feat: add conf2uedata tool for generating .*.nvram
This patch adds the conf2uedata tool for generating .ue.nvram* .ue.emm.nvram* and .usim.nvram* files from a textual configuration file. The configuration file define most usefull values like plmns, mnc, mcc, msin, K, OPc for several users. The files generated will always ends with a number corresponding to the user entry in the configuration file. This breaks oai5g because other script have not be updated for using conf2uedata. This breaks also the at_nas_ue command. Examples of configuration files are in openair3/NAS/TOOLS/
This commit is contained in:
committed by
Frédéric Leroy
parent
c4707bd8b7
commit
17d155325a
@@ -49,16 +49,14 @@
|
||||
*
|
||||
*-----------------------------------------------------------------*/
|
||||
void f1 ( u8 k_pP[16], u8 rand_pP[16], u8 sqn_pP[6], u8 amf_pP[2],
|
||||
u8 mac_a_pP[8], const u8 op[16])
|
||||
u8 mac_a_pP[8], const u8 op_c[16])
|
||||
{
|
||||
u8 op_c[16];
|
||||
u8 temp[16];
|
||||
u8 in1[16];
|
||||
u8 out1[16];
|
||||
u8 rijndaelInput[16];
|
||||
u8 i;
|
||||
RijndaelKeySchedule( k_pP );
|
||||
ComputeOPc(op, op_c);
|
||||
|
||||
for (i=0; i<16; i++)
|
||||
rijndaelInput[i] = rand_pP[i] ^ op_c[i];
|
||||
@@ -104,9 +102,8 @@ void f1 ( u8 k_pP[16], u8 rand_pP[16], u8 sqn_pP[6], u8 amf_pP[2],
|
||||
*
|
||||
*-----------------------------------------------------------------*/
|
||||
void f2345 ( u8 k_pP[16], u8 rand_pP[16],
|
||||
u8 res_pP[8], u8 ck_pP[16], u8 ik_pP[16], u8 ak_pP[6],const u8 op[16])
|
||||
u8 res_pP[8], u8 ck_pP[16], u8 ik_pP[16], u8 ak_pP[6],const u8 op_c[16])
|
||||
{
|
||||
u8 op_c[16];
|
||||
u8 temp[16];
|
||||
u8 out[16];
|
||||
u8 rijndaelInput[16];
|
||||
@@ -122,7 +119,6 @@ void f2345 ( u8 k_pP[16], u8 rand_pP[16],
|
||||
rand_pP[8],rand_pP[9],rand_pP[10],rand_pP[11],rand_pP[12],rand_pP[13],rand_pP[14],rand_pP[15]);
|
||||
|
||||
RijndaelKeySchedule( k_pP );
|
||||
ComputeOPc(op, op_c);
|
||||
|
||||
for (i=0; i<16; i++)
|
||||
rijndaelInput[i] = rand_pP[i] ^ op_c[i];
|
||||
@@ -205,16 +201,14 @@ void f2345 ( u8 k_pP[16], u8 rand_pP[16],
|
||||
*
|
||||
*-----------------------------------------------------------------*/
|
||||
void f1star( u8 k_pP[16], u8 rand_pP[16], u8 sqn_pP[6], u8 amf_pP[2],
|
||||
u8 mac_s_pP[8],const u8 op[16])
|
||||
u8 mac_s_pP[8],const u8 op_c[16])
|
||||
{
|
||||
u8 op_c[16];
|
||||
u8 temp[16];
|
||||
u8 in1[16];
|
||||
u8 out1[16];
|
||||
u8 rijndaelInput[16];
|
||||
u8 i;
|
||||
RijndaelKeySchedule( k_pP );
|
||||
ComputeOPc(op, op_c);
|
||||
|
||||
for (i=0; i<16; i++)
|
||||
rijndaelInput[i] = rand_pP[i] ^ op_c[i];
|
||||
@@ -260,15 +254,13 @@ void f1star( u8 k_pP[16], u8 rand_pP[16], u8 sqn_pP[6], u8 amf_pP[2],
|
||||
*
|
||||
*-----------------------------------------------------------------*/
|
||||
void f5star( u8 k_pP[16], u8 rand_pP[16],
|
||||
u8 ak_pP[6], const u8 op[16])
|
||||
u8 ak_pP[6], const u8 op_c[16])
|
||||
{
|
||||
u8 op_c[16];
|
||||
u8 temp[16];
|
||||
u8 out[16];
|
||||
u8 rijndaelInput[16];
|
||||
u8 i;
|
||||
RijndaelKeySchedule( k_pP );
|
||||
ComputeOPc(op, op_c);
|
||||
|
||||
for (i=0; i<16; i++)
|
||||
rijndaelInput[i] = rand_pP[i] ^ op_c[i];
|
||||
|
||||
Reference in New Issue
Block a user