Revert "Merge branch 'op_vs_opc' into next"

This reverts commit be2276b8da, reversing
changes made to 4d3fd342f7.
master
Pedro Alvarez 7 years ago
parent 8d07709069
commit fd97caadb3

@ -37,7 +37,7 @@
#include "srslte/common/liblte_security.h"
#include "srslte/common/liblte_ssl.h"
#include "math.h"
#include <stdio.h>
/*******************************************************************************
DEFINES
*******************************************************************************/
@ -1124,15 +1124,7 @@ LIBLTE_ERROR_ENUM liblte_security_milenage_f1(uint8 *k,
rijndael_key_schedule(k, &round_keys);
// Compute OPc
printf("OPc 0x: ");
for(i=0;i<16;i++)
{
op_c[i] = op[i];
printf("%02x", op_c[i]);
}
printf("\n");
//compute_OPc(&round_keys, op, op_c);
compute_OPc(&round_keys, op, op_c);
// Compute temp
for(i=0; i<16; i++)
@ -1215,16 +1207,8 @@ LIBLTE_ERROR_ENUM liblte_security_milenage_f1_star(uint8 *k,
// Initialize the round keys
rijndael_key_schedule(k, &round_keys);
printf("OPc 0x: ");
for(i=0;i<16;i++)
{
op_c[i] = op[i];
printf("%02x", op_c[i]);
}
printf("\n");
// Compute OPc
//compute_OPc(&round_keys, op, op_c);
compute_OPc(&round_keys, op, op_c);
// Compute temp
for(i=0; i<16; i++)
@ -1309,14 +1293,8 @@ LIBLTE_ERROR_ENUM liblte_security_milenage_f2345(uint8 *k,
rijndael_key_schedule(k, &round_keys);
// Compute OPc
//compute_OPc(&round_keys, op, op_c);
printf("OPc 0x: ");
for(i=0;i<16;i++)
{
op_c[i] = op[i];
printf("%02x", op_c[i]);
}
printf("\n");
compute_OPc(&round_keys, op, op_c);
// Compute temp
for(i=0; i<16; i++)
{
@ -1420,14 +1398,7 @@ LIBLTE_ERROR_ENUM liblte_security_milenage_f5_star(uint8 *k,
rijndael_key_schedule(k, &round_keys);
// Compute OPc
//compute_OPc(&round_keys, op, op_c);
printf("OPc 0x: ");
for(i=0;i<16;i++)
{
op_c[i] = op[i];
printf("%02x", op_c[i]);
}
printf("\n");
compute_OPc(&round_keys, op, op_c);
// Compute temp
for(i=0; i<16; i++)

@ -660,6 +660,7 @@ hss::get_uint_vec_from_hex_str(const std::string &key_str, uint8_t *key, uint le
return;
}
std::string
hss::hex_string(uint8_t *hex, int size)
{
@ -671,4 +672,15 @@ hss::hex_string(uint8_t *hex, int size)
}
return ss.str();
}
/*
uint64_t
string_to_imsi()
{
uint64_t imsi = 0;
for(int i=0;i<=14;i++){
imsi += attach_req.eps_mobile_id.imsi[i]*std::pow(10,14-i);
}
return imsi;
}
*/
} //namespace srsepc

Loading…
Cancel
Save