summaryrefslogtreecommitdiff
path: root/third_party/milenage/milenage.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-10-10 11:37:56 +0000
committerBenny Prijono <bennylp@teluu.com>2007-10-10 11:37:56 +0000
commita3354959d1493f86392296ab0e78512e633abf40 (patch)
tree8e73a0994d92c5b97d77cf43165f2bc84d5313a3 /third_party/milenage/milenage.h
parent0cb2d5b9e84601bb822a300c48a4ea8397d85850 (diff)
Ticket #396: initial implementation of digest AKA (akav1-md5) authentication for IMS/3GPP
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1488 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'third_party/milenage/milenage.h')
-rw-r--r--third_party/milenage/milenage.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/third_party/milenage/milenage.h b/third_party/milenage/milenage.h
new file mode 100644
index 00000000..a5f407f3
--- /dev/null
+++ b/third_party/milenage/milenage.h
@@ -0,0 +1,35 @@
+/*-------------------------------------------------------------------
+ * Example algorithms f1, f1*, f2, f3, f4, f5, f5*
+ *-------------------------------------------------------------------
+ *
+ * A sample implementation of the example 3GPP authentication and
+ * key agreement functions f1, f1*, f2, f3, f4, f5 and f5*. This is
+ * a byte-oriented implementation of the functions, and of the block
+ * cipher kernel function Rijndael.
+ *
+ * This has been coded for clarity, not necessarily for efficiency.
+ *
+ * The functions f2, f3, f4 and f5 share the same inputs and have
+ * been coded together as a single function. f1, f1* and f5* are
+ * all coded separately.
+ *
+ *-----------------------------------------------------------------*/
+
+#ifndef MILENAGE_H
+#define MILENAGE_H
+
+typedef unsigned char u8;
+
+
+void f1 ( u8 k[16], u8 rand[16], u8 sqn[6], u8 amf[2],
+ u8 mac_a[8], u8 op[16] );
+void f2345 ( u8 k[16], u8 rand[16],
+ u8 res[8], u8 ck[16], u8 ik[16], u8 ak[6], u8 op[16] );
+void f1star( u8 k[16], u8 rand[16], u8 sqn[6], u8 amf[2],
+ u8 mac_s[8], u8 op[16] );
+void f5star( u8 k[16], u8 rand[16],
+ u8 ak[6], u8 op[16] );
+void ComputeOPc( u8 op_c[16], u8 op[16] );
+
+
+#endif