Commit c3ab6a9f authored by Lionel Gauthier's avatar Lionel Gauthier

key OP !, traces

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5479 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 7d10c48d
...@@ -24,7 +24,10 @@ ...@@ -24,7 +24,10 @@
/*--------- Operator Variant Algorithm Configuration Field --------*/ /*--------- Operator Variant Algorithm Configuration Field --------*/
/*------- Insert your value of OP here -------*/ /*------- Insert your value of OP here -------*/
u8 OP[16]; u8 OP[16]= {
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
};
/*--------------------------- prototypes --------------------------*/ /*--------------------------- prototypes --------------------------*/
void ComputeOPc( u8 op_c[16] ); void ComputeOPc( u8 op_c[16] );
...@@ -237,11 +240,15 @@ void f5star( u8 k[16], u8 _rand[16], ...@@ -237,11 +240,15 @@ void f5star( u8 k[16], u8 _rand[16],
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
* Function to compute OPc from OP and K. Assumes key schedule has * Function to compute OPc from OP and K. Assumes key schedule has
a lready been performed. * * already been performed.
*-----------------------------------------------------------------*/ *-----------------------------------------------------------------*/
void ComputeOPc( u8 op_c[16] ) void ComputeOPc( u8 op_c[16] )
{ {
u8 i; u8 i;
printf("ComputeOPc: OP : %02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X ",
OP[0],OP[1],OP[2],OP[3],OP[4],OP[5],OP[6],OP[7],
OP[8],OP[9],OP[10],OP[11],OP[12],OP[13],OP[14],OP[15]);
RijndaelEncrypt( OP, op_c ); RijndaelEncrypt( OP, op_c );
for (i=0; i<16; i++) for (i=0; i<16; i++)
op_c[i] ^= OP[i]; op_c[i] ^= OP[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment