0% found this document useful (0 votes)
91 views6 pages

Class Milenage: Overview Package Tree Deprecated Index Help

The Milenage class implements algorithms f1, f1*, f2, f3, f4, f5, f5* defined by the 3GPP TS 35.206 standard for computing authentication codes and keys from a secret key and random number. The class contains methods to compute MAC codes, response codes, confidentiality keys, integrity keys, and anonymity keys. It also contains a method to compute OPc from the secret key and OP.

Uploaded by

Uthayan Alagesan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views6 pages

Class Milenage: Overview Package Tree Deprecated Index Help

The Milenage class implements algorithms f1, f1*, f2, f3, f4, f5, f5* defined by the 3GPP TS 35.206 standard for computing authentication codes and keys from a secret key and random number. The class contains methods to compute MAC codes, response codes, confidentiality keys, integrity keys, and anonymity keys. It also contains a method to compute OPc from the secret key and OP.

Uploaded by

Uthayan Alagesan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Overview Package Class Tree Deprecated Index Help

PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD FRAMES NO FRAMES All Classes DETAIL: FIELD | CONSTR | METHOD

net.java.sip.communicator.sip.security

Class Milenage

java.lang.Object net.java.sip.communicator.sip.security.Milenage public class Milenage extends java.lang.Object

A sample implementation of the f1, f1*, f2, f3, f4, f5, f5* algorithms, as defined by 3GPP TS 35.206 (MILENAGE Algorithm Set)

Field Summary
private console static Console private rijndael static Rijndael32Bit

Constructor Summary
Milenage()

Method Summary
static byte[] computeOpC(byte[] secretKey, byte[] op)

Function to compute OPc from OP and K.


static byte[] f1(byte[] secretKey, byte[] rand, byte[] op_c, byte[] sqn, byte[] amf)

Algorithm f1.
static byte[] f1star(byte[] secretKey, byte[] rand, byte[] op_c, byte[] sqn, byte[] amf)

Algorithm f1*.
static byte[] f2(byte[] secretKey, byte[] rand, byte[] op_c)

Algorithm f2.
static byte[] f3(byte[] secretKey, byte[] rand, byte[] op_c)

Algorithm f3.
static byte[] f4(byte[] secretKey, byte[] rand, byte[] op_c)

Algorithm f4.
static byte[] f5(byte[] secretKey, byte[] rand, byte[] op_c)

Algorithm f5.
static byte[] f5star(byte[] secretKey, byte[] rand, byte[] op_c)

Algorithm f5*. Methods inherited from class java.lang.Object


clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail
console
private static Console console

rijndael
private static Rijndael32Bit rijndael

Constructor Detail
Milenage
public Milenage()

Method Detail
f1
public static byte[] f1(byte[] secretKey, byte[] rand, byte[] op_c, byte[] sqn, byte[] amf) throws java.security.InvalidKeyException, java.lang.ArrayIndexOutOfBoundsException

Algorithm f1. Computes network authentication code MAC-A from key K, random challenge RAND, sequence number SQN and authentication management field AMF. Parameters: secretKey rand op_c sqn amf Returns: MAC-A Throws:
java.security.InvalidKeyException java.lang.ArrayIndexOutOfBoundsException

f2
public static byte[] f2(byte[] secretKey, byte[] rand, byte[] op_c) throws java.security.InvalidKeyException, java.lang.ArrayIndexOutOfBoundsException

Algorithm f2. Takes key K and random challenge RAND, and returns response RES. Parameters: secretKey rand op_c Returns: RES (or XRES) Throws:
java.security.InvalidKeyException java.lang.ArrayIndexOutOfBoundsException

f3
public static byte[] f3(byte[] secretKey,

byte[] rand, byte[] op_c) throws java.security.InvalidKeyException, java.lang.ArrayIndexOutOfBoundsException

Algorithm f3. Takes key K and random challenge RAND, and returns confidentiality key CK. Parameters: secretKey rand op_c Returns: CK confidentiality key Throws:
java.security.InvalidKeyException java.lang.ArrayIndexOutOfBoundsException

f4
public static byte[] f4(byte[] secretKey, byte[] rand, byte[] op_c) throws java.security.InvalidKeyException, java.lang.ArrayIndexOutOfBoundsException

Algorithm f4. Takes key K and random challenge RAND, and returns integrity key IK and anonymity key AK. Parameters: secretKey rand op_c Returns: IK integrity key Throws:
java.security.InvalidKeyException java.lang.ArrayIndexOutOfBoundsException

f5
public static byte[] f5(byte[] secretKey, byte[] rand, byte[] op_c) throws java.security.InvalidKeyException, java.lang.ArrayIndexOutOfBoundsException

Algorithm f5. Takes key K and random challenge RAND, and returns anonymity key AK. Parameters: secretKey rand -

op_c

Returns: AK anonymity key Throws:


java.security.InvalidKeyException java.lang.ArrayIndexOutOfBoundsException

f1star
public static byte[] f1star(byte[] secretKey, byte[] rand, byte[] op_c, byte[] sqn, byte[] amf) throws java.security.InvalidKeyException, java.lang.ArrayIndexOutOfBoundsException

Algorithm f1*. Computes resynch authentication code MAC-S from key K, random challenge RAND, sequence number SQN and authentication management field AMF. Parameters: secretKey rand op_c sqn amf Returns: MAC-S resynch authentication code Throws:
java.security.InvalidKeyException java.lang.ArrayIndexOutOfBoundsException

f5star
public static byte[] f5star(byte[] secretKey, byte[] rand, byte[] op_c) throws java.security.InvalidKeyException, java.lang.ArrayIndexOutOfBoundsException

Algorithm f5*. Takes key K and random challenge RAND, and return resynch anonymity key AK Parameters: secretKey rand op_c Returns: AK Throws:
java.security.InvalidKeyException

java.lang.ArrayIndexOutOfBoundsException

computeOpC
public static byte[] computeOpC(byte[] secretKey, byte[] op) throws java.security.InvalidKeyException, java.lang.ArrayIndexOutOfBoundsException

Function to compute OPc from OP and K. Assumes key schedule has already been performed Parameters: secretKey op Returns: OPc Throws:
java.security.InvalidKeyException java.lang.ArrayIndexOutOfBoundsException

Overview Package Class Tree Deprecated Index Help


PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD FRAMES NO FRAMES All Classes DETAIL: FIELD | CONSTR | METHOD

You might also like