summaryrefslogtreecommitdiffstats
path: root/tests/auth
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2018-12-19 20:12:19 +0100
committerMax <msuraev@sysmocom.de>2018-12-20 09:51:02 +0000
commitaf25c37f903be0f30a0a6a4663a2892a84c79740 (patch)
treee0ce918cc2a5cbc832edb7e829df398cdc58941f /tests/auth
parent6cb833608fa39943c1ce9fe046992922e09f4266 (diff)
Use define for key buffers
Add corresponding spec. references and comments where appropriate. Change-Id: If5e2aad86eaecd8eada667b3488ba415d81c6312
Diffstat (limited to 'tests/auth')
-rw-r--r--tests/auth/milenage_test.c5
1 files changed, 4 insertions, 1 deletions
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));
}
}