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 --- tests/auth/milenage_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/auth') diff --git a/tests/auth/milenage_test.c b/tests/auth/milenage_test.c index 2bd3cf20..8b058e56 100644 --- a/tests/auth/milenage_test.c +++ b/tests/auth/milenage_test.c @@ -23,7 +23,10 @@ static void dump_auth_vec(struct osmo_auth_vector *vec) if (vec->auth_types & OSMO_AUTH_TYPE_GSM) { printf("SRES:\t%s\n", osmo_hexdump(vec->sres, sizeof(vec->sres))); - printf("Kc:\t%s\n", osmo_hexdump(vec->kc, sizeof(vec->kc))); + /* According to 3GPP TS 55.205 Sec. 4 the GSM-MILENAGE output is limited to 64 bits. + According to 3GPP TS 33.102 Annex. B5 in UMTS security context Kc can be 128 bits. + Here we test the former, so make sure we only print interesting Kc bits. */ + printf("Kc:\t%s\n", osmo_hexdump(vec->kc, OSMO_A5_MAX_KEY_LEN_BYTES/2)); } } -- cgit v1.2.3