Milenage Algorithm (Auth, Crypto)
Milenage Algorithm (Auth, Crypto)
Zakaria Zakaria Hassan et al Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 3( Version 6), March 2014, pp.67-74
Abstract
Milenage algorithm applies the block cipher Rijnadael (AES) with 128 bit key and 128 bit block size. This
algorithm is used in the 3GPP authentication and key generation functions (f1, f1*, f2, f3, f4, f5 and f5*) for
mobile communication systems (GSM/UMTS/LTE). In this paper a modification of Milenage algorithm is
proposed through a dynamic change of S-box in AES depending on secret key. To get a new secret key for
every authentication process we add the random number (RAND) transmitted from the authentication center
(AUC) to the contents of the fixed stored secret key (Ki) and thus the initialization of the AES will be different
each new authentication process . For every change in secret key a new S-box is derived from the standard one
by permuting its rows and columns with the help of a new designed PN sequence generator. A complete
simulation of modified Milenage and PN sequence generator is done using Microcontroller (PIC18F452).
security analysis is applied using Avalanche test to compare between the original and modified Milenage . Tests
proved that the modified algorithm is more secure than the original one due to the dynamic behavior of S-box
with every change of the secret key and immunity against linear and differential cryptanalysis using Avalanche
tests. This makes the modified Milenage more suitable for the applications of authentication techniques
specially for mobile communication systems.
Keywords—Authentication vector (AV), Modified MILENAGE Algorithm for AKA Functions
(F1,F1*,F2,F3,F4,F5,F5*), AES ,Dynamic S-BOX and PN Sequence Generator(LFSR).
www.ijera.com 67 | P a g e
Zakaria Zakaria Hassan et al Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 3( Version 6), March 2014, pp.67-74
that the subscriber has access to Ki. This can be To generate authentication quintuple, the
achieved by challenging the subscriber by sending a HLR\AUC computes a message authentication code
random 128-bit string (RAND) to the terminal. The for authentication MAC-A= f1k (SQN || RAND ||
terminal has to respond by computing a one-way AMF), the length of MAC-A is 64bits. an expected
function with inputs of RAND and the key Ki, and response XRES = f2k (RAND), the length of XRES is
returning the 32-bit output Signed Response (SRES) 64bits.. a cipher key CK = f3k (RAND). the length of
to the network. Inside the terminal, the computation of CK is 128bits . an integrity key IK = f4k (RAND) the
this one-way function, denoted by A3, happens in the length of IK is 128bits and an anonymity key AK =
SIM card. During the authentication procedure, a f5k (RAND), the length of AK is 48bits that is used to
temporary session key Kc is generated as an output of conceale sequence number SQN, the length of SQN is
another one-way function A8. The input parameters 48bits, SQN= SQN ⊕ AK. the HLR/AuC aggregates
for A8 are the same as for A3: Ki and RAND. The the authentication token AUTN = SQN [⊕ AK] ||
session key Kc is subsequently used to encrypt AMF(16bits) || MAC-A, the lengths of AUTN is
communication on the radio interface. The serving 128bits that forms the quintet Q =AV= (RAND,
network does not have direct access to the permanent XRES, CK, IK, AUTN). [7], [8], [9].
key Ki, so it cannot perform the authentication alone.
Instead, all relevant parameters, so called the . Authentication and key derivation in the
authentication triplet (RAND, SRES and Kc) are sent USIM.
to the serving network element Mobile Switching Upon receipt of a (RAND, AUTN), the
Centre/Visitor Location Register (MSC/VLR) (or USIM computes the anonymity key AK = f5k
Serving GPRS Support Node (SGSN) in the case of (RAND) and retrieves the unconcealed sequence
GPRS) from the AuC. [5], [6]. number SQN = (SQN ⊕AK) ⊕ AK, XMAC-A = f1k
(SQN || RAND|| AMF), the response RES = f2k
(ii) UMTS/LTE/Advanced LTE Authentication and (RAND), the cipher key CK = f3k (RAND) and the
Key Agreement Vectors. integrity key IK = f4k (RAND) as shown in fig.2. [5],
. UMTS Generation of Authentication vectors [6].
(Quintets) in the AUC. RAND AUTN
It should be a pseudo random number-generating Verify that SQN is in the correct range
function and map the internal state of the generator to Figure1. Authentication and key derivation in the
the challenge value RAND , the length of RAND is USIM.[7].
128 bits. The f1 is the network authentication
function, f1* is the re-synchronization message
(iii) LTE\AdvancedLTE Generation of
authentication function, it is used to provide data Authentication Vectors in the HSS.
origin authentication for synchronization failure The LTE architecture is built on the existing
information sent by the USIM to the AuC, f2 is the architecture from UMTS. LTE standards reuse the
user authentication function, f3 is the cipher key authentication and key-agreement of UMTS. The
derivation function , f4 is the integrity key derivation LTE/Advanced LTE AKA protocol also known as the
function, f5 is the anonymity key derivation function Evolved Packet System (EPS) AKA protocol. The
for normal operation and f5* is the anonymity key EPS-AKA protocol is executed between UE and the
derivation function for re-synchronization, f5* is only MME instead of between the USIM and the
used to provide user identity confidentiality during VLR/SGSN. The AuC generates UMTS AVs for EPS
resynchronization. K is the subscriber authentication AKA in exactly the same format as for UMTS AKA.
key stored in the USIM and at the AuC, The length of The HSS part outside the AuC derives KASME from
K is 128 bits. [5],[7],[8]. the CK and IK. EPS AV consists of [RAND, XRES, a
www.ijera.com 68 | P a g e
Zakaria Zakaria Hassan et al Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 3( Version 6), March 2014, pp.67-74
SQN||AMF||SQN||AMF EK
f1 f1* f5 f2 f3 f4 f5*
Figure 3. Computation of the MILENAGE functions.
[13].
www.ijera.com 70 | P a g e
Zakaria Zakaria Hassan et al Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 3( Version 6), March 2014, pp.67-74
A0 2E C9 42 CE DB F9 Difference value = B4 88 CF FB 38 5F 9C FB
Difference value = 39 AF C7 11 C4 FD EC 9E 10 B6 CA 85 38 BD B0 8D
5C D3 53 98 C1 F9 50 B7 Ratio=53.12%
Ratio=54.68% Changed one bit (2)
Secret key = C8 5C 36 49 B8 40 D9 E0 06
Table 6. Results of Avalanche test due to change one D0 61 F5 F6 FC 60 46
bit in plain text in modified AES. Cipher Text = B3 3B 73 D4 77 9C F5 CB
Changed one bit (1) B5 0A DD FB 4F 27 70 47
Plain text = 4F 57 47 10 27 73 65 1A 6E Difference value = 01 23 D6 5B D6 12 41 7C
23 88 18 A2 7C B9 EF D1 79 A0 AA CC 10 FB 09
Cipher Text = A6 3B 8A BD B0 84 37 EA Ratio=44.53%
BF 7E F5 A4 1D 8F F9 0C Changed one bit (16)
Difference Value = 9E 8A C7 97 E6 05 18 F9 40 Secret key = 88 5D 36 49 B8 40 D9 E0 06
90 CD CD E7 2B 8E 4C Ratio=49.21% D0 61 F5 F6 FC 60 46
Changed one bit (15) Cipher Text = C7 43 E5 6C 4C D6 65 F1
Plain text = CF 55 47 10 27 73 65 1A 6E 60 31 D9 43 E5 0D 0E 65
23 88 18 A2 7C B9 EF Difference value = 75 5B 40 E3 ED 58 D1 46 04
Cipher Text = 5F EC 44 96 1B C5 F4 36 42 A4 12 66 3A 85 2B
52 F2 E4 72 5E 25 22 9B Ratio=42.96%
Difference Value = 67 5D 09 BC 4D 44 DB 25 Changed one bit (99)
AD 1C DC 1B A4 81 55 DB Secret key = 88 5C 36 49 B8 40 D9 E0 06
Ratio=50.00% D0 61 F5 D6 FC 60 46
Changed one bit (69) Cipher Text = CB 67 F2 A1 C9 4D B7 21
Plain text = CF 57 47 10 27 73 65 1A 66 C0 06 A1 4C DC D6 9B 05
23 88 18 A2 7C B9 EF Difference value = 79 7F 57 2E 68 C3 03 96 A4
Cipher Text = 3B E8 CF 4F 38 2C 25 26 75 DC 1D 5F E1 10 4B
C1 7E B7 B1 4C 9F 81 C7 Ratio=51.56%
Difference Value = 03 59 82 65 6E AD 0A 35 3E Changed one bit (128)
90 8F D8 B6 3B F6 87 Secret key = 88 5C 36 49 B8 40 D9 E0 06
Ratio=50.00% D0 61 F5 F6 FC 60 47
Changed one bit (115) Cipher Text = 5D F7 E1 35 B8 9D 17 77
Plain text = CF 57 47 10 27 73 65 1A 6E 68 17 02 CB 12 EF 61 33
23 88 18 A2 7C 99 EF Difference value = EF EF 44 BA 19 13 A3 C0
Cipher Text = 70 F7 F4 7C 5D AD FE E1 0C 64 7F 9A 91 D8 EA 7D
08 02 F4 13 1C 2E DE 62 Ratio=52.34%
Difference Value = 48 46 B9 56 0B 2C D1 F2 F7
EC CC 7A E6 8A A9 22 70.00%
Avalanche effect Ratio
60.00%
Ratio=50.00% 50.00%
Changed one bit (128) 40.00%
30.00%
Plain text = CF 57 47 10 27 73 65 1A 6E 20.00%
10.00%
23 88 18 A2 7C B9 EE 0.00%
Cipher Text = E6 58 E8 C3 91 53 46 B6
1
7
103
109
115
121
127
13
19
25
31
37
43
49
55
61
67
73
79
85
91
97
CA F4 A9 BC 6C A2 D8 56
Difference Value = DE E9 A5 E9 C7 D2 69 A5 128-bits
35 1A 91 D5 96 06 AF 16 Figure 5. Avalanche effects of AES standard due to
Ratio=52.34% change one bit in Secret Key.
www.ijera.com 71 | P a g e
Zakaria Zakaria Hassan et al Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 3( Version 6), March 2014, pp.67-74
Table 8. Samples of Avalanche test due to change one Table 9. Result Outputs of Modified MILENAGE
bit in Secret Key of Modified AES. Algorthim to derive a stronger Authentication Vector
Changed one bit (1) (AV) than Output of standard Milenage Algorthim
Secret key = 08 5C 36 49 B8 40 D9 E0 06 (Authentication Vector) in 3GPP. [16], [17].
D0 61 F5 F6 FC 60 46 Key 9E5944AE A94B8116 5C82FBF9
Cipher Text = 10 8D DA 81 C6 9C 0A F1 F32DB751
70 58 10 9A 79 04 08 07 RAND CE83DBC54AC0274A 157C17F8
Difference value = 28 3C 97 AB 90 1D 25 E2 8F D017BD6
B6 28 F3 83 A0 7F 47 Ratio = Dynamic 50DA9F6BE38BA65C49FEEC01FE
49.21% Key 2CCC87
Changed one bit (2) SQN 0B604A81 ECA8
Secret key = C8 5C 36 49 B8 40 D9 E0 06 AMF 9E09
D0 61 F5 F6 FC 60 46 OP 223014C5806694C0 07CA1EEE
F57F004F
Cipher Text = 7A 0F EA 22 23 2A 1B 89 94
8B 23 16 02 A8 6A 74 OPC 1B3D2E3E625213D9BC49DBC552
BCDE 4C
Difference value = 42 BE A7 08 75 AB 34 9A 6B
TEMP
65 1B 7F F8 0C 1D 34 Ratio =
C8B662E237F3E58D24E7B5A96D2
50.78%
C2C9F
Changed one bit (16)
OUT1 BA328BB5831B71029111AC8D2332
Secret key = 88 5D 36 49 B8 40 D9 E0 06 E862
D0 61 F5 F6 FC 60 46
OUT2 13DD09518BE63818E23EDE87AC
Cipher Text = 80 D1 05 BD 8B A4 40 40 6C 73F109
05 28 36 A2 8B 0C F1 OUT3 EF3523C87886D0637FD2B501D02
Difference value = B8 60 48 97 DD 25 6F 53 93 E3BA2
EB 10 5F 58 2F 7B B1 Ratio = OUT4 0FE930F07931B15882B88BEB4F4D
52.34% E654
Changed one bit (99) OUT5 93A92189A493A876B8F1801A9F8A
Secret key = 88 5C 36 49 B8 40 D9 E0 06 B8C3
D0 61 F5 D6 FC 60 46 F1(MAC- BA328BB5831B7102
Cipher Text = 4A 6C 51 DC 6D B9 99 13 69 A)
B3 72 43 21 7E C3 E6 F1*(MAC 9111AC8D2332E862
Difference value = 72 DD 1C F6 3B 38 B6 00 96 -S)
5D 4A 2A DB DA B4 A6 Ratio = F2(RES) E23EDE87AC73F109
51.56% F3(CK) EF3523C87886D0637FD2B501D02
Changed one bit (128) E3BA2
Secret key = 88 5C 36 49 B8 40 D9 E0 06 F4(IK) 0FE930F07931B15882B88BEB4F4D
D0 61 F5 F6 FC 60 47 E654
Cipher Text = 00 A6 7B 81 86 50 04 40 94 F5(AK) 13DD09518BE6
5E 64 9A 0F 57 18 03 F5*(AK) 93A92189A493
Difference value = 38 17 36 AB D0 D1 2B 53 6B AUTN 18BD43D0674E9E09BA328BB5831
B0 5C F3 F5 F3 6F 43 Ratio = B7102
54.68% CE83DBC54AC0274A157C17F80D
017BD6E23EDE87AC73F109EF352
70.00% AV 3C87886D063EF3523C87886D0637
Avalanche effect Ratio
60.00%
50.00% FD2B501D02E3BA20FE930F07931
40.00%
30.00%
B15882B88BEB4F4DE65418BD43D
20.00% 0674E9E09BA328BB5831B7102
10.00%
0.00%
103
109
115
121
127
128 - bits
(i) The main weakness in Milenage, as stated by the
Cryptanalysts, is the use bit rotations and constant
Figure 6. Avalanche effects of Modified AES due to XORs in the middle part of the milenage specially if
change one bit in Secret Key. the kernel block cipher in milenage algorithm is
susceptible to differential cryptanalysis, then an
attacker is capable to proceed a variety of attacks on
www.ijera.com 72 | P a g e
Zakaria Zakaria Hassan et al Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 3( Version 6), March 2014, pp.67-74
milenage algorithm. An attacker cannot predict any Sussex PO19 8SQ, ISBN 0-470-84794-8,
useful information if the kernel block cipher in 2003.
milenage algorithm is a strong secure. [6] Dan Forsberg, Gunther Horn, Wolf-Dietrich
This paper modifies the standard Milenage Moeller and Valtteri Niemi.‖LTE security‖.
Authentication algorithm through the dynamic change United Kingdom: John Wiley & Sons Ltd,
of the kernel block cipher AES. For every the Atrium, Southern Gate, Chichester, West
Authentication process a new S-box will be generated Sussex, PO19 8SQ, 2013.
using a combination of received random sequence [7] 3GPP TS 33.102 V11.5.1 (2013-06)
number (RAND), stored Authentication key (Ki) and Technical Specification; Third Generation
PN sequence generator to rearrange the columns and Partnership Project; Technical Specification
rows of standard S-box in AES. Tests proved that the Group Services and System Aspects; 3G
modified AES is more secure than the standard one Security; Security architecture (Release 11).
due to its dynamic structure in addition to increasing [8] 3GPP TS 33.105 V11.0.0 (2012-09)
its immunity to linear and differential cryptanalysis as Technical Specification; Third Generation
shown by avalanche test results in table 12. Partnership Project; Technical Specification
Group Services and System Aspects; 3G
Table 10. Average value of avalanche tests for (plain Security; Cryptographic algorithm
text – Secret key) in AES and Modified AES. requirements (Release 11).
Input type of Type of Avalanche average [9] Stefan Pütz, Roland Schmitz, Tobias Martin
data algorithm value ―Security Mechanisms in UMTS‖ DBLP:
Plaintext Modified AES 50.15% journals/dud/PutzSM01, Vol.25, No.6, June
Plaintext AES 49.71% 2001.
Secret key Modified AES 49.86% [10] 3GPP TS 33.401 V12.9.0 (2013-09)
Secret key AES 49.84% Technical Specification; Third Generation
Partnership Project; Technical Specification
(ii) Execution time can be reduced as follows: Group Services and System Aspects; 3GPP
The implementation of the modified System Architecture Evolution
authentication algorithm required more operation than (SAE);Security architecture (Release 12).
the standard one due to the dynamic nature of its S- [11] Sebastian Banescu and Simona Posea
box. Using the PIC18F452 microcontroller, the ―Security of 3G and LTE‖. Faculty of
execution time of the modified algorithm can be Computer Science , Eindhoven University of
greatly decreased to about 50.333 ms ( instead of Technology.
500ms taken by the standard algorithm using IC card. [12] Mun, H., Han, K., & Kim, K. 3G-WLAN
[19] ). interworking: security analysis and new
authentication and key agreement based on
EAP-AKA. Wireless Telecommunications
REFERENCES Symposium. WTS2009 (pp. 18). IEEE.
[1] P. Kitsos*, N. Sklavos, O. Koufopavlou (2009).
―UMTS security: system architecture and [13] 3GPP TS 35.206 V11.0.0 (2012-09)
hardware implementation‖ in Wireless Technical Specification; 3G Security;
Communications and Mobile Computing.- Specification of the MILENAGE Algorithm
May 2007.-Issue (4):Vol. (7).-pp. 483-494. Set: An example algorithm set for the 3GPP
[2] Federal Information Processing Standards authentication and key generation functions
Publications (FIPS 197), "Advanced f1, f1*, f2, f3, f4, f5 and f5*; Document 2:
Encryption Standard (AES) ", 26 Nov. 2001. Algorithm Specification (Release 11).
[3] J. Daemen and V. Rijmen, The blocks cipher [14] khaled suwais and Azman samsudin ―New
Rijndael, Smart Card research and Classification of Existing Stream Ciphers‖
Applications, LNCS 1820, Springer-Verlag, INTECH Journal ,1 Feb.2010. [15] Shinsaku
pp. 288-296. Kiyomoto , Toshiaki Tanaka and Kouichi
Sakurai ―K2: A Stream Cipher Algorithm
[4] Reshma Nadaf and Veena Desai ―Hardware using Dynamic Feedback Control‖ Springer,
Implementation of Modified AES with Key Communications in Computer and
Dependent Dynamic S-Box‖ IEEE ICARET Information Science,, Vol.23, 2009, pp 214-
2012. 226.
[5] Valterri Niemi and Kaisa Nyberg ―UMTS [16] 3GPP TS 35.207 V11.0.0 (2012-09)
security‖. England: John Wiley & Sons Ltd, Technical Specification; 3G Security;
the Atrium, Southern Gate, Chichester, West Specification of the MILENAGE Algorithm
www.ijera.com 73 | P a g e
Zakaria Zakaria Hassan et al Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 3( Version 6), March 2014, pp.67-74
www.ijera.com 74 | P a g e