Subject: [eap] EAP-AKA Test Vectors

From: Pascal Urien <[email-masked]>
Date: Sun, 07 Aug 2005 22:38:06 +0200

Hi Everybody

  An error has been detected in the EAP-AKA test vectors,
  (in http://www.ietf.org/internet-drafts/draft-urien-eap-smartcard-08.txt )
the 2 res bytes of the EAP header are missing.

Here are the corrected values. is there some interested to check this vectors

Best Regards
Pascal

// Identity request
Tx: A0 80 00 00 05 01 A4 00 05 01
// Identity.response: [email-masked]
Rx: 02 A4 00 16 01 61 6E 6F 6E 79 6D 6F 75 73 40 64 6F 74 2E 63 6F 6D 90 00

// EAP-AKA GET AT_PERMANENT_ID_REQ: [email-masked]
Tx: A0 80 00 00 0A 01A6 000A 1705 0A01 0000
Rx: 02 A6 00 16 17 05 0E 04 00 0B 61 6B 61 40 64 6F 74 2E 63 6F 6D 00 90 00

//=================
// Milenage Values=
//=================
// These values are imported from
// 3GPP TS 35.207 V5.0.0 (2002-06),
// sections 4.3-Test set 1 and  6.3-Test set 1
// K:   465b5ce8 b199b49f aa5f0a2e e238a6bc
// OP:  cdc202d5 123e20f6 2b6d676a c72cb318
// SQN: ff9bb4d0b607
// AMF: b9b9
// RAND:23553cbe 9637a89d 218ae64d ae47bf35

// f1|f1*: 4A 9F FA C3 54 DF AF B3 01 CF AF 9E C4 E8 71 E9
// f2/sres A5 42 11 D5 E3 BA 50 BF
// f3/ck   B4 0B A9 A3 C5 8B 2A 05 BB F0 D9 87 B2 1B F8 CB
// f4/ik   F7 69 BC D7 51 04 46 04 12 76 72 71 1C 6D 34 41
// f5/ak   AA 68 9C 64 83 70
// f5*/ak2 45 1E 8B EC A4 3B

//=============================
// Values for XKEY & PRF(XKEY)=
//=============================
// ID: 61 6B 61 40 64 6F 74 2E 63 6F 6D = [email-masked]
// IK: F7 69 BC D7 51 04 46 04 12 76 72 71 1C 6D 34 41
// CK: B4 0B A9 A3 C5 8B 2A 05 BB F0 D9 87 B2 1B F8 CB
// XKEY = sha1(ID|IK|CK) =
// C4 83 4F 21 BE AD F0 9E 7A 3B E8 17 97 5A BA 99 DD B4 0C 9A

// PRF(XKEY)
// K_Encr: 28 FF 32 38 42 05 6B 55 4B 85 A5 11 16 34 5A A4
// K_Auth: B3 08 06 82 48 8E 68 6F AC 3E 1C F8 24 8E 73 63
// MSK:    BE 12 98 C0 B5 33 8C 91 D6 E1 1B 33 AE 7D 46 2D
//         E2 99 64 64 0C F5 05 FF 26 AE D5 98 82 2D 41 F9
//         20 AF 49 FD CB 77 00 8C 2A AC DB A3 A1 AE 79 75
//         20 8C 25 E5 40 17 5D 22 D5 48 0C DE 88 D7 90 33
// EMSK:   CD 10 C9 14 BB 54 DC 97 AE E8 96 06 67 F8 C8 59
//         12 44 DF E7 BD 4A C1 B1 6E 63 1B 4D FA 5D F6 97
//         4A 4C 51 F5 D8 19 FE 68 E7 37 0F 9E 47 43 9B 43
//         FD 6E 83 CC 35 7A 01 E7 16 57 F3 BE 6D 26 4A 2B

//=========================================
// Test #1 : FULL AUTHENTICATION, GOOD #SEQ
//=========================================
//AT_RAND AT_AUTN AT_MAC
Tx: A0 80 00 00 44 01 A5 00 44 17 01 00 00 01 05 00 00 23 55 3C BE 96 37 A8 
9D 21 8A E6 4D AE 47 BF
     35 02 05 00 00 55 F3 28 B4 35 77 B9 B9 4A 9F FA C3 54 DF AF B3 0B 05 
00 00 C7 00 35 36 66 2D 52
     01 B0 11 F2 0F E5 DD 8C E4

// AT_RES AT_MAC
Rx: 02 A5 00 28 17 01 00 00 03 03 00 40 A5 42 11 D5 E3 BA 50 BF 0B 05 00 00 
45 70 3D 12 95 67 DC A9
     2C 91 01 C4 93 92 F2 67 90 00

// Get MSK
Tx: A0 A6 00 00 40
Rx: 20 AF 49 FD CB 77 00 8C 2A AC DB A3 A1 AE 79 75 20 8C 25 E5 40 17 5D 22 
D5 48 0C DE 88 D7 90 33
     BE 12 98 C0 B5 33 8C 91 D6 E1 1B 33 AE 7D 46 2D E2 99 64 64 0C F5 05 
FF 26 AE D5 98 82 2D 41 F9
     90 00

//==========================================
// Test #2 : FULL AUTHENTICATION, WRONG #SEQ
//==========================================
Tx: A0 80 00 00 44 01 A5 00 44 17 01 00 00 01 05 00 00 23 55 3C BE 96 37 A8 
9D 21 8A E6 4D AE 47 BF
     35 02 05 00 00 55 F3 28 B4 35 77 B9 B9 4A 9F FA C3 54 DF AF B3 0B 05 
00 00 C7 00 35 36 66 2D 52
     01 B0 11 F2 0F E5 DD 8C E4

// AT_AUTS = AK2+SEQ | MAC-S
// AK2 =  45 1E 8B EC A4 3B
// SEQ =  ff 9b b4 d0 b6 08
// MAC-S= 01 CF AF 9E C4 E8 71 E9

Rx: 02 A5 00 18 17 04 00 00 04 04 BA 85 3F 3C 12 33 01 CF AF 9E C4 E8 71 E9 
90 00

//==========================================
// Test #3 : FULL AUTHENTICATION, WRONG MAC=
//==========================================
Tx: A0 80 00 00 44 01 A5 00 44 17 01 00 00 01 05 00 00 23 55 3C BE 96 37 A8 
9D 21 8A E6 4D AE 47 BF
     36 02 05 00 00 55 F3 28 B4 35 77 B9 B9 4A 9F FA C3 54 DF AF B3 0B 05 
00 00 C7 00 35 36 66 2D 52
     01 B0 11 F2 0F E5 DD 8C E4

// AKA-Authentication-Reject
Rx: 02 A5 00 08 17 02 00 00 90 00

//=============================
// Test #4 : Identity Browsing=
//=============================
// AT_ANY_ID_REQ
Tx: A0 80 00 00 0C 01 A6 00 0C 17 05 00 00 0D 01 00 00
Rx: 02 A6 00 18 17 05 00 00 0E 04 00 0B 61 6B 61 40 64 6F 74 2E 63 6F 6D 00 
90 00

// AT_FULLAUTH_ID_REQ
Tx: A0 80 00 00 0C 01 A6 00 0C 17 05 00 00 11 01 00 00
Rx: 02 A6 00 18 17 05 00 00 0E 04 00 0B 61 6B 61 40 64 6F 74 2E 63 6F 6D 00 
90 00

// AT_PERMANENT_ID_REQ
Tx: A0 80 00 00 0C 01 A6 00 0C 17 05 00 00 0A 01 00 00
Rx: 02 A6 00 18 17 05 00 00 0E 04 00 0B 61 6B 61 40 64 6F 74 2E 63 6F 6D 00 
90 00

//===========================================
// Test #5 : Full Authentication + PSEUDO_ID=
//===========================================

// AT_RAND AT_AUTN AT_ENCR AT_MAC
// AT_ENCR: 82090000 8205000D 31323334 31323334 31323334 31000000 06030000 
00000000 00000000

Tx: A0 80 00 00 7C 01 A5 00 7C 17 01 00 00 01 05 00 00 23 55 3C BE 96 37 A8 
9D 21 8A E6 4D AE 47 BF
     35 02 05 00 00 55 F3 28 B4 35 77 B9 B9 4A 9F FA C3 54 DF AF B3 81 05 
00 00 12 34 56 78 12 34 56
     78 12 34 56 78 12 34 56 78 82 09 00 00 81 9D CA F9 E8 51 07 2D 66 0A 
36 FB 79 D9 6C 09 6A C3 6F
     2E 58 D6 E3 2D 3F C8 48 69 9D A0 76 D4 0B 05 00 00 B0 5E 0F FC 0A 99 
A4 34 2A 2B FA D8 19 00 F1
     B3

// AT_RES AT_MAC
Rx: 02 A5 00 28 17 01 00 00 03 03 00 40 A5 42 11 D5 E3 BA 50 BF 0B 05 00 00 
45 70 3D 12 95 67 DC A9
     2C 91 01 C4 93 92 F2 67 90 00

// AT_FULLAUTH_ID_REQ = [email-masked]
Tx: A0 80 00 00 0C 01 A6 00 0C 17 05 00 00 11 01 00 00
Rx: 02 A6 00 24 17 05 00 00 0E 07 00 15 31 32 33 34 31 32 33 34 31 32 33 34 
31 40 64 6F 74 2E 63 6F
     6D 00 00 00 90 00

// AT_PERMANENT_ID_REQ = [email-masked]
Tx: A0 80 00 00 0C 01 A6 00 0C 17 05 00 00 0A 01 00 00
Rx: 02 A6 00 18 17 05 00 00 0E 04 00 0B 61 6B 61 40 64 6F 74 2E 63 6F 6D 00 
90 00

//===========================================
// Test #6 : Full Authentication + ReAUTH_ID=
//===========================================
// AT_RAND AT_AUTN AT_ENCR AT_MAC
// AT_ENCR: 82090000 8505000D 31323334 31323334 31323334 31000000 06030000 
00000000 00000000
Tx: A0 80 00 00 7C 01 A5 00 7A 17 01 00 00 01 05 00 00 23 55 3C BE 96 37 A8 
9D 21 8A E6 4D AE 47 BF
     35 02 05 00 00 55 F3 28 B4 35 77 B9 B9 4A 9F FA C3 54 DF AF B3 81 05 
00 00 12 34 56 78 12 34 56
     78 12 34 56 78 12 34 56 78 82 09 00 00 49 E8 E4 BE 42 45 26 11 89 AF 
E3 A1 E9 13 95 3F 4A 96 6D
     BE 53 D6 21 A8 CC 77 10 72 DA 7B 19 64 0B 05 00 00 37 7E 88 D4 EC 61 
74 5D A4 8B 26 AF 2B 45 FF
     FB

// AT_RES AT_MAC
Rx: 02 A5 00 28 17 01 00 00 03 03 00 40 A5 42 11 D5 E3 BA 50 BF 0B 05 00 00 
45 70 3D 12 95 67 DC A9
     2C 91 01 C4 93 92 F2 67 90 00

// AT_ANY_ID_REQ = 1234123412341
Tx: A0 80 00 00 0C 01 A6 00 0C 17 05 00 00 0D 01 00 00
Rx: 02 A6 00 1C 17 05 00 00 0E 05 00 0D 31 32 33 34 31 32 33 34 31 32 33 34 
31 00 00 00 90 00

//==============================
// Test #7: ReAUTH, GoodCounter=
//==============================
// XKEY' = SHA1(Identity|counter|NONCE_S|MK)
// Identity = "31323334 31323334 31323334 31"
// Counter=    "0000" +
// NONCE=      "12345678 12345678 12345678 12345678"
// MK 
=        "BE1298C0B5338C91D6E11B33AE7D462DE29964640CF505FF26AED598822D41F9"
// 
"20AF49FDCB77008C2AACDBA3A1AE7975208C25E540175D22D5480CDE88D79033"
// XKEY'=       5f83882b27d5793c01a512f5ed300e6759e64974
// PRF(XKEY') = 
7a9d9d7e5ca72ef90b63cc466c4a9d0d6a6a5506a56f978d2adea27db5176c3f
// 
3abe04e06673ca3e58c85e6fd01f7cef9bd210a143917e90978aaf3eb4539747

// AT_IV AT_ENCR AT_MAC
// ENCR: 82090000 13010000 15050000 12345678 12345678 12345678 12345678 
85020004 31323334

Tx: A0 80 00 00 54 01 A5 00 54 17 0D 00 00 81 05 00 00 12 34 56 78 12 34 56 
78 12 34 56 78 12 34 56
     78 82 09 00 00 5A 88 77 6E 7D CB 10 73 7D 3D 3A B7 6A 38 0B 89 95 26 
36 16 45 30 79 A4 9F 7D C9
     7F 15 59 6B 2C 0B 05 00 00 37 B1 CF E9 B9 A6 F3 04 45 97 AE DC 2F D7 
F4 1E

// AT_ENCR: 82090000 13010000 15050000 12345678 12345678 12345678 12345678 
85020004 31323334
Rx: 02 A5 00 54 17 0D 00 00 81 05 00 00 A5 A5 A5 A5 A5 A5 A5 A5 A5 A5 A5 A5 
A5 A5 A5 A5 82 09 00 00
     FE 69 18 6B AA E2 DE 0E A6 1B 0A A3 18 B2 1F 51 50 60 BA 59 0C 6C A9 
84 0E 6D 6A 66 C2 34 0F E6
     0B 05 00 00 0B 17 F6 F6 2C 6F 5D 86 4B 00 B5 5D 59 63 00 15 90 00

// Get MSK
Tx: A0 A6 00 00 40
Rx: 3A BE 04 E0 66 73 CA 3E 58 C8 5E 6F D0 1F 7C EF 9B D2 10 A1 43 91 7E 90 
97 8A AF 3E B4 53 97 47
     7A 9D 9D 7E 5C A7 2E F9 0B 63 CC 46 6C 4A 9D 0D 6A 6A 55 06 A5 6F 97 
8D 2A DE A2 7D B5 17 6C 3F
     90 00

//==============================
// Test #8: ReAUTH,WrongCounter=
//==============================

// AT_IV AT_ENCR AT_MAC
Tx: A0 80 00 00 54 01 A5 00 54 17 0D 00 00 81 05 00 00 12 34 56 78 12 34 56 
78 12 34 56 78 12 34 56
     78 82 09 00 00 5A 88 77 6E 7D CB 10 73 7D 3D 3A B7 6A 38 0B 89 95 26 
36 16 45 30 79 A4 9F 7D C9
     7F 15 59 6B 2C 0B 05 00 00 37 B1 CF E9 B9 A6 F3 04 45 97 AE DC 2F D7 
F4 1E

// AT_ENCR AT_COUNTER_TOO_SMALL AT_COUNTER AT_PADDING
// AT_ENCR: 82050000 14010000 13010000 06020000 00000000
Rx: 02 A5 00 44 17 0D 00 00 81 05 00 00 A5 A5 A5 A5 A5 A5 A5 A5 A5 A5 A5 A5 
A5 A5 A5 A5 82 05 00 00
     76 74 0A 5C AD 91 64 CD EB 1F C3 A5 6A 63 38 E7 0B 05 00 00 87 10 88 
6D 97 7A 1A C5 65 2D E5 0D
     AA 32 EC 15 90 00 

_______________________________________________
eap mailing list
[email-masked]
http://mail.frascone.com/mailman/listinfo/eap