From 1766e11076a52c8c6c45ce4c9c3950e81e7f9883 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 15 Jun 2018 13:28:23 +0100 Subject: [PATCH] Starting to add OP/OPc support. --- lib/include/srslte/common/security.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/include/srslte/common/security.h b/lib/include/srslte/common/security.h index 5dc8a6305..4881abd96 100644 --- a/lib/include/srslte/common/security.h +++ b/lib/include/srslte/common/security.h @@ -58,7 +58,11 @@ typedef enum{ static const char integrity_algorithm_id_text[INTEGRITY_ALGORITHM_ID_N_ITEMS][20] = {"EIA0", "128-EIA1", "128-EIA2"}; - +typedef enum +{ + AUTH_OP, + AUTH_OPC +} AUTH_OPERATOR_CODE_TYPE; /****************************************************************************** * Key Generation @@ -153,6 +157,7 @@ uint8_t security_128_eea2(uint8_t *key, *****************************************************************************/ uint8_t security_milenage_f1( uint8_t *k, + AUTH_OPERATOR_CODE_TYPE opc_t, uint8_t *op, uint8_t *rand, uint8_t *sqn, @@ -160,6 +165,7 @@ uint8_t security_milenage_f1( uint8_t *k, uint8_t *mac_a); uint8_t security_milenage_f1_star( uint8_t *k, + AUTH_OPERATOR_CODE_TYPE opc_t, uint8_t *op, uint8_t *rand, uint8_t *sqn, @@ -167,6 +173,7 @@ uint8_t security_milenage_f1_star( uint8_t *k, uint8_t *mac_s); uint8_t security_milenage_f2345( uint8_t *k, + AUTH_OPERATOR_CODE_TYPE opc_t, uint8_t *op, uint8_t *rand, uint8_t *res, @@ -175,11 +182,11 @@ uint8_t security_milenage_f2345( uint8_t *k, uint8_t *ak); uint8_t security_milenage_f5_star( uint8_t *k, + AUTH_OPERATOR_CODE_TYPE opc_t, uint8_t *op, uint8_t *rand, uint8_t *ak); - } // namespace srslte #endif // SRSLTE_SECURITY_H