From de6d1e35b6e6cc98cc015edaaa05c8aa8857ccb4 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 1 May 2018 16:20:13 +0100 Subject: [PATCH] Hardcoded OPc instead of OP. Authentication with symocom's SIMs is Ok now. Needs to be made configurable. --- lib/src/common/liblte_security.cc | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/src/common/liblte_security.cc b/lib/src/common/liblte_security.cc index f14bc1e60..020f019c9 100644 --- a/lib/src/common/liblte_security.cc +++ b/lib/src/common/liblte_security.cc @@ -1124,7 +1124,15 @@ LIBLTE_ERROR_ENUM liblte_security_milenage_f1(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++) @@ -1207,8 +1215,16 @@ 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++) @@ -1404,8 +1420,15 @@ 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); - + //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 temp for(i=0; i<16; i++) {