summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/auc.c9
-rw-r--r--src/db_auc.c1
-rw-r--r--tests/auc/auc_test.err22
-rw-r--r--tests/auc/auc_ts_55_205_test_sets.err38
4 files changed, 33 insertions, 37 deletions
diff --git a/src/auc.c b/src/auc.c
index 9c20db2..d3b3d36 100644
--- a/src/auc.c
+++ b/src/auc.c
@@ -123,14 +123,7 @@ int auc_compute_vectors(struct osmo_auth_vector *vec, unsigned int num_vec,
rc = osmo_auth_gen_vec_auts(vec+i, aud3g, auts,
rand_auts, rand);
- /* The sqn used for the key is sqn - 1 because
- * vector generation has already inc'd it. The
- * USIM's sqn sent in AUTS is sqn - 2. */
- DBGP("vector [%u]: resync: sqn = %"PRIu64 "\n",
- i, aud3g->u.umts.sqn - 1);
} else {
- DBGP("vector [%u]: sqn = %" PRIu64 "\n",
- i, aud3g->u.umts.sqn);
rc = osmo_auth_gen_vec(vec+i, aud3g, rand);
}
if (rc < 0) {
@@ -138,6 +131,8 @@ int auc_compute_vectors(struct osmo_auth_vector *vec, unsigned int num_vec,
"generation: [%u]: rc = %d\n", i, rc);
goto out;
}
+ DBGP("vector [%u]: sqn = %" PRIu64 "\n",
+ i, aud3g->u.umts.sqn);
DBGVB(autn);
DBGVB(ck);
diff --git a/src/db_auc.c b/src/db_auc.c
index a24f27e..ac81404 100644
--- a/src/db_auc.c
+++ b/src/db_auc.c
@@ -18,6 +18,7 @@
*/
#include <string.h>
+#include <inttypes.h>
#include <osmocom/core/utils.h>
#include <osmocom/crypt/auth.h>
diff --git a/tests/auc/auc_test.err b/tests/auc/auc_test.err
index bfc046f..8748ece 100644
--- a/tests/auc/auc_test.err
+++ b/tests/auc/auc_test.err
@@ -28,7 +28,7 @@ DAUC 3G: k = eb215756028d60e3275e613320aec880
DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308
DAUC 2G: ki = eb215756028d60e3275e613320aec880
DAUC vector [0]: rand = 39fa2f4e3d523d8619a73b4f65c3e14d
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 8704f5ba55d30000541dde77ea5b1d8c
DAUC vector [0]: ck = f64735036e5871319c679f4742a75ea1
DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef
@@ -47,7 +47,7 @@ DAUC 3G: k = eb215756028d60e3275e613320aec880
DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308
DAUC 2G: ki = eb215756028d60e3275e613320aec880
DAUC vector [0]: rand = 39fa2f4e3d523d8619a73b4f65c3e14d
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 8704f5ba55d30000541dde77ea5b1d8c
DAUC vector [0]: ck = f64735036e5871319c679f4742a75ea1
DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef
@@ -69,7 +69,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = eb215756028d60e3275e613320aec880
DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308
DAUC vector [0]: rand = 39fa2f4e3d523d8619a73b4f65c3e14d
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 8704f5ba55d30000541dde77ea5b1d8c
DAUC vector [0]: ck = f64735036e5871319c679f4742a75ea1
DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef
@@ -86,7 +86,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = eb215756028d60e3275e613320aec880
DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308
DAUC vector [0]: rand = 39fa2f4e3d523d8619a73b4f65c3e14d
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 8704f5ba55d30000541dde77ea5b1d8c
DAUC vector [0]: ck = f64735036e5871319c679f4742a75ea1
DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef
@@ -106,7 +106,7 @@ DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308
DAUC vector [0]: rand = 897210a0f7de278f0b8213098e098a3f
DAUC vector [0]: resync: auts = 979498b1f72d3e28c59fa2e72f9c
DAUC vector [0]: resync: rand_auts = 39fa2f4e3d523d8619a73b4f65c3e14d
-DAUC vector [0]: resync: sqn = 23
+DAUC vector [0]: sqn = 24
DAUC vector [0]: autn = c6b9790dad4b00000cf322869ea6a481
DAUC vector [0]: ck = e9922bd036718ed9e40bd1d02c3b81a5
DAUC vector [0]: ik = f19c20ca863137f8892326d959ec5e01
@@ -125,7 +125,7 @@ DAUC Computing 3 auth vectors: 3G only (2G derived from 3G keys)
DAUC 3G: k = eb215756028d60e3275e613320aec880
DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308
DAUC vector [0]: rand = 897210a0f7de278f0b8213098e098a3f
-DAUC vector [0]: sqn = 23
+DAUC vector [0]: sqn = 24
DAUC vector [0]: autn = c6b9790dad4b00000cf322869ea6a481
DAUC vector [0]: ck = e9922bd036718ed9e40bd1d02c3b81a5
DAUC vector [0]: ik = f19c20ca863137f8892326d959ec5e01
@@ -135,7 +135,7 @@ DAUC vector [0]: kc = 7526fc13c5976685
DAUC vector [0]: sres = 0ad888ef
DAUC vector [0]: auth_types = 0x3
DAUC vector [1]: rand = 9a8321b108ef38a01c93241a9f1a9b50
-DAUC vector [1]: sqn = 24
+DAUC vector [1]: sqn = 25
DAUC vector [1]: autn = 79a5113eb0910000be6020540503ffc5
DAUC vector [1]: ck = 3686f05df057d1899c66ae4eb18cf941
DAUC vector [1]: ik = 79f21ed53bcb47787de57d136ff803a5
@@ -145,7 +145,7 @@ DAUC vector [1]: kc = aef73dd515e86c15
DAUC vector [1]: sres = 882b1d59
DAUC vector [1]: auth_types = 0x3
DAUC vector [2]: rand = ab9432c2190049b12da4352bb02bac61
-DAUC vector [2]: sqn = 25
+DAUC vector [2]: sqn = 26
DAUC vector [2]: autn = 24b018d46c3b00009c7e1b47f3a19b2b
DAUC vector [2]: ck = d86c3191a36fc0602e48202ef2080964
DAUC vector [2]: ik = 648dab72016181406243420649e63dc9
@@ -166,7 +166,7 @@ DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308
DAUC vector [0]: rand = 897210a0f7de278f0b8213098e098a3f
DAUC vector [0]: resync: auts = 979498b1f72d3e28c59fa2e72f9c
DAUC vector [0]: resync: rand_auts = 39fa2f4e3d523d8619a73b4f65c3e14d
-DAUC vector [0]: resync: sqn = 23
+DAUC vector [0]: sqn = 24
DAUC vector [0]: autn = c6b9790dad4b00000cf322869ea6a481
DAUC vector [0]: ck = e9922bd036718ed9e40bd1d02c3b81a5
DAUC vector [0]: ik = f19c20ca863137f8892326d959ec5e01
@@ -176,7 +176,7 @@ DAUC vector [0]: kc = 7526fc13c5976685
DAUC vector [0]: sres = 0ad888ef
DAUC vector [0]: auth_types = 0x3
DAUC vector [1]: rand = 9a8321b108ef38a01c93241a9f1a9b50
-DAUC vector [1]: sqn = 24
+DAUC vector [1]: sqn = 25
DAUC vector [1]: autn = 79a5113eb0910000be6020540503ffc5
DAUC vector [1]: ck = 3686f05df057d1899c66ae4eb18cf941
DAUC vector [1]: ik = 79f21ed53bcb47787de57d136ff803a5
@@ -186,7 +186,7 @@ DAUC vector [1]: kc = aef73dd515e86c15
DAUC vector [1]: sres = 882b1d59
DAUC vector [1]: auth_types = 0x3
DAUC vector [2]: rand = ab9432c2190049b12da4352bb02bac61
-DAUC vector [2]: sqn = 25
+DAUC vector [2]: sqn = 26
DAUC vector [2]: autn = 24b018d46c3b00009c7e1b47f3a19b2b
DAUC vector [2]: ck = d86c3191a36fc0602e48202ef2080964
DAUC vector [2]: ik = 648dab72016181406243420649e63dc9
diff --git a/tests/auc/auc_ts_55_205_test_sets.err b/tests/auc/auc_ts_55_205_test_sets.err
index 59ba22d..3037d2f 100644
--- a/tests/auc/auc_ts_55_205_test_sets.err
+++ b/tests/auc/auc_ts_55_205_test_sets.err
@@ -5,7 +5,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 465b5ce8b199b49faa5f0a2ee238a6bc
DAUC 3G: opc = cd63cb71954a9f4e48a5994e37a02baf
DAUC vector [0]: rand = 23553cbe9637a89d218ae64dae47bf35
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = aa689c64835000002bb2bf2f1faba139
DAUC vector [0]: ck = b40ba9a3c58b2a05bbf0d987b21bf8cb
DAUC vector [0]: ik = f769bcd751044604127672711c6d3441
@@ -26,7 +26,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = fec86ba6eb707ed08905757b1bb44b8f
DAUC 3G: opc = 1006020f0a478bf6b699f15c062e42b3
DAUC vector [0]: rand = 9f7c8d021accf4db213ccff0c7f71a6a
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 33484dc2134b000091ec125f4840ed64
DAUC vector [0]: ck = 5dbdbb2954e8f3cde665b046179a5098
DAUC vector [0]: ik = 59a92d3b476a0443487055cf88b2307b
@@ -47,7 +47,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 9e5944aea94b81165c82fbf9f32db751
DAUC 3G: opc = a64a507ae1a2a98bb88eb4210135dc87
DAUC vector [0]: rand = ce83dbc54ac0274a157c17f80d017bd6
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = f0b9c08ad00e00005da4ccbbdfa29310
DAUC vector [0]: ck = e203edb3971574f5a94b0d61b816345d
DAUC vector [0]: ik = 0c4524adeac041c4dd830d20854fc46b
@@ -68,7 +68,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 4ab1deb05ca6ceb051fc98e77d026a84
DAUC 3G: opc = dcf07cbd51855290b92a07a9891e523e
DAUC vector [0]: rand = 74b0cd6031a1c8339b2b6ce2b8c4a186
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 31e11a60913800006a7003718d5d82e5
DAUC vector [0]: ck = 7657766b373d1c2138f307e3de9242f9
DAUC vector [0]: ik = 1c42e960d89b8fa99f2744e0708ccb53
@@ -89,7 +89,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 6c38a116ac280c454f59332ee35c8c4f
DAUC 3G: opc = 3803ef5363b947c6aaa225e58fae3934
DAUC vector [0]: rand = ee6466bc96202c5a557abbeff8babf63
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 45b0f69ab04c000053f2a822f2b3e824
DAUC vector [0]: ck = 3f8c7587fe8e4b233af676aede30ba3b
DAUC vector [0]: ik = a7466cc1e6b2a1337d49d3b66e95d7b4
@@ -110,7 +110,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 2d609d4db0ac5bf0d2c0de267014de0d
DAUC 3G: opc = c35a0ab0bcbfc9252caff15f24efbde0
DAUC vector [0]: rand = 194aa756013896b74b4a2a3b0af4539e
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 7e6455f34cd300004a2a9f2f3a529b8c
DAUC vector [0]: ck = 4cd0846020f8fa0731dd47cbdc6be411
DAUC vector [0]: ik = 88ab80a415f15c73711254a1d388f696
@@ -131,7 +131,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = a530a7fe428fad1082c45eddfce13884
DAUC 3G: opc = 27953e49bc8af6dcc6e730eb80286be3
DAUC vector [0]: rand = 3a4c2b3245c50eb5c71d08639395764d
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 88196c47984f00000a50c5f4056ccb68
DAUC vector [0]: ck = 10f05bab75a99a5fbb98a9c287679c3b
DAUC vector [0]: ik = f9ec0865eb32f22369cade40c59c3a44
@@ -152,7 +152,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = d9151cf04896e25830bf2e08267b8360
DAUC 3G: opc = c4c93effe8a08138c203d4c27ce4e3d9
DAUC vector [0]: rand = f761e5e93d603feb730e27556cb8a2ca
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 82a0f5287a5100006d6c0ff132426479
DAUC vector [0]: ck = 71236b7129f9b22ab77ea7a54c96da22
DAUC vector [0]: ik = 90527ebaa5588968db41727325a04d9e
@@ -173,7 +173,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = a0e2971b6822e8d354a18cc235624ecb
DAUC 3G: opc = 82a26f22bba9e9488f949a10d98e9cc4
DAUC vector [0]: rand = 08eff828b13fdb562722c65c7f30a9b2
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = a2f858aa9e7d00001c14f5fcd445bc46
DAUC vector [0]: ck = 08cef6d004ec61471a3c3cda048137fa
DAUC vector [0]: ik = ed0318ca5deb9206272f6e8fa64ba411
@@ -194,7 +194,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 0da6f7ba86d5eac8a19cf563ac58642d
DAUC 3G: opc = 0db1071f8767562ca43a0a64c41e8d08
DAUC vector [0]: rand = 679ac4dbacd7d233ff9d6806f4149ce3
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 4c539a26e1da000071cc0b769fd1aa96
DAUC vector [0]: ck = 69b1cae7c7429d975e245cacb05a517c
DAUC vector [0]: ik = 74f24e8c26df58e1b38d7dcd4f1b7fbd
@@ -215,7 +215,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 77b45843c88e58c10d202684515ed430
DAUC 3G: opc = d483afae562409a326b5bb0b20c4d762
DAUC vector [0]: rand = 4c47eb3076dc55fe5106cb2034b8cd78
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 30ff25cdadd60000e08a00f7ed54d6fe
DAUC vector [0]: ck = 908c43f0569cb8f74bc971e706c36c5f
DAUC vector [0]: ik = c251df0d888dd9329bcf46655b226e40
@@ -236,7 +236,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 729b17729270dd87ccdf1bfe29b4e9bb
DAUC 3G: opc = 228c2f2f06ac3268a9e616ee16db4ba1
DAUC vector [0]: rand = 311c4c929744d675b720f3b7e9b1cbd0
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 5380d158cfc30000f4e1436e9f67e4b2
DAUC vector [0]: ck = 44c0f23c5493cfd241e48f197e1d1012
DAUC vector [0]: ik = 0c9fb81613884c2535dd0eabf3b440d8
@@ -257,7 +257,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = d32dd23e89dc662354ca12eb79dd32fa
DAUC 3G: opc = d22a4b4180a5325708a5ff70d9f67ec7
DAUC vector [0]: rand = cf7d0ab1d94306950bf12018fbd46887
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 217af492728d00003bd338249751de80
DAUC vector [0]: ck = 5af86b80edb70df5292cc1121cbad50c
DAUC vector [0]: ik = 7f4d6ae7440e18789a8b75ad3f42f03a
@@ -278,7 +278,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = af7c65e1927221de591187a2c5987a53
DAUC 3G: opc = a4cf5c8155c08a7eff418e5443b98e55
DAUC vector [0]: rand = 1f0f8578464fd59b64bed2d09436b57a
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 837fd7b744390000557a836fd534e542
DAUC vector [0]: ck = 3f8c3f3ccf7625bf77fc94bcfd22fd26
DAUC vector [0]: ik = abcbae8fd46115e9961a55d0da5f2078
@@ -299,7 +299,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 5bd7ecd3d3127a41d12539bed4e7cf71
DAUC 3G: opc = 76089d3c0ff3efdc6e36721d4fceb747
DAUC vector [0]: rand = 59b75f14251c75031d0bcbac1c2c04c7
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 5be11495527d0000298064f82a439924
DAUC vector [0]: ck = d42b2d615e49a03ac275a5aef97af892
DAUC vector [0]: ik = 0b3f8d024fe6bfafaa982b8f82e319c2
@@ -320,7 +320,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 6cd1c6ceb1e01e14f1b82316a90b7f3d
DAUC 3G: opc = a219dc37f1dc7d66738b5843c799f206
DAUC vector [0]: rand = f69b78f300a0568bce9f0cb93c4be4c9
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 1c408a858b1e0000e6e96310f83b5689
DAUC vector [0]: ck = 6edaf99e5bd9f85d5f36d91c1272fb4b
DAUC vector [0]: ik = d61c853c280dd9c46f297baec386de17
@@ -341,7 +341,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = b73a90cbcf3afb622dba83c58a8415df
DAUC 3G: opc = df0c67868fa25f748b7044c6e7c245b8
DAUC vector [0]: rand = b120f1c1a0102a2f507dd543de68281f
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = aefdaa5dddb90000c4741d698b7a7ed3
DAUC vector [0]: ck = 66195dbed0313274c5ca7766615fa25e
DAUC vector [0]: ik = 66bec707eb2afc476d7408a8f2927b36
@@ -362,7 +362,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 5122250214c33e723a5dd523fc145fc0
DAUC 3G: opc = 981d464c7c52eb6e5036234984ad0bcf
DAUC vector [0]: rand = 81e92b6c0ee0e12ebceba8d92a99dfa5
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = ada15aeb7b980000a99729b59d5688b2
DAUC vector [0]: ck = 5349fbe098649f948f5d2e973a81c00f
DAUC vector [0]: ik = 9744871ad32bf9bbd1dd5ce54e3e2e5a
@@ -383,7 +383,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys)
DAUC 3G: k = 90dca4eda45b53cf0f12d7c9c3bc6a89
DAUC 3G: opc = cb9cccc4b9258e6dca4760379fb82581
DAUC vector [0]: rand = 9fddc72092c6ad036b6e464789315b78
-DAUC vector [0]: sqn = 31
+DAUC vector [0]: sqn = 32
DAUC vector [0]: autn = 83cfd54db9330000695685b2b9214472
DAUC vector [0]: ck = b5f2da03883b69f96bf52e029ed9ac45
DAUC vector [0]: ik = b4721368bc16ea67875c5598688bb0ef