Use define for key buffers
Add corresponding spec. references and comments where appropriate.
Change-Id: If5e2aad86eaecd8eada667b3488ba415d81c6312
diff --git a/tests/auth/milenage_test.c b/tests/auth/milenage_test.c
index 2bd3cf2..8b058e5 100644
--- a/tests/auth/milenage_test.c
+++ b/tests/auth/milenage_test.c
@@ -23,7 +23,10 @@
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));
}
}