mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
737 B
C
39 lines
737 B
C
#ifndef SRSLTE_ZUC_H
|
|
#define SRSLTE_ZUC_H
|
|
|
|
typedef unsigned char u8;
|
|
typedef unsigned int u32;
|
|
|
|
/* the state registers of LFSR */
|
|
typedef struct {
|
|
u32 LFSR_S0;
|
|
u32 LFSR_S1;
|
|
u32 LFSR_S2;
|
|
u32 LFSR_S3;
|
|
u32 LFSR_S4;
|
|
u32 LFSR_S5;
|
|
u32 LFSR_S6;
|
|
u32 LFSR_S7;
|
|
u32 LFSR_S8;
|
|
u32 LFSR_S9;
|
|
u32 LFSR_S10;
|
|
u32 LFSR_S11;
|
|
u32 LFSR_S12;
|
|
u32 LFSR_S13;
|
|
u32 LFSR_S14;
|
|
u32 LFSR_S15;
|
|
/* the registers of F */
|
|
u32 F_R1;
|
|
u32 F_R2;
|
|
/* the outputs of BitReorganization */
|
|
u32 BRC_X0;
|
|
u32 BRC_X1;
|
|
u32 BRC_X2;
|
|
u32 BRC_X3;
|
|
} zuc_state_t;
|
|
|
|
void zuc_initialize(u8* k, u8* iv);
|
|
void zuc_generate_keystream(int KeystreamLen, u32* pKeystream);
|
|
// void zu_deinitialze(zuc_state_t* zuc_state);
|
|
|
|
#endif // SRSLTE_ZUC_H
|