auc tests: adjust cosmetically to prepare for SQN changes

The current auc tests test a lot with SQN == 0. An upcoming change in the SQN
algorithms from libosmocore [1] will require us to pass desired_sqn - 1,
because the tuple generation will increment the SQN before calculating.  Later
on [2] we will also want to employ ind_bits and ind in the test. In order to
have some room in the number range, cosmetically adjust the current SQN tested
for from 0 to 32, changing the generated AUTN. The upcoming adjustment to the
new situation will then be able to show that only the SQN values before and
after vector generation change while the auth tuples as well as the SQNs used
for generation remain the same (without having to trick around with wrapping
SQN past its maximum value).

Note that the TS 55.205 test sets include neither SQN nor AUTN. While AUTN
changes with changing SQN, all the other values are invariant of the SQN used.
So we can simply choose a different SQN and ignore the difference in the AUTN.

[1] change-id Iadf43f21e0605e9e85f7e8026c40985f7ceff1a3 "store last sqn"
[2] change-id Ibc97e1736a797ffcbf8c1f7d41c5c4518f4e41bf "fix SQN increment"

Related: OS#1969
Change-Id: I45d1866cde1b3e777460df76100af2fe4767c678
diff --git a/tests/auc/auc_test.c b/tests/auc/auc_test.c
index 16c87f7..e507c29 100644
--- a/tests/auc/auc_test.c
+++ b/tests/auc/auc_test.c
@@ -194,6 +194,7 @@
 	aud3g = (struct osmo_sub_auth_data){
 		.type = OSMO_AUTH_TYPE_UMTS,
 		.algo = OSMO_AUTH_ALG_MILENAGE,
+		.u.umts.sqn = 32,
 	};
 
 	osmo_hexparse("EB215756028D60E3275E613320AEC880",
@@ -203,13 +204,14 @@
 	next_rand("39fa2f4e3d523d8619a73b4f65c3e14d", true);
 
 	vec = (struct osmo_auth_vector){ {0} };
-	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 0, "%"PRIu64);
+	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 32, "%"PRIu64);
 	rc = auc_compute_vectors(&vec, 1, &aud2g, &aud3g, NULL, NULL);
 	VERBOSE_ASSERT(rc, == 1, "%d");
+	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 33, "%"PRIu64);
 
 	VEC_IS(&vec,
 	       "  rand: 39fa2f4e3d523d8619a73b4f65c3e14d\n"
-	       "  autn: 8704f5ba55f30000d2ee44b22c8ea919\n"
+	       "  autn: 8704f5ba55d30000541dde77ea5b1d8c\n"
 	       "  ck: f64735036e5871319c679f4742a75ea1\n"
 	       "  ik: 27497388b6cb044648f396aa155b95ef\n"
 	       "  res: e229c19e791f2e410000000000000000\n"
@@ -219,19 +221,17 @@
 	       "  auth_types: 03000000\n"
 	      );
 
-	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 1, "%"PRIu64);
-
 	/* even though vec is not zero-initialized, it should produce the same
 	 * result with the same sequence nr */
-	aud3g.u.umts.sqn = 0;
-	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 0, "%"PRIu64);
+	aud3g.u.umts.sqn = 32;
+	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 32, "%"PRIu64);
 	rc = auc_compute_vectors(&vec, 1, &aud2g, &aud3g, NULL, NULL);
 	VERBOSE_ASSERT(rc, == 1, "%d");
-	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 1, "%"PRIu64);
+	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 33, "%"PRIu64);
 
 	VEC_IS(&vec,
 	       "  rand: 39fa2f4e3d523d8619a73b4f65c3e14d\n"
-	       "  autn: 8704f5ba55f30000d2ee44b22c8ea919\n"
+	       "  autn: 8704f5ba55d30000541dde77ea5b1d8c\n"
 	       "  ck: f64735036e5871319c679f4742a75ea1\n"
 	       "  ik: 27497388b6cb044648f396aa155b95ef\n"
 	       "  res: e229c19e791f2e410000000000000000\n"
@@ -301,6 +301,7 @@
 	aud3g = (struct osmo_sub_auth_data){
 		.type = OSMO_AUTH_TYPE_UMTS,
 		.algo = OSMO_AUTH_ALG_MILENAGE,
+		.u.umts.sqn = 32,
 	};
 
 	osmo_hexparse("EB215756028D60E3275E613320AEC880",
@@ -310,13 +311,14 @@
 	next_rand("39fa2f4e3d523d8619a73b4f65c3e14d", true);
 
 	vec = (struct osmo_auth_vector){ {0} };
-	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 0, "%"PRIu64);
+	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 32, "%"PRIu64);
 	rc = auc_compute_vectors(&vec, 1, &aud2g, &aud3g, NULL, NULL);
 	VERBOSE_ASSERT(rc, == 1, "%d");
+	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 33, "%"PRIu64);
 
 	VEC_IS(&vec,
 	       "  rand: 39fa2f4e3d523d8619a73b4f65c3e14d\n"
-	       "  autn: 8704f5ba55f30000d2ee44b22c8ea919\n"
+	       "  autn: 8704f5ba55d30000541dde77ea5b1d8c\n"
 	       "  ck: f64735036e5871319c679f4742a75ea1\n"
 	       "  ik: 27497388b6cb044648f396aa155b95ef\n"
 	       "  res: e229c19e791f2e410000000000000000\n"
@@ -336,19 +338,17 @@
 	 * hence expecting kc: 059a4f668f6fbe39
 	 */
 
-	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 1, "%"PRIu64);
-
 	/* even though vec is not zero-initialized, it should produce the same
 	 * result with the same sequence nr */
-	aud3g.u.umts.sqn = 0;
-	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 0, "%"PRIu64);
+	aud3g.u.umts.sqn = 32;
+	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 32, "%"PRIu64);
 	rc = auc_compute_vectors(&vec, 1, &aud2g, &aud3g, NULL, NULL);
 	VERBOSE_ASSERT(rc, == 1, "%d");
-	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 1, "%"PRIu64);
+	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 33, "%"PRIu64);
 
 	VEC_IS(&vec,
 	       "  rand: 39fa2f4e3d523d8619a73b4f65c3e14d\n"
-	       "  autn: 8704f5ba55f30000d2ee44b22c8ea919\n"
+	       "  autn: 8704f5ba55d30000541dde77ea5b1d8c\n"
 	       "  ck: f64735036e5871319c679f4742a75ea1\n"
 	       "  ik: 27497388b6cb044648f396aa155b95ef\n"
 	       "  res: e229c19e791f2e410000000000000000\n"
@@ -361,8 +361,8 @@
 
 	fprintf(stderr, "- test AUTS resync\n");
 	vec = (struct osmo_auth_vector){};
-	aud3g.u.umts.sqn = 0;
-	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 0, "%"PRIu64);
+	aud3g.u.umts.sqn = 32;
+	VERBOSE_ASSERT(aud3g.u.umts.sqn, == 32, "%"PRIu64);
 
 	/* The AUTN sent was 8704f5ba55f30000d2ee44b22c8ea919
 	 * with the first 6 bytes being SQN ^ AK.