From af25c37f903be0f30a0a6a4663a2892a84c79740 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 19 Dec 2018 20:12:19 +0100 Subject: Use define for key buffers Add corresponding spec. references and comments where appropriate. Change-Id: If5e2aad86eaecd8eada667b3488ba415d81c6312 --- include/osmocom/crypt/auth.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/osmocom') diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index e544126b..c653b616 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -42,7 +42,7 @@ struct osmo_sub_auth_data { union { struct { uint8_t opc[16]; /*!< operator invariant value */ - uint8_t k[16]; /*!< secret key of the subscriber */ + uint8_t k[OSMO_A5_MAX_KEY_LEN_BYTES]; /*!< secret key of the subscriber */ uint8_t amf[2]; uint64_t sqn; /*!< sequence number (in: prev sqn; out: used sqn) */ int opc_is_op; /*!< is the OPC field OPC (0) or OP (1) ? */ @@ -60,8 +60,8 @@ struct osmo_sub_auth_data { struct osmo_auth_vector { uint8_t rand[16]; /*!< random challenge */ uint8_t autn[16]; /*!< authentication nonce */ - uint8_t ck[16]; /*!< ciphering key */ - uint8_t ik[16]; /*!< integrity key */ + uint8_t ck[OSMO_A5_MAX_KEY_LEN_BYTES]; /*!< ciphering key */ + uint8_t ik[OSMO_A5_MAX_KEY_LEN_BYTES]; /*!< integrity key */ uint8_t res[16]; /*!< authentication result */ uint8_t res_len; /*!< length (in bytes) of res */ uint8_t kc[8]; /*!< Kc for GSM encryption (A5) */ -- cgit v1.2.3