Home | History | Annotate | Download | only in hlr_auc_gw

Lines Matching full:opc

33  * @opc: OPc = 128-bit value derived from OP and K
42 static int milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand,
50 tmp1[i] = _rand[i] ^ opc[i];
63 tmp3[(i + 8) % 16] = tmp2[i] ^ opc[i];
73 tmp1[i] ^= opc[i];
84 * @opc: OPc = 128-bit value derived from OP and K
94 static int milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand,
102 tmp1[i] = _rand[i] ^ opc[i];
114 tmp1[i] = tmp2[i] ^ opc[i];
120 tmp3[i] ^= opc[i];
130 tmp1[(i + 12) % 16] = tmp2[i] ^ opc[i];
135 ck[i] ^= opc[i];
142 tmp1[(i + 8) % 16] = tmp2[i] ^ opc[i];
147 ik[i] ^= opc[i];
154 tmp1[(i + 4) % 16] = tmp2[i] ^ opc[i];
159 akstar[i] = tmp1[i] ^ opc[i];
168 * @opc: OPc = 128-bit operator variant algorithm configuration field (encr.)
179 void milenage_generate(const u8 *opc, const u8 *amf, const u8 *k,
190 if (milenage_f1(opc, k, _rand, sqn, amf, mac_a, NULL) ||
191 milenage_f2345(opc, k, _rand, res, ck, ik, ak, NULL)) {
207 * @opc: OPc = 128-bit operator variant algorithm configuration field (encr.)
214 int milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts,
221 if (milenage_f2345(opc, k, _rand, NULL, NULL, NULL, NULL, ak))
225 if (milenage_f1(opc, k, _rand, sqn, amf, NULL, mac_s) ||
234 * @opc: OPc = 128-bit operator variant algorithm configuration field (encr.)
241 int gsm_milenage(const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres, u8 *kc)
246 if (milenage_f2345(opc, k, _rand, res, ck, ik, NULL, NULL))
264 * @opc: OPc = 128-bit operator variant algorithm configuration field (encr.)
276 int milenage_check(const u8 *opc, const u8 *k, const u8 *sqn, const u8 *_rand,
287 if (milenage_f2345(opc, k, _rand, res, ck, ik, ak, NULL))
303 if (milenage_f2345(opc, k, _rand, NULL, NULL, NULL, NULL, ak))
308 if (milenage_f1(opc, k, _rand, sqn, auts_amf, NULL, auts + 6))
316 if (milenage_f1(opc, k, _rand, rx_sqn, amf, mac_a, NULL))
338 * milenage_opc - Determine OPc from OP and K
341 * @opc: Buffer for OPc = 128-bit value derived from OP and K
343 static void milenage_opc(const u8 *op, const u8 *k, u8 *opc)
347 aes_128_encrypt_block(k, op, opc);
349 opc[i] ^= op[i];
356 u8 opc[16];
585 u8 opc[16];
1025 u8 buf[16], buf2[16], buf3[16], buf4[16], buf5[16], opc[16];
1038 milenage_opc(t->op, t->k, opc);
1039 if (memcmp(opc, t->opc, 16) != 0) {
1044 if (milenage_f1(opc, t->k, t->rand, t->sqn, t->amf, buf, buf2)
1054 if (milenage_f2345(opc, t->k, t->rand, buf, buf2, buf3, buf4,
1081 res = milenage_auts(t->opc, t->k, t->rand, auts, buf);
1091 res = milenage_auts(t->opc, t->k, _rand, auts, buf);
1102 milenage_generate(t->opc, t->amf, t->k, sqn, _rand, buf, buf2, buf3,
1117 gsm_milenage(g->opc, g->ki, g->rand, sres, kc);