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.
51 lines
982 B
C
51 lines
982 B
C
4 years ago
|
/**
|
||
|
*
|
||
|
* \section COPYRIGHT
|
||
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
4 years ago
|
*
|
||
|
* By using this file, you agree to the terms and conditions set
|
||
|
* forth in the LICENSE file which can be found at the top level of
|
||
|
* the distribution.
|
||
|
*
|
||
|
*/
|
||
5 years ago
|
|
||
4 years ago
|
#ifndef SRSRAN_ZUC_H
|
||
|
#define SRSRAN_ZUC_H
|
||
6 years ago
|
|
||
|
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;
|
||
|
|
||
5 years ago
|
void zuc_initialize(zuc_state_t* state, const u8* k, u8* iv);
|
||
5 years ago
|
void zuc_generate_keystream(zuc_state_t* state, int key_stream_len, u32* p_keystream);
|
||
6 years ago
|
|
||
4 years ago
|
#endif // SRSRAN_ZUC_H
|