blob: a5f407f3787266cb0d90c08bc2b8c15e31704950 [file] [log] [blame]
Benny Prijono7977f9f2007-10-10 11:37:56 +00001/*-------------------------------------------------------------------
2 * Example algorithms f1, f1*, f2, f3, f4, f5, f5*
3 *-------------------------------------------------------------------
4 *
5 * A sample implementation of the example 3GPP authentication and
6 * key agreement functions f1, f1*, f2, f3, f4, f5 and f5*. This is
7 * a byte-oriented implementation of the functions, and of the block
8 * cipher kernel function Rijndael.
9 *
10 * This has been coded for clarity, not necessarily for efficiency.
11 *
12 * The functions f2, f3, f4 and f5 share the same inputs and have
13 * been coded together as a single function. f1, f1* and f5* are
14 * all coded separately.
15 *
16 *-----------------------------------------------------------------*/
17
18#ifndef MILENAGE_H
19#define MILENAGE_H
20
21typedef unsigned char u8;
22
23
24void f1 ( u8 k[16], u8 rand[16], u8 sqn[6], u8 amf[2],
25 u8 mac_a[8], u8 op[16] );
26void f2345 ( u8 k[16], u8 rand[16],
27 u8 res[8], u8 ck[16], u8 ik[16], u8 ak[6], u8 op[16] );
28void f1star( u8 k[16], u8 rand[16], u8 sqn[6], u8 amf[2],
29 u8 mac_s[8], u8 op[16] );
30void f5star( u8 k[16], u8 rand[16],
31 u8 ak[6], u8 op[16] );
32void ComputeOPc( u8 op_c[16], u8 op[16] );
33
34
35#endif