rfc4186.txt 216 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155
  1. Network Working Group H. Haverinen, Ed.
  2. Request for Comments: 4186 Nokia
  3. Category: Informational J. Salowey, Ed.
  4. Cisco Systems
  5. January 2006
  6. Extensible Authentication Protocol Method for
  7. Global System for Mobile Communications (GSM)
  8. Subscriber Identity Modules (EAP-SIM)
  9. Status of This Memo
  10. This memo provides information for the Internet community. It does
  11. not specify an Internet standard of any kind. Distribution of this
  12. memo is unlimited.
  13. Copyright Notice
  14. Copyright (C) The Internet Society (2006).
  15. IESG Note
  16. The EAP-SIM protocol was developed by 3GPP. The documentation of
  17. EAP-SIM is provided as information to the Internet community. While
  18. the EAP WG has verified that EAP-SIM is compatible with EAP, as
  19. defined in RFC 3748, no other review has been done, including
  20. validation of the security claims. The IETF has also not reviewed
  21. the security of the cryptographic algorithms.
  22. Abstract
  23. This document specifies an Extensible Authentication Protocol (EAP)
  24. mechanism for authentication and session key distribution using the
  25. Global System for Mobile Communications (GSM) Subscriber Identity
  26. Module (SIM). GSM is a second generation mobile network standard.
  27. The EAP-SIM mechanism specifies enhancements to GSM authentication
  28. and key agreement whereby multiple authentication triplets can be
  29. combined to create authentication responses and session keys of
  30. greater strength than the individual GSM triplets. The mechanism
  31. also includes network authentication, user anonymity support, result
  32. indications, and a fast re-authentication procedure.
  33. Haverinen & Salowey Informational [Page 1]
  34. RFC 4186 EAP-SIM Authentication January 2006
  35. Table of Contents
  36. 1. Introduction ....................................................4
  37. 2. Terms ...........................................................5
  38. 3. Overview ........................................................8
  39. 4. Operation ......................................................10
  40. 4.1. Version Negotiation .......................................10
  41. 4.2. Identity Management .......................................11
  42. 4.2.1. Format, Generation and Usage of Peer Identities ....11
  43. 4.2.2. Communicating the Peer Identity to the Server ......17
  44. 4.2.3. Choice of Identity for the EAP-Response/Identity ...19
  45. 4.2.4. Server Operation in the Beginning of
  46. EAP-SIM Exchange ...................................19
  47. 4.2.5. Processing of EAP-Request/SIM/Start by the Peer ....20
  48. 4.2.6. Attacks Against Identity Privacy ...................21
  49. 4.2.7. Processing of AT_IDENTITY by the Server ............22
  50. 4.3. Message Sequence Examples (Informative) ...................23
  51. 4.3.1. Full Authentication ................................24
  52. 4.3.2. Fast Re-authentication .............................25
  53. 4.3.3. Fall Back to Full Authentication ...................26
  54. 4.3.4. Requesting the Permanent Identity 1 ................27
  55. 4.3.5. Requesting the Permanent Identity 2 ................28
  56. 4.3.6. Three EAP-SIM/Start Roundtrips .....................28
  57. 5. Fast Re-Authentication .........................................30
  58. 5.1. General ...................................................30
  59. 5.2. Comparison to UMTS AKA ....................................31
  60. 5.3. Fast Re-authentication Identity ...........................31
  61. 5.4. Fast Re-authentication Procedure ..........................33
  62. 5.5. Fast Re-authentication Procedure when Counter Is
  63. Too Small .................................................36
  64. 6. EAP-SIM Notifications ..........................................37
  65. 6.1. General ...................................................37
  66. 6.2. Result Indications ........................................39
  67. 6.3. Error Cases ...............................................40
  68. 6.3.1. Peer Operation .....................................40
  69. 6.3.2. Server Operation ...................................41
  70. 6.3.3. EAP-Failure ........................................42
  71. 6.3.4. EAP-Success ........................................42
  72. 7. Key Generation .................................................43
  73. 8. Message Format and Protocol Extensibility ......................45
  74. 8.1. Message Format ............................................45
  75. 8.2. Protocol Extensibility ....................................47
  76. 9. Messages .......................................................48
  77. 9.1. EAP-Request/SIM/Start .....................................48
  78. 9.2. EAP-Response/SIM/Start ....................................49
  79. 9.3. EAP-Request/SIM/Challenge .................................49
  80. 9.4. EAP-Response/SIM/Challenge ................................50
  81. 9.5. EAP-Request/SIM/Re-authentication .........................51
  82. Haverinen & Salowey Informational [Page 2]
  83. RFC 4186 EAP-SIM Authentication January 2006
  84. 9.6. EAP-Response/SIM/Re-authentication ........................51
  85. 9.7. EAP-Response/SIM/Client-Error .............................52
  86. 9.8. EAP-Request/SIM/Notification ..............................52
  87. 9.9. EAP-Response/SIM/Notification .............................53
  88. 10. Attributes ....................................................53
  89. 10.1. Table of Attributes ......................................53
  90. 10.2. AT_VERSION_LIST ..........................................54
  91. 10.3. AT_SELECTED_VERSION ......................................55
  92. 10.4. AT_NONCE_MT ..............................................55
  93. 10.5. AT_PERMANENT_ID_REQ ......................................56
  94. 10.6. AT_ANY_ID_REQ ............................................56
  95. 10.7. AT_FULLAUTH_ID_REQ .......................................57
  96. 10.8. AT_IDENTITY ..............................................57
  97. 10.9. AT_RAND ..................................................58
  98. 10.10. AT_NEXT_PSEUDONYM .......................................59
  99. 10.11. AT_NEXT_REAUTH_ID .......................................59
  100. 10.12. AT_IV, AT_ENCR_DATA, and AT_PADDING .....................60
  101. 10.13. AT_RESULT_IND ...........................................62
  102. 10.14. AT_MAC ..................................................62
  103. 10.15. AT_COUNTER ..............................................63
  104. 10.16. AT_COUNTER_TOO_SMALL ....................................63
  105. 10.17. AT_NONCE_S ..............................................64
  106. 10.18. AT_NOTIFICATION .........................................64
  107. 10.19. AT_CLIENT_ERROR_CODE ....................................65
  108. 11. IANA Considerations ...........................................66
  109. 12. Security Considerations .......................................66
  110. 12.1. A3 and A8 Algorithms .....................................66
  111. 12.2. Identity Protection ......................................66
  112. 12.3. Mutual Authentication and Triplet Exposure ...............67
  113. 12.4. Flooding the Authentication Centre .......................69
  114. 12.5. Key Derivation ...........................................69
  115. 12.6. Cryptographic Separation of Keys and Session
  116. Independence .............................................70
  117. 12.7. Dictionary Attacks .......................................71
  118. 12.8. Credentials Re-use .......................................71
  119. 12.9. Integrity and Replay Protection, and Confidentiality .....72
  120. 12.10. Negotiation Attacks .....................................73
  121. 12.11. Protected Result Indications ............................73
  122. 12.12. Man-in-the-Middle Attacks ...............................74
  123. 12.13. Generating Random Numbers ...............................74
  124. 13. Security Claims ...............................................74
  125. 14. Acknowledgements and Contributions ............................75
  126. 14.1. Contributors .............................................75
  127. 14.2. Acknowledgements .........................................75
  128. 14.2.1. Contributors' Addresses ...........................77
  129. 15. References ....................................................78
  130. 15.1. Normative References .....................................78
  131. 15.2. Informative References ...................................79
  132. Haverinen & Salowey Informational [Page 3]
  133. RFC 4186 EAP-SIM Authentication January 2006
  134. Appendix A. Test Vectors .........................................81
  135. A.1. EAP-Request/Identity .....................................81
  136. A.2. EAP-Response/Identity ....................................81
  137. A.3. EAP-Request/SIM/Start ....................................82
  138. A.4. EAP-Response/SIM/Start ...................................82
  139. A.5. EAP-Request/SIM/Challenge ................................83
  140. A.6. EAP-Response/SIM/Challenge ...............................86
  141. A.7. EAP-Success ..............................................86
  142. A.8. Fast Re-authentication ...................................86
  143. A.9. EAP-Request/SIM/Re-authentication ........................87
  144. A.10. EAP-Response/SIM/Re-authentication ......................89
  145. Appendix B. Pseudo-Random Number Generator .......................90
  146. 1. Introduction
  147. This document specifies an Extensible Authentication Protocol (EAP)
  148. [RFC3748] mechanism for authentication and session key distribution
  149. using the Global System for Mobile Communications (GSM) Subscriber
  150. Identity Module (SIM).
  151. GSM is a second generation mobile network standard. Second
  152. generation mobile networks and third generation mobile networks use
  153. different authentication and key agreement mechanisms. EAP-AKA
  154. [EAP-AKA] specifies an EAP method that is based on the Authentication
  155. and Key Agreement (AKA) mechanism used in 3rd generation mobile
  156. networks.
  157. GSM authentication is based on a challenge-response mechanism. The
  158. A3/A8 authentication and key derivation algorithms that run on the
  159. SIM can be given a 128-bit random number (RAND) as a challenge. The
  160. SIM runs operator-specific algorithms, which take the RAND and a
  161. secret key Ki (stored on the SIM) as input, and produce a 32-bit
  162. response (SRES) and a 64-bit long key Kc as output. The Kc key is
  163. originally intended to be used as an encryption key over the air
  164. interface, but in this protocol, it is used for deriving keying
  165. material and is not directly used. Hence, the secrecy of Kc is
  166. critical to the security of this protocol. For more information
  167. about GSM authentication, see [GSM-03.20]. See Section 12.1 for more
  168. discussion about the GSM algorithms used in EAP-SIM.
  169. The lack of mutual authentication is a weakness in GSM
  170. authentication. The derived 64-bit cipher key (Kc) is not strong
  171. enough for data networks in which stronger and longer keys are
  172. required. Hence, in EAP-SIM, several RAND challenges are used for
  173. generating several 64-bit Kc keys, which are combined to constitute
  174. stronger keying material. In EAP-SIM, the client issues a random
  175. number NONCE_MT to the network in order to contribute to key
  176. derivation, and to prevent replays of EAP-SIM requests from previous
  177. Haverinen & Salowey Informational [Page 4]
  178. RFC 4186 EAP-SIM Authentication January 2006
  179. exchanges. The NONCE_MT can be conceived as the client's challenge
  180. to the network. EAP-SIM also extends the combined RAND challenges
  181. and other messages with a message authentication code in order to
  182. provide message integrity protection along with mutual
  183. authentication.
  184. EAP-SIM specifies optional support for protecting the privacy of
  185. subscriber identity using the same concept as the GSM, which uses
  186. pseudonyms/temporary identifiers. It also specifies an optional fast
  187. re-authentication procedure.
  188. The security of EAP-SIM builds on underlying GSM mechanisms. The
  189. security properties of EAP-SIM are documented in Section 11 of this
  190. document. Implementers and users of EAP-SIM are advised to carefully
  191. study the security considerations in Section 11 in order to determine
  192. whether the security properties are sufficient for the environment in
  193. question, especially as the secrecy of Kc keys is essential to the
  194. security of EAP-SIM. In brief, EAP-SIM is in no sense weaker than
  195. the GSM mechanisms. In some cases EAP-SIM provides better security
  196. properties than the underlying GSM mechanisms, particularly if the
  197. SIM credentials are only used for EAP-SIM and are not re-used from
  198. GSM/GPRS. Many of the security features of EAP-SIM rely upon the
  199. secrecy of the Kc values in the SIM triplets, so protecting these
  200. values is key to the security of the EAP-SIM protocol.
  201. The 3rd Generation Partnership Project (3GPP) has specified an
  202. enhanced Authentication and Key Agreement (AKA) architecture for the
  203. Universal Mobile Telecommunications System (UMTS). The 3rd
  204. generation AKA mechanism includes mutual authentication, replay
  205. protection, and derivation of longer session keys. EAP-AKA [EAP-AKA]
  206. specifies an EAP method that is based on the 3rd generation AKA.
  207. EAP-AKA, which is a more secure protocol, may be used instead of
  208. EAP-SIM, if 3rd generation identity modules and 3G network
  209. infrastructures are available.
  210. 2. Terms
  211. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  212. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  213. document are to be interpreted as described in [RFC2119].
  214. The terms and abbreviations "authenticator", "backend authentication
  215. server", "EAP server", "peer", "Silently Discard", "Master Session
  216. Key (MSK)", and "Extended Master Session Key (EMSK)" in this document
  217. are to be interpreted as described in [RFC3748].
  218. Haverinen & Salowey Informational [Page 5]
  219. RFC 4186 EAP-SIM Authentication January 2006
  220. This document frequently uses the following terms and abbreviations:
  221. AAA protocol
  222. Authentication, Authorization, and Accounting protocol
  223. AuC
  224. Authentication Centre. The GSM network element that provides
  225. the authentication triplets for authenticating
  226. the subscriber.
  227. Authentication vector
  228. GSM triplets can be alternatively called authentication
  229. vectors.
  230. EAP
  231. Extensible Authentication Protocol
  232. Fast re-authentication
  233. An EAP-SIM authentication exchange that is based on keys
  234. derived upon a preceding full authentication exchange.
  235. The GSM authentication and key exchange algorithms are not
  236. used in the fast re-authentication procedure.
  237. Fast Re-authentication Identity
  238. A fast re-authentication identity of the peer, including an NAI
  239. realm portion in environments where a realm is used. Used on
  240. fast re-authentication only.
  241. Fast Re-authentication Username
  242. The username portion of fast re-authentication identity,
  243. i.e., not including any realm portions.
  244. Full authentication
  245. An EAP-SIM authentication exchange based on the GSM
  246. authentication and key agreement algorithms.
  247. GSM
  248. Global System for Mobile communications.
  249. Haverinen & Salowey Informational [Page 6]
  250. RFC 4186 EAP-SIM Authentication January 2006
  251. GSM Triplet
  252. The tuple formed by the three GSM authentication values RAND,
  253. Kc, and SRES.
  254. IMSI
  255. International Mobile Subscriber Identifier, used in GSM to
  256. identify subscribers.
  257. MAC
  258. Message Authentication Code
  259. NAI
  260. Network Access Identifier
  261. Nonce
  262. A value that is used at most once or that is never repeated
  263. within the same cryptographic context. In general, a nonce can
  264. be predictable (e.g., a counter) or unpredictable (e.g., a
  265. random value). Since some cryptographic properties may depend
  266. on the randomness of the nonce, attention should be paid to
  267. whether a nonce is required to be random or not. In this
  268. document, the term nonce is only used to denote random nonces,
  269. and it is not used to denote counters.
  270. Permanent Identity
  271. The permanent identity of the peer, including an NAI realm
  272. portion in environments where a realm is used. The permanent
  273. identity is usually based on the IMSI. Used on full
  274. authentication only.
  275. Permanent Username
  276. The username portion of permanent identity, i.e., not including
  277. any realm portions.
  278. Pseudonym Identity
  279. A pseudonym identity of the peer, including an NAI realm
  280. portion in environments where a realm is used. Used on
  281. full authentication only.
  282. Haverinen & Salowey Informational [Page 7]
  283. RFC 4186 EAP-SIM Authentication January 2006
  284. Pseudonym Username
  285. The username portion of pseudonym identity, i.e., not including
  286. any realm portions.
  287. SIM
  288. Subscriber Identity Module. The SIM is traditionally a smart
  289. card distributed by a GSM operator.
  290. 3. Overview
  291. Figure 1 shows an overview of the EAP-SIM full authentication
  292. procedure, wherein optional protected success indications are not
  293. used. The authenticator typically communicates with an EAP server
  294. that is located on a backend authentication server using an AAA
  295. protocol. The authenticator shown in the figure is often simply
  296. relaying EAP messages to and from the EAP server, but these backend
  297. AAA communications are not shown.
  298. Peer Authenticator
  299. | EAP-Request/Identity |
  300. |<---------------------------------------------------------|
  301. | |
  302. | EAP-Response/Identity |
  303. |--------------------------------------------------------->|
  304. | |
  305. | EAP-Request/SIM/Start (AT_VERSION_LIST) |
  306. |<---------------------------------------------------------|
  307. | |
  308. | EAP-Response/SIM/Start (AT_NONCE_MT, AT_SELECTED_VERSION)|
  309. |--------------------------------------------------------->|
  310. | |
  311. | EAP-Request/SIM/Challenge (AT_RAND, AT_MAC) |
  312. |<---------------------------------------------------------|
  313. +-------------------------------------+ |
  314. | Peer runs GSM algorithms, verifies | |
  315. | AT_MAC and derives session keys | |
  316. +-------------------------------------+ |
  317. | EAP-Response/SIM/Challenge (AT_MAC) |
  318. |--------------------------------------------------------->|
  319. | |
  320. | EAP-Success |
  321. |<---------------------------------------------------------|
  322. | |
  323. Figure 1: EAP-SIM full authentication procedure
  324. Haverinen & Salowey Informational [Page 8]
  325. RFC 4186 EAP-SIM Authentication January 2006
  326. The first EAP Request issued by the authenticator is
  327. EAP-Request/Identity. On full authentication, the peer's response
  328. includes either the user's International Mobile Subscriber Identity
  329. (IMSI) or a temporary identity (pseudonym) if identity privacy is in
  330. effect, as specified in Section 4.2.
  331. Following the peer's EAP-Response/Identity packet, the peer receives
  332. EAP Requests of Type 18 (SIM) from the EAP server and sends the
  333. corresponding EAP Responses. The EAP packets that are of the Type
  334. SIM also have a Subtype field. On full authentication, the first
  335. EAP-Request/SIM packet is of the Subtype 10 (Start). EAP-SIM packets
  336. encapsulate parameters in attributes, encoded in a Type, Length,
  337. Value format. The packet format and the use of attributes are
  338. specified in Section 8.
  339. The EAP-Request/SIM/Start packet contains the list of EAP-SIM
  340. versions supported by the EAP server in the AT_VERSION_LIST
  341. attribute. This packet may also include attributes for requesting
  342. the subscriber identity, as specified in Section 4.2.
  343. The peer responds to a EAP-Request/SIM/Start with the
  344. EAP-Response/SIM/Start packet, which includes the AT_NONCE_MT
  345. attribute that contains a random number NONCE_MT, chosen by the peer,
  346. and the AT_SELECTED_VERSION attribute that contains the version
  347. number selected by the peer. The version negotiation is protected by
  348. including the version list and the selected version in the
  349. calculation of keying material (Section 7).
  350. After receiving the EAP Response/SIM/Start, the EAP server obtains n
  351. GSM triplets for use in authenticating the subscriber, where n = 2 or
  352. n = 3. From the triplets, the EAP server derives the keying
  353. material, as specified in Section 7. The triplets may be obtained by
  354. contacting an Authentication Centre (AuC) on the GSM network; per GSM
  355. specifications, between 1 and 5 triplets may be obtained at a time.
  356. Triplets may be stored in the EAP server for use at a later time, but
  357. triplets MUST NOT be re-used, except in some error cases that are
  358. specified in Section 10.9.
  359. The next EAP Request the EAP Server issues is of the type SIM and
  360. subtype Challenge (11). It contains the RAND challenges and a
  361. message authentication code attribute AT_MAC to cover the challenges.
  362. The AT_MAC attribute is a general message authentication code
  363. attribute that is used in many EAP-SIM messages.
  364. On receipt of the EAP-Request/SIM/Challenge message, the peer runs
  365. the GSM authentication algorithm and calculates a copy of the message
  366. authentication code. The peer then verifies that the calculated MAC
  367. equals the received MAC. If the MAC's do not match, then the peer
  368. Haverinen & Salowey Informational [Page 9]
  369. RFC 4186 EAP-SIM Authentication January 2006
  370. sends the EAP-Response/SIM/Client-Error packet and the authentication
  371. exchange terminates.
  372. Since the RANDs given to a peer are accompanied by the message
  373. authentication code AT_MAC, and since the peer's NONCE_MT value
  374. contributes to AT_MAC, the peer is able to verify that the EAP-SIM
  375. message is fresh (i.e., not a replay) and that the sender possesses
  376. valid GSM triplets for the subscriber.
  377. If all checks out, the peer responds with the
  378. EAP-Response/SIM/Challenge, containing the AT_MAC attribute that
  379. covers the peer's SRES response values (Section 9.4). The EAP server
  380. verifies that the MAC is correct. Because protected success
  381. indications are not used in this example, the EAP server sends the
  382. EAP-Success packet, indicating that the authentication was
  383. successful. (Protected success indications are discussed in
  384. Section 6.2.) The EAP server may also include derived keying
  385. material in the message it sends to the authenticator. The peer has
  386. derived the same keying material, so the authenticator does not
  387. forward the keying material to the peer along with EAP-Success.
  388. EAP-SIM also includes a separate fast re-authentication procedure
  389. that does not make use of the A3/A8 algorithms or the GSM
  390. infrastructure. Fast re-authentication is based on keys derived on
  391. full authentication. If the peer has maintained state information
  392. for fast re-authentication and wants to use fast re-authentication,
  393. then the peer indicates this by using a specific fast
  394. re-authentication identity instead of the permanent identity or a
  395. pseudonym identity. The fast re-authentication procedure is
  396. described in Section 5.
  397. 4. Operation
  398. 4.1. Version Negotiation
  399. EAP-SIM includes version negotiation so as to allow future
  400. developments in the protocol. The version negotiation is performed
  401. on full authentication and it uses two attributes, AT_VERSION_LIST,
  402. which the server always includes in EAP-Request/SIM/Start, and
  403. AT_SELECTED_VERSION, which the peer includes in
  404. EAP-Response/SIM/Start on full authentication.
  405. AT_VERSION_LIST includes the EAP-SIM versions supported by the
  406. server. If AT_VERSION_LIST does not include a version that is
  407. implemented by the peer and allowed in the peer's security policy,
  408. then the peer MUST send the EAP-Response/SIM/Client-Error packet
  409. (Section 9.7) to the server with the error code "unsupported
  410. version". If a suitable version is included, then the peer includes
  411. Haverinen & Salowey Informational [Page 10]
  412. RFC 4186 EAP-SIM Authentication January 2006
  413. the AT_SELECTED_VERSION attribute, containing the selected version in
  414. the EAP-Response/SIM/Start packet. The peer MUST only indicate a
  415. version that is included in the AT_VERSION_LIST. If several versions
  416. are acceptable, then the peer SHOULD choose the version that occurs
  417. first in the version list.
  418. The version number list of AT_VERSION_LIST and the selected version
  419. of AT_SELECTED_VERSION are included in the key derivation procedure
  420. (Section 7). If an attacker modifies either one of these attributes,
  421. then the peer and the server derive different keying material.
  422. Because K_aut keys are different, the server and peer calculate
  423. different AT_MAC values. Hence, the peer detects that AT_MAC,
  424. included in EAP-Request/SIM/Challenge, is incorrect and sends the
  425. EAP-Response/SIM/Client-Error packet. The authentication procedure
  426. terminates.
  427. 4.2. Identity Management
  428. 4.2.1. Format, Generation and Usage of Peer Identities
  429. 4.2.1.1. General
  430. In the beginning of EAP authentication, the Authenticator or the EAP
  431. server usually issues the EAP-Request/Identity packet to the peer.
  432. The peer responds with the EAP-Response/Identity, which contains the
  433. user's identity. The formats of these packets are specified in
  434. [RFC3748].
  435. GSM subscribers are identified with the International Mobile
  436. Subscriber Identity (IMSI) [GSM-03.03]. The IMSI is a string of not
  437. more than 15 digits. It is composed of a three digit Mobile Country
  438. Code (MCC), a two or three digit Mobile Network Code (MNC), and a
  439. Mobile Subscriber Identification Number (MSIN) of no more than 10
  440. digits. MCC and MNC uniquely identify the GSM operator and help
  441. identify the AuC from which the authentication vectors need to be
  442. retrieved for this subscriber.
  443. Internet AAA protocols identify users with the Network Access
  444. Identifier (NAI) [RFC4282]. When used in a roaming environment, the
  445. NAI is composed of a username and a realm, separated with "@"
  446. (username@realm). The username portion identifies the subscriber
  447. within the realm.
  448. This section specifies the peer identity format used in EAP-SIM. In
  449. this document, the term "identity" or "peer identity" refers to the
  450. whole identity string that is used to identify the peer. The peer
  451. Haverinen & Salowey Informational [Page 11]
  452. RFC 4186 EAP-SIM Authentication January 2006
  453. identity may include a realm portion. "Username" refers to the
  454. portion of the peer identity that identifies the user, i.e., the
  455. username does not include the realm portion.
  456. 4.2.1.2. Identity Privacy Support
  457. EAP-SIM includes optional identity privacy (anonymity) support that
  458. can be used to hide the cleartext permanent identity and thereby make
  459. the subscriber's EAP exchanges untraceable to eavesdroppers. Because
  460. the permanent identity never changes, revealing it would help
  461. observers to track the user. The permanent identity is usually based
  462. on the IMSI, which may further help the tracking, because the same
  463. identifier may be used in other contexts as well. Identity privacy
  464. is based on temporary identities, or pseudonyms, which are equivalent
  465. to but separate from the Temporary Mobile Subscriber Identities
  466. (TMSI) that are used on cellular networks. Please see Section 12.2
  467. for security considerations regarding identity privacy.
  468. 4.2.1.3. Username Types in EAP-SIM identities
  469. There are three types of usernames in EAP-SIM peer identities:
  470. (1) Permanent usernames. For example,
  471. 1123456789098765@myoperator.com might be a valid permanent identity.
  472. In this example, 1123456789098765 is the permanent username.
  473. (2) Pseudonym usernames. For example, 3s7ah6n9q@myoperator.com might
  474. be a valid pseudonym identity. In this example, 3s7ah6n9q is the
  475. pseudonym username.
  476. (3) Fast re-authentication usernames. For example,
  477. 53953754@myoperator.com might be a valid fast re-authentication
  478. identity. In this case, 53953754 is the fast re-authentication
  479. username. Unlike permanent usernames and pseudonym usernames, fast
  480. re-authentication usernames are one-time identifiers, which are not
  481. re-used across EAP exchanges.
  482. The first two types of identities are used only on full
  483. authentication and the last one only on fast re-authentication. When
  484. the optional identity privacy support is not used, the non-pseudonym
  485. permanent identity is used on full authentication. The fast
  486. re-authentication exchange is specified in Section 5.
  487. 4.2.1.4. Username Decoration
  488. In some environments, the peer may need to decorate the identity by
  489. prepending or appending the username with a string, in order to
  490. indicate supplementary AAA routing information in addition to the NAI
  491. Haverinen & Salowey Informational [Page 12]
  492. RFC 4186 EAP-SIM Authentication January 2006
  493. realm. (The usage of an NAI realm portion is not considered
  494. decoration.) Username decoration is out of the scope of this
  495. document. However, it should be noted that username decoration might
  496. prevent the server from recognizing a valid username. Hence,
  497. although the peer MAY use username decoration in the identities that
  498. the peer includes in EAP-Response/Identity, and although the EAP
  499. server MAY accept a decorated peer username in this message, the peer
  500. or the EAP server MUST NOT decorate any other peer identities that
  501. are used in various EAP-SIM attributes. Only the identity used in
  502. the EAP-Response/Identity may be decorated.
  503. 4.2.1.5. NAI Realm Portion
  504. The peer MAY include a realm portion in the peer identity, as per the
  505. NAI format. The use of a realm portion is not mandatory.
  506. If a realm is used, the realm MAY be chosen by the subscriber's home
  507. operator and it MAY be a configurable parameter in the EAP-SIM peer
  508. implementation. In this case, the peer is typically configured with
  509. the NAI realm of the home operator. Operators MAY reserve a specific
  510. realm name for EAP-SIM users. This convention makes it easy to
  511. recognize that the NAI identifies a GSM subscriber. Such a reserved
  512. NAI realm may be a useful hint as to the first authentication method
  513. to use during method negotiation. When the peer is using a pseudonym
  514. username instead of the permanent username, the peer selects the
  515. realm name portion similarly as it select the realm portion when
  516. using the permanent username.
  517. If no configured realm name is available, the peer MAY derive the
  518. realm name from the MCC and MNC portions of the IMSI. A RECOMMENDED
  519. way to derive the realm from the IMSI using the realm 3gppnetwork.org
  520. is specified in [3GPP-TS-23.003].
  521. Some old implementations derive the realm name from the IMSI by
  522. concatenating "mnc", the MNC digits of IMSI, ".mcc", the MCC digits
  523. of IMSI, and ".owlan.org". For example, if the IMSI is
  524. 123456789098765, and the MNC is three digits long, then the derived
  525. realm name is "mnc456.mcc123.owlan.org". As there are no DNS servers
  526. running at owlan.org, these realm names can only be used with
  527. manually configured AAA routing. New implementations SHOULD use the
  528. mechanism specified in [3GPP-TS-23.003] instead of owlan.org.
  529. The IMSI is a string of digits without any explicit structure, so the
  530. peer may not be able to determine the length of the MNC portion. If
  531. the peer is not able to determine whether the MNC is two or three
  532. digits long, the peer MAY use a 3-digit MNC. If the correct length
  533. of the MNC is two, then the MNC used in the realm name includes the
  534. first digit of the MSIN. Hence, when configuring AAA networks for
  535. Haverinen & Salowey Informational [Page 13]
  536. RFC 4186 EAP-SIM Authentication January 2006
  537. operators that have 2-digit MNCs, the network SHOULD also be prepared
  538. for realm names with incorrect, 3-digit MNCs.
  539. 4.2.1.6. Format of the Permanent Username
  540. The non-pseudonym permanent username SHOULD be derived from the IMSI.
  541. In this case, the permanent username MUST be of the format "1" |
  542. IMSI, where the character "|" denotes concatenation. In other words,
  543. the first character of the username is the digit one (ASCII value 31
  544. hexadecimal), followed by the IMSI. The IMSI is encoded as an ASCII
  545. string that consists of not more than 15 decimal digits (ASCII values
  546. between 30 and 39 hexadecimal), one character per IMSI digit, in the
  547. order specified in [GSM-03.03]. For example, a permanent username
  548. derived from the IMSI 295023820005424 would be encoded as the ASCII
  549. string "1295023820005424" (byte values in hexadecimal notation: 31 32
  550. 39 35 30 32 33 38 32 30 30 30 35 34 32 34).
  551. The EAP server MAY use the leading "1" as a hint to try EAP-SIM as
  552. the first authentication method during method negotiation, rather
  553. than, for example EAP/AKA. The EAP-SIM server MAY propose EAP-SIM,
  554. even if the leading character was not "1".
  555. Alternatively, an implementation MAY choose a permanent username that
  556. is not based on the IMSI. In this case, the selection of the
  557. username, its format, and its processing is out of the scope of this
  558. document. In this case, the peer implementation MUST NOT prepend any
  559. leading characters to the username.
  560. 4.2.1.7. Generating Pseudonyms and Fast Re-authentication Identities by
  561. the Server
  562. Pseudonym usernames and fast re-authentication identities are
  563. generated by the EAP server. The EAP server produces pseudonym
  564. usernames and fast re-authentication identities in an
  565. implementation-dependent manner. Only the EAP server needs to be
  566. able to map the pseudonym username to the permanent identity, or to
  567. recognize a fast re-authentication identity.
  568. EAP-SIM includes no provisions to ensure that the same EAP server
  569. that generated a pseudonym username will be used on the
  570. authentication exchange when the pseudonym username is used. It is
  571. recommended that the EAP servers implement some centralized mechanism
  572. to allow all EAP servers of the home operator to map pseudonyms
  573. generated by other severs to the permanent identity. If no such
  574. mechanism is available, then the EAP server failing to understand a
  575. pseudonym issued by another server can request the that peer send the
  576. permanent identity.
  577. Haverinen & Salowey Informational [Page 14]
  578. RFC 4186 EAP-SIM Authentication January 2006
  579. When issuing a fast re-authentication identity, the EAP server may
  580. include a realm name in the identity to make the fast
  581. re-authentication request be forwarded to the same EAP server.
  582. When generating fast re-authentication identities, the server SHOULD
  583. choose a fresh, new fast re-authentication identity that is different
  584. from the previous ones that were used after the same full
  585. authentication exchange. A full authentication exchange and the
  586. associated fast re-authentication exchanges are referred to here as
  587. the same "full authentication context". The fast re-authentication
  588. identity SHOULD include a random component. This random component
  589. works as a full authentication context identifier. A
  590. context-specific fast re-authentication identity can help the server
  591. to detect whether its fast re-authentication state information
  592. matches that of its peer (in other words, whether the state
  593. information is from the same full authentication exchange). The
  594. random component also makes the fast re-authentication identities
  595. unpredictable, so an attacker cannot initiate a fast
  596. re-authentication exchange to get the server's EAP-Request/SIM/
  597. Re-authentication packet.
  598. Transmitting pseudonyms and fast re-authentication identities from
  599. the server to the peer is discussed in Section 4.2.1.8. The
  600. pseudonym is transmitted as a username, without an NAI realm, and the
  601. fast re-authentication identity is transmitted as a complete NAI,
  602. including a realm portion if a realm is required. The realm is
  603. included in the fast re-authentication identity to allow the server
  604. to include a server-specific realm.
  605. Regardless of the construction method, the pseudonym username MUST
  606. conform to the grammar specified for the username portion of an NAI.
  607. The fast re-authentication identity also MUST conform to the NAI
  608. grammar. The EAP servers that the subscribers of an operator can use
  609. MUST ensure that the pseudonym usernames and the username portions
  610. used in fast re-authentication identities they generate are unique.
  611. In any case, it is necessary that permanent usernames, pseudonym
  612. usernames, and fast re-authentication usernames are separate and
  613. recognizable from each other. It is also desirable that EAP-SIM and
  614. EAP-AKA [EAP-AKA] usernames be distinguishable from each other as an
  615. aid for the server on which method to offer.
  616. In general, it is the task of the EAP server and the policies of its
  617. administrator to ensure sufficient separation of the usernames.
  618. Pseudonym usernames and fast re-authentication usernames are both
  619. produced and used by the EAP server. The EAP server MUST compose
  620. pseudonym usernames and fast re-authentication usernames so that it
  621. can determine if an NAI username is an EAP-SIM pseudonym username or
  622. Haverinen & Salowey Informational [Page 15]
  623. RFC 4186 EAP-SIM Authentication January 2006
  624. an EAP-SIM fast re-authentication username. For instance, when the
  625. usernames have been derived from the IMSI, the server could use
  626. different leading characters in the pseudonym usernames and fast
  627. re-authentication usernames (e.g., the pseudonym could begin with a
  628. leading "3" character). When mapping a fast re-authentication
  629. identity to a permanent identity, the server SHOULD only examine the
  630. username portion of the fast re-authentication identity and ignore
  631. the realm portion of the identity.
  632. Because the peer may fail to save a pseudonym username sent in an
  633. EAP-Request/SIM/Challenge, for example due to malfunction, the EAP
  634. server SHOULD maintain at least the most recently used pseudonym
  635. username in addition to the most recently issued pseudonym username.
  636. If the authentication exchange is not completed successfully, then
  637. the server SHOULD NOT overwrite the pseudonym username that was
  638. issued during the most recent successful authentication exchange.
  639. 4.2.1.8. Transmitting Pseudonyms and Fast Re-authentication Identities
  640. to the Peer
  641. The server transmits pseudonym usernames and fast re-authentication
  642. identities to the peer in cipher, using the AT_ENCR_DATA attribute.
  643. The EAP-Request/SIM/Challenge message MAY include an encrypted
  644. pseudonym username and/or an encrypted fast re-authentication
  645. identity in the value field of the AT_ENCR_DATA attribute. Because
  646. identity privacy support and fast re-authentication are optional
  647. implementations, the peer MAY ignore the AT_ENCR_DATA attribute and
  648. always use the permanent identity. On fast re-authentication
  649. (discussed in Section 5), the server MAY include a new, encrypted
  650. fast re-authentication identity in the
  651. EAP-Request/SIM/Re-authentication message.
  652. On receipt of the EAP-Request/SIM/Challenge, the peer MAY decrypt the
  653. encrypted data in AT_ENCR_DATA. If the authentication exchange is
  654. successful, and the encrypted data includes a pseudonym username,
  655. then the peer may use the obtained pseudonym username on the next
  656. full authentication. If a fast re-authentication identity is
  657. included, then the peer MAY save it together with other fast
  658. re-authentication state information, as discussed in Section 5, for
  659. the next fast re-authentication. If the authentication exchange does
  660. not complete successfully, the peer MUST ignore the received
  661. pseudonym username and the fast re-authentication identity.
  662. If the peer does not receive a new pseudonym username in the
  663. EAP-Request/SIM/Challenge message, the peer MAY use an old pseudonym
  664. username instead of the permanent username on the next full
  665. authentication. The username portions of fast re-authentication
  666. Haverinen & Salowey Informational [Page 16]
  667. RFC 4186 EAP-SIM Authentication January 2006
  668. identities are one-time usernames, which the peer MUST NOT re-use.
  669. When the peer uses a fast re-authentication identity in an EAP
  670. exchange, the peer MUST discard the fast re-authentication identity
  671. and not re-use it in another EAP authentication exchange, even if the
  672. authentication exchange was not completed.
  673. 4.2.1.9. Usage of the Pseudonym by the Peer
  674. When the optional identity privacy support is used on full
  675. authentication, the peer MAY use a pseudonym username received as
  676. part of a previous full authentication sequence as the username
  677. portion of the NAI. The peer MUST NOT modify the pseudonym username
  678. received in AT_NEXT_PSEUDONYM. However, as discussed above, the peer
  679. MAY need to decorate the username in some environments by appending
  680. or prepending the username with a string that indicates supplementary
  681. AAA routing information.
  682. When using a pseudonym username in an environment where a realm
  683. portion is used, the peer concatenates the received pseudonym
  684. username with the "@" character and an NAI realm portion. The
  685. selection of the NAI realm is discussed above. The peer can select
  686. the realm portion similarly, regardless of whether it uses the
  687. permanent username or a pseudonym username.
  688. 4.2.1.10. Usage of the Fast Re-authentication Identity by the Peer
  689. On fast re-authentication, the peer uses the fast re-authentication
  690. identity that was received as part of the previous authentication
  691. sequence. A new re-authentication identity may be delivered as part
  692. of both full authentication and fast re-authentication. The peer
  693. MUST NOT modify the username part of the fast re-authentication
  694. identity received in AT_NEXT_REAUTH_ID, except in cases when username
  695. decoration is required. Even in these cases, the "root" fast
  696. re-authentication username must not be modified, but it may be
  697. appended or prepended with another string.
  698. 4.2.2. Communicating the Peer Identity to the Server
  699. 4.2.2.1. General
  700. The peer identity MAY be communicated to the server with the
  701. EAP-Response/Identity message. This message MAY contain the
  702. permanent identity, a pseudonym identity, or a fast re-authentication
  703. identity. If the peer uses the permanent identity or a pseudonym
  704. identity, which the server is able to map to the permanent identity,
  705. then the authentication proceeds as discussed in the overview of
  706. Section 3. If the peer uses a fast re-authentication identity, and
  707. if the fast re-authentication identity matches with a valid fast
  708. Haverinen & Salowey Informational [Page 17]
  709. RFC 4186 EAP-SIM Authentication January 2006
  710. re-authentication identity maintained by the server, and if the
  711. server agrees to use fast re-authentication, then a fast
  712. re-authentication exchange is performed, as described in Section 5.
  713. The peer identity can also be transmitted from the peer to the server
  714. using EAP-SIM messages instead of the EAP-Response/Identity. In this
  715. case, the server includes an identity-requesting attribute
  716. (AT_ANY_ID_REQ, AT_FULLAUTH_ID_REQ or AT_PERMANENT_ID_REQ) in the
  717. EAP-Request/SIM/Start message, and the peer includes the AT_IDENTITY
  718. attribute, which contains the peer's identity, in the
  719. EAP-Response/SIM/Start message. The AT_ANY_ID_REQ attribute is a
  720. general identity-requesting attribute, which the server uses if it
  721. does not specify which kind of an identity the peer should return in
  722. AT_IDENTITY. The server uses the AT_FULLAUTH_ID_REQ attribute to
  723. request either the permanent identity or a pseudonym identity. The
  724. server uses the AT_PERMANENT_ID_REQ attribute to request that the
  725. peer send its permanent identity.
  726. The identity format in the AT_IDENTITY attribute is the same as in
  727. the EAP-Response/Identity packet (except that identity decoration is
  728. not allowed). The AT_IDENTITY attribute contains a permanent
  729. identity, a pseudonym identity, or a fast re-authentication identity.
  730. Please note that the EAP-SIM peer and the EAP-SIM server only process
  731. the AT_IDENTITY attribute; entities that only pass through EAP
  732. packets do not process this attribute. Hence, the authenticator and
  733. other intermediate AAA elements (such as possible AAA proxy servers)
  734. will continue to refer to the peer with the original identity from
  735. the EAP-Response/Identity packet unless the identity authenticated in
  736. the AT_IDENTITY attribute is communicated to them in another way
  737. within the AAA protocol.
  738. 4.2.2.2. Relying on EAP-Response/Identity Discouraged
  739. The EAP-Response/Identity packet is not method-specific, so in many
  740. implementations it may be handled by an EAP Framework. This
  741. introduces an additional layer of processing between the EAP peer and
  742. EAP server. The extra layer of processing may cache identity
  743. responses or add decorations to the identity. A modification of the
  744. identity response will cause the EAP peer and EAP server to use
  745. different identities in the key derivation, which will cause the
  746. protocol to fail.
  747. For this reason, it is RECOMMENDED that the EAP peer and server use
  748. the method-specific identity attributes in EAP-SIM, and the server is
  749. strongly discouraged from relying upon the EAP-Response/Identity.
  750. Haverinen & Salowey Informational [Page 18]
  751. RFC 4186 EAP-SIM Authentication January 2006
  752. In particular, if the EAP server receives a decorated identity in
  753. EAP-Response/Identity, then the EAP server MUST use the
  754. identity-requesting attributes to request that the peer send an
  755. unmodified and undecorated copy of the identity in AT_IDENTITY.
  756. 4.2.3. Choice of Identity for the EAP-Response/Identity
  757. If EAP-SIM peer is started upon receiving an EAP-Request/Identity
  758. message, then the peer MAY use an EAP-SIM identity in the EAP-
  759. Response/Identity packet. In this case, the peer performs the
  760. following steps.
  761. If the peer has maintained fast re-authentication state information
  762. and wants to use fast re-authentication, then the peer transmits the
  763. fast re-authentication identity in EAP-Response/Identity.
  764. Else, if the peer has a pseudonym username available, then the peer
  765. transmits the pseudonym identity in EAP-Response/Identity.
  766. In other cases, the peer transmits the permanent identity in
  767. EAP-Response/Identity.
  768. 4.2.4. Server Operation in the Beginning of EAP-SIM Exchange
  769. As discussed in Section 4.2.2.2, the server SHOULD NOT rely on an
  770. identity string received in EAP-Response/Identity. Therefore, the
  771. RECOMMENDED way to start an EAP-SIM exchange is to ignore any
  772. received identity strings. The server SHOULD begin the EAP-SIM
  773. exchange by issuing the EAP-Request/SIM/Start packet with an
  774. identity-requesting attribute to indicate that the server wants the
  775. peer to include an identity in the AT_IDENTITY attribute of the EAP-
  776. Response/SIM/Start message. Three methods to request an identity
  777. from the peer are discussed below.
  778. If the server chooses not to ignore the contents of EAP-
  779. Response/Identity, then the server may have already received an EAP-
  780. SIM identity in this packet. However, if the EAP server has not
  781. received any EAP-SIM peer identity (permanent identity, pseudonym
  782. identity, or fast re-authentication identity) from the peer when
  783. sending the first EAP-SIM request, or if the EAP server has received
  784. an EAP-Response/Identity packet but the contents do not appear to be
  785. a valid permanent identity, pseudonym identity or a re-authentication
  786. identity, then the server MUST request an identity from the peer
  787. using one of the methods below.
  788. The server sends the EAP-Request/SIM/Start message with the
  789. AT_PERMANENT_ID_REQ attribute to indicate that the server wants the
  790. peer to include the permanent identity in the AT_IDENTITY attribute
  791. Haverinen & Salowey Informational [Page 19]
  792. RFC 4186 EAP-SIM Authentication January 2006
  793. of the EAP-Response/SIM/Start message. This is done in the following
  794. cases:
  795. o The server does not support fast re-authentication or identity
  796. privacy.
  797. o The server decided to process a received identity, and the server
  798. recognizes the received identity as a pseudonym identity but the
  799. server is not able to map the pseudonym identity to a permanent
  800. identity.
  801. The server issues the EAP-Request/SIM/Start packet with the
  802. AT_FULLAUTH_ID_REQ attribute to indicate that the server wants the
  803. peer to include a full authentication identity (pseudonym identity or
  804. permanent identity) in the AT_IDENTITY attribute of the
  805. EAP-Response/SIM/Start message. This is done in the following cases:
  806. o The server does not support fast re-authentication and the server
  807. supports identity privacy.
  808. o The server decided to process a received identity, and the server
  809. recognizes the received identity as a re-authentication identity
  810. but the server is not able to map the re-authentication identity
  811. to a permanent identity.
  812. The server issues the EAP-Request/SIM/Start packet with the
  813. AT_ANY_ID_REQ attribute to indicate that the server wants the peer to
  814. include an identity in the AT_IDENTITY attribute of the
  815. EAP-Response/SIM/Start message, and the server does not indicate any
  816. preferred type for the identity. This is done in other cases, such
  817. as when the server ignores a received EAP-Response/Identity, the
  818. server does not have any identity, or the server does not recognize
  819. the format of a received identity.
  820. 4.2.5. Processing of EAP-Request/SIM/Start by the Peer
  821. Upon receipt of an EAP-Request/SIM/Start message, the peer MUST
  822. perform the following steps.
  823. If the EAP-Request/SIM/Start does not include an identity request
  824. attribute, then the peer responds with EAP-Response/SIM/Start without
  825. AT_IDENTITY. The peer includes the AT_SELECTED_VERSION and
  826. AT_NONCE_MT attributes, because the exchange is a full authentication
  827. exchange.
  828. If the EAP-Request/SIM/Start includes AT_PERMANENT_ID_REQ, and if the
  829. peer does not have a pseudonym available, then the peer MUST respond
  830. with EAP-Response/SIM/Start and include the permanent identity in
  831. Haverinen & Salowey Informational [Page 20]
  832. RFC 4186 EAP-SIM Authentication January 2006
  833. AT_IDENTITY. If the peer has a pseudonym available, then the peer
  834. MAY refuse to send the permanent identity; hence, in this case the
  835. peer MUST either respond with EAP-Response/SIM/Start and include the
  836. permanent identity in AT_IDENTITY or respond with EAP-Response/SIM/
  837. Client-Error packet with the code "unable to process packet".
  838. If the EAP-Request/SIM/Start includes AT_FULL_AUTH_ID_REQ, and if the
  839. peer has a pseudonym available, then the peer SHOULD respond with
  840. EAP-Response/SIM/Start and include the pseudonym identity in
  841. AT_IDENTITY. If the peer does not have a pseudonym when it receives
  842. this message, then the peer MUST respond with EAP-Response/SIM/Start
  843. and include the permanent identity in AT_IDENTITY. The Peer MUST NOT
  844. use a re-authentication identity in the AT_IDENTITY attribute.
  845. If the EAP-Request/SIM/Start includes AT_ANY_ID_REQ, and if the peer
  846. has maintained fast re-authentication state information and the peer
  847. wants to use fast re-authentication, then the peer responds with
  848. EAP-Response/SIM/Start and includes the fast re-authentication
  849. identity in AT_IDENTITY. Else, if the peer has a pseudonym identity
  850. available, then the peer responds with EAP-Response/SIM/Start and
  851. includes the pseudonym identity in AT_IDENTITY. Else, the peer
  852. responds with EAP-Response/SIM/Start and includes the permanent
  853. identity in AT_IDENTITY.
  854. An EAP-SIM exchange may include several EAP/SIM/Start rounds. The
  855. server may issue a second EAP-Request/SIM/Start if it was not able to
  856. recognize the identity that the peer used in the previous AT_IDENTITY
  857. attribute. At most, three EAP/SIM/Start rounds can be used, so the
  858. peer MUST NOT respond to more than three EAP-Request/SIM/Start
  859. messages within an EAP exchange. The peer MUST verify that the
  860. sequence of EAP-Request/SIM/Start packets that the peer receives
  861. comply with the sequencing rules defined in this document. That is,
  862. AT_ANY_ID_REQ can only be used in the first EAP-Request/SIM/Start; in
  863. other words, AT_ANY_ID_REQ MUST NOT be used in the second or third
  864. EAP-Request/SIM/Start. AT_FULLAUTH_ID_REQ MUST NOT be used if the
  865. previous EAP-Request/SIM/Start included AT_PERMANENT_ID_REQ. The
  866. peer operation, in cases when it receives an unexpected attribute or
  867. an unexpected message, is specified in Section 6.3.1.
  868. 4.2.6. Attacks Against Identity Privacy
  869. The section above specifies two possible ways the peer can operate
  870. upon receipt of AT_PERMANENT_ID_REQ. This is because a received
  871. AT_PERMANENT_ID_REQ does not necessarily originate from the valid
  872. network, but an active attacker may transmit an EAP-Request/SIM/
  873. Start packet with an AT_PERMANENT_ID_REQ attribute to the peer, in an
  874. effort to find out the true identity of the user. If the peer does
  875. not want to reveal its permanent identity, then the peer sends the
  876. Haverinen & Salowey Informational [Page 21]
  877. RFC 4186 EAP-SIM Authentication January 2006
  878. EAP-Response/SIM/Client-Error packet with the error code "unable to
  879. process packet", and the authentication exchange terminates.
  880. Basically, there are two different policies that the peer can employ
  881. with regard to AT_PERMANENT_ID_REQ. A "conservative" peer assumes
  882. that the network is able to maintain pseudonyms robustly. Therefore,
  883. if a conservative peer has a pseudonym username, the peer responds
  884. with EAP-Response/SIM/Client-Error to the EAP packet with
  885. AT_PERMANENT_ID_REQ, because the peer believes that the valid network
  886. is able to map the pseudonym identity to the peer's permanent
  887. identity. (Alternatively, the conservative peer may accept
  888. AT_PERMANENT_ID_REQ in certain circumstances, for example, if the
  889. pseudonym was received a long time ago.) The benefit of this policy
  890. is that it protects the peer against active attacks on anonymity. On
  891. the other hand, a "liberal" peer always accepts the
  892. AT_PERMANENT_ID_REQ and responds with the permanent identity. The
  893. benefit of this policy is that it works even if the valid network
  894. sometimes loses pseudonyms and is not able to map them to the
  895. permanent identity.
  896. 4.2.7. Processing of AT_IDENTITY by the Server
  897. When the server receives an EAP-Response/SIM/Start message with the
  898. AT_IDENTITY (in response to the server's identity requesting
  899. attribute), the server MUST operate as follows.
  900. If the server used AT_PERMANENT_ID_REQ, and if the AT_IDENTITY does
  901. not contain a valid permanent identity, then the server sends
  902. EAP-Request/SIM/Notification with AT_NOTIFICATION code "General
  903. failure" (16384), and the EAP exchange terminates. If the server
  904. recognizes the permanent identity and is able to continue, then the
  905. server proceeds with full authentication by sending EAP-Request/SIM/
  906. Challenge.
  907. If the server used AT_FULLAUTH_ID_REQ, and if AT_IDENTITY contains a
  908. valid permanent identity or a pseudonym identity that the server can
  909. map to a valid permanent identity, then the server proceeds with full
  910. authentication by sending EAP-Request/SIM/Challenge. If AT_IDENTITY
  911. contains a pseudonym identity that the server is not able to map to a
  912. valid permanent identity, or an identity that the server is not able
  913. to recognize or classify, then the server sends EAP-Request/SIM/Start
  914. with AT_PERMANENT_ID_REQ.
  915. If the server used AT_ANY_ID_REQ, and if the AT_IDENTITY contains a
  916. valid permanent identity or a pseudonym identity that the server can
  917. map to a valid permanent identity, then the server proceeds with full
  918. authentication by sending EAP-Request/SIM/Challenge.
  919. Haverinen & Salowey Informational [Page 22]
  920. RFC 4186 EAP-SIM Authentication January 2006
  921. If the server used AT_ANY_ID_REQ, and if AT_IDENTITY contains a valid
  922. fast re-authentication identity and the server agrees on using
  923. re-authentication, then the server proceeds with fast
  924. re-authentication by sending EAP-Request/SIM/Re-authentication
  925. (Section 5).
  926. If the server used AT_ANY_ID_REQ, and if the peer sent an
  927. EAP-Response/SIM/Start with only AT_IDENTITY (indicating
  928. re-authentication), but the server is not able to map the identity to
  929. a permanent identity, then the server sends EAP-Request/SIM/Start
  930. with AT_FULLAUTH_ID_REQ.
  931. If the server used AT_ANY_ID_REQ, and if AT_IDENTITY contains a valid
  932. fast re-authentication identity that the server is able to map to a
  933. permanent identity, and if the server does not want to use fast
  934. re-authentication, then the server sends EAP-Request/SIM/Start
  935. without any identity requesting attributes.
  936. If the server used AT_ANY_ID_REQ, and AT_IDENTITY contains an
  937. identity that the server recognizes as a pseudonym identity but the
  938. server is not able to map the pseudonym identity to a permanent
  939. identity, then the server sends EAP-Request/SIM/Start with
  940. AT_PERMANENT_ID_REQ.
  941. If the server used AT_ANY_ID_REQ, and AT_IDENTITY contains an
  942. identity that the server is not able to recognize or classify, then
  943. the server sends EAP-Request/SIM/Start with AT_FULLAUTH_ID_REQ.
  944. 4.3. Message Sequence Examples (Informative)
  945. This section contains non-normative message sequence examples to
  946. illustrate how the peer identity can be communicated to the server.
  947. Haverinen & Salowey Informational [Page 23]
  948. RFC 4186 EAP-SIM Authentication January 2006
  949. 4.3.1. Full Authentication
  950. This case for full authentication is illustrated below in Figure 2.
  951. In this case, AT_IDENTITY contains either the permanent identity or a
  952. pseudonym identity. The same sequence is also used in case the
  953. server uses the AT_FULLAUTH_ID_REQ in EAP-Request/SIM/Start.
  954. Peer Authenticator
  955. | |
  956. | +------------------------------+
  957. | | Server does not have a |
  958. | | Subscriber identity available|
  959. | | When starting EAP-SIM |
  960. | +------------------------------+
  961. | |
  962. | EAP-Request/SIM/Start |
  963. | (AT_ANY_ID_REQ, AT_VERSION_LIST) |
  964. |<------------------------------------------------------|
  965. | |
  966. | |
  967. | EAP-Response/SIM/Start |
  968. | (AT_IDENTITY, AT_NONCE_MT, |
  969. | AT_SELECTED_VERSION) |
  970. |------------------------------------------------------>|
  971. | |
  972. Figure 2: Requesting any identity, full authentication
  973. If the peer uses its full authentication identity and the AT_IDENTITY
  974. attribute contains a valid permanent identity or a valid pseudonym
  975. identity that the EAP server is able to map to the permanent
  976. identity, then the full authentication sequence proceeds as usual
  977. with the EAP Server issuing the EAP-Request/SIM/Challenge message.
  978. Haverinen & Salowey Informational [Page 24]
  979. RFC 4186 EAP-SIM Authentication January 2006
  980. 4.3.2. Fast Re-authentication
  981. The case when the server uses the AT_ANY_ID_REQ and the peer wants to
  982. perform fast re-authentication is illustrated below in Figure 3.
  983. Peer Authenticator
  984. | |
  985. | +------------------------------+
  986. | | Server does not have a |
  987. | | Subscriber identity available|
  988. | | When starting EAP-SIM |
  989. | +------------------------------+
  990. | |
  991. | EAP-Request/SIM/Start |
  992. | (AT_ANY_ID_REQ, AT_VERSION_LIST) |
  993. |<------------------------------------------------------|
  994. | |
  995. | |
  996. | EAP-Response/SIM/Start |
  997. | (AT_IDENTITY containing a fast re-auth. identity) |
  998. |------------------------------------------------------>|
  999. | |
  1000. Figure 3: Requesting any identity, fast re-authentication
  1001. On fast re-authentication, if the AT_IDENTITY attribute contains a
  1002. valid fast re-authentication identity and the server agrees on using
  1003. fast re-authentication, then the server proceeds with the fast
  1004. re-authentication sequence and issues the EAP-Request/SIM/
  1005. Re-authentication packet, as specified in Section 5.
  1006. Haverinen & Salowey Informational [Page 25]
  1007. RFC 4186 EAP-SIM Authentication January 2006
  1008. 4.3.3. Fall Back to Full Authentication
  1009. Figure 4 illustrates cases in which the server does not recognize the
  1010. fast re-authentication identity the peer used in AT_IDENTITY, and
  1011. issues a second EAP-Request/SIM/Start message.
  1012. Peer Authenticator
  1013. | |
  1014. | +------------------------------+
  1015. | | Server does not have a |
  1016. | | Subscriber identity available|
  1017. | | When starting EAP-SIM |
  1018. | +------------------------------+
  1019. | |
  1020. | EAP-Request/SIM/Start |
  1021. | (AT_ANY_ID_REQ, AT_VERSION_LIST) |
  1022. |<------------------------------------------------------|
  1023. | |
  1024. | |
  1025. | EAP-Response/SIM/Start |
  1026. | (AT_IDENTITY containing a fast re-auth. identity) |
  1027. |------------------------------------------------------>|
  1028. | |
  1029. | +------------------------------+
  1030. | | Server does not recognize |
  1031. | | The fast re-auth. |
  1032. | | Identity |
  1033. | +------------------------------+
  1034. | |
  1035. | EAP-Request/SIM/Start |
  1036. | (AT_FULLAUTH_ID_REQ, AT_VERSION_LIST) |
  1037. |<------------------------------------------------------|
  1038. | |
  1039. | |
  1040. | EAP-Response/SIM/Start |
  1041. | (AT_IDENTITY with a full-auth. identity, AT_NONCE_MT, |
  1042. | AT_SELECTED_VERSION) |
  1043. |------------------------------------------------------>|
  1044. | |
  1045. Figure 4: Fall back to full authentication
  1046. Haverinen & Salowey Informational [Page 26]
  1047. RFC 4186 EAP-SIM Authentication January 2006
  1048. 4.3.4. Requesting the Permanent Identity 1
  1049. Figure 5 illustrates the case in which the EAP server fails to map
  1050. the pseudonym identity included in the EAP-Response/Identity packet
  1051. to a valid permanent identity.
  1052. Peer Authenticator
  1053. | |
  1054. | EAP-Request/Identity |
  1055. |<------------------------------------------------------|
  1056. | |
  1057. | EAP-Response/Identity |
  1058. | (Includes a pseudonym) |
  1059. |------------------------------------------------------>|
  1060. | |
  1061. | +------------------------------+
  1062. | | Server fails to map the |
  1063. | | Pseudonym to a permanent id. |
  1064. | +------------------------------+
  1065. | EAP-Request/SIM/Start |
  1066. | (AT_PERMANENT_ID_REQ, AT_VERSION_LIST) |
  1067. |<------------------------------------------------------|
  1068. | |
  1069. | EAP-Response/SIM/Start |
  1070. | (AT_IDENTITY with permanent identity, AT_NONCE_MT, |
  1071. | AT_SELECTED_VERSION) |
  1072. |------------------------------------------------------>|
  1073. | |
  1074. Figure 5: Requesting the permanent identity
  1075. If the server recognizes the permanent identity, then the
  1076. authentication sequence proceeds as usual with the EAP Server issuing
  1077. the EAP-Request/SIM/Challenge message.
  1078. Haverinen & Salowey Informational [Page 27]
  1079. RFC 4186 EAP-SIM Authentication January 2006
  1080. 4.3.5. Requesting the Permanent Identity 2
  1081. Figure 6 illustrates the case in which the EAP server fails to map
  1082. the pseudonym included in the AT_IDENTITY attribute to a valid
  1083. permanent identity.
  1084. Peer Authenticator
  1085. | |
  1086. | +------------------------------+
  1087. | | Server does not have a |
  1088. | | Subscriber identity available|
  1089. | | When starting EAP-SIM |
  1090. | +------------------------------+
  1091. | EAP-Request/SIM/Start |
  1092. | (AT_ANY_ID_REQ, AT_VERSION_LIST) |
  1093. |<------------------------------------------------------|
  1094. | |
  1095. |EAP-Response/SIM/Start |
  1096. |(AT_IDENTITY with a pseudonym identity, AT_NONCE_MT, |
  1097. | AT_SELECTED_VERSION) |
  1098. |------------------------------------------------------>|
  1099. | +-------------------------------+
  1100. | | Server fails to map the |
  1101. | | Pseudonym in AT_IDENTITY |
  1102. | | to a valid permanent identity |
  1103. | +-------------------------------+
  1104. | |
  1105. | EAP-Request/SIM/Start |
  1106. | (AT_PERMANENT_ID_REQ, AT_VERSION_LIST) |
  1107. |<------------------------------------------------------|
  1108. | |
  1109. | EAP-Response/SIM/Start |
  1110. | (AT_IDENTITY with permanent identity, |
  1111. | AT_NONCE_MT, AT_SELECTED_VERSION) |
  1112. |------------------------------------------------------>|
  1113. | |
  1114. Figure 6: Requesting a permanent identity (two EAP-SIM Start rounds)
  1115. 4.3.6. Three EAP-SIM/Start Roundtrips
  1116. In the worst case, there are three EAP/SIM/Start round trips before
  1117. the server obtains an acceptable identity. This case is illustrated
  1118. in Figure 7.
  1119. Haverinen & Salowey Informational [Page 28]
  1120. RFC 4186 EAP-SIM Authentication January 2006
  1121. Peer Authenticator
  1122. | |
  1123. | +------------------------------+
  1124. | | Server does not have a |
  1125. | | Subscriber identity available|
  1126. | | When starting EAP-SIM |
  1127. | +------------------------------+
  1128. | EAP-Request/SIM/Start |
  1129. | (Includes AT_ANY_ID_REQ, AT_VERSION_LIST) |
  1130. |<------------------------------------------------------|
  1131. | |
  1132. | EAP-Response/SIM/Start |
  1133. | (AT_IDENTITY with fast re-auth. identity) |
  1134. |------------------------------------------------------>|
  1135. | |
  1136. | +------------------------------+
  1137. | | Server does not accept |
  1138. | | The fast re-auth. |
  1139. | | Identity |
  1140. | +------------------------------+
  1141. | EAP-Request/SIM/Start |
  1142. | (AT_FULLAUTH_ID_REQ, AT_VERSION_LIST) |
  1143. |<------------------------------------------------------|
  1144. | |
  1145. : :
  1146. : :
  1147. : :
  1148. : :
  1149. |EAP-Response/SIM/Start |
  1150. |(AT_IDENTITY with a pseudonym identity, AT_NONCE_MT, |
  1151. | AT_SELECTED_VERSION) |
  1152. |------------------------------------------------------>|
  1153. | |
  1154. | +-------------------------------+
  1155. | | Server fails to map the |
  1156. | | Pseudonym in AT_IDENTITY |
  1157. | | to a valid permanent identity |
  1158. | +-------------------------------+
  1159. | EAP-Request/SIM/Start |
  1160. | (AT_PERMANENT_ID_REQ, AT_VERSION_LIST) |
  1161. |<------------------------------------------------------|
  1162. | |
  1163. | EAP-Response/SIM/Start |
  1164. | (AT_IDENTITY with permanent identity, AT_NONCE_MT, |
  1165. | AT_SELECTED_VERSION) |
  1166. |------------------------------------------------------>|
  1167. | |
  1168. Figure 7: Three EAP-SIM Start rounds
  1169. Haverinen & Salowey Informational [Page 29]
  1170. RFC 4186 EAP-SIM Authentication January 2006
  1171. After the last EAP-Response/SIM/Start message, the full
  1172. authentication sequence proceeds as usual. If the EAP Server
  1173. recognizes the permanent identity and is able to proceed, the server
  1174. issues the EAP-Request/SIM/Challenge message.
  1175. 5. Fast Re-Authentication
  1176. 5.1. General
  1177. In some environments, EAP authentication may be performed frequently.
  1178. Because the EAP-SIM full authentication procedure makes use of the
  1179. GSM SIM A3/A8 algorithms, and therefore requires 2 or 3 fresh
  1180. triplets from the Authentication Centre, the full authentication
  1181. procedure is not very well suited for frequent use. Therefore,
  1182. EAP-SIM includes a more inexpensive fast re-authentication procedure
  1183. that does not make use of the SIM A3/A8 algorithms and does not need
  1184. new triplets from the Authentication Centre. Re-authentication can
  1185. be performed in fewer roundtrips than the full authentication.
  1186. Fast re-authentication is optional to implement for both the EAP-SIM
  1187. server and peer. On each EAP authentication, either one of the
  1188. entities may also fall back on full authentication if it does not
  1189. want to use fast re-authentication.
  1190. Fast re-authentication is based on the keys derived on the preceding
  1191. full authentication. The same K_aut and K_encr keys that were used
  1192. in full authentication are used to protect EAP-SIM packets and
  1193. attributes, and the original Master Key from full authentication is
  1194. used to generate a fresh Master Session Key, as specified in Section
  1195. 7.
  1196. The fast re-authentication exchange makes use of an unsigned 16-bit
  1197. counter, included in the AT_COUNTER attribute. The counter has three
  1198. goals: 1) it can be used to limit the number of successive
  1199. reauthentication exchanges without full authentication 2) it
  1200. contributes to the keying material, and 3) it protects the peer and
  1201. the server from replays. On full authentication, both the server and
  1202. the peer initialize the counter to one. The counter value of at
  1203. least one is used on the first fast re-authentication. On subsequent
  1204. fast re-authentications, the counter MUST be greater than on any of
  1205. the previous re-authentications. For example, on the second fast
  1206. re-authentication, the counter value is two or greater. The
  1207. AT_COUNTER attribute is encrypted.
  1208. Both the peer and the EAP server maintain a copy of the counter. The
  1209. EAP server sends its counter value to the peer in the fast
  1210. re-authentication request. The peer MUST verify that its counter
  1211. value is less than or equal to the value sent by the EAP server.
  1212. Haverinen & Salowey Informational [Page 30]
  1213. RFC 4186 EAP-SIM Authentication January 2006
  1214. The server includes an encrypted server random nonce (AT_NONCE_S) in
  1215. the fast re-authentication request. The AT_MAC attribute in the
  1216. peer's response is calculated over NONCE_S to provide a
  1217. challenge/response authentication scheme. The NONCE_S also
  1218. contributes to the new Master Session Key.
  1219. Both the peer and the server SHOULD have an upper limit for the
  1220. number of subsequent fast re-authentications allowed before a full
  1221. authentication needs to be performed. Because a 16-bit counter is
  1222. used in fast re-authentication, the theoretical maximum number of
  1223. re-authentications is reached when the counter value reaches FFFF
  1224. hexadecimal.
  1225. In order to use fast re-authentication, the peer and the EAP server
  1226. need to store the following values: Master Key, latest counter value
  1227. and the next fast re-authentication identity. K_aut, K_encr may
  1228. either be stored or derived again from MK. The server may also need
  1229. to store the permanent identity of the user.
  1230. 5.2. Comparison to UMTS AKA
  1231. When analyzing the fast re-authentication exchange, it may be helpful
  1232. to compare it with the UMTS Authentication and Key Agreement (AKA)
  1233. exchange, which it resembles closely. The counter corresponds to the
  1234. UMTS AKA sequence number, NONCE_S corresponds to RAND, AT_MAC in
  1235. EAP-Request/SIM/Re-authentication corresponds to AUTN, the AT_MAC in
  1236. EAP-Response/SIM/Re-authentication corresponds to RES,
  1237. AT_COUNTER_TOO_SMALL corresponds to AUTS, and encrypting the counter
  1238. corresponds to the usage of the Anonymity Key. Also, the key
  1239. generation on fast re-authentication, with regard to random or fresh
  1240. material, is similar to UMTS AKA -- the server generates the NONCE_S
  1241. and counter values, and the peer only verifies that the counter value
  1242. is fresh.
  1243. It should also be noted that encrypting the AT_NONCE_S, AT_COUNTER,
  1244. or AT_COUNTER_TOO_SMALL attributes is not important to the security
  1245. of the fast re-authentication exchange.
  1246. 5.3. Fast Re-authentication Identity
  1247. The fast re-authentication procedure makes use of separate
  1248. re-authentication user identities. Pseudonyms and the permanent
  1249. identity are reserved for full authentication only. If a
  1250. re-authentication identity is lost and the network does not recognize
  1251. it, the EAP server can fall back on full authentication.
  1252. Haverinen & Salowey Informational [Page 31]
  1253. RFC 4186 EAP-SIM Authentication January 2006
  1254. If the EAP server supports fast re-authentication, it MAY include the
  1255. skippable AT_NEXT_REAUTH_ID attribute in the encrypted data of
  1256. EAP-Request/SIM/Challenge message (Section 9.3). This attribute
  1257. contains a new fast re-authentication identity for the next fast
  1258. re-authentication. The attribute also works as a capability flag
  1259. that, indicating that the server supports fast re-authentication, and
  1260. that the server wants to continue using fast re-authentication within
  1261. the current context. The peer MAY ignore this attribute, in which
  1262. case it MUST use full authentication next time. If the peer wants to
  1263. use re-authentication, it uses this fast re-authentication identity
  1264. on next authentication. Even if the peer has a fast
  1265. re-authentication identity, the peer MAY discard the fast
  1266. re-authentication identity and use a pseudonym or the permanent
  1267. identity instead, in which case full authentication MUST be
  1268. performed. If the EAP server does not include the AT_NEXT_REAUTH_ID
  1269. in the encrypted data of EAP-Request/SIM/Challenge or
  1270. EAP-Request/SIM/ Re-authentication, then the peer MUST discard its
  1271. current fast re-authentication state information and perform a full
  1272. authentication next time.
  1273. In environments where a realm portion is needed in the peer identity,
  1274. the fast re-authentication identity received in AT_NEXT_REAUTH_ID
  1275. MUST contain both a username portion and a realm portion, as per the
  1276. NAI format. The EAP Server can choose an appropriate realm part in
  1277. order to have the AAA infrastructure route subsequent fast
  1278. re-authentication related requests to the same AAA server. For
  1279. example, the realm part MAY include a portion that is specific to the
  1280. AAA server. Hence, it is sufficient to store the context required
  1281. for fast re-authentication in the AAA server that performed the full
  1282. authentication.
  1283. The peer MAY use the fast re-authentication identity in the
  1284. EAP-Response/Identity packet or, in response to the server's
  1285. AT_ANY_ID_REQ attribute, the peer MAY use the fast re-authentication
  1286. identity in the AT_IDENTITY attribute of the EAP-Response/SIM/Start
  1287. packet.
  1288. The peer MUST NOT modify the username portion of the fast
  1289. re-authentication identity, but the peer MAY modify the realm portion
  1290. or replace it with another realm portion. The peer might need to
  1291. modify the realm in order to influence the AAA routing, for example,
  1292. to make sure that the correct server is reached. It should be noted
  1293. that sharing the same fast re-authentication key among several
  1294. servers may have security risks, so changing the realm portion of the
  1295. NAI in order to change the EAP server is not desirable.
  1296. Haverinen & Salowey Informational [Page 32]
  1297. RFC 4186 EAP-SIM Authentication January 2006
  1298. Even if the peer uses a fast re-authentication identity, the server
  1299. may want to fall back on full authentication, for example because the
  1300. server does not recognize the fast re-authentication identity or does
  1301. not want to use fast re-authentication. In this case, the server
  1302. starts the full authentication procedure by issuing an
  1303. EAP-Request/SIM/Start packet. This packet always starts a full
  1304. authentication sequence if it does not include the AT_ANY_ID_REQ
  1305. attribute. If the server was not able to recover the peer's identity
  1306. from the fast re-authentication identity, the server includes either
  1307. the AT_FULLAUTH_ID_REQ or the AT_PERMANENT_ID_REQ attribute in this
  1308. EAP request.
  1309. 5.4. Fast Re-authentication Procedure
  1310. Figure 8 illustrates the fast re-authentication procedure. In this
  1311. example, the optional protected success indication is not used.
  1312. Encrypted attributes are denoted with '*'. The peer uses its
  1313. re-authentication identity in the EAP-Response/Identity packet. As
  1314. discussed above, an alternative way to communicate the
  1315. re-authentication identity to the server is for the peer to use the
  1316. AT_IDENTITY attribute in the EAP-Response/SIM/Start message. This
  1317. latter case is not illustrated in the figure below, and it is only
  1318. possible when the server requests that the peer send its identity by
  1319. including the AT_ANY_ID_REQ attribute in the EAP-Request/SIM/Start
  1320. packet.
  1321. If the server recognizes the identity as a valid fast
  1322. re-authentication identity, and if the server agrees to use fast
  1323. re-authentication, then the server sends the EAP-Request/SIM/
  1324. Re-authentication packet to the peer. This packet MUST include the
  1325. encrypted AT_COUNTER attribute, with a fresh counter value, the
  1326. encrypted AT_NONCE_S attribute that contains a random number chosen
  1327. by the server, the AT_ENCR_DATA and the AT_IV attributes used for
  1328. encryption, and the AT_MAC attribute that contains a message
  1329. authentication code over the packet. The packet MAY also include an
  1330. encrypted AT_NEXT_REAUTH_ID attribute that contains the next fast
  1331. re-authentication identity.
  1332. Fast re-authentication identities are one-time identities. If the
  1333. peer does not receive a new fast re-authentication identity, it MUST
  1334. use either the permanent identity or a pseudonym identity on the next
  1335. authentication to initiate full authentication.
  1336. The peer verifies that AT_MAC is correct, and that the counter value
  1337. is fresh (greater than any previously used value). The peer MAY save
  1338. the next fast re-authentication identity from the encrypted
  1339. AT_NEXT_REAUTH_ID for next time. If all checks are successful, the
  1340. peer responds with the EAP-Response/SIM/Re-authentication packet,
  1341. Haverinen & Salowey Informational [Page 33]
  1342. RFC 4186 EAP-SIM Authentication January 2006
  1343. including the AT_COUNTER attribute with the same counter value and
  1344. AT_MAC attribute.
  1345. The server verifies the AT_MAC attribute and also verifies that the
  1346. counter value is the same that it used in the EAP-Request/SIM/
  1347. Re-authentication packet. If these checks are successful, the
  1348. re-authentication has succeeded and the server sends the EAP-Success
  1349. packet to the peer.
  1350. If protected success indications (Section 6.2) were used, the
  1351. EAP-Success packet would be preceded by an EAP-SIM notification
  1352. round.
  1353. Haverinen & Salowey Informational [Page 34]
  1354. RFC 4186 EAP-SIM Authentication January 2006
  1355. Peer Authenticator
  1356. | |
  1357. | EAP-Request/Identity |
  1358. |<------------------------------------------------------|
  1359. | |
  1360. | EAP-Response/Identity |
  1361. | (Includes a fast re-authentication identity) |
  1362. |------------------------------------------------------>|
  1363. | |
  1364. | +--------------------------------+
  1365. | | Server recognizes the identity |
  1366. | | and agrees to use fast |
  1367. | | re-authentication |
  1368. | +--------------------------------+
  1369. | |
  1370. : :
  1371. : :
  1372. : :
  1373. : :
  1374. | EAP-Request/SIM/Re-authentication |
  1375. | (AT_IV, AT_ENCR_DATA, *AT_COUNTER, |
  1376. | *AT_NONCE_S, *AT_NEXT_REAUTH_ID, AT_MAC) |
  1377. |<------------------------------------------------------|
  1378. | |
  1379. +-----------------------------------------------+ |
  1380. | Peer verifies AT_MAC and the freshness of | |
  1381. | the counter. Peer MAY store the new fast re- | |
  1382. | authentication identity for next re-auth. | |
  1383. +-----------------------------------------------+ |
  1384. | |
  1385. | EAP-Response/SIM/Re-authentication |
  1386. | (AT_IV, AT_ENCR_DATA, *AT_COUNTER with same value, |
  1387. | AT_MAC) |
  1388. |------------------------------------------------------>|
  1389. | +--------------------------------+
  1390. | | Server verifies AT_MAC and |
  1391. | | the counter |
  1392. | +--------------------------------+
  1393. | |
  1394. | EAP-Success |
  1395. |<------------------------------------------------------|
  1396. | |
  1397. Figure 8: Fast Re-authentication
  1398. Haverinen & Salowey Informational [Page 35]
  1399. RFC 4186 EAP-SIM Authentication January 2006
  1400. 5.5. Fast Re-authentication Procedure when Counter Is Too Small
  1401. If the peer does not accept the counter value of EAP-Request/SIM/
  1402. Re-authentication, it indicates the counter synchronization problem
  1403. by including the encrypted AT_COUNTER_TOO_SMALL in EAP-Response/SIM/
  1404. Re-authentication. The server responds with EAP-Request/SIM/Start to
  1405. initiate a normal full authentication procedure. This is illustrated
  1406. in Figure 9. Encrypted attributes are denoted with '*'.
  1407. Peer Authenticator
  1408. | EAP-Request/SIM/Start |
  1409. | (AT_ANY_ID_REQ, AT_VERSION_LIST) |
  1410. |<------------------------------------------------------|
  1411. | |
  1412. | EAP-Response/SIM/Start |
  1413. | (AT_IDENTITY) |
  1414. | (Includes a fast re-authentication identity) |
  1415. |------------------------------------------------------>|
  1416. | |
  1417. | EAP-Request/SIM/Re-authentication |
  1418. | (AT_IV, AT_ENCR_DATA, *AT_COUNTER, |
  1419. | *AT_NONCE_S, *AT_NEXT_REAUTH_ID, AT_MAC) |
  1420. |<------------------------------------------------------|
  1421. +-----------------------------------------------+ |
  1422. | AT_MAC is valid but the counter is not fresh. | |
  1423. +-----------------------------------------------+ |
  1424. | |
  1425. | EAP-Response/SIM/Re-authentication |
  1426. | (AT_IV, AT_ENCR_DATA, *AT_COUNTER_TOO_SMALL, |
  1427. | *AT_COUNTER, AT_MAC) |
  1428. |------------------------------------------------------>|
  1429. | +----------------------------------------------+
  1430. | | Server verifies AT_MAC but detects |
  1431. | | That peer has included AT_COUNTER_TOO_SMALL |
  1432. | +----------------------------------------------+
  1433. | |
  1434. | EAP-Request/SIM/Start |
  1435. | (AT_VERSION_LIST) |
  1436. |<------------------------------------------------------|
  1437. +---------------------------------------------------------------+
  1438. | Normal full authentication follows. |
  1439. +---------------------------------------------------------------+
  1440. | |
  1441. Figure 9: Fast Re-authentication, counter is not fresh
  1442. Haverinen & Salowey Informational [Page 36]
  1443. RFC 4186 EAP-SIM Authentication January 2006
  1444. In the figure above, the first three messages are similar to the
  1445. basic fast re-authentication case. When the peer detects that the
  1446. counter value is not fresh, it includes the AT_COUNTER_TOO_SMALL
  1447. attribute in EAP-Response/SIM/Re-authentication. This attribute
  1448. doesn't contain any data, but it is a request for the server to
  1449. initiate full authentication. In this case, the peer MUST ignore the
  1450. contents of the server's AT_NEXT_REAUTH_ID attribute.
  1451. On receipt of AT_COUNTER_TOO_SMALL, the server verifies AT_MAC and
  1452. verifies that AT_COUNTER contains the same counter value as in the
  1453. EAP-Request/SIM/Re-authentication packet. If not, the server
  1454. terminates the authentication exchange by sending the
  1455. EAP-Request/SIM/Notification with AT_NOTIFICATION code "General
  1456. failure" (16384). If all checks on the packet are successful, the
  1457. server transmits a new EAP-Request/SIM/Start packet and the full
  1458. authentication procedure is performed as usual. Since the server
  1459. already knows the subscriber identity, it MUST NOT include
  1460. AT_ANY_ID_REQ, AT_FULLAUTH_ID_REQ, or AT_PERMANENT_ID_REQ in the
  1461. EAP-Request/SIM/Start.
  1462. It should be noted that in this case, peer identity is only
  1463. transmitted in the AT_IDENTITY attribute at the beginning of the
  1464. whole EAP exchange. The fast re-authentication identity used in this
  1465. AT_IDENTITY attribute will be used in key derivation (see Section 7).
  1466. 6. EAP-SIM Notifications
  1467. 6.1. General
  1468. EAP-SIM does not prohibit the use of the EAP Notifications as
  1469. specified in [RFC3748]. EAP Notifications can be used at any time in
  1470. the EAP-SIM exchange. It should be noted that EAP-SIM does not
  1471. protect EAP Notifications. EAP-SIM also specifies method-specific
  1472. EAP-SIM notifications that are protected in some cases.
  1473. The EAP server can use EAP-SIM notifications to convey notifications
  1474. and result indications (Section 6.2) to the peer.
  1475. The server MUST use notifications in cases discussed in
  1476. Section 6.3.2. When the EAP server issues an
  1477. EAP-Request/SIM/Notification packet to the peer, the peer MUST
  1478. process the notification packet. The peer MAY show a notification
  1479. message to the user and the peer MUST respond to the EAP server with
  1480. an EAP-Response/SIM/Notification packet, even if the peer did not
  1481. recognize the notification code.
  1482. Haverinen & Salowey Informational [Page 37]
  1483. RFC 4186 EAP-SIM Authentication January 2006
  1484. An EAP-SIM full authentication exchange or a fast re-authentication
  1485. exchange MUST NOT include more than one EAP-SIM notification round.
  1486. The notification code is a 16-bit number. The most significant bit
  1487. is called the Success bit (S bit). The S bit specifies whether the
  1488. notification implies failure. The code values with the S bit set to
  1489. zero (code values 0...32767) are used on unsuccessful cases. The
  1490. receipt of a notification code from this range implies a failed EAP
  1491. exchange, so the peer can use the notification as a failure
  1492. indication. After receiving the EAP-Response/SIM/Notification for
  1493. these notification codes, the server MUST send the EAP-Failure
  1494. packet.
  1495. The receipt of a notification code with the S bit set to one (values
  1496. 32768...65536) does not imply failure. Notification code "Success"
  1497. (32768) has been reserved as a general notification code to indicate
  1498. successful authentication.
  1499. The second most significant bit of the notification code is called
  1500. the Phase bit (P bit). It specifies at which phase of the EAP-SIM
  1501. exchange the notification can be used. If the P bit is set to zero,
  1502. the notification can only be used after a successful
  1503. EAP/SIM/Challenge round in full authentication or a successful
  1504. EAP/SIM/Re-authentication round in reauthentication. A
  1505. re-authentication round is considered successful only if the peer has
  1506. successfully verified AT_MAC and AT_COUNTER attributes, and does not
  1507. include the AT_COUNTER_TOO_SMALL attribute in
  1508. EAP-Response/SIM/Re-authentication.
  1509. If the P bit is set to one, the notification can only by used before
  1510. the EAP/SIM/Challenge round in full authentication, or before the
  1511. EAP/SIM/Re-authentication round in reauthentication. These
  1512. notifications can only be used to indicate various failure cases. In
  1513. other words, if the P bit is set to one, then the S bit MUST be set
  1514. to zero.
  1515. Section 9.8 and Section 9.9 specify what other attributes must be
  1516. included in the notification packets.
  1517. Some of the notification codes are authorization related and, hence,
  1518. are not usually considered part of the responsibility of an EAP
  1519. method. However, they are included as part of EAP-SIM because there
  1520. are currently no other ways to convey this information to the user in
  1521. a localizable way, and the information is potentially useful for the
  1522. user. An EAP-SIM server implementation may decide never to send
  1523. these EAP-SIM notifications.
  1524. Haverinen & Salowey Informational [Page 38]
  1525. RFC 4186 EAP-SIM Authentication January 2006
  1526. 6.2. Result Indications
  1527. As discussed in Section 6.3, the server and the peer use explicit
  1528. error messages in all error cases. If the server detects an error
  1529. after successful authentication, the server uses an EAP-SIM
  1530. notification to indicate failure to the peer. In this case, the
  1531. result indication is integrity and replay protected.
  1532. By sending an EAP-Response/SIM/Challenge packet or an
  1533. EAP-Response/SIM/Re-authentication packet (without
  1534. AT_COUNTER_TOO_SMALL), the peer indicates that it has successfully
  1535. authenticated the server and that the peer's local policy accepts the
  1536. EAP exchange. In other words, these packets are implicit success
  1537. indications from the peer to the server.
  1538. EAP-SIM also supports optional protected success indications from the
  1539. server to the peer. If the EAP server wants to use protected success
  1540. indications, it includes the AT_RESULT_IND attribute in the
  1541. EAP-Request/SIM/Challenge or the EAP-Request/SIM/Re-authentication
  1542. packet. This attribute indicates that the EAP server would like to
  1543. use result indications in both successful and unsuccessful cases. If
  1544. the peer also wants this, the peer includes AT_RESULT_IND in
  1545. EAP-Response/SIM/Challenge or EAP-Response/SIM/Re-authentication.
  1546. The peer MUST NOT include AT_RESULT_IND if it did not receive
  1547. AT_RESULT_IND from the server. If both the peer and the server used
  1548. AT_RESULT_IND, then the EAP exchange is not complete yet, but an
  1549. EAP-SIM notification round will follow. The following EAP-SIM
  1550. notification may indicate either failure or success.
  1551. Success indications with the AT_NOTIFICATION code "Success" (32768)
  1552. can only be used if both the server and the peer indicate they want
  1553. to use them with AT_RESULT_IND. If the server did not include
  1554. AT_RESULT_IND in the EAP-Request/SIM/Challenge or
  1555. EAP-Request/SIM/Re-authentication packet, or if the peer did not
  1556. include AT_RESULT_IND in the corresponding response packet, then the
  1557. server MUST NOT use protected success indications.
  1558. Because the server uses the AT_NOTIFICATION code "Success" (32768) to
  1559. indicate that the EAP exchange has completed successfully, the EAP
  1560. exchange cannot fail when the server processes the EAP-SIM response
  1561. to this notification. Hence, the server MUST ignore the contents of
  1562. the EAP-SIM response it receives from the
  1563. EAP-Request/SIM/Notification with this code. Regardless of the
  1564. contents of the EAP-SIM response, the server MUST send EAP-Success as
  1565. the next packet.
  1566. Haverinen & Salowey Informational [Page 39]
  1567. RFC 4186 EAP-SIM Authentication January 2006
  1568. 6.3. Error Cases
  1569. This section specifies the operation of the peer and the server in
  1570. error cases. The subsections below require the EAP-SIM peer and
  1571. server to send an error packet (EAP-Response/SIM/Client-Error from
  1572. the peer or EAP-Request/SIM/Notification from the server) in error
  1573. cases. However, implementations SHOULD NOT rely upon the correct
  1574. error reporting behavior of the peer, authenticator, or the server.
  1575. It is possible for error and other messages to be lost in transit or
  1576. for a malicious participant to attempt to consume resources by not
  1577. issuing error messages. Both the peer and the EAP server SHOULD have
  1578. a mechanism to clean up state, even if an error message or
  1579. EAP-Success is not received after a timeout period.
  1580. 6.3.1. Peer Operation
  1581. In general, if an EAP-SIM peer detects an error in a received EAP-SIM
  1582. packet, the EAP-SIM implementation responds with the
  1583. EAP-Response/SIM/Client-Error packet. In response to the
  1584. EAP-Response/SIM/Client-Error, the EAP server MUST issue the
  1585. EAP-Failure packet and the authentication exchange terminates.
  1586. By default, the peer uses the client error code 0, "unable to process
  1587. packet". This error code is used in the following cases:
  1588. o EAP exchange is not acceptable according to the peer's local
  1589. policy.
  1590. o the peer is not able to parse the EAP request, i.e., the EAP
  1591. request is malformed.
  1592. o the peer encountered a malformed attribute.
  1593. o wrong attribute types or duplicate attributes have been included
  1594. in the EAP request.
  1595. o a mandatory attribute is missing.
  1596. o unrecognized, non-skippable attribute.
  1597. o unrecognized or unexpected EAP-SIM Subtype in the EAP request.
  1598. o A RAND challenge repeated in AT_RAND.
  1599. o invalid AT_MAC. The peer SHOULD log this event.
  1600. o invalid pad bytes in AT_PADDING.
  1601. Haverinen & Salowey Informational [Page 40]
  1602. RFC 4186 EAP-SIM Authentication January 2006
  1603. o the peer does not want to process AT_PERMANENT_ID_REQ.
  1604. Separate error codes have been defined for the following error cases
  1605. in Section 10.19:
  1606. As specified in Section 4.1, when processing the AT_VERSION_LIST
  1607. attribute, which lists the EAP-SIM versions supported by the server,
  1608. if the attribute does not include a version that is implemented by
  1609. the peer and allowed in the peer's security policy, then the peer
  1610. MUST send the EAP-Response/SIM/Client-Error packet with the error
  1611. code "unsupported version".
  1612. If the number of RAND challenges is smaller than what is required by
  1613. peer's local policy when processing the AT_RAND attribute, the peer
  1614. MUST send the EAP-Response/SIM/Client-Error packet with the error
  1615. code "insufficient number of challenges".
  1616. If the peer believes that the RAND challenges included in AT_RAND are
  1617. not fresh e.g., because it is capable of remembering some previously
  1618. used RANDs, the peer MUST send the EAP-Response/SIM/Client-Error
  1619. packet with the error code "RANDs are not fresh".
  1620. 6.3.2. Server Operation
  1621. If an EAP-SIM server detects an error in a received EAP-SIM response,
  1622. the server MUST issue the EAP-Request/SIM/Notification packet with an
  1623. AT_NOTIFICATION code that implies failure. By default, the server
  1624. uses one of the general failure codes ("General failure after
  1625. authentication" (0), or "General failure" (16384)). The choice
  1626. between these two codes depends on the phase of the EAP-SIM exchange,
  1627. see Section 6. When the server issues an EAP-
  1628. Request/SIM/Notification that implies failure, the error cases
  1629. include the following:
  1630. o the server is not able to parse the peer's EAP response
  1631. o the server encounters a malformed attribute, a non-recognized
  1632. non-skippable attribute, or a duplicate attribute
  1633. o a mandatory attribute is missing or an invalid attribute was
  1634. included
  1635. o unrecognized or unexpected EAP-SIM Subtype in the EAP Response
  1636. o invalid AT_MAC. The server SHOULD log this event.
  1637. o invalid AT_COUNTER
  1638. Haverinen & Salowey Informational [Page 41]
  1639. RFC 4186 EAP-SIM Authentication January 2006
  1640. 6.3.3. EAP-Failure
  1641. The EAP-SIM server sends EAP-Failure in two cases:
  1642. 1) In response to an EAP-Response/SIM/Client-Error packet the server
  1643. has received from the peer, or
  1644. 2) Following an EAP-SIM notification round, when the AT_NOTIFICATION
  1645. code implies failure.
  1646. The EAP-SIM server MUST NOT send EAP-Failure in cases other than
  1647. these two. However, it should be noted that even though the EAP-SIM
  1648. server would not send an EAP-Failure, an authorization decision that
  1649. happens outside EAP-SIM, such as in the AAA server or in an
  1650. intermediate AAA proxy, may result in a failed exchange.
  1651. The peer MUST accept the EAP-Failure packet in case 1) and case 2),
  1652. above. The peer SHOULD silently discard the EAP-Failure packet in
  1653. other cases.
  1654. 6.3.4. EAP-Success
  1655. On full authentication, the server can only send EAP-Success after
  1656. the EAP/SIM/Challenge round. The peer MUST silently discard any
  1657. EAP-Success packets if they are received before the peer has
  1658. successfully authenticated the server and sent the
  1659. EAP-Response/SIM/Challenge packet.
  1660. If the peer did not indicate that it wants to use protected success
  1661. indications with AT_RESULT_IND (as discussed in Section 6.2) on full
  1662. authentication, then the peer MUST accept EAP-Success after a
  1663. successful EAP/SIM/Challenge round.
  1664. If the peer indicated that it wants to use protected success
  1665. indications with AT_RESULT_IND (as discussed in Section 6.2), then
  1666. the peer MUST NOT accept EAP-Success after a successful
  1667. EAP/SIM/Challenge round. In this case, the peer MUST only accept
  1668. EAP-Success after receiving an EAP-SIM Notification with the
  1669. AT_NOTIFICATION code "Success" (32768).
  1670. On fast re-authentication, EAP-Success can only be sent after the
  1671. EAP/SIM/Re-authentication round. The peer MUST silently discard any
  1672. EAP-Success packets if they are received before the peer has
  1673. successfully authenticated the server and sent the
  1674. EAP-Response/SIM/Re-authentication packet.
  1675. If the peer did not indicate that it wants to use protected success
  1676. indications with AT_RESULT_IND (as discussed in Section 6.2) on fast
  1677. Haverinen & Salowey Informational [Page 42]
  1678. RFC 4186 EAP-SIM Authentication January 2006
  1679. re-authentication, then the peer MUST accept EAP-Success after a
  1680. successful EAP/SIM/Re-authentication round.
  1681. If the peer indicated that it wants to use protected success
  1682. indications with AT_RESULT_IND (as discussed in Section 6.2), then
  1683. the peer MUST NOT accept EAP-Success after a successful EAP/SIM/Re-
  1684. authentication round. In this case, the peer MUST only accept
  1685. EAP-Success after receiving an EAP-SIM Notification with the
  1686. AT_NOTIFICATION code "Success" (32768).
  1687. If the peer receives an EAP-SIM notification (Section 6) that
  1688. indicates failure, then the peer MUST no longer accept the
  1689. EAP-Success packet, even if the server authentication was
  1690. successfully completed.
  1691. 7. Key Generation
  1692. This section specifies how keying material is generated.
  1693. On EAP-SIM full authentication, a Master Key (MK) is derived from the
  1694. underlying GSM authentication values (Kc keys), the NONCE_MT, and
  1695. other relevant context as follows.
  1696. MK = SHA1(Identity|n*Kc| NONCE_MT| Version List| Selected Version)
  1697. In the formula above, the "|" character denotes concatenation.
  1698. "Identity" denotes the peer identity string without any terminating
  1699. null characters. It is the identity from the last AT_IDENTITY
  1700. attribute sent by the peer in this exchange, or, if AT_IDENTITY was
  1701. not used, it is the identity from the EAP-Response/Identity packet.
  1702. The identity string is included as-is, without any changes. As
  1703. discussed in Section 4.2.2.2, relying on EAP-Response/Identity for
  1704. conveying the EAP-SIM peer identity is discouraged, and the server
  1705. SHOULD use the EAP-SIM method-specific identity attributes.
  1706. The notation n*Kc in the formula above denotes the n Kc values
  1707. concatenated. The Kc keys are used in the same order as the RAND
  1708. challenges in AT_RAND attribute. NONCE_MT denotes the NONCE_MT value
  1709. (not the AT_NONCE_MT attribute, but only the nonce value). The
  1710. Version List includes the 2-byte-supported version numbers from
  1711. AT_VERSION_LIST, in the same order as in the attribute. The Selected
  1712. Version is the 2-byte selected version from AT_SELECTED_VERSION.
  1713. Network byte order is used, just as in the attributes. The hash
  1714. function SHA-1 is specified in [SHA-1]. If several EAP/SIM/Start
  1715. roundtrips are used in an EAP-SIM exchange, then the NONCE_MT,
  1716. Version List and Selected version from the last EAP/SIM/Start round
  1717. are used, and the previous EAP/SIM/Start rounds are ignored.
  1718. Haverinen & Salowey Informational [Page 43]
  1719. RFC 4186 EAP-SIM Authentication January 2006
  1720. The Master Key is fed into a Pseudo-Random number Function (PRF)
  1721. which generates separate Transient EAP Keys (TEKs) for protecting
  1722. EAP-SIM packets, as well as a Master Session Key (MSK) for link layer
  1723. security, and an Extended Master Session Key (EMSK) for other
  1724. purposes. On fast re-authentication, the same TEKs MUST be used for
  1725. protecting EAP packets, but a new MSK and a new EMSK MUST be derived
  1726. from the original MK and from new values exchanged in the fast
  1727. re-authentication.
  1728. EAP-SIM requires two TEKs for its own purposes; the authentication
  1729. key K_aut is to be used with the AT_MAC attribute, and the encryption
  1730. key K_encr is to be used with the AT_ENCR_DATA attribute. The same
  1731. K_aut and K_encr keys are used in full authentication and subsequent
  1732. fast re-authentications.
  1733. Key derivation is based on the random number generation specified in
  1734. NIST Federal Information Processing Standards (FIPS) Publication
  1735. 186-2 [PRF]. The pseudo-random number generator is specified in the
  1736. change notice 1 (2001 October 5) of [PRF] (Algorithm 1). As
  1737. specified in the change notice (page 74), when Algorithm 1 is used as
  1738. a general-purpose pseudo-random number generator, the "mod q" term in
  1739. step 3.3 is omitted. The function G used in the algorithm is
  1740. constructed via the Secure Hash Standard, as specified in Appendix
  1741. 3.3 of the standard. It should be noted that the function G is very
  1742. similar to SHA-1, but the message padding is different. Please refer
  1743. to [PRF] for full details. For convenience, the random number
  1744. algorithm with the correct modification is cited in Appendix B.
  1745. 160-bit XKEY and XVAL values are used, so b = 160. On each full
  1746. authentication, the Master Key is used as the initial secret seed-key
  1747. XKEY. The optional user input values (XSEED_j) in step 3.1 are set
  1748. to zero.
  1749. On full authentication, the resulting 320-bit random numbers (x_0,
  1750. x_1, ..., x_m-1) are concatenated and partitioned into suitable-sized
  1751. chunks and used as keys in the following order: K_encr (128 bits),
  1752. K_aut (128 bits), Master Session Key (64 bytes), Extended Master
  1753. Session Key (64 bytes).
  1754. On fast re-authentication, the same pseudo-random number generator
  1755. can be used to generate a new Master Session Key and a new Extended
  1756. Master Session Key. The seed value XKEY' is calculated as follows:
  1757. XKEY' = SHA1(Identity|counter|NONCE_S| MK)
  1758. In the formula above, the Identity denotes the fast re-authentication
  1759. identity, without any terminating null characters, from the
  1760. AT_IDENTITY attribute of the EAP-Response/SIM/Start packet, or, if
  1761. Haverinen & Salowey Informational [Page 44]
  1762. RFC 4186 EAP-SIM Authentication January 2006
  1763. EAP-Response/SIM/Start was not used on fast re-authentication, it
  1764. denotes the identity string from the EAP-Response/Identity packet.
  1765. The counter denotes the counter value from the AT_COUNTER attribute
  1766. used in the EAP-Response/SIM/Re-authentication packet. The counter
  1767. is used in network byte order. NONCE_S denotes the 16-byte NONCE_S
  1768. value from the AT_NONCE_S attribute used in the
  1769. EAP-Request/SIM/Re-authentication packet. The MK is the Master Key
  1770. derived on the preceding full authentication.
  1771. On fast re-authentication, the pseudo-random number generator is run
  1772. with the new seed value XKEY', and the resulting 320-bit random
  1773. numbers (x_0, x_1, ..., x_m-1) are concatenated and partitioned into
  1774. two 64-byte chunks and used as the new 64-byte Master Session Key and
  1775. the new 64-byte Extended Master Session Key. Note that because
  1776. K_encr and K_aut are not derived on fast re-authentication, the
  1777. Master Session Key and the Extended Master Session key are obtained
  1778. from the beginning of the key stream (x_0, x_1, ...).
  1779. The first 32 bytes of the MSK can be used as the Pairwise Master Key
  1780. (PMK) for IEEE 802.11i.
  1781. When the RADIUS attributes specified in [RFC2548] are used to
  1782. transport keying material, then the first 32 bytes of the MSK
  1783. correspond to MS-MPPE-RECV-KEY and the second 32 bytes to
  1784. MS-MPPE-SEND-KEY. In this case, only 64 bytes of keying material
  1785. (the MSK) are used.
  1786. When generating the initial Master Key, the hash function is used as
  1787. a mixing function to combine several session keys (Kc's) generated by
  1788. the GSM authentication procedure and the random number NONCE_MT into
  1789. a single session key. There are several reasons for this. The
  1790. current GSM session keys are, at most, 64 bits, so two or more of
  1791. them are needed to generate a longer key. By using a one-way
  1792. function to combine the keys, we are assured that, even if an
  1793. attacker managed to learn one of the EAP-SIM session keys, it
  1794. wouldn't help him in learning the original GSM Kc's. In addition,
  1795. since we include the random number NONCE_MT in the calculation, the
  1796. peer is able to verify that the EAP-SIM packets it receives from the
  1797. network are fresh and not replays (also see Section 11).
  1798. 8. Message Format and Protocol Extensibility
  1799. 8.1. Message Format
  1800. As specified in [RFC3748], EAP packets begin with the Code,
  1801. Identifiers, Length, and Type fields, which are followed by EAP-
  1802. method-specific Type-Data. The Code field in the EAP header is set
  1803. to 1 for EAP requests, and to 2 for EAP Responses. The usage of the
  1804. Haverinen & Salowey Informational [Page 45]
  1805. RFC 4186 EAP-SIM Authentication January 2006
  1806. Length and Identifier fields in the EAP header are also specified in
  1807. [RFC3748]. In EAP-SIM, the Type field is set to 18.
  1808. In EAP-SIM, the Type-Data begins with an EAP-SIM header that consists
  1809. of a 1-octet Subtype field and a 2-octet reserved field. The Subtype
  1810. values used in EAP-SIM are defined in the IANA considerations section
  1811. of the EAP-AKA specification [EAP-AKA]. The formats of the EAP
  1812. header and the EAP-SIM header are shown below.
  1813. 0 1 2 3
  1814. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1815. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1816. | Code | Identifier | Length |
  1817. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1818. | Type | Subtype | Reserved |
  1819. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1820. The rest of the Type-Data that immediately follows the EAP-SIM header
  1821. consists of attributes that are encoded in Type, Length, Value
  1822. format. The figure below shows the generic format of an attribute.
  1823. 0 1 2 3
  1824. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1825. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1826. | Type | Length | Value...
  1827. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1828. Attribute Type
  1829. Indicates the particular type of attribute. The attribute type
  1830. values are listed in the IANA considerations section of the
  1831. EAP-AKA specification [EAP-AKA].
  1832. Length
  1833. Indicates the length of this attribute in multiples of four
  1834. bytes. The maximum length of an attribute is 1024 bytes. The
  1835. length includes the Attribute Type and Length bytes.
  1836. Value
  1837. The particular data associated with this attribute. This field
  1838. is always included and it may be two or more bytes in length.
  1839. The type and length fields determine the format and length
  1840. of the value field.
  1841. Haverinen & Salowey Informational [Page 46]
  1842. RFC 4186 EAP-SIM Authentication January 2006
  1843. Attributes numbered within the range 0 through 127 are called
  1844. non-skippable attributes. When an EAP-SIM peer encounters a
  1845. non-skippable attribute that the peer does not recognize, the peer
  1846. MUST send the EAP-Response/SIM/Client-Error packet, which terminates
  1847. the authentication exchange. If an EAP-SIM server encounters a
  1848. non-skippable attribute that the server does not recognize, then the
  1849. server sends the EAP-Request/SIM/Notification packet with an
  1850. AT_NOTIFICATION code, which implies general failure ("General failure
  1851. after authentication" (0), or "General failure" (16384), depending on
  1852. the phase of the exchange), which terminates the authentication
  1853. exchange.
  1854. Attributes within the range of 128 through 255 are called skippable
  1855. attributes. When a skippable attribute is encountered and is not
  1856. recognized, it is ignored. The rest of the attributes and message
  1857. data MUST still be processed. The Length field of the attribute is
  1858. used to skip the attribute value in searching for the next attribute.
  1859. Unless otherwise specified, the order of the attributes in an EAP-SIM
  1860. message is insignificant and an EAP-SIM implementation should not
  1861. assume a certain order to be used.
  1862. Attributes can be encapsulated within other attributes. In other
  1863. words, the value field of an attribute type can be specified to
  1864. contain other attributes.
  1865. 8.2. Protocol Extensibility
  1866. EAP-SIM can be extended by specifying new attribute types. If
  1867. skippable attributes are used, it is possible to extend the protocol
  1868. without breaking old implementations.
  1869. However, any new attributes added to the EAP-Request/SIM/Start or
  1870. EAP-Response/SIM/Start packets would not be integrity-protected.
  1871. Therefore, these messages MUST NOT be extended in the current version
  1872. of EAP-SIM. If the list of supported EAP-SIM versions in the
  1873. AT_VERSION_LIST does not include versions other than 1, then the
  1874. server MUST NOT include attributes other than those specified in this
  1875. document in the EAP-Request/SIM/Start message. Note that future
  1876. versions of this protocol might specify new attributes for
  1877. EAP-Request/SIM/Start and still support version 1 of the protocol.
  1878. In this case, the server might send an EAP-Request/SIM/Start message
  1879. that includes new attributes and indicates support for protocol
  1880. version 1 and other versions in the AT_VERSION_LIST attribute. If
  1881. the peer selects version 1, then the peer MUST ignore any other
  1882. attributes included in EAP-Request/SIM/Start, other than those
  1883. specified in this document. If the selected EAP-SIM version in
  1884. peer's AT_SELECTED_VERSION is 1, then the peer MUST NOT include other
  1885. Haverinen & Salowey Informational [Page 47]
  1886. RFC 4186 EAP-SIM Authentication January 2006
  1887. attributes aside from those specified in this document in the
  1888. EAP-Response/SIM/Start message.
  1889. When specifying new attributes, it should be noted that EAP-SIM does
  1890. not support message fragmentation. Hence, the sizes of the new
  1891. extensions MUST be limited so that the maximum transfer unit (MTU) of
  1892. the underlying lower layer is not exceeded. According to [RFC3748],
  1893. lower layers must provide an EAP MTU of 1020 bytes or greater, so any
  1894. extensions to EAP-SIM SHOULD NOT exceed the EAP MTU of 1020 bytes.
  1895. Because EAP-SIM supports version negotiation, new versions of the
  1896. protocol can also be specified by using a new version number.
  1897. 9. Messages
  1898. This section specifies the messages used in EAP-SIM. It specifies
  1899. when a message may be transmitted or accepted, which attributes are
  1900. allowed in a message, which attributes are required in a message, and
  1901. other message-specific details. The general message format is
  1902. specified in Section 8.1.
  1903. 9.1. EAP-Request/SIM/Start
  1904. In full authentication the first SIM-specific EAP Request is
  1905. EAP-Request/SIM/Start. The EAP/SIM/Start roundtrip is used for two
  1906. purposes. In full authentication this packet is used to request the
  1907. peer to send the AT_NONCE_MT attribute to the server. In addition,
  1908. as specified in Section 4.2, the Start round trip may be used by the
  1909. server for obtaining the peer identity. As discussed in Section 4.2,
  1910. several Start rounds may be required to obtain a valid peer identity.
  1911. The server MUST always include the AT_VERSION_LIST attribute.
  1912. The server MAY include one of the following identity-requesting
  1913. attributes: AT_PERMANENT_ID_REQ, AT_FULLAUTH_ID_REQ, or
  1914. AT_ANY_ID_REQ. These three attributes are mutually exclusive, so the
  1915. server MUST NOT include more than one of the attributes.
  1916. If the server has received a response from the peer, it MUST NOT
  1917. issue a new EAP-Request/SIM/Start packet if it has previously issued
  1918. an EAP-Request/SIM/Start message either without any identity
  1919. requesting attributes or with the AT_PERMANENT_ID_REQ attribute.
  1920. If the server has received a response from the peer, it MUST NOT
  1921. issue a new EAP-Request/SIM/Start packet with the AT_ANY_ID_REQ or
  1922. AT_FULLAUTH_ID_REQ attributes if it has previously issued an
  1923. EAP-Request/SIM/Start message with the AT_FULLAUTH_ID_REQ attribute.
  1924. Haverinen & Salowey Informational [Page 48]
  1925. RFC 4186 EAP-SIM Authentication January 2006
  1926. If the server has received a response from the peer, it MUST NOT
  1927. issue a new EAP-Request/SIM/Start packet with the AT_ANY_ID_REQ
  1928. attribute if the server has previously issued an
  1929. EAP-Request/SIM/Start message with the AT_ANY_ID_REQ attribute.
  1930. This message MUST NOT include AT_MAC, AT_IV, or AT_ENCR_DATA.
  1931. 9.2. EAP-Response/SIM/Start
  1932. The peer sends EAP-Response/SIM/Start in response to a valid
  1933. EAP-Request/SIM/Start from the server.
  1934. If and only if the server's EAP-Request/SIM/Start includes one of the
  1935. identity-requesting attributes, then the peer MUST include the
  1936. AT_IDENTITY attribute. The usage of AT_IDENTITY is defined in
  1937. Section 4.2.
  1938. The AT_NONCE_MT attribute MUST NOT be included if the AT_IDENTITY
  1939. with a fast re-authentication identity is present for fast
  1940. re-authentication. AT_NONCE_MT MUST be included in all other cases
  1941. (full authentication).
  1942. The AT_SELECTED_VERSION attribute MUST NOT be included if the
  1943. AT_IDENTITY attribute with a fast re-authentication identity is
  1944. present for fast re-authentication. In all other cases,
  1945. AT_SELECTED_VERSION MUST be included (full authentication). This
  1946. attribute is used in version negotiation, as specified in
  1947. Section 4.1.
  1948. This message MUST NOT include AT_MAC, AT_IV, or AT_ENCR_DATA.
  1949. 9.3. EAP-Request/SIM/Challenge
  1950. The server sends the EAP-Request/SIM/Challenge after receiving a
  1951. valid EAP-Response/SIM/Start that contains AT_NONCE_MT and
  1952. AT_SELECTED_VERSION, and after successfully obtaining the subscriber
  1953. identity.
  1954. The AT_RAND attribute MUST be included.
  1955. The AT_RESULT_IND attribute MAY be included. The usage of this
  1956. attribute is discussed in Section 6.2.
  1957. The AT_MAC attribute MUST be included. For
  1958. EAP-Request/SIM/Challenge, the MAC code is calculated over the
  1959. following data:
  1960. EAP packet| NONCE_MT
  1961. Haverinen & Salowey Informational [Page 49]
  1962. RFC 4186 EAP-SIM Authentication January 2006
  1963. The EAP packet is represented as specified in Section 8.1. It is
  1964. followed by the 16-byte NONCE_MT value from the peer's AT_NONCE_MT
  1965. attribute.
  1966. The EAP-Request/SIM/Challenge packet MAY include encrypted attributes
  1967. for identity privacy and for communicating the next fast
  1968. re-authentication identity. In this case, the AT_IV and AT_ENCR_DATA
  1969. attributes are included (Section 10.12).
  1970. The plaintext of the AT_ENCR_DATA value field consists of nested
  1971. attributes. The nested attributes MAY include AT_PADDING (as
  1972. specified in Section 10.12). If the server supports identity privacy
  1973. and wants to communicate a pseudonym to the peer for the next full
  1974. authentication, then the nested encrypted attributes include the
  1975. AT_NEXT_PSEUDONYM attribute. If the server supports
  1976. re-authentication and wants to communicate a fast re-authentication
  1977. identity to the peer, then the nested encrypted attributes include
  1978. the AT_NEXT_REAUTH_ID attribute.
  1979. When processing this message, the peer MUST process AT_RAND before
  1980. processing other attributes. Only if AT_RAND is verified to be
  1981. valid, the peer derives keys and verifies AT_MAC. The operation in
  1982. case an error occurs is specified in Section 6.3.1.
  1983. 9.4. EAP-Response/SIM/Challenge
  1984. The peer sends EAP-Response/SIM/Challenge in response to a valid
  1985. EAP-Request/SIM/Challenge.
  1986. Sending this packet indicates that the peer has successfully
  1987. authenticated the server and that the EAP exchange will be accepted
  1988. by the peer's local policy. Hence, if these conditions are not met,
  1989. then the peer MUST NOT send EAP-Response/SIM/Challenge, but the peer
  1990. MUST send EAP-Response/SIM/Client-Error.
  1991. The AT_MAC attribute MUST be included. For EAP-
  1992. Response/SIM/Challenge, the MAC code is calculated over the following
  1993. data:
  1994. EAP packet| n*SRES
  1995. The EAP packet is represented as specified in Section 8.1. The EAP
  1996. packet bytes are immediately followed by the two or three SRES values
  1997. concatenated, denoted above with the notation n*SRES. The SRES
  1998. values are used in the same order as the corresponding RAND
  1999. challenges in the server's AT_RAND attribute.
  2000. Haverinen & Salowey Informational [Page 50]
  2001. RFC 4186 EAP-SIM Authentication January 2006
  2002. The AT_RESULT_IND attribute MAY be included if it was included in
  2003. EAP-Request/SIM/Challenge. The usage of this attribute is discussed
  2004. in Section 6.2.
  2005. Later versions of this protocol MAY make use of the AT_ENCR_DATA and
  2006. AT_IV attributes in this message to include encrypted (skippable)
  2007. attributes. The EAP server MUST process EAP-Response/SIM/Challenge
  2008. messages that include these attributes even if the server did not
  2009. implement these optional attributes.
  2010. 9.5. EAP-Request/SIM/Re-authentication
  2011. The server sends the EAP-Request/SIM/Re-authentication message if it
  2012. wants to use fast re-authentication, and if it has received a valid
  2013. fast re-authentication identity in EAP-Response/Identity or
  2014. EAP-Response/SIM/Start.
  2015. AT_MAC MUST be included. No message-specific data is included in the
  2016. MAC calculation. See Section 10.14.
  2017. The AT_RESULT_IND attribute MAY be included. The usage of this
  2018. attribute is discussed in Section 6.2.
  2019. The AT_IV and AT_ENCR_DATA attributes MUST be included. The
  2020. plaintext consists of the following nested encrypted attributes,
  2021. which MUST be included: AT_COUNTER and AT_NONCE_S. In addition, the
  2022. nested encrypted attributes MAY include the following attributes:
  2023. AT_NEXT_REAUTH_ID and AT_PADDING.
  2024. 9.6. EAP-Response/SIM/Re-authentication
  2025. The client sends the EAP-Response/SIM/Re-authentication packet in
  2026. response to a valid EAP-Request/SIM/Re-authentication.
  2027. The AT_MAC attribute MUST be included. For
  2028. EAP-Response/SIM/Re-authentication, the MAC code is calculated over
  2029. the following data:
  2030. EAP packet| NONCE_S
  2031. The EAP packet is represented as specified in Section 8.1. It is
  2032. followed by the 16-byte NONCE_S value from the server's AT_NONCE_S
  2033. attribute.
  2034. The AT_IV and AT_ENCR_DATA attributes MUST be included. The nested
  2035. encrypted attributes MUST include the AT_COUNTER attribute. The
  2036. AT_COUNTER_TOO_SMALL attribute MAY be included in the nested
  2037. Haverinen & Salowey Informational [Page 51]
  2038. RFC 4186 EAP-SIM Authentication January 2006
  2039. encrypted attributes, and it is included in cases specified in
  2040. Section 5. The AT_PADDING attribute MAY be included.
  2041. The AT_RESULT_IND attribute MAY be included if it was included in
  2042. EAP-Request/SIM/Re-authentication. The usage of this attribute is
  2043. discussed in Section 6.2.
  2044. Sending this packet without AT_COUNTER_TOO_SMALL indicates that the
  2045. peer has successfully authenticated the server and that the EAP
  2046. exchange will be accepted by the peer's local policy. Hence, if
  2047. these conditions are not met, then the peer MUST NOT send
  2048. EAP-Response/SIM/Re-authentication, but the peer MUST send
  2049. EAP-Response/SIM/Client-Error.
  2050. 9.7. EAP-Response/SIM/Client-Error
  2051. The peer sends EAP-Response/SIM/Client-Error in error cases, as
  2052. specified in Section 6.3.1.
  2053. The AT_CLIENT_ERROR_CODE attribute MUST be included.
  2054. The AT_MAC, AT_IV, or AT_ENCR_DATA attributes MUST NOT be used with
  2055. this packet.
  2056. 9.8. EAP-Request/SIM/Notification
  2057. The usage of this message is specified in Section 6. The
  2058. AT_NOTIFICATION attribute MUST be included.
  2059. The AT_MAC attribute MUST be included if the P bit of the
  2060. notification code in AT_NOTIFICATION is set to zero, and MUST NOT be
  2061. included in cases when the P bit is set to one. The P bit is
  2062. discussed in Section 6.
  2063. No message-specific data is included in the MAC calculation. See
  2064. Section 10.14.
  2065. If EAP-Request/SIM/Notification is used on a fast re-authentication
  2066. exchange, and if the P bit in AT_NOTIFICATION is set to zero, then
  2067. AT_COUNTER is used for replay protection. In this case, the
  2068. AT_ENCR_DATA and AT_IV attributes MUST be included, and the
  2069. encapsulated plaintext attributes MUST include the AT_COUNTER
  2070. attribute. The counter value included in AT_COUNTER MUST be the same
  2071. as in the EAP-Request/SIM/Re-authentication packet on the same fast
  2072. re-authentication exchange.
  2073. Haverinen & Salowey Informational [Page 52]
  2074. RFC 4186 EAP-SIM Authentication January 2006
  2075. 9.9. EAP-Response/SIM/Notification
  2076. The usage of this message is specified in Section 6. This packet is
  2077. an acknowledgement of EAP-Request/SIM/Notification.
  2078. The AT_MAC attribute MUST be included in cases when the P bit of the
  2079. notification code in AT_NOTIFICATION of EAP-Request/SIM/Notification
  2080. is set to zero, and MUST NOT be included in cases when the P bit is
  2081. set to one. The P bit is discussed in Section 6.
  2082. No message-specific data is included in the MAC calculation, see
  2083. Section 10.14.
  2084. If EAP-Request/SIM/Notification is used on a fast re-authentication
  2085. exchange, and if the P bit in AT_NOTIFICATION is set to zero, then
  2086. AT_COUNTER is used for replay protection. In this case, the
  2087. AT_ENCR_DATA and AT_IV attributes MUST be included, and the
  2088. encapsulated plaintext attributes MUST include the AT_COUNTER
  2089. attribute. The counter value included in AT_COUNTER MUST be the same
  2090. as in the EAP-Request/SIM/Re-authentication packet on the same fast
  2091. re-authentication exchange.
  2092. 10. Attributes
  2093. This section specifies the format of message attributes. The
  2094. attribute type numbers are specified in the IANA considerations
  2095. section of the EAP-AKA specification [EAP-AKA].
  2096. 10.1. Table of Attributes
  2097. The following table provides a guide to which attributes may be found
  2098. in which kinds of messages, and in what quantity. Messages are
  2099. denoted with numbers in parentheses as follows: (1)
  2100. EAP-Request/SIM/Start, (2) EAP-Response/SIM/Start, (3)
  2101. EAP-Request/SIM/Challenge, (4) EAP-Response/SIM/Challenge, (5)
  2102. EAP-Request/SIM/Notification, (6) EAP-Response/SIM/Notification, (7)
  2103. EAP-Response/SIM/Client-Error, (8) EAP-Request/SIM/Re-authentication,
  2104. and (9) EAP-Response/SIM/Re-authentication. The column denoted with
  2105. "Encr" indicates whether the attribute is a nested attribute that
  2106. MUST be included within AT_ENCR_DATA, and the column denoted with
  2107. "Skip" indicates whether the attribute is a skippable attribute.
  2108. "0" indicates that the attribute MUST NOT be included in the message,
  2109. "1" indicates that the attribute MUST be included in the message,
  2110. "0-1" indicates that the attribute is sometimes included in the
  2111. message, and "0*" indicates that the attribute is not included in the
  2112. message in cases specified in this document, but MAY be included in
  2113. future versions of the protocol.
  2114. Haverinen & Salowey Informational [Page 53]
  2115. RFC 4186 EAP-SIM Authentication January 2006
  2116. Attribute (1) (2) (3) (4) (5) (6) (7) (8) (9) Encr Skip
  2117. AT_VERSION_LIST 1 0 0 0 0 0 0 0 0 N N
  2118. AT_SELECTED_VERSION 0 0-1 0 0 0 0 0 0 0 N N
  2119. AT_NONCE_MT 0 0-1 0 0 0 0 0 0 0 N N
  2120. AT_PERMANENT_ID_REQ 0-1 0 0 0 0 0 0 0 0 N N
  2121. AT_ANY_ID_REQ 0-1 0 0 0 0 0 0 0 0 N N
  2122. AT_FULLAUTH_ID_REQ 0-1 0 0 0 0 0 0 0 0 N N
  2123. AT_IDENTITY 0 0-1 0 0 0 0 0 0 0 N N
  2124. AT_RAND 0 0 1 0 0 0 0 0 0 N N
  2125. AT_NEXT_PSEUDONYM 0 0 0-1 0 0 0 0 0 0 Y Y
  2126. AT_NEXT_REAUTH_ID 0 0 0-1 0 0 0 0 0-1 0 Y Y
  2127. AT_IV 0 0 0-1 0* 0-1 0-1 0 1 1 N Y
  2128. AT_ENCR_DATA 0 0 0-1 0* 0-1 0-1 0 1 1 N Y
  2129. AT_PADDING 0 0 0-1 0* 0-1 0-1 0 0-1 0-1 Y N
  2130. AT_RESULT_IND 0 0 0-1 0-1 0 0 0 0-1 0-1 N Y
  2131. AT_MAC 0 0 1 1 0-1 0-1 0 1 1 N N
  2132. AT_COUNTER 0 0 0 0 0-1 0-1 0 1 1 Y N
  2133. AT_COUNTER_TOO_SMALL 0 0 0 0 0 0 0 0 0-1 Y N
  2134. AT_NONCE_S 0 0 0 0 0 0 0 1 0 Y N
  2135. AT_NOTIFICATION 0 0 0 0 1 0 0 0 0 N N
  2136. AT_CLIENT_ERROR_CODE 0 0 0 0 0 0 1 0 0 N N
  2137. It should be noted that attributes AT_PERMANENT_ID_REQ,
  2138. AT_ANY_ID_REQ, and AT_FULLAUTH_ID_REQ are mutually exclusive; only
  2139. one of them can be included at the same time. If one of the
  2140. attributes AT_IV and AT_ENCR_DATA is included, then both of the
  2141. attributes MUST be included.
  2142. 10.2. AT_VERSION_LIST
  2143. The format of the AT_VERSION_LIST attribute is shown below.
  2144. 0 1 2 3
  2145. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2146. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2147. | AT_VERSION_L..| Length | Actual Version List Length |
  2148. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2149. | Supported Version 1 | Supported Version 2 |
  2150. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2151. . .
  2152. . .
  2153. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2154. | Supported Version N | Padding |
  2155. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2156. This attribute is used in version negotiation, as specified in
  2157. Section 4.1. The attribute contains the version numbers supported by
  2158. the EAP-SIM server. The server MUST only include versions that it
  2159. Haverinen & Salowey Informational [Page 54]
  2160. RFC 4186 EAP-SIM Authentication January 2006
  2161. implements and that are allowed in its security policy. The server
  2162. SHOULD list the versions in the order of preference, with the most
  2163. preferred versions listed first. At least one version number MUST be
  2164. included. The version number for the protocol described in this
  2165. document is one (0001 hexadecimal).
  2166. The value field of this attribute begins with 2-byte Actual Version
  2167. List Length, which specifies the length of the Version List in bytes,
  2168. not including the Actual Version List Length attribute length. This
  2169. field is followed by the list of the versions supported by the
  2170. server, which each have a length of 2 bytes. For example, if there
  2171. is only one supported version, then the Actual Version List Length is
  2172. 2. Because the length of the attribute must be a multiple of 4
  2173. bytes, the sender pads the value field with zero bytes when
  2174. necessary.
  2175. 10.3. AT_SELECTED_VERSION
  2176. The format of the AT_SELECTED_VERSION attribute is shown below.
  2177. 0 1 2 3
  2178. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2179. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2180. | AT_SELECTED...| Length = 1 | Selected Version |
  2181. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2182. This attribute is used in version negotiation, as specified in
  2183. Section 4.1. The value field of this attribute contains a two-byte
  2184. version number, which indicates the EAP-SIM version that the peer
  2185. wants to use.
  2186. 10.4. AT_NONCE_MT
  2187. The format of the AT_NONCE_MT attribute is shown below.
  2188. 0 1 2 3
  2189. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2190. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2191. |AT_NONCE_MT | Length = 5 | Reserved |
  2192. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2193. | |
  2194. | NONCE_MT |
  2195. | |
  2196. | |
  2197. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2198. Haverinen & Salowey Informational [Page 55]
  2199. RFC 4186 EAP-SIM Authentication January 2006
  2200. The value field of the NONCE_MT attribute contains two reserved bytes
  2201. followed by a random number freshly generated by the peer (16 bytes
  2202. long) for this EAP-SIM authentication exchange. The random number is
  2203. used as a seed value for the new keying material. The reserved bytes
  2204. are set to zero upon sending and ignored upon reception.
  2205. The peer MUST NOT re-use the NONCE_MT value from a previous EAP-SIM
  2206. authentication exchange. If an EAP-SIM exchange includes several
  2207. EAP/SIM/Start rounds, then the peer SHOULD use the same NONCE_MT
  2208. value in all EAP-Response/SIM/Start packets. The peer SHOULD use a
  2209. good source of randomness to generate NONCE_MT. Please see [RFC4086]
  2210. for more information about generating random numbers for security
  2211. applications.
  2212. 10.5. AT_PERMANENT_ID_REQ
  2213. The format of the AT_PERMANENT_ID_REQ attribute is shown below.
  2214. 0 1 2 3
  2215. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2216. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2217. |AT_PERM..._REQ | Length = 1 | Reserved |
  2218. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2219. The use of the AT_PERMANENT_ID_REQ is defined in Section 4.2. The
  2220. value field contains only two reserved bytes, which are set to zero
  2221. on sending and ignored on reception.
  2222. 10.6. AT_ANY_ID_REQ
  2223. The format of the AT_ANY_ID_REQ attribute is shown below.
  2224. 0 1 2 3
  2225. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2226. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2227. |AT_ANY_ID_REQ | Length = 1 | Reserved |
  2228. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2229. The use of the AT_ANY_ID_REQ is defined in Section 4.2. The value
  2230. field contains only two reserved bytes, which are set to zero on
  2231. sending and ignored on reception.
  2232. Haverinen & Salowey Informational [Page 56]
  2233. RFC 4186 EAP-SIM Authentication January 2006
  2234. 10.7. AT_FULLAUTH_ID_REQ
  2235. The format of the AT_FULLAUTH_ID_REQ attribute is shown below.
  2236. 0 1 2 3
  2237. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2238. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2239. |AT_FULLAUTH_...| Length = 1 | Reserved |
  2240. +---------------+---------------+-------------------------------+
  2241. The use of the AT_FULLAUTH_ID_REQ is defined in Section 4.2. The
  2242. value field contains only two reserved bytes, which are set to zero
  2243. on sending and ignored on reception.
  2244. 10.8. AT_IDENTITY
  2245. The format of the AT_IDENTITY attribute is shown below.
  2246. 0 1 2 3
  2247. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2248. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2249. | AT_IDENTITY | Length | Actual Identity Length |
  2250. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2251. | |
  2252. . Identity (optional) .
  2253. . .
  2254. | |
  2255. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2256. The use of the AT_IDENTITY is defined in Section 4.2. The value
  2257. field of this attribute begins with a 2-byte actual identity length,
  2258. which specifies the length of the identity in bytes. This field is
  2259. followed by the subscriber identity of the indicated actual length.
  2260. The identity is the permanent identity, a pseudonym identity, or a
  2261. fast re-authentication identity. The identity format is specified in
  2262. Section 4.2.1. The same identity format is used in the AT_IDENTITY
  2263. attribute and the EAP-Response/Identity packet, with the exception
  2264. that the peer MUST NOT decorate the identity it includes in
  2265. AT_IDENTITY. The identity does not include any terminating null
  2266. characters. Because the length of the attribute must be a multiple
  2267. of 4 bytes, the sender pads the identity with zero bytes when
  2268. necessary.
  2269. Haverinen & Salowey Informational [Page 57]
  2270. RFC 4186 EAP-SIM Authentication January 2006
  2271. 10.9. AT_RAND
  2272. The format of the AT_RAND attribute is shown below.
  2273. 0 1 2 3
  2274. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2275. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2276. | AT_RAND | Length | Reserved |
  2277. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2278. | |
  2279. . n*RAND .
  2280. . .
  2281. | |
  2282. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2283. The value field of this attribute contains two reserved bytes
  2284. followed by n GSM RANDs, each 16 bytes long. The value of n can be
  2285. determined by the attribute length. The reserved bytes are set to
  2286. zero upon sending and ignored upon reception.
  2287. The number of RAND challenges (n) MUST be two or three. The peer
  2288. MUST verify that the number of RAND challenges is sufficient
  2289. according to the peer's policy. The server MUST use different RAND
  2290. values. In other words, a RAND value can only be included once in
  2291. AT_RAND. When processing the AT_RAND attribute, the peer MUST check
  2292. that the RANDs are different.
  2293. The EAP server MUST obtain fresh RANDs for each EAP-SIM full
  2294. authentication exchange. More specifically, the server MUST consider
  2295. RANDs it included in AT_RAND to be consumed if the server receives an
  2296. EAP-Response/SIM/Challenge packet with a valid AT_MAC, or an
  2297. EAP-Response/SIM/Client-Error with the code "insufficient number of
  2298. challenges" or "RANDs are not fresh". However, in other cases (if
  2299. the server does not receive a response to its
  2300. EAP-Request/SIM/Challenge packet, or if the server receives a
  2301. response other than the cases listed above), the server does not need
  2302. to consider the RANDs to be consumed, and the server MAY re-use the
  2303. RANDs in the AT_RAND attribute of the next full authentication
  2304. attempt.
  2305. Haverinen & Salowey Informational [Page 58]
  2306. RFC 4186 EAP-SIM Authentication January 2006
  2307. 10.10. AT_NEXT_PSEUDONYM
  2308. The format of the AT_NEXT_PSEUDONYM attribute is shown below.
  2309. 0 1 2 3
  2310. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2311. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2312. | AT_NEXT_PSEU..| Length | Actual Pseudonym Length |
  2313. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2314. | |
  2315. . Next Pseudonym .
  2316. . .
  2317. | |
  2318. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2319. The value field of this attribute begins with the 2-byte actual
  2320. pseudonym length, which specifies the length of the following
  2321. pseudonym in bytes. This field is followed by a pseudonym username
  2322. that the peer can use in the next authentication. The username MUST
  2323. NOT include any realm portion. The username does not include any
  2324. terminating null characters. Because the length of the attribute
  2325. must be a multiple of 4 bytes, the sender pads the pseudonym with
  2326. zero bytes when necessary. The username encoding MUST follow the
  2327. UTF-8 transformation format [RFC3629]. This attribute MUST always be
  2328. encrypted by encapsulating it within the AT_ENCR_DATA attribute.
  2329. 10.11. AT_NEXT_REAUTH_ID
  2330. The format of the AT_NEXT_REAUTH_ID attribute is shown below.
  2331. 0 1 2 3
  2332. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2333. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2334. | AT_NEXT_REAU..| Length | Actual Re-Auth Identity Length|
  2335. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2336. | |
  2337. . Next Fast Re-authentication Username .
  2338. . .
  2339. | |
  2340. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2341. The value field of this attribute begins with the 2-byte actual
  2342. re-authentication identity length which specifies the length of the
  2343. following fast re-authentication identity in bytes. This field is
  2344. followed by a fast re-authentication identity that the peer can use
  2345. in the next fast re-authentication, as described in Section 5. In
  2346. environments where a realm portion is required, the fast
  2347. re-authentication identity includes both a username portion and a
  2348. Haverinen & Salowey Informational [Page 59]
  2349. RFC 4186 EAP-SIM Authentication January 2006
  2350. realm name portion. The fast re-authentication identity does not
  2351. include any terminating null characters. Because the length of the
  2352. attribute must be a multiple of 4 bytes, the sender pads the fast
  2353. re-authentication identity with zero bytes when necessary. The
  2354. identity encoding MUST follow the UTF-8 transformation format
  2355. [RFC3629]. This attribute MUST always be encrypted by encapsulating
  2356. it within the AT_ENCR_DATA attribute.
  2357. 10.12. AT_IV, AT_ENCR_DATA, and AT_PADDING
  2358. AT_IV and AT_ENCR_DATA attributes can be used to transmit encrypted
  2359. information between the EAP-SIM peer and server.
  2360. The value field of AT_IV contains two reserved bytes followed by a
  2361. 16-byte initialization vector required by the AT_ENCR_DATA attribute.
  2362. The reserved bytes are set to zero when sending and ignored on
  2363. reception. The AT_IV attribute MUST be included if and only if the
  2364. AT_ENCR_DATA is included. Section 6.3 specifies the operation if a
  2365. packet that does not meet this condition is encountered.
  2366. The sender of the AT_IV attribute chooses the initialization vector
  2367. at random. The sender MUST NOT re-use the initialization vector
  2368. value from previous EAP-SIM packets. The sender SHOULD use a good
  2369. source of randomness to generate the initialization vector. Please
  2370. see [RFC4086] for more information about generating random numbers
  2371. for security applications. The format of AT_IV is shown below.
  2372. 0 1 2 3
  2373. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2374. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2375. | AT_IV | Length = 5 | Reserved |
  2376. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2377. | |
  2378. | Initialization Vector |
  2379. | |
  2380. | |
  2381. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2382. The value field of the AT_ENCR_DATA attribute consists of two
  2383. reserved bytes followed by cipher text bytes encrypted using the
  2384. Advanced Encryption Standard (AES) [AES] with a 128-bit key in the
  2385. Cipher Block Chaining (CBC) mode of operation using the
  2386. initialization vector from the AT_IV attribute. The reserved bytes
  2387. are set to zero when sending and ignored on reception. Please see
  2388. [CBC] for a description of the CBC mode. The format of the
  2389. AT_ENCR_DATA attribute is shown below.
  2390. Haverinen & Salowey Informational [Page 60]
  2391. RFC 4186 EAP-SIM Authentication January 2006
  2392. 0 1 2 3
  2393. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2394. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2395. | AT_ENCR_DATA | Length | Reserved |
  2396. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2397. | |
  2398. . Encrypted Data .
  2399. . .
  2400. | |
  2401. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2402. The derivation of the encryption key (K_encr) is specified in Section
  2403. 7.
  2404. The plaintext consists of nested EAP-SIM attributes.
  2405. The encryption algorithm requires the length of the plaintext to be a
  2406. multiple of 16 bytes. The sender may need to include the AT_PADDING
  2407. attribute as the last attribute within AT_ENCR_DATA. The AT_PADDING
  2408. attribute is not included if the total length of other nested
  2409. attributes within the AT_ENCR_DATA attribute is a multiple of 16
  2410. bytes. As usual, the Length of the Padding attribute includes the
  2411. Attribute Type and Attribute Length fields. The length of the
  2412. Padding attribute is 4, 8, or 12 bytes. It is chosen so that the
  2413. length of the value field of the AT_ENCR_DATA attribute becomes a
  2414. multiple of 16 bytes. The actual pad bytes in the value field are
  2415. set to zero (00 hexadecimal) on sending. The recipient of the
  2416. message MUST verify that the pad bytes are set to zero. If this
  2417. verification fails on the peer, then it MUST send the
  2418. EAP-Response/SIM/Client-Error packet with the error code "unable to
  2419. process packet" to terminate the authentication exchange. If this
  2420. verification fails on the server, then the server sends the peer the
  2421. EAP-Request/SIM/Notification packet with an AT_NOTIFICATION code that
  2422. implies failure to terminate the authentication exchange. The format
  2423. of the AT_PADDING attribute is shown below.
  2424. 0 1 2 3
  2425. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2426. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2427. | AT_PADDING | Length | Padding... |
  2428. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  2429. | |
  2430. | |
  2431. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2432. Haverinen & Salowey Informational [Page 61]
  2433. RFC 4186 EAP-SIM Authentication January 2006
  2434. 10.13. AT_RESULT_IND
  2435. The format of the AT_RESULT_IND attribute is shown below.
  2436. 0 1 2 3
  2437. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2438. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2439. | AT_RESULT_...| Length = 1 | Reserved |
  2440. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2441. The value field of this attribute consists of two reserved bytes,
  2442. which are set to zero upon sending and ignored upon reception. This
  2443. attribute is always sent unencrypted, so it MUST NOT be encapsulated
  2444. within the AT_ENCR_DATA attribute.
  2445. 10.14. AT_MAC
  2446. The AT_MAC attribute is used for EAP-SIM message authentication.
  2447. Section 8 specifies in which messages AT_MAC MUST be included.
  2448. The value field of the AT_MAC attribute contains two reserved bytes
  2449. followed by a keyed message authentication code (MAC). The MAC is
  2450. calculated over the whole EAP packet and concatenated with optional
  2451. message-specific data, with the exception that the value field of the
  2452. MAC attribute is set to zero when calculating the MAC. The EAP
  2453. packet includes the EAP header that begins with the Code field, the
  2454. EAP-SIM header that begins with the Subtype field, and all the
  2455. attributes, as specified in Section 8.1. The reserved bytes in
  2456. AT_MAC are set to zero when sending and ignored on reception. The
  2457. contents of the message-specific data that may be included in the MAC
  2458. calculation are specified separately for each EAP-SIM message in
  2459. Section 9.
  2460. The format of the AT_MAC attribute is shown below.
  2461. 0 1 2 3
  2462. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2463. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2464. | AT_MAC | Length = 5 | Reserved |
  2465. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2466. | |
  2467. | MAC |
  2468. | |
  2469. | |
  2470. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2471. Haverinen & Salowey Informational [Page 62]
  2472. RFC 4186 EAP-SIM Authentication January 2006
  2473. The MAC algorithm is an HMAC-SHA1-128 [RFC2104] keyed hash value.
  2474. (The HMAC-SHA1-128 value is obtained from the 20-byte HMAC-SHA1 value
  2475. by truncating the output to the first 16 bytes. Hence, the length of
  2476. the MAC is 16 bytes. The derivation of the authentication key
  2477. (K_aut) used in the calculation of the MAC is specified in Section 7.
  2478. When the AT_MAC attribute is included in an EAP-SIM message, the
  2479. recipient MUST process the AT_MAC attribute before looking at any
  2480. other attributes, except when processing EAP-Request/SIM/Challenge.
  2481. The processing of EAP-Request/SIM/Challenge is specified in Section
  2482. 9.3. If the message authentication code is invalid, then the
  2483. recipient MUST ignore all other attributes in the message and operate
  2484. as specified in Section 6.3.
  2485. 10.15. AT_COUNTER
  2486. The format of the AT_COUNTER attribute is shown below.
  2487. 0 1 2 3
  2488. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2489. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2490. | AT_COUNTER | Length = 1 | Counter |
  2491. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2492. The value field of the AT_COUNTER attribute consists of a 16-bit
  2493. unsigned integer counter value, represented in network byte order.
  2494. This attribute MUST always be encrypted by encapsulating it within
  2495. the AT_ENCR_DATA attribute.
  2496. 10.16. AT_COUNTER_TOO_SMALL
  2497. The format of the AT_COUNTER_TOO_SMALL attribute is shown below.
  2498. 0 1 2 3
  2499. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2500. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2501. | AT_COUNTER...| Length = 1 | Reserved |
  2502. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2503. The value field of this attribute consists of two reserved bytes,
  2504. which are set to zero upon sending and ignored upon reception. This
  2505. attribute MUST always be encrypted by encapsulating it within the
  2506. AT_ENCR_DATA attribute.
  2507. Haverinen & Salowey Informational [Page 63]
  2508. RFC 4186 EAP-SIM Authentication January 2006
  2509. 10.17. AT_NONCE_S
  2510. The format of the AT_NONCE_S attribute is shown below.
  2511. 0 1 2 3
  2512. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2513. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2514. | AT_NONCE_S | Length = 5 | Reserved |
  2515. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2516. | |
  2517. | |
  2518. | NONCE_S |
  2519. | |
  2520. | |
  2521. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2522. The value field of the AT_NONCE_S attribute contains two reserved
  2523. bytes followed by a random number freshly generated by the server (16
  2524. bytes) for this EAP-SIM fast re-authentication. The random number is
  2525. used as a challenge for the peer and also as a seed value for the new
  2526. keying material. The reserved bytes are set to zero upon sending and
  2527. ignored upon reception. This attribute MUST always be encrypted by
  2528. encapsulating it within the AT_ENCR_DATA attribute.
  2529. The server MUST NOT re-use the NONCE_S value from any previous
  2530. EAP-SIM fast re-authentication exchange. The server SHOULD use a
  2531. good source of randomness to generate NONCE_S. Please see [RFC4086]
  2532. for more information about generating random numbers for security
  2533. applications.
  2534. 10.18. AT_NOTIFICATION
  2535. The format of the AT_NOTIFICATION attribute is shown below.
  2536. 0 1 2 3
  2537. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2538. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2539. |AT_NOTIFICATION| Length = 1 |S|P| Notification Code |
  2540. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2541. The value field of this attribute contains a two-byte notification
  2542. code. The first and second bit (S and P) of the notification code
  2543. are interpreted as described in Section 6.
  2544. The notification code values listed below have been reserved. The
  2545. descriptions below illustrate the semantics of the notifications.
  2546. Haverinen & Salowey Informational [Page 64]
  2547. RFC 4186 EAP-SIM Authentication January 2006
  2548. The peer implementation MAY use different wordings when presenting
  2549. the notifications to the user. The "requested service" depends on
  2550. the environment where EAP-SIM is applied.
  2551. 0 - General failure after authentication. (Implies failure, used
  2552. after successful authentication.)
  2553. 16384 - General failure. (Implies failure, used before
  2554. authentication.)
  2555. 32768 - Success. User has been successfully authenticated. (Does
  2556. not imply failure, used after successful authentication). The usage
  2557. of this code is discussed in Section 6.2.
  2558. 1026 - User has been temporarily denied access to the requested
  2559. service. (Implies failure, used after successful authentication.)
  2560. 1031 - User has not subscribed to the requested service. (Implies
  2561. failure, used after successful authentication.)
  2562. 10.19. AT_CLIENT_ERROR_CODE
  2563. The format of the AT_CLIENT_ERROR_CODE attribute is shown below.
  2564. 0 1 2 3
  2565. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2566. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2567. |AT_CLIENT_ERR..| Length = 1 | Client Error Code |
  2568. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2569. The value field of this attribute contains a two-byte client error
  2570. code. The following error code values have been reserved.
  2571. 0 "unable to process packet": a general error code
  2572. 1 "unsupported version": the peer does not support any of
  2573. the versions listed in AT_VERSION_LIST
  2574. 2 "insufficient number of challenges": the peer's policy
  2575. requires more triplets than the server included in AT_RAND
  2576. 3 "RANDs are not fresh": the peer believes that the RAND
  2577. challenges included in AT_RAND were not fresh
  2578. Haverinen & Salowey Informational [Page 65]
  2579. RFC 4186 EAP-SIM Authentication January 2006
  2580. 11. IANA Considerations
  2581. IANA has assigned the EAP type number 18 for this protocol.
  2582. EAP-SIM shares most of the protocol design, such as attributes and
  2583. message Subtypes, with EAP-AKA [EAP-AKA]. EAP-SIM protocol numbers
  2584. should be administered in the same IANA registry as EAP-AKA. The
  2585. initial values are listed in [EAP-AKA] for both protocols, so this
  2586. document does not require any new registries or parameter allocation.
  2587. As a common registry is used for EAP-SIM and EAP-AKA, the protocol
  2588. number allocation policy for both protocols is specified in
  2589. [EAP-AKA].
  2590. 12. Security Considerations
  2591. The EAP specification [RFC3748] describes the security
  2592. vulnerabilities of EAP, which does not include its own security
  2593. mechanisms. This section discusses the claimed security properties
  2594. of EAP-SIM, as well as vulnerabilities and security recommendations.
  2595. 12.1. A3 and A8 Algorithms
  2596. The GSM A3 and A8 algorithms are used in EAP-SIM. [GSM-03.20]
  2597. specifies the general GSM authentication procedure and the external
  2598. interface (inputs and outputs) of the A3 and A8 algorithms. The
  2599. operation of these functions falls completely within the domain of an
  2600. individual operator, and therefore, the functions are specified by
  2601. each operator rather than being fully standardised. The GSM-MILENAGE
  2602. algorithm, specified publicly in [3GPP-TS-55.205], is an example
  2603. algorithm set for A3 and A8 algorithms.
  2604. The security of the A3 and A8 algorithms is important to the security
  2605. of EAP-SIM. Some A3/A8 algorithms have been compromised; see [GSM-
  2606. Cloning] for discussion about the security of COMP-128 version 1.
  2607. Note that several revised versions of the COMP-128 A3/A8 algorithm
  2608. have been devised after the publication of these weaknesses and that
  2609. the publicly specified GSM-MILENAGE algorithm is not vulnerable to
  2610. any known attacks.
  2611. 12.2. Identity Protection
  2612. EAP-SIM includes optional identity privacy support that protects the
  2613. privacy of the subscriber identity against passive eavesdropping.
  2614. This document only specifies a mechanism to deliver pseudonyms from
  2615. the server to the peer as part of an EAP-SIM exchange. Hence, a peer
  2616. that has not yet performed any EAP-SIM exchanges does not typically
  2617. have a pseudonym available. If the peer does not have a pseudonym
  2618. available, then the privacy mechanism cannot be used, but the
  2619. Haverinen & Salowey Informational [Page 66]
  2620. RFC 4186 EAP-SIM Authentication January 2006
  2621. permanent identity will have to be sent in the clear. The terminal
  2622. SHOULD store the pseudonym in a non-volatile memory so that it can be
  2623. maintained across reboots. An active attacker that impersonates the
  2624. network may use the AT_PERMANENT_ID_REQ attribute to attempt to learn
  2625. the subscriber's permanent identity. However, as discussed in
  2626. Section 4.2.2, the terminal can refuse to send the cleartext
  2627. permanent identity if it believes that the network should be able to
  2628. recognize the pseudonym.
  2629. If the peer and server cannot guarantee that the pseudonym will be
  2630. maintained reliably, and identity privacy is required, then
  2631. additional protection from an external security mechanism (such as
  2632. Protected Extensible Authentication Protocol (PEAP) [PEAP]) may be
  2633. used. If an external security mechanism is in use, the identity
  2634. privacy features of EAP-SIM may not be useful. The security
  2635. considerations of using an external security mechanism with EAP-SIM
  2636. are beyond the scope of this document.
  2637. 12.3. Mutual Authentication and Triplet Exposure
  2638. EAP-SIM provides mutual authentication. The peer believes that the
  2639. network is authentic because the network can calculate a correct
  2640. AT_MAC value in the EAP-Request/SIM/Challenge packet. To calculate
  2641. AT_MAC it is sufficient to know the RAND and Kc values from the GSM
  2642. triplets (RAND, SRES, Kc) used in the authentication. Because the
  2643. network selects the RAND challenges and the triplets, an attacker
  2644. that knows n (2 or 3) GSM triplets for the subscriber is able to
  2645. impersonate a valid network to the peer. (Some peers MAY employ an
  2646. implementation-specific counter-measure against impersonating a valid
  2647. network by re-using a previously used RAND; see below.) In other
  2648. words, the security of EAP-SIM is based on the secrecy of Kc keys,
  2649. which are considered secret intermediate results in the EAP-SIM
  2650. cryptographic calculations.
  2651. Given physical access to the SIM card, it is easy to obtain any
  2652. number of GSM triplets.
  2653. Another way to obtain triplets is to mount an attack on the peer
  2654. platform via a virus or other malicious piece of software. The peer
  2655. SHOULD be protected against triplet querying attacks by malicious
  2656. software. Care should be taken not to expose Kc keys to attackers
  2657. when they are stored or handled by the peer, or transmitted between
  2658. subsystems of the peer. Steps should be taken to limit the
  2659. transport, storage, and handling of these values outside a protected
  2660. environment within the peer. However, the virus protection of the
  2661. peer and the security capabilities of the peer's operating system are
  2662. outside the scope of this document.
  2663. Haverinen & Salowey Informational [Page 67]
  2664. RFC 4186 EAP-SIM Authentication January 2006
  2665. The EAP-SIM server typically obtains the triplets from the Home
  2666. Location Register (HLR). An attacker might try to obtain triplets by
  2667. attacking against the network used between the EAP-SIM server and the
  2668. HLR. Care should be taken not to expose Kc keys to attackers when
  2669. they are stored or handled by the EAP-SIM server, or transmitted
  2670. between the EAP server and the HLR. Steps should be taken to limit
  2671. the transport, storage, and handling of these values outside a
  2672. protected environment. However, the protection of the communications
  2673. between the EAP-SIM server and the HLR is outside the scope of this
  2674. document.
  2675. If the same SIM credentials are also used for GSM traffic, the
  2676. triplets could be revealed in the GSM network; see Section 12.8.
  2677. In GSM, the network is allowed to re-use the RAND challenge in
  2678. consecutive authentication exchanges. This is not allowed in
  2679. EAP-SIM. The EAP-SIM server is mandated to use fresh triplets (RAND
  2680. challenges) in consecutive authentication exchanges, as specified in
  2681. Section 3. EAP-SIM does not mandate any means for the peer to check
  2682. if the RANDs are fresh, so the security of the scheme leans on the
  2683. secrecy of the triplets. However, the peer MAY employ
  2684. implementation-specific mechanisms to remember some of the previously
  2685. used RANDs, and the peer MAY check the freshness of the server's
  2686. RANDs. The operation in cases when the peer detects that the RANDs
  2687. are not fresh is specified in Section 6.3.1.
  2688. Preventing the re-use of authentication vectors has been taken into
  2689. account in the design of the UMTS Authentication and Key Agreement
  2690. (AKA), which is used in EAP-AKA [EAP-AKA]. In cases when the triplet
  2691. re-use properties of EAP-SIM are not considered sufficient, it is
  2692. advised to use EAP-AKA.
  2693. Note that EAP-SIM mutual authentication is done with the EAP server.
  2694. In general, EAP methods do not authenticate the identity or services
  2695. provided by the EAP authenticator (if distinct from the EAP server)
  2696. unless they provide the so-called channel bindings property. The
  2697. vulnerabilities related to this have been discussed in [RFC3748],
  2698. [EAP-Keying], [Service-Identity].
  2699. EAP-SIM does not provide the channel bindings property, so it only
  2700. authenticates the EAP server. However, ongoing work such as
  2701. [Service-Identity] may provide such support as an extension to
  2702. popular EAP methods such as EAP-TLS, EAP-SIM, or EAP-AKA.
  2703. Haverinen & Salowey Informational [Page 68]
  2704. RFC 4186 EAP-SIM Authentication January 2006
  2705. 12.4. Flooding the Authentication Centre
  2706. The EAP-SIM server typically obtains authentication vectors from the
  2707. Authentication Centre (AuC). EAP-SIM introduces a new usage for the
  2708. AuC. The protocols between the EAP-SIM server and the AuC are out of
  2709. the scope of this document. However, it should be noted that a
  2710. malicious EAP-SIM peer may generate a lot of protocol requests to
  2711. mount a denial of service attack. The EAP-SIM server implementation
  2712. SHOULD take this into account and SHOULD take steps to limit the
  2713. traffic that it generates towards the AuC, preventing the attacker
  2714. from flooding the AuC and from extending the denial of service attack
  2715. from EAP-SIM to other users of the AuC.
  2716. 12.5. Key Derivation
  2717. EAP-SIM supports key derivation. The key hierarchy is specified in
  2718. Section 7. EAP-SIM combines several GSM triplets in order to
  2719. generate stronger keying material and stronger AT_MAC values. The
  2720. actual strength of the resulting keys depends, among other things, on
  2721. operator-specific parameters including authentication algorithms, the
  2722. strength of the Ki key, and the quality of the RAND challenges. For
  2723. example, some SIM cards generate Kc keys with 10 bits set to zero.
  2724. Such restrictions may prevent the concatenation technique from
  2725. yielding strong session keys. Because the strength of the Ki key is
  2726. 128 bits, the ultimate strength of any derived secret key material is
  2727. never more than 128 bits.
  2728. It should also be noted that a security policy that allows n=2 to be
  2729. used may compromise the security of a future policy that requires
  2730. three triplets, because adversaries may be able to exploit the
  2731. messages exchanged when the weaker policy is applied.
  2732. There is no known way to obtain complete GSM triplets by mounting an
  2733. attack against EAP-SIM. A passive eavesdropper can learn n*RAND and
  2734. AT_MAC and may be able to link this information to the subscriber
  2735. identity. An active attacker that impersonates a GSM subscriber can
  2736. easily obtain n*RAND and AT_MAC values from the EAP server for any
  2737. given subscriber identity. However, calculating the Kc and SRES
  2738. values from AT_MAC would require the attacker to reverse the keyed
  2739. message authentication code function HMAC-SHA1-128.
  2740. As EAP-SIM does not expose any values calculated from an individual
  2741. GSM Kc keys, it is not possible to mount a brute force attack on only
  2742. one of the Kc keys in EAP-SIM. Therefore, when considering brute
  2743. force attacks on the values exposed in EAP-SIM, the effective length
  2744. of EAP-SIM session keys is not compromised by the fact that they are
  2745. Haverinen & Salowey Informational [Page 69]
  2746. RFC 4186 EAP-SIM Authentication January 2006
  2747. combined from several shorter keys, i.e., the effective length of 128
  2748. bits may be achieved. For additional considerations, see Section
  2749. 12.8.
  2750. 12.6. Cryptographic Separation of Keys and Session Independence
  2751. The EAP Transient Keys used to protect EAP-SIM packets (K_encr,
  2752. K_aut), the Master Session Key, and the Extended Master Session Key
  2753. are cryptographically separate in EAP-SIM. An attacker cannot derive
  2754. any non-trivial information about any of these keys based on the
  2755. other keys. An attacker also cannot calculate the pre-shared secret
  2756. (Ki) from the GSM Kc keys, from EAP-SIM K_encr, from EAP-SIM K_aut,
  2757. from the Master Session Key, or from the Extended Master Session Key.
  2758. Each EAP-SIM exchange generates fresh keying material, and the keying
  2759. material exported from the method upon separate EAP-SIM exchanges is
  2760. cryptographically separate. The EAP-SIM peer contributes to the
  2761. keying material with the NONCE_MT parameter, which must be chosen
  2762. freshly for each full authentication exchange. The EAP server is
  2763. mandated to choose the RAND challenges freshly for each full
  2764. authentication exchange. If either the server or the peer chooses
  2765. its random value (NONCE_MT or RAND challenges) freshly, even if the
  2766. other entity re-used its value from a previous exchange, then the EAP
  2767. Transient Keys, the Master Session Key, and the Extended Master
  2768. Session Key will be different and cryptographically separate from the
  2769. corresponding values derived upon the previous full authentication
  2770. exchange.
  2771. On fast re-authentication, freshness of the Master Session Key and
  2772. the Extended Master Session Key is provided with a counter
  2773. (AT_COUNTER). The same EAP Transient Keys (K_encr, K_aut) that were
  2774. used in the full authentication exchange are used to protect the EAP
  2775. negotiation. However, replay and integrity protection across all the
  2776. fast re-authentication exchanges that use the same EAP Transient Keys
  2777. is provided with AT_COUNTER.
  2778. [RFC3748] defines session independence as the "demonstration that
  2779. passive attacks (such as capture of the EAP conversation) or active
  2780. attacks (including compromise of the MSK or EMSK) do not enable
  2781. compromise of subsequent or prior MSKs or EMSKs". Because the MSKs
  2782. and EMSKs are separate between EAP exchanges, EAP-SIM supports this
  2783. security claim.
  2784. It should be noted that [Patel-2003], which predates [RFC3748], uses
  2785. a slightly different meaning for session independence. The EAP-SIM
  2786. protocol does not allow the peer to ensure that different Kc key
  2787. values would be used in different exchanges. Only the server is able
  2788. to ensure that fresh RANDs, and therefore, fresh Kc keys are used.
  2789. Haverinen & Salowey Informational [Page 70]
  2790. RFC 4186 EAP-SIM Authentication January 2006
  2791. Hence, the peer cannot guarantee EAP-SIM sessions to be independent
  2792. with regard to the internal Kc values. However, in EAP-SIM, the Kc
  2793. keys are considered to be secret intermediate results, which are not
  2794. exported outside the method. See Section 12.3 for more information
  2795. about RAND re-use.
  2796. 12.7. Dictionary Attacks
  2797. Because EAP-SIM is not a password protocol, it is not vulnerable to
  2798. dictionary attacks. (The pre-shared symmetric secret stored on the
  2799. SIM card is not a passphrase, nor is it derived from a passphrase.)
  2800. 12.8. Credentials Re-use
  2801. EAP-SIM cannot prevent attacks over the GSM or GPRS radio networks.
  2802. If the same SIM credentials are also used in GSM or GPRS, it is
  2803. possible to mount attacks over the cellular interface.
  2804. A passive attacker can eavesdrop GSM or GPRS traffic and obtain RAND,
  2805. SRES pairs. He can then use a brute force attack or other
  2806. cryptanalysis techniques to obtain the 64-bit Kc keys used to encrypt
  2807. the GSM or GPRS data. This makes it possible to attack each 64-bit
  2808. key separately.
  2809. An active attacker can mount a "rogue GSM/GPRS base station attack",
  2810. replaying previously seen RAND challenges to obtain SRES values. He
  2811. can then use a brute force attack to obtain the Kc keys. If
  2812. successful, the attacker can impersonate a valid network or decrypt
  2813. previously seen traffic, because EAP-SIM does not provide perfect
  2814. forward secrecy (PFS).
  2815. Due to several weaknesses in the GSM encryption algorithms, the
  2816. effective key strength of the Kc keys is much less than the expected
  2817. 64 bits (no more than 40 bits if the A5/1 GSM encryption algorithm is
  2818. used; as documented in [Barkan-2003], an active attacker can force
  2819. the peer to use the weaker A5/2 algorithm that can be broken in less
  2820. than a second).
  2821. Because the A5 encryption algorithm is not used in EAP-SIM, and
  2822. because EAP-SIM does not expose any values calculated from individual
  2823. Kc keys, it should be noted that these attacks are not possible if
  2824. the SIM credentials used in EAP-SIM are not shared in GSM/GPRS.
  2825. At the time this document was written, the 3rd Generation Partnership
  2826. Project (3GPP) has started to work on fixes to these A5
  2827. vulnerabilities. One of the solution proposals discussed in 3GPP is
  2828. integrity-protected A5 version negotiation, which would require the
  2829. base station to prove knowledge of the Kc key before the terminal
  2830. Haverinen & Salowey Informational [Page 71]
  2831. RFC 4186 EAP-SIM Authentication January 2006
  2832. sends any values calculated from the Kc to the network. Another
  2833. proposal is so-called special RANDs, where some bits of the RAND
  2834. challenge would be used for cryptographic separation by indicating
  2835. the allowed use of the triplet, such as the allowed A5 algorithm in
  2836. GSM or the fact that the triplet is intended for EAP-SIM. This is
  2837. currently a work in progress, and the mechanisms have not been
  2838. selected yet.
  2839. 12.9. Integrity and Replay Protection, and Confidentiality
  2840. AT_MAC, AT_IV, AT_ENCR_DATA, and AT_COUNTER attributes are used to
  2841. provide integrity, replay and confidentiality protection for EAP-SIM
  2842. requests and responses. Integrity protection with AT_MAC includes
  2843. the EAP header. These attributes cannot be used during the
  2844. EAP/SIM/Start roundtrip. However, the protocol values (user identity
  2845. string, NONCE_MT, and version negotiation parameters) are
  2846. (implicitly) protected by later EAP-SIM messages by including them in
  2847. key derivation.
  2848. Integrity protection (AT_MAC) is based on a keyed message
  2849. authentication code. Confidentiality (AT_ENCR_DATA and AT_IV) is
  2850. based on a block cipher.
  2851. Confidentiality protection is applied only to a part of the protocol
  2852. fields. The table of attributes in Section 10.1 summarizes which
  2853. fields are confidentiality-protected. It should be noted that the
  2854. error and notification code attributes AT_CLIENT_ERROR_CODE and
  2855. AT_NOTIFICATION are not confidential, but they are transmitted in the
  2856. clear. Identity protection is discussed in Section 12.2.
  2857. On full authentication, replay protection of the EAP exchange is
  2858. provided by the RAND values from the underlying GSM authentication
  2859. scheme and the use of the NONCE_MT value. Protection against replays
  2860. of EAP-SIM messages is also based on the fact that messages that can
  2861. include AT_MAC can only be sent once with a certain EAP-SIM Subtype,
  2862. and on the fact that a different K_aut key will be used for
  2863. calculating AT_MAC in each full authentication exchange.
  2864. On fast re-authentication, a counter included in AT_COUNTER and a
  2865. server random nonce is used to provide replay protection. The
  2866. AT_COUNTER attribute is also included in EAP-SIM notifications if it
  2867. is used after successful authentication in order to provide replay
  2868. protection between re-authentication exchanges.
  2869. Because EAP-SIM is not a tunneling method, EAP-Request/Notification,
  2870. EAP-Response/Notification, EAP-Success, or EAP-Failure packets are
  2871. not confidential, integrity-protected, or replay-protected in
  2872. EAP-SIM. On physically insecure networks, this may enable an
  2873. Haverinen & Salowey Informational [Page 72]
  2874. RFC 4186 EAP-SIM Authentication January 2006
  2875. attacker to send false notifications to the peer and to mount denial
  2876. of service attacks by spoofing these packets. As discussed in
  2877. Section 6.3, the peer will only accept EAP-Success after the peer
  2878. successfully authenticates the server. Hence, the attacker cannot
  2879. force the peer to believe successful mutual authentication has
  2880. occurred until the peer successfully authenticates the server or
  2881. after the peer fails to authenticate the server.
  2882. The security considerations of EAP-SIM result indications are covered
  2883. in Section 12.11
  2884. An eavesdropper will see the EAP-Request/Notification,
  2885. EAP-Response/Notification, EAP-Success, and EAP-Failure packets sent
  2886. in the clear. With EAP-SIM, confidential information MUST NOT be
  2887. transmitted in EAP Notification packets.
  2888. 12.10. Negotiation Attacks
  2889. EAP-SIM does not protect the EAP-Response/Nak packet. Because
  2890. EAP-SIM does not protect the EAP method negotiation, EAP method
  2891. downgrading attacks may be possible, especially if the user uses the
  2892. same identity with EAP-SIM and other EAP methods.
  2893. EAP-SIM includes a version negotiation procedure. In EAP-SIM the
  2894. keying material derivation includes the version list and selected
  2895. version to ensure that the protocol cannot be downgraded and that the
  2896. peer and server use the same version of EAP-SIM.
  2897. EAP-SIM does not support ciphersuite negotiation.
  2898. 12.11. Protected Result Indications
  2899. EAP-SIM supports optional protected success indications and
  2900. acknowledged failure indications. If a failure occurs after
  2901. successful authentication, then the EAP-SIM failure indication is
  2902. integrity- and replay-protected.
  2903. Even if an EAP-Failure packet is lost when using EAP-SIM over an
  2904. unreliable medium, then the EAP-SIM failure indications will help
  2905. ensure that the peer and EAP server will know the other party's
  2906. authentication decision. If protected success indications are used,
  2907. then the loss of Success packet will also be addressed by the
  2908. acknowledged, integrity- and replay-protected EAP-SIM success
  2909. indication. If the optional success indications are not used, then
  2910. the peer may end up believing that the server succeeded
  2911. authentication, when it actually failed. Since access will not be
  2912. Haverinen & Salowey Informational [Page 73]
  2913. RFC 4186 EAP-SIM Authentication January 2006
  2914. granted in this case, protected result indications are not needed
  2915. unless the client is not able to realize it does not have access for
  2916. an extended period of time.
  2917. 12.12. Man-in-the-Middle Attacks
  2918. In order to avoid man-in-the-middle attacks and session hijacking,
  2919. user data SHOULD be integrity-protected on physically insecure
  2920. networks. The EAP-SIM Master Session Key, or keys derived from it,
  2921. MAY be used as the integrity protection keys, or, if an external
  2922. security mechanism such as PEAP is used, then the link integrity
  2923. protection keys MAY be derived by the external security mechanism.
  2924. There are man-in-the-middle attacks associated with the use of any
  2925. EAP method within a tunneled protocol. For instance, an early
  2926. version of PEAP [PEAP-02] was vulnerable to this attack. This
  2927. specification does not address these attacks. If EAP-SIM is used
  2928. with a tunneling protocol, there should be cryptographic binding
  2929. provided between the protocol and EAP-SIM to prevent
  2930. man-in-the-middle attacks through rogue authenticators being able to
  2931. setup one-way authenticated tunnels. For example, newer versions of
  2932. PEAP include such cryptographic binding. The EAP-SIM Master Session
  2933. Key MAY be used to provide the cryptographic binding. However, the
  2934. mechanism by which the binding is provided depends on the tunneling
  2935. protocol and is beyond the scope of this document.
  2936. 12.13. Generating Random Numbers
  2937. An EAP-SIM implementation SHOULD use a good source of randomness to
  2938. generate the random numbers required in the protocol. Please see
  2939. [RFC4086] for more information on generating random numbers for
  2940. security applications.
  2941. 13. Security Claims
  2942. This section provides the security claims required by [RFC3748].
  2943. Auth. mechanism: EAP-SIM is based on the GSM SIM mechanism, which is
  2944. a challenge/response authentication and key agreement mechanism based
  2945. on a symmetric 128-bit pre-shared secret. EAP-SIM also makes use of
  2946. a peer challenge to provide mutual authentication.
  2947. Ciphersuite negotiation: No
  2948. Mutual authentication: Yes (Section 12.3)
  2949. Integrity protection: Yes (Section 12.9)
  2950. Haverinen & Salowey Informational [Page 74]
  2951. RFC 4186 EAP-SIM Authentication January 2006
  2952. Replay protection: Yes (Section 12.9)
  2953. Confidentiality: Yes, except method-specific success and failure
  2954. indications (Section 12.2, Section 12.9)
  2955. Key derivation: Yes
  2956. Key strength: EAP-SIM supports key derivation with 128-bit effective
  2957. key strength (Section 12.5). However, as discussed in Section 11, if
  2958. the same credentials are used in GSM/GPRS and in EAP-SIM, then the
  2959. key strength may be reduced considerably, basically to the same level
  2960. as in GSM, by mounting attacks over GSM/GPRS. For example an active
  2961. attack using a false GSM/GPRS base station reduces the effective key
  2962. strength to almost zero.
  2963. Description of key hierarchy: Please see Section 7.
  2964. Dictionary attack protection: N/A (Section 12.7)
  2965. Fast reconnect: Yes
  2966. Cryptographic binding: N/A
  2967. Session independence: Yes (Section 12.6)
  2968. Fragmentation: No
  2969. Channel binding: No
  2970. Indication of vulnerabilities: Vulnerabilities are discussed in
  2971. Section 12.
  2972. 14. Acknowledgements and Contributions
  2973. 14.1. Contributors
  2974. In addition to the editors, Nora Dabbous, Jose Puthenkulam, and
  2975. Prasanna Satarasinghe were significant contributors to this document.
  2976. Pasi Eronen and Jukka-Pekka Honkanen contributed Appendix A.
  2977. 14.2. Acknowledgements
  2978. Juha Ala-Laurila, N. Asokan, Jan-Erik Ekberg, Patrik Flykt,
  2979. Jukka-Pekka Honkanen, Antti Kuikka, Jukka Latva, Lassi Lehtinen, Jyri
  2980. Rinnemaa, Timo Takamaki, and Raimo Vuonnala contributed many original
  2981. ideas and concepts to this protocol.
  2982. Haverinen & Salowey Informational [Page 75]
  2983. RFC 4186 EAP-SIM Authentication January 2006
  2984. N. Asokan, Pasi Eronen, and Jukka-Pekka Honkanen contributed and
  2985. helped in innumerable ways during the development of the protocol.
  2986. Valtteri Niemi and Kaisa Nyberg contributed substantially to the
  2987. design of the key derivation and the fast re-authentication
  2988. procedure, and have also provided their cryptographic expertise in
  2989. many discussions related to this protocol.
  2990. Simon Blake-Wilson provided very helpful comments on key derivation
  2991. and version negotiation.
  2992. Thanks to Greg Rose for his very valuable comments to an early
  2993. version of this specification [S3-020125], and for reviewing and
  2994. providing very useful comments on version 12.
  2995. Thanks to Bernard Aboba, Vladimir Alperovich, Florent Bersani,
  2996. Jacques Caron, Gopal Dommety, Augustin Farrugia, Mark Grayson, Max de
  2997. Groot, Prakash Iyer, Nishi Kant, Victor Lortz, Jouni Malinen, Sarvar
  2998. Patel, Tom Porcher, Michael Richardson, Stefan Schroeder, Uma
  2999. Shankar, Jesse Walker, and Thomas Wieland for their contributions and
  3000. critiques. Special thanks to Max for proposing improvements to the
  3001. MAC calculation.
  3002. Thanks to Glen Zorn for reviewing this document and for providing
  3003. very useful comments on the protocol.
  3004. Thanks to Sarvar Patel for his review of the protocol [Patel-2003].
  3005. Thanks to Bernard Aboba for reviewing this document for RFC 3748
  3006. compliance.
  3007. The identity privacy support is based on the identity privacy support
  3008. of [EAP-SRP]. The attribute format is based on the extension format
  3009. of Mobile IPv4 [RFC3344].
  3010. This protocol has been partly developed in parallel with EAP-AKA
  3011. [EAP-AKA], and hence this specification incorporates many ideas from
  3012. Jari Arkko.
  3013. Haverinen & Salowey Informational [Page 76]
  3014. RFC 4186 EAP-SIM Authentication January 2006
  3015. 14.2.1. Contributors' Addresses
  3016. Nora Dabbous
  3017. Gemplus
  3018. 34 rue Guynemer
  3019. 92447 Issy les Moulineaux
  3020. France
  3021. Phone: +33 1 4648 2000
  3022. EMail: nora.dabbous@gemplus.com
  3023. Jose Puthenkulam
  3024. Intel Corporation
  3025. 2111 NE 25th Avenue, JF2-58
  3026. Hillsboro, OR 97124
  3027. USA
  3028. Phone: +1 503 264 6121
  3029. EMail: jose.p.puthenkulam@intel.com
  3030. Prasanna Satarasinghe
  3031. Transat Technologies
  3032. 180 State Street, Suite 240
  3033. Southlake, TX 76092
  3034. USA
  3035. Phone: + 1 817 4814412
  3036. EMail: prasannas@transat-tech.com
  3037. Haverinen & Salowey Informational [Page 77]
  3038. RFC 4186 EAP-SIM Authentication January 2006
  3039. 15. References
  3040. 15.1. Normative References
  3041. [GSM-03.20] European Telecommunications Standards Institute,
  3042. "GSM Technical Specification GSM 03.20 (ETS 300
  3043. 534): "Digital cellular telecommunication system
  3044. (Phase 2); Security related network functions"",
  3045. August 1997.
  3046. [RFC2119] Bradner, S., "Key words for use in RFCs to
  3047. Indicate Requirement Levels", BCP 14, RFC 2119,
  3048. March 1997.
  3049. [GSM-03.03] European Telecommunications Standards Institute,
  3050. "GSM Technical Specification GSM 03.03 (ETS 300
  3051. 523): "Digital cellular telecommunication system
  3052. (Phase 2); Numbering, addressing and
  3053. identification"", April 1997.
  3054. [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC:
  3055. Keyed-Hashing for Message Authentication", RFC
  3056. 2104, February 1997.
  3057. [RFC4282] Aboba, B., Beadles, M., Arkko, J., and P. Eronen,
  3058. "The Network Access Identifier", RFC 4282,
  3059. December 2005.
  3060. [AES] National Institute of Standards and Technology,
  3061. "Federal Information Processing Standards (FIPS)
  3062. Publication 197, "Advanced Encryption Standard
  3063. (AES)"", November 2001.
  3064. http://csrc.nist.gov/publications/fips/fips197/
  3065. fips-197.pdf
  3066. [CBC] National Institute of Standards and Technology,
  3067. "NIST Special Publication 800-38A, "Recommendation
  3068. for Block Cipher Modes of Operation - Methods and
  3069. Techniques"", December 2001.
  3070. http://csrc.nist.gov/publications/nistpubs/
  3071. 800-38a/sp800-38a.pdf
  3072. [SHA-1] National Institute of Standards and Technology,
  3073. U.S. Department of Commerce, "Federal Information
  3074. Processing Standard (FIPS) Publication 180-1,
  3075. "Secure Hash Standard"", April 1995.
  3076. Haverinen & Salowey Informational [Page 78]
  3077. RFC 4186 EAP-SIM Authentication January 2006
  3078. [PRF] National Institute of Standards and Technology,
  3079. "Federal Information Processing Standards (FIPS)
  3080. Publication 186-2 (with change notice); Digital
  3081. Signature Standard (DSS)", January 2000.
  3082. Available on-line at:
  3083. http://csrc.nist.gov/publications/
  3084. fips/fips186-2/fips186-2-change1.pdf
  3085. [RFC3629] Yergeau, F., "UTF-8, a transformation format of
  3086. ISO 10646", STD 63, RFC 3629, November 2003.
  3087. [RFC3748] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J.,
  3088. and H. Levkowetz, "Extensible Authentication
  3089. Protocol (EAP)", RFC 3748, June 2004.
  3090. [EAP-AKA] Arkko, J. and H. Haverinen, "Extensible
  3091. Authentication Protocol Method for 3rd Generation
  3092. Authentication and Key Agreement (EAP-AKA)", RFC
  3093. 4187, January 2006.
  3094. 15.2. Informative References
  3095. [3GPP-TS-23.003] 3rd Generation Partnership Project, "3GPP
  3096. Technical Specification 3GPP TS 23.003 V6.8.0:
  3097. "3rd Generation Parnership Project; Technical
  3098. Specification Group Core Network; Numbering,
  3099. addressing and identification (Release 6)"",
  3100. December 2005.
  3101. [3GPP-TS-55.205] 3rd Generation Partnership Project, "3GPP
  3102. Technical Specification 3GPP TS 55.205 V 6.0.0:
  3103. "3rd Generation Partnership Project; Technical
  3104. Specification Group Services and System Aspects;
  3105. Specification of the GSM-MILENAGE Algorithms: An
  3106. example algorithm set for the GSM Authentication
  3107. and Key Generation functions A3 and A8 (Release
  3108. 6)"", December 2002.
  3109. [PEAP] Palekar, A., Simon, D., Zorn, G., Salowey, J.,
  3110. Zhou, H., and S. Josefsson, "Protected EAP
  3111. Protocol (PEAP) Version 2", Work in Progress,
  3112. October 2004.
  3113. [PEAP-02] Anderson, H., Josefsson, S., Zorn, G., Simon, D.,
  3114. and A. Palekar, "Protected EAP Protocol (PEAP)",
  3115. Work in Progress, February 2002.
  3116. Haverinen & Salowey Informational [Page 79]
  3117. RFC 4186 EAP-SIM Authentication January 2006
  3118. [EAP-Keying] Aboba, B., Simon, D., Arkko, J., Eronen, P., and
  3119. H. Levkowetz, "Extensible Authentication Protocol
  3120. (EAP) Key Management Framework", Work in Progress,
  3121. October 2005.
  3122. [Service-Identity] Arkko, J. and P. Eronen, "Authenticated Service
  3123. Information for the Extensible Authentication
  3124. Protocol (EAP)", Work in Progress, October 2004.
  3125. [RFC4086] Eastlake, D., 3rd, Schiller, J., and S. Crocker,
  3126. "Randomness Requirements for Security", BCP 106,
  3127. RFC 4086, June 2005.
  3128. [S3-020125] Qualcomm, "Comments on draft EAP/SIM, 3rd
  3129. Generation Partnership Project document 3GPP TSG
  3130. SA WG3 Security S3#22, S3-020125", February 2002.
  3131. [RFC3344] Perkins, C., "IP Mobility Support for IPv4", RFC
  3132. 3344, August 2002.
  3133. [RFC2548] Zorn, G., "Microsoft Vendor-specific RADIUS
  3134. Attributes ", RFC 2548, March 1999.
  3135. [EAP-SRP] Carlson, J., Aboba, B., and H. Haverinen, "EAP
  3136. SRP-SHA1 Authentication Protocol", Work in
  3137. Progress, July 2001.
  3138. [GSM-Cloning] Wagner, D., "GSM Cloning". Web page about
  3139. COMP-128 version 1 vulnerabilities, available at
  3140. http://www.isaac.cs.berkeley.edu/isaac/gsm.html
  3141. [Barkan-2003] Barkan, E., Biham, E., and N. Keller, "Instant
  3142. Ciphertext-Only Cryptanalysis of GSM Encrypted
  3143. Communications". available on-line at
  3144. http://cryptome.org/gsm-crack-bbk.pdf
  3145. [Patel-2003] Patel, S., "Analysis of EAP-SIM Session Key
  3146. Agreement". Posted to the EAP mailing list 29
  3147. May,2003. http://
  3148. mail.frascone.com/pipermail/public/eap/2003-May/
  3149. 001267.html
  3150. Haverinen & Salowey Informational [Page 80]
  3151. RFC 4186 EAP-SIM Authentication January 2006
  3152. Appendix A. Test Vectors
  3153. Test vectors for the NIST FIPS 186-2 pseudo-random number generator
  3154. [PRF] are available at the following URL:
  3155. http://csrc.nist.gov/encryption/dss/Examples-1024bit.pdf
  3156. The following examples show the contents of EAP-SIM packets on full
  3157. authentication and fast re-authentication.
  3158. A.1. EAP-Request/Identity
  3159. The first packet is a plain Identity Request:
  3160. 01 ; Code: Request
  3161. 00 ; Identifier: 0
  3162. 00 05 ; Length: 5 octets
  3163. 01 ; Type: Identity
  3164. A.2. EAP-Response/Identity
  3165. The client's identity is "1244070100000001@eapsim.foo", so it
  3166. responds with the following packet:
  3167. 02 ; Code: Response
  3168. 00 ; Identifier: 0
  3169. 00 20 ; Length: 32 octets
  3170. 01 ; Type: Identity
  3171. 31 32 34 34 ; "1244070100000001@eapsim.foo"
  3172. 30 37 30 31
  3173. 30 30 30 30
  3174. 30 30 30 31
  3175. 40 65 61 70
  3176. 73 69 6d 2e
  3177. 66 6f 6f
  3178. Haverinen & Salowey Informational [Page 81]
  3179. RFC 4186 EAP-SIM Authentication January 2006
  3180. A.3. EAP-Request/SIM/Start
  3181. The server's first packet looks like this:
  3182. 01 ; Code: Request
  3183. 01 ; Identifier: 1
  3184. 00 10 ; Length: 16 octets
  3185. 12 ; Type: EAP-SIM
  3186. 0a ; EAP-SIM subtype: Start
  3187. 00 00 ; (reserved)
  3188. 0f ; Attribute type: AT_VERSION_LIST
  3189. 02 ; Attribute length: 8 octets (2*4)
  3190. 00 02 ; Actual version list length: 2 octets
  3191. 00 01 ; Version: 1
  3192. 00 00 ; (attribute padding)
  3193. A.4. EAP-Response/SIM/Start
  3194. The client selects a nonce and responds with the following packet:
  3195. 02 ; Code: Response
  3196. 01 ; Identifier: 1
  3197. 00 20 ; Length: 32 octets
  3198. 12 ; Type: EAP-SIM
  3199. 0a ; EAP-SIM subtype: Start
  3200. 00 00 ; (reserved)
  3201. 07 ; Attribute type: AT_NONCE_MT
  3202. 05 ; Attribute length: 20 octets (5*4)
  3203. 00 00 ; (reserved)
  3204. 01 23 45 67 ; NONCE_MT value
  3205. 89 ab cd ef
  3206. fe dc ba 98
  3207. 76 54 32 10
  3208. 10 ; Attribute type: AT_SELECTED_VERSION
  3209. 01 ; Attribute length: 4 octets (1*4)
  3210. 00 01 ; Version: 1
  3211. Haverinen & Salowey Informational [Page 82]
  3212. RFC 4186 EAP-SIM Authentication January 2006
  3213. A.5. EAP-Request/SIM/Challenge
  3214. Next, the server selects three authentication triplets
  3215. (RAND1,SRES1,Kc1) = (10111213 14151617 18191a1b 1c1d1e1f,
  3216. d1d2d3d4,
  3217. a0a1a2a3 a4a5a6a7)
  3218. (RAND2,SRES2,Kc2) = (20212223 24252627 28292a2b 2c2d2e2f,
  3219. e1e2e3e4,
  3220. b0b1b2b3 b4b5b6b7)
  3221. (RAND3,SRES3,Kc3) = (30313233 34353637 38393a3b 3c3d3e3f,
  3222. f1f2f3f4,
  3223. c0c1c2c3 c4c5c6c7)
  3224. Next, the MK is calculated as specified in Section 7*.
  3225. MK = e576d5ca 332e9930 018bf1ba ee2763c7 95b3c712
  3226. And the other keys are derived using the PRNG:
  3227. K_encr = 536e5ebc 4465582a a6a8ec99 86ebb620
  3228. K_aut = 25af1942 efcbf4bc 72b39434 21f2a974
  3229. MSK = 39d45aea f4e30601 983e972b 6cfd46d1
  3230. c3637733 65690d09 cd44976b 525f47d3
  3231. a60a985e 955c53b0 90b2e4b7 3719196a
  3232. 40254296 8fd14a88 8f46b9a7 886e4488
  3233. EMSK = 5949eab0 fff69d52 315c6c63 4fd14a7f
  3234. 0d52023d 56f79698 fa6596ab eed4f93f
  3235. bb48eb53 4d985414 ceed0d9a 8ed33c38
  3236. 7c9dfdab 92ffbdf2 40fcecf6 5a2c93b9
  3237. Next, the server selects a pseudonym and a fast re-authentication
  3238. identity (in this case, "w8w49PexCazWJ&xCIARmxuMKht5S1sxR
  3239. DqXSEFBEg3DcZP9cIxTe5J4OyIwNGVzxeJOU1G" and
  3240. "Y24fNSrz8BP274jOJaF17WfxI8YO7QX0
  3241. 0pMXk9XMMVOw7broaNhTczuFq53aEpOkk3L0dm@eapsim.foo", respectively).
  3242. Haverinen & Salowey Informational [Page 83]
  3243. RFC 4186 EAP-SIM Authentication January 2006
  3244. The following plaintext will be encrypted and stored in the
  3245. AT_ENCR_DATA attribute:
  3246. 84 ; Attribute type: AT_NEXT_PSEUDONYM
  3247. 13 ; Attribute length: 76 octets (19*4)
  3248. 00 46 ; Actual pseudonym length: 70 octets
  3249. 77 38 77 34 39 50 65 78 43 61 7a 57 4a 26 78 43
  3250. 49 41 52 6d 78 75 4d 4b 68 74 35 53 31 73 78 52
  3251. 44 71 58 53 45 46 42 45 67 33 44 63 5a 50 39 63
  3252. 49 78 54 65 35 4a 34 4f 79 49 77 4e 47 56 7a 78
  3253. 65 4a 4f 55 31 47
  3254. 00 00 ; (attribute padding)
  3255. 85 ; Attribute type: AT_NEXT_REAUTH_ID
  3256. 16 ; Attribute length: 88 octets (22*4)
  3257. 00 51 ; Actual re-auth identity length: 81 octets
  3258. 59 32 34 66 4e 53 72 7a 38 42 50 32 37 34 6a 4f
  3259. 4a 61 46 31 37 57 66 78 49 38 59 4f 37 51 58 30
  3260. 30 70 4d 58 6b 39 58 4d 4d 56 4f 77 37 62 72 6f
  3261. 61 4e 68 54 63 7a 75 46 71 35 33 61 45 70 4f 6b
  3262. 6b 33 4c 30 64 6d 40 65 61 70 73 69 6d 2e 66 6f
  3263. 6f
  3264. 00 00 00 ; (attribute padding)
  3265. 06 ; Attribute type: AT_PADDING
  3266. 03 ; Attribute length: 12 octets (3*4)
  3267. 00 00 00 00
  3268. 00 00 00 00
  3269. 00 00
  3270. The EAP packet looks like this:
  3271. 01 ; Code: Request
  3272. 02 ; Identifier: 2
  3273. 01 18 ; Length: 280 octets
  3274. 12 ; Type: EAP-SIM
  3275. 0b ; EAP-SIM subtype: Challenge
  3276. 00 00 ; (reserved)
  3277. 01 ; Attribute type: AT_RAND
  3278. 0d ; Attribute length: 52 octets (13*4)
  3279. 00 00 ; (reserved)
  3280. 10 11 12 13 ; first RAND
  3281. 14 15 16 17
  3282. 18 19 1a 1b
  3283. 1c 1d 1e 1f
  3284. 20 21 22 23 ; second RAND
  3285. 24 25 26 27
  3286. 28 29 2a 2b
  3287. 2c 2d 2e 2f
  3288. Haverinen & Salowey Informational [Page 84]
  3289. RFC 4186 EAP-SIM Authentication January 2006
  3290. 30 31 32 33 ; third RAND
  3291. 34 35 36 37
  3292. 38 39 3a 3b
  3293. 3c 3d 3e 3f
  3294. 81 ; Attribute type: AT_IV
  3295. 05 ; Attribute length: 20 octets (5*4)
  3296. 00 00 ; (reserved)
  3297. 9e 18 b0 c2 ; IV value
  3298. 9a 65 22 63
  3299. c0 6e fb 54
  3300. dd 00 a8 95
  3301. 82 ; Attribute type: AT_ENCR_DATA
  3302. 2d ; Attribute length: 180 octets (45*4)
  3303. 00 00 ; (reserved)
  3304. 55 f2 93 9b bd b1 b1 9e a1 b4 7f c0 b3 e0 be 4c
  3305. ab 2c f7 37 2d 98 e3 02 3c 6b b9 24 15 72 3d 58
  3306. ba d6 6c e0 84 e1 01 b6 0f 53 58 35 4b d4 21 82
  3307. 78 ae a7 bf 2c ba ce 33 10 6a ed dc 62 5b 0c 1d
  3308. 5a a6 7a 41 73 9a e5 b5 79 50 97 3f c7 ff 83 01
  3309. 07 3c 6f 95 31 50 fc 30 3e a1 52 d1 e1 0a 2d 1f
  3310. 4f 52 26 da a1 ee 90 05 47 22 52 bd b3 b7 1d 6f
  3311. 0c 3a 34 90 31 6c 46 92 98 71 bd 45 cd fd bc a6
  3312. 11 2f 07 f8 be 71 79 90 d2 5f 6d d7 f2 b7 b3 20
  3313. bf 4d 5a 99 2e 88 03 31 d7 29 94 5a ec 75 ae 5d
  3314. 43 c8 ed a5 fe 62 33 fc ac 49 4e e6 7a 0d 50 4d
  3315. 0b ; Attribute type: AT_MAC
  3316. 05 ; Attribute length: 20 octets (5*4)
  3317. 00 00 ; (reserved)
  3318. fe f3 24 ac ; MAC value
  3319. 39 62 b5 9f
  3320. 3b d7 82 53
  3321. ae 4d cb 6a
  3322. The MAC is calculated over the EAP packet above (with MAC value set
  3323. to zero), followed by the NONCE_MT value (a total of 296 bytes).
  3324. Haverinen & Salowey Informational [Page 85]
  3325. RFC 4186 EAP-SIM Authentication January 2006
  3326. A.6. EAP-Response/SIM/Challenge
  3327. The client's response looks like this:
  3328. 02 ; Code: Response
  3329. 02 ; Identifier: 2
  3330. 00 1c ; Length: 28 octets
  3331. 12 ; Type: EAP-SIM
  3332. 0b ; EAP-SIM subtype: Challenge
  3333. 00 00 ; (reserved)
  3334. 0b ; Attribute type: AT_MAC
  3335. 05 ; Attribute length: 20 octets (5*4)
  3336. 00 00 ; (reserved)
  3337. f5 6d 64 33 ; MAC value
  3338. e6 8e d2 97
  3339. 6a c1 19 37
  3340. fc 3d 11 54
  3341. The MAC is calculated over the EAP packet above (with MAC value set
  3342. to zero), followed by the SRES values (a total of 40 bytes).
  3343. A.7. EAP-Success
  3344. The last packet is an EAP-Success:
  3345. 03 ; Code: Success
  3346. 02 ; Identifier: 2
  3347. 00 04 ; Length: 4 octets
  3348. A.8. Fast Re-authentication
  3349. When performing fast re-authentication, the EAP-Request/Identity
  3350. packet is the same as usual. The EAP-Response/Identity contains the
  3351. fast re-authentication identity (from AT_ENCR_DATA attribute above):
  3352. 02 ; Code: Response
  3353. 00 ; Identifier: 0
  3354. 00 56 ; Length: 86 octets
  3355. 01 ; Type: Identity
  3356. 59 32 34 66 4e 53 72 7a 38 42 50 32 37 34 6a 4f
  3357. 4a 61 46 31 37 57 66 78 49 38 59 4f 37 51 58 30
  3358. 30 70 4d 58 6b 39 58 4d 4d 56 4f 77 37 62 72 6f
  3359. 61 4e 68 54 63 7a 75 46 71 35 33 61 45 70 4f 6b
  3360. 6b 33 4c 30 64 6d 40 65 61 70 73 69 6d 2e 66 6f
  3361. 6f
  3362. Haverinen & Salowey Informational [Page 86]
  3363. RFC 4186 EAP-SIM Authentication January 2006
  3364. A.9. EAP-Request/SIM/Re-authentication
  3365. The server recognizes the reauthentication identity, so it will
  3366. respond with EAP-Request/SIM/Re-authentication. It retrieves the
  3367. associated counter value, generates a nonce, and picks a new
  3368. reauthentication identity (in this case,
  3369. "uta0M0iyIsMwWp5TTdSdnOLvg2XDVf21OYt1vnfiMcs5dnIDHOIFVavIRzMR
  3370. yzW6vFzdHW@eapsim.foo").
  3371. The following plaintext will be encrypted and stored in the
  3372. AT_ENCR_DATA attribute. Note that AT_PADDING is not used because the
  3373. length of the plaintext is a multiple of 16 bytes.
  3374. 13 ; Attribute type: AT_COUNTER
  3375. 01 ; Attribute length: 4 octets (1*4)
  3376. 00 01 ; Counter value
  3377. 15 ; Attribute type: AT_NONCE_S
  3378. 05 ; Attribute length: 20 octets (5*4)
  3379. 00 00 ; (reserved)
  3380. 01 23 45 67 ; NONCE_S value
  3381. 89 ab cd ef
  3382. fe dc ba 98
  3383. 76 54 32 10
  3384. 85 ; Attribute type: AT_NEXT_REAUTH_ID
  3385. 16 ; Attribute length: 88 octets (22*4)
  3386. 00 51 ; Actual re-auth identity length: 81 octets
  3387. 75 74 61 30 4d 30 69 79 49 73 4d 77 57 70 35 54
  3388. 54 64 53 64 6e 4f 4c 76 67 32 58 44 56 66 32 31
  3389. 4f 59 74 31 76 6e 66 69 4d 63 73 35 64 6e 49 44
  3390. 48 4f 49 46 56 61 76 49 52 7a 4d 52 79 7a 57 36
  3391. 76 46 7a 64 48 57 40 65 61 70 73 69 6d 2e 66 6f
  3392. 6f
  3393. 00 00 00 ; (attribute padding)
  3394. Haverinen & Salowey Informational [Page 87]
  3395. RFC 4186 EAP-SIM Authentication January 2006
  3396. The EAP packet looks like this:
  3397. 01 ; Code: Request
  3398. 01 ; Identifier: 1
  3399. 00 a4 ; Length: 164 octets
  3400. 12 ; Type: EAP-SIM
  3401. 0d ; EAP-SIM subtype: Re-authentication
  3402. 00 00 ; (reserved)
  3403. 81 ; Attribute type: AT_IV
  3404. 05 ; Attribute length: 20 octets (5*4)
  3405. 00 00 ; (reserved)
  3406. d5 85 ac 77 ; IV value
  3407. 86 b9 03 36
  3408. 65 7c 77 b4
  3409. 65 75 b9 c4
  3410. 82 ; Attribute type: AT_ENCR_DATA
  3411. 1d ; Attribute length: 116 octets (29*4)
  3412. 00 00 ; (reserved)
  3413. 68 62 91 a9 d2 ab c5 8c aa 32 94 b6 e8 5b 44 84
  3414. 6c 44 e5 dc b2 de 8b 9e 80 d6 9d 49 85 8a 5d b8
  3415. 4c dc 1c 9b c9 5c 01 b9 6b 6e ca 31 34 74 ae a6
  3416. d3 14 16 e1 9d aa 9d f7 0f 05 00 88 41 ca 80 14
  3417. 96 4d 3b 30 a4 9b cf 43 e4 d3 f1 8e 86 29 5a 4a
  3418. 2b 38 d9 6c 97 05 c2 bb b0 5c 4a ac e9 7d 5e af
  3419. f5 64 04 6c 8b d3 0b c3 9b e5 e1 7a ce 2b 10 a6
  3420. 0b ; Attribute type: AT_MAC
  3421. 05 ; Attribute length: 20 octets (5*4)
  3422. 00 00 ; (reserved)
  3423. 48 3a 17 99 ; MAC value
  3424. b8 3d 7c d3
  3425. d0 a1 e4 01
  3426. d9 ee 47 70
  3427. The MAC is calculated over the EAP packet above (with MAC value set
  3428. to zero; a total of 164 bytes).
  3429. Finally, the server derives new keys. The XKEY' is calculated as
  3430. described in Section 7*:
  3431. XKEY' = 863dc120 32e08343 c1a2308d b48377f6 801f58d4
  3432. Haverinen & Salowey Informational [Page 88]
  3433. RFC 4186 EAP-SIM Authentication January 2006
  3434. The new MSK and EMSK are derived using the PRNG (note that K_encr and
  3435. K_aut stay the same).
  3436. MSK = 6263f614 973895e1 335f7e30 cff028ee
  3437. 2176f519 002c9abe 732fe0ef 00cf167c
  3438. 756d9e4c ed6d5ed6 40eb3fe3 8565ca07
  3439. 6e7fb8a8 17cfe8d9 adbce441 d47c4f5e
  3440. EMSK = 3d8ff786 3a630b2b 06e2cf20 9684c13f
  3441. 6b82f992 f2b06f1b 54bf51ef 237f2a40
  3442. 1ef5e0d7 e098a34c 533eaebf 34578854
  3443. b7721526 20a777f0 e0340884 a294fb73
  3444. A.10. EAP-Response/SIM/Re-authentication
  3445. The client's response includes the counter as well. The following
  3446. plaintext will be encrypted and stored in the AT_ENCR_DATA attribute:
  3447. 13 ; Attribute type: AT_COUNTER
  3448. 01 ; Attribute length: 4 octets (1*4)
  3449. 00 01 ; Counter value
  3450. 06 ; Attribute type: AT_PADDING
  3451. 03 ; Attribute length: 12 octets (3*4)
  3452. 00 00 00 00
  3453. 00 00 00 00
  3454. 00 00
  3455. The EAP packet looks like this:
  3456. 02 ; Code: Response
  3457. 01 ; Identifier: 1
  3458. 00 44 ; Length: 68 octets
  3459. 12 ; Type: EAP-SIM
  3460. 0d ; EAP-SIM subtype: Re-authentication
  3461. 00 00 ; (reserved)
  3462. 81 ; Attribute type: AT_IV
  3463. 05 ; Attribute length: 20 octets (5*4)
  3464. 00 00 ; (reserved)
  3465. cd f7 ff a6 ; IV value
  3466. 5d e0 4c 02
  3467. 6b 56 c8 6b
  3468. 76 b1 02 ea
  3469. 82 ; Attribute type: AT_ENCR_DATA
  3470. 05 ; Attribute length: 20 octets (5*4)
  3471. 00 00 ; (reserved)
  3472. b6 ed d3 82
  3473. 79 e2 a1 42
  3474. 3c 1a fc 5c
  3475. 45 5c 7d 56
  3476. Haverinen & Salowey Informational [Page 89]
  3477. RFC 4186 EAP-SIM Authentication January 2006
  3478. 0b ; Attribute type: AT_MAC
  3479. 05 ; Attribute length: 20 octets (5*4)
  3480. 00 00 ; (reserved)
  3481. fa f7 6b 71 ; MAC value
  3482. fb e2 d2 55
  3483. b9 6a 35 66
  3484. c9 15 c6 17
  3485. The MAC is calculated over the EAP packet above (with MAC value set
  3486. to zero), followed by the NONCE_S value (a total of 84 bytes).
  3487. The next packet will be EAP-Success:
  3488. 03 ; Code: Success
  3489. 01 ; Identifier: 1
  3490. 00 04 ; Length: 4 octets
  3491. Appendix B. Pseudo-Random Number Generator
  3492. The "|" character denotes concatenation, and "^" denotes
  3493. exponentiation.
  3494. Step 1: Choose a new, secret value for the seed-key, XKEY
  3495. Step 2: In hexadecimal notation let
  3496. t = 67452301 EFCDAB89 98BADCFE 10325476 C3D2E1F0
  3497. This is the initial value for H0|H1|H2|H3|H4
  3498. in the FIPS SHS [SHA-1]
  3499. Step 3: For j = 0 to m - 1 do
  3500. 3.1 XSEED_j = 0 /* no optional user input */
  3501. 3.2 For i = 0 to 1 do
  3502. a. XVAL = (XKEY + XSEED_j) mod 2^b
  3503. b. w_i = G(t, XVAL)
  3504. c. XKEY = (1 + XKEY + w_i) mod 2^b
  3505. 3.3 x_j = w_0|w_1
  3506. Haverinen & Salowey Informational [Page 90]
  3507. RFC 4186 EAP-SIM Authentication January 2006
  3508. Authors' Addresses
  3509. Henry Haverinen (editor)
  3510. Nokia Enterprise Solutions
  3511. P.O. Box 12
  3512. FIN-40101 Jyvaskyla
  3513. Finland
  3514. EMail: henry.haverinen@nokia.com
  3515. Joseph Salowey (editor)
  3516. Cisco Systems
  3517. 2901 Third Avenue
  3518. Seattle, WA 98121
  3519. USA
  3520. Phone: +1 206 256 3380
  3521. EMail: jsalowey@cisco.com
  3522. Haverinen & Salowey Informational [Page 91]
  3523. RFC 4186 EAP-SIM Authentication January 2006
  3524. Full Copyright Statement
  3525. Copyright (C) The Internet Society (2006).
  3526. This document is subject to the rights, licenses and restrictions
  3527. contained in BCP 78, and except as set forth therein, the authors
  3528. retain all their rights.
  3529. This document and the information contained herein are provided on an
  3530. "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
  3531. OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
  3532. ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
  3533. INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
  3534. INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
  3535. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  3536. Intellectual Property
  3537. The IETF takes no position regarding the validity or scope of any
  3538. Intellectual Property Rights or other rights that might be claimed to
  3539. pertain to the implementation or use of the technology described in
  3540. this document or the extent to which any license under such rights
  3541. might or might not be available; nor does it represent that it has
  3542. made any independent effort to identify any such rights. Information
  3543. on the procedures with respect to rights in RFC documents can be
  3544. found in BCP 78 and BCP 79.
  3545. Copies of IPR disclosures made to the IETF Secretariat and any
  3546. assurances of licenses to be made available, or the result of an
  3547. attempt made to obtain a general license or permission for the use of
  3548. such proprietary rights by implementers or users of this
  3549. specification can be obtained from the IETF on-line IPR repository at
  3550. http://www.ietf.org/ipr.
  3551. The IETF invites any interested party to bring to its attention any
  3552. copyrights, patents or patent applications, or other proprietary
  3553. rights that may cover technology that may be required to implement
  3554. this standard. Please address the information to the IETF at
  3555. ietf-ipr@ietf.org.
  3556. Acknowledgement
  3557. Funding for the RFC Editor function is provided by the IETF
  3558. Administrative Support Activity (IASA).
  3559. Haverinen & Salowey Informational [Page 92]