Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rfc3414.txt 189KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931
  1. Network Working Group U. Blumenthal
  2. Request for Comments: 3414 B. Wijnen
  3. STD: 62 Lucent Technologies
  4. Obsoletes: 2574 December 2002
  5. Category: Standards Track
  6. User-based Security Model (USM) for version 3 of the
  7. Simple Network Management Protocol (SNMPv3)
  8. Status of this Memo
  9. This document specifies an Internet standards track protocol for the
  10. Internet community, and requests discussion and suggestions for
  11. improvements. Please refer to the current edition of the "Internet
  12. Official Protocol Standards" (STD 1) for the standardization state
  13. and status of this protocol. Distribution of this memo is unlimited.
  14. Copyright Notice
  15. Copyright (C) The Internet Society (2002). All Rights Reserved.
  16. Abstract
  17. This document describes the User-based Security Model (USM) for
  18. Simple Network Management Protocol (SNMP) version 3 for use in the
  19. SNMP architecture. It defines the Elements of Procedure for
  20. providing SNMP message level security. This document also includes a
  21. Management Information Base (MIB) for remotely monitoring/managing
  22. the configuration parameters for this Security Model. This document
  23. obsoletes RFC 2574.
  24. Table of Contents
  25. 1. Introduction.......................................... 4
  26. 1.1. Threats............................................... 4
  27. 1.2. Goals and Constraints................................. 6
  28. 1.3. Security Services..................................... 6
  29. 1.4. Module Organization................................... 7
  30. 1.4.1. Timeliness Module..................................... 8
  31. 1.4.2. Authentication Protocol............................... 8
  32. 1.4.3. Privacy Protocol...................................... 8
  33. 1.5. Protection against Message Replay, Delay
  34. and Redirection....................................... 9
  35. 1.5.1. Authoritative SNMP engine............................. 9
  36. 1.5.2. Mechanisms............................................ 9
  37. 1.6. Abstract Service Interfaces........................... 11
  38. Blumenthal & Wijnen Standards Track [Page 1]
  39. RFC 3414 USM for SNMPv3 December 2002
  40. 1.6.1. User-based Security Model Primitives
  41. for Authentication.................................... 11
  42. 1.6.2. User-based Security Model Primitives
  43. for Privacy........................................... 12
  44. 2. Elements of the Model................................. 12
  45. 2.1. User-based Security Model Users....................... 12
  46. 2.2. Replay Protection..................................... 13
  47. 2.2.1. msgAuthoritativeEngineID.............................. 14
  48. 2.2.2. msgAuthoritativeEngineBoots and
  49. msgAuthoritativeEngineTime............................ 14
  50. 2.2.3. Time Window........................................... 15
  51. 2.3. Time Synchronization.................................. 15
  52. 2.4. SNMP Messages Using this Security Model............... 16
  53. 2.5. Services provided by the User-based Security Model.... 17
  54. 2.5.1. Services for Generating an Outgoing SNMP Message...... 17
  55. 2.5.2. Services for Processing an Incoming SNMP Message...... 20
  56. 2.6. Key Localization Algorithm............................ 22
  57. 3. Elements of Procedure................................. 22
  58. 3.1. Generating an Outgoing SNMP Message................... 22
  59. 3.2. Processing an Incoming SNMP Message................... 26
  60. 4. Discovery............................................. 31
  61. 5. Definitions........................................... 32
  62. 6. HMAC-MD5-96 Authentication Protocol................... 51
  63. 6.1. Mechanisms............................................ 51
  64. 6.1.1. Digest Authentication Mechanism....................... 51
  65. 6.2. Elements of the Digest Authentication Protocol........ 52
  66. 6.2.1. Users................................................. 52
  67. 6.2.2. msgAuthoritativeEngineID.............................. 53
  68. 6.2.3. SNMP Messages Using this Authentication Protocol...... 53
  69. 6.2.4. Services provided by the HMAC-MD5-96
  70. Authentication Module................................. 53
  71. 6.2.4.1. Services for Generating an Outgoing SNMP Message...... 53
  72. 6.2.4.2. Services for Processing an Incoming SNMP Message...... 54
  73. 6.3. Elements of Procedure................................. 55
  74. 6.3.1. Processing an Outgoing Message........................ 55
  75. 6.3.2. Processing an Incoming Message........................ 56
  76. 7. HMAC-SHA-96 Authentication Protocol................... 57
  77. 7.1. Mechanisms............................................ 57
  78. 7.1.1. Digest Authentication Mechanism....................... 57
  79. 7.2. Elements of the HMAC-SHA-96 Authentication Protocol... 58
  80. 7.2.1. Users................................................. 58
  81. 7.2.2. msgAuthoritativeEngineID.............................. 58
  82. 7.2.3. SNMP Messages Using this Authentication Protocol...... 59
  83. 7.2.4. Services provided by the HMAC-SHA-96
  84. Authentication Module................................. 59
  85. 7.2.4.1. Services for Generating an Outgoing SNMP Message...... 59
  86. 7.2.4.2. Services for Processing an Incoming SNMP Message...... 60
  87. 7.3. Elements of Procedure................................. 61
  88. Blumenthal & Wijnen Standards Track [Page 2]
  89. RFC 3414 USM for SNMPv3 December 2002
  90. 7.3.1. Processing an Outgoing Message........................ 61
  91. 7.3.2. Processing an Incoming Message........................ 61
  92. 8. CBC-DES Symmetric Encryption Protocol................. 63
  93. 8.1. Mechanisms............................................ 63
  94. 8.1.1. Symmetric Encryption Protocol......................... 63
  95. 8.1.1.1. DES key and Initialization Vector..................... 64
  96. 8.1.1.2. Data Encryption....................................... 65
  97. 8.1.1.3. Data Decryption....................................... 65
  98. 8.2. Elements of the DES Privacy Protocol.................. 65
  99. 8.2.1. Users................................................. 65
  100. 8.2.2. msgAuthoritativeEngineID.............................. 66
  101. 8.2.3. SNMP Messages Using this Privacy Protocol............. 66
  102. 8.2.4. Services provided by the DES Privacy Module........... 66
  103. 8.2.4.1. Services for Encrypting Outgoing Data................. 66
  104. 8.2.4.2. Services for Decrypting Incoming Data................. 67
  105. 8.3. Elements of Procedure................................. 68
  106. 8.3.1. Processing an Outgoing Message........................ 68
  107. 8.3.2. Processing an Incoming Message........................ 69
  108. 9. Intellectual Property................................. 69
  109. 10. Acknowledgements...................................... 70
  110. 11. Security Considerations............................... 71
  111. 11.1. Recommended Practices................................. 71
  112. 11.2. Defining Users........................................ 73
  113. 11.3. Conformance........................................... 74
  114. 11.4. Use of Reports........................................ 75
  115. 11.5. Access to the SNMP-USER-BASED-SM-MIB.................. 75
  116. 12. References............................................ 75
  117. A.1. SNMP engine Installation Parameters................... 78
  118. A.2. Password to Key Algorithm............................. 80
  119. A.2.1. Password to Key Sample Code for MD5................... 81
  120. A.2.2. Password to Key Sample Code for SHA................... 82
  121. A.3. Password to Key Sample Results........................ 83
  122. A.3.1. Password to Key Sample Results using MD5.............. 83
  123. A.3.2. Password to Key Sample Results using SHA.............. 83
  124. A.4. Sample encoding of msgSecurityParameters.............. 83
  125. A.5. Sample keyChange Results.............................. 84
  126. A.5.1. Sample keyChange Results using MD5.................... 84
  127. A.5.2. Sample keyChange Results using SHA.................... 85
  128. B. Change Log............................................ 86
  129. Editors' Addresses.................................... 87
  130. Full Copyright Statement.............................. 88
  131. Blumenthal & Wijnen Standards Track [Page 3]
  132. RFC 3414 USM for SNMPv3 December 2002
  133. 1. Introduction
  134. The Architecture for describing Internet Management Frameworks
  135. [RFC3411] describes that an SNMP engine is composed of:
  136. 1) a Dispatcher,
  137. 2) a Message Processing Subsystem,
  138. 3) a Security Subsystem, and
  139. 4) an Access Control Subsystem.
  140. Applications make use of the services of these subsystems.
  141. It is important to understand the SNMP architecture and the
  142. terminology of the architecture to understand where the Security
  143. Model described in this document fits into the architecture and
  144. interacts with other subsystems within the architecture. The reader
  145. is expected to have read and understood the description of the SNMP
  146. architecture, as defined in [RFC3411].
  147. This memo describes the User-based Security Model as it is used
  148. within the SNMP Architecture. The main idea is that we use the
  149. traditional concept of a user (identified by a userName) with which
  150. to associate security information.
  151. This memo describes the use of HMAC-MD5-96 and HMAC-SHA-96 as the
  152. authentication protocols and the use of CBC-DES as the privacy
  153. protocol. The User-based Security Model however allows for other
  154. such protocols to be used instead of or concurrent with these
  155. protocols. Therefore, the description of HMAC-MD5-96, HMAC-SHA-96
  156. and CBC-DES are in separate sections to reflect their self-contained
  157. nature and to indicate that they can be replaced or supplemented in
  158. the future.
  159. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  160. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  161. document are to be interpreted as described in [RFC2119].
  162. 1.1. Threats
  163. Several of the classical threats to network protocols are applicable
  164. to the network management problem and therefore would be applicable
  165. to any SNMP Security Model. Other threats are not applicable to the
  166. network management problem. This section discusses principal
  167. threats, secondary threats, and threats which are of lesser
  168. importance.
  169. The principal threats against which this SNMP Security Model should
  170. provide protection are:
  171. Blumenthal & Wijnen Standards Track [Page 4]
  172. RFC 3414 USM for SNMPv3 December 2002
  173. - Modification of Information The modification threat is the danger
  174. that some unauthorized entity may alter in-transit SNMP messages
  175. generated on behalf of an authorized principal in such a way as to
  176. effect unauthorized management operations, including falsifying the
  177. value of an object.
  178. - Masquerade The masquerade threat is the danger that management
  179. operations not authorized for some user may be attempted by
  180. assuming the identity of another user that has the appropriate
  181. authorizations.
  182. Two secondary threats are also identified. The Security Model
  183. defined in this memo provides limited protection against:
  184. - Disclosure The disclosure threat is the danger of eavesdropping on
  185. the exchanges between managed agents and a management station.
  186. Protecting against this threat may be required as a matter of local
  187. policy.
  188. - Message Stream Modification The SNMP protocol is typically based
  189. upon a connection-less transport service which may operate over any
  190. sub-network service. The re-ordering, delay or replay of messages
  191. can and does occur through the natural operation of many such sub-
  192. network services. The message stream modification threat is the
  193. danger that messages may be maliciously re-ordered, delayed or
  194. replayed to an extent which is greater than can occur through the
  195. natural operation of a sub-network service, in order to effect
  196. unauthorized management operations.
  197. There are at least two threats that an SNMP Security Model need not
  198. protect against. The security protocols defined in this memo do not
  199. provide protection against:
  200. - Denial of Service This SNMP Security Model does not attempt to
  201. address the broad range of attacks by which service on behalf of
  202. authorized users is denied. Indeed, such denial-of-service attacks
  203. are in many cases indistinguishable from the type of network
  204. failures with which any viable network management protocol must
  205. cope as a matter of course.
  206. - Traffic Analysis This SNMP Security Model does not attempt to
  207. address traffic analysis attacks. Indeed, many traffic patterns
  208. are predictable - devices may be managed on a regular basis by a
  209. relatively small number of management applications - and therefore
  210. there is no significant advantage afforded by protecting against
  211. traffic analysis.
  212. Blumenthal & Wijnen Standards Track [Page 5]
  213. RFC 3414 USM for SNMPv3 December 2002
  214. 1.2. Goals and Constraints
  215. Based on the foregoing account of threats in the SNMP network
  216. management environment, the goals of this SNMP Security Model are as
  217. follows.
  218. 1) Provide for verification that each received SNMP message has not
  219. been modified during its transmission through the network.
  220. 2) Provide for verification of the identity of the user on whose
  221. behalf a received SNMP message claims to have been generated.
  222. 3) Provide for detection of received SNMP messages, which request or
  223. contain management information, whose time of generation was not
  224. recent.
  225. 4) Provide, when necessary, that the contents of each received SNMP
  226. message are protected from disclosure.
  227. In addition to the principal goal of supporting secure network
  228. management, the design of this SNMP Security Model is also influenced
  229. by the following constraints:
  230. 1) When the requirements of effective management in times of network
  231. stress are inconsistent with those of security, the design of USM
  232. has given preference to the former.
  233. 2) Neither the security protocol nor its underlying security
  234. mechanisms should depend upon the ready availability of other
  235. network services (e.g., Network Time Protocol (NTP) or key
  236. management protocols).
  237. 3) A security mechanism should entail no changes to the basic SNMP
  238. network management philosophy.
  239. 1.3. Security Services
  240. The security services necessary to support the goals of this SNMP
  241. Security Model are as follows:
  242. - Data Integrity is the provision of the property that data has not
  243. been altered or destroyed in an unauthorized manner, nor have data
  244. sequences been altered to an extent greater than can occur non-
  245. maliciously.
  246. - Data Origin Authentication is the provision of the property that
  247. the claimed identity of the user on whose behalf received data was
  248. originated is corroborated.
  249. Blumenthal & Wijnen Standards Track [Page 6]
  250. RFC 3414 USM for SNMPv3 December 2002
  251. - Data Confidentiality is the provision of the property that
  252. information is not made available or disclosed to unauthorized
  253. individuals, entities, or processes.
  254. - Message timeliness and limited replay protection is the provision
  255. of the property that a message whose generation time is outside of
  256. a specified time window is not accepted. Note that message
  257. reordering is not dealt with and can occur in normal conditions
  258. too.
  259. For the protocols specified in this memo, it is not possible to
  260. assure the specific originator of a received SNMP message; rather, it
  261. is the user on whose behalf the message was originated that is
  262. authenticated.
  263. For these protocols, it not possible to obtain data integrity without
  264. data origin authentication, nor is it possible to obtain data origin
  265. authentication without data integrity. Further, there is no
  266. provision for data confidentiality without both data integrity and
  267. data origin authentication.
  268. The security protocols used in this memo are considered acceptably
  269. secure at the time of writing. However, the procedures allow for new
  270. authentication and privacy methods to be specified at a future time
  271. if the need arises.
  272. 1.4. Module Organization
  273. The security protocols defined in this memo are split in three
  274. different modules and each has its specific responsibilities such
  275. that together they realize the goals and security services described
  276. above:
  277. - The authentication module MUST provide for:
  278. - Data Integrity,
  279. - Data Origin Authentication,
  280. - The timeliness module MUST provide for:
  281. - Protection against message delay or replay (to an extent greater
  282. than can occur through normal operation).
  283. - The privacy module MUST provide for
  284. - Protection against disclosure of the message payload.
  285. Blumenthal & Wijnen Standards Track [Page 7]
  286. RFC 3414 USM for SNMPv3 December 2002
  287. The timeliness module is fixed for the User-based Security Model
  288. while there is provision for multiple authentication and/or privacy
  289. modules, each of which implements a specific authentication or
  290. privacy protocol respectively.
  291. 1.4.1. Timeliness Module
  292. Section 3 (Elements of Procedure) uses the timeliness values in an
  293. SNMP message to do timeliness checking. The timeliness check is only
  294. performed if authentication is applied to the message. Since the
  295. complete message is checked for integrity, we can assume that the
  296. timeliness values in a message that passes the authentication module
  297. are trustworthy.
  298. 1.4.2. Authentication Protocol
  299. Section 6 describes the HMAC-MD5-96 authentication protocol which is
  300. the first authentication protocol that MUST be supported with the
  301. User-based Security Model. Section 7 describes the HMAC-SHA-96
  302. authentication protocol which is another authentication protocol that
  303. SHOULD be supported with the User-based Security Model. In the
  304. future additional or replacement authentication protocols may be
  305. defined as new needs arise.
  306. The User-based Security Model prescribes that, if authentication is
  307. used, then the complete message is checked for integrity in the
  308. authentication module.
  309. For a message to be authenticated, it needs to pass authentication
  310. check by the authentication module and the timeliness check which is
  311. a fixed part of this User-based Security model.
  312. 1.4.3. Privacy Protocol
  313. Section 8 describes the CBC-DES Symmetric Encryption Protocol which
  314. is the first privacy protocol to be used with the User-based Security
  315. Model. In the future additional or replacement privacy protocols may
  316. be defined as new needs arise.
  317. The User-based Security Model prescribes that the scopedPDU is
  318. protected from disclosure when a message is sent with privacy.
  319. The User-based Security Model also prescribes that a message needs to
  320. be authenticated if privacy is in use.
  321. Blumenthal & Wijnen Standards Track [Page 8]
  322. RFC 3414 USM for SNMPv3 December 2002
  323. 1.5. Protection against Message Replay, Delay and Redirection
  324. 1.5.1. Authoritative SNMP Engine
  325. In order to protect against message replay, delay and redirection,
  326. one of the SNMP engines involved in each communication is designated
  327. to be the authoritative SNMP engine. When an SNMP message contains a
  328. payload which expects a response (those messages that contain a
  329. Confirmed Class PDU [RFC3411]), then the receiver of such messages is
  330. authoritative. When an SNMP message contains a payload which does
  331. not expect a response (those messages that contain an Unconfirmed
  332. Class PDU [RFC3411]), then the sender of such a message is
  333. authoritative.
  334. 1.5.2. Mechanisms
  335. The following mechanisms are used:
  336. 1) To protect against the threat of message delay or replay (to an
  337. extent greater than can occur through normal operation), a set of
  338. timeliness indicators (for the authoritative SNMP engine) are
  339. included in each message generated. An SNMP engine evaluates the
  340. timeliness indicators to determine if a received message is
  341. recent. An SNMP engine may evaluate the timeliness indicators to
  342. ensure that a received message is at least as recent as the last
  343. message it received from the same source. A non-authoritative
  344. SNMP engine uses received authentic messages to advance its notion
  345. of the timeliness indicators at the remote authoritative source.
  346. An SNMP engine MUST also use a mechanism to match incoming
  347. Responses to outstanding Requests and it MUST drop any Responses
  348. that do not match an outstanding request. For example, a msgID
  349. can be inserted in every message to cater for this functionality.
  350. These mechanisms provide for the detection of authenticated
  351. messages whose time of generation was not recent.
  352. This protection against the threat of message delay or replay does
  353. not imply nor provide any protection against unauthorized deletion
  354. or suppression of messages. Also, an SNMP engine may not be able
  355. to detect message reordering if all the messages involved are sent
  356. within the Time Window interval. Other mechanisms defined
  357. independently of the security protocol can also be used to detect
  358. the re-ordering replay, deletion, or suppression of messages
  359. containing Set operations (e.g., the MIB variable snmpSetSerialNo
  360. [RFC3418]).
  361. Blumenthal & Wijnen Standards Track [Page 9]
  362. RFC 3414 USM for SNMPv3 December 2002
  363. 2) Verification that a message sent to/from one authoritative SNMP
  364. engine cannot be replayed to/as-if-from another authoritative SNMP
  365. engine.
  366. Included in each message is an identifier unique to the
  367. authoritative SNMP engine associated with the sender or intended
  368. recipient of the message.
  369. A message containing an Unconfirmed Class PDU sent by an
  370. authoritative SNMP engine to one non-authoritative SNMP engine can
  371. potentially be replayed to another non-authoritative SNMP engine.
  372. The latter non-authoritative SNMP engine might (if it knows about
  373. the same userName with the same secrets at the authoritative SNMP
  374. engine) as a result update its notion of timeliness indicators of
  375. the authoritative SNMP engine, but that is not considered a
  376. threat. In this case, A Report or Response message will be
  377. discarded by the Message Processing Model, because there should
  378. not be an outstanding Request message. A Trap will possibly be
  379. accepted. Again, that is not considered a threat, because the
  380. communication was authenticated and timely. It is as if the
  381. authoritative SNMP engine was configured to start sending Traps to
  382. the second SNMP engine, which theoretically can happen without the
  383. knowledge of the second SNMP engine anyway. Anyway, the second
  384. SNMP engine may not expect to receive this Trap, but is allowed to
  385. see the management information contained in it.
  386. 3) Detection of messages which were not recently generated.
  387. A set of time indicators are included in the message, indicating
  388. the time of generation. Messages without recent time indicators
  389. are not considered authentic. In addition, an SNMP engine MUST
  390. drop any Responses that do not match an outstanding request. This
  391. however is the responsibility of the Message Processing Model.
  392. This memo allows the same user to be defined on multiple SNMP
  393. engines. Each SNMP engine maintains a value, snmpEngineID, which
  394. uniquely identifies the SNMP engine. This value is included in each
  395. message sent to/from the SNMP engine that is authoritative (see
  396. section 1.5.1). On receipt of a message, an authoritative SNMP
  397. engine checks the value to ensure that it is the intended recipient,
  398. and a non-authoritative SNMP engine uses the value to ensure that the
  399. message is processed using the correct state information.
  400. Each SNMP engine maintains two values, snmpEngineBoots and
  401. snmpEngineTime, which taken together provide an indication of time at
  402. that SNMP engine. Both of these values are included in an
  403. authenticated message sent to/received from that SNMP engine. On
  404. receipt, the values are checked to ensure that the indicated
  405. Blumenthal & Wijnen Standards Track [Page 10]
  406. RFC 3414 USM for SNMPv3 December 2002
  407. timeliness value is within a Time Window of the current time. The
  408. Time Window represents an administrative upper bound on acceptable
  409. delivery delay for protocol messages.
  410. For an SNMP engine to generate a message which an authoritative SNMP
  411. engine will accept as authentic, and to verify that a message
  412. received from that authoritative SNMP engine is authentic, such an
  413. SNMP engine must first achieve timeliness synchronization with the
  414. authoritative SNMP engine. See section 2.3.
  415. 1.6. Abstract Service Interfaces
  416. Abstract service interfaces have been defined to describe the
  417. conceptual interfaces between the various subsystems within an SNMP
  418. entity. Similarly a set of abstract service interfaces have been
  419. defined within the User-based Security Model (USM) to describe the
  420. conceptual interfaces between the generic USM services and the
  421. self-contained authentication and privacy services.
  422. These abstract service interfaces are defined by a set of primitives
  423. that define the services provided and the abstract data elements that
  424. must be passed when the services are invoked. This section lists the
  425. primitives that have been defined for the User-based Security Model.
  426. 1.6.1. User-based Security Model Primitives for Authentication
  427. The User-based Security Model provides the following internal
  428. primitives to pass data back and forth between the Security Model
  429. itself and the authentication service:
  430. statusInformation =
  431. authenticateOutgoingMsg(
  432. IN authKey -- secret key for authentication
  433. IN wholeMsg -- unauthenticated complete message
  434. OUT authenticatedWholeMsg -- complete authenticated message
  435. )
  436. statusInformation =
  437. authenticateIncomingMsg(
  438. IN authKey -- secret key for authentication
  439. IN authParameters -- as received on the wire
  440. IN wholeMsg -- as received on the wire
  441. OUT authenticatedWholeMsg -- complete authenticated message
  442. )
  443. Blumenthal & Wijnen Standards Track [Page 11]
  444. RFC 3414 USM for SNMPv3 December 2002
  445. 1.6.2. User-based Security Model Primitives for Privacy
  446. The User-based Security Model provides the following internal
  447. primitives to pass data back and forth between the Security Model
  448. itself and the privacy service:
  449. statusInformation =
  450. encryptData(
  451. IN encryptKey -- secret key for encryption
  452. IN dataToEncrypt -- data to encrypt (scopedPDU)
  453. OUT encryptedData -- encrypted data (encryptedPDU)
  454. OUT privParameters -- filled in by service provider
  455. )
  456. statusInformation =
  457. decryptData(
  458. IN decryptKey -- secret key for decrypting
  459. IN privParameters -- as received on the wire
  460. IN encryptedData -- encrypted data (encryptedPDU)
  461. OUT decryptedData -- decrypted data (scopedPDU)
  462. )
  463. 2. Elements of the Model
  464. This section contains definitions required to realize the security
  465. model defined by this memo.
  466. 2.1. User-based Security Model Users
  467. Management operations using this Security Model make use of a defined
  468. set of user identities. For any user on whose behalf management
  469. operations are authorized at a particular SNMP engine, that SNMP
  470. engine must have knowledge of that user. An SNMP engine that wishes
  471. to communicate with another SNMP engine must also have knowledge of a
  472. user known to that engine, including knowledge of the applicable
  473. attributes of that user.
  474. A user and its attributes are defined as follows:
  475. userName
  476. A string representing the name of the user.
  477. securityName
  478. A human-readable string representing the user in a format that is
  479. Security Model independent. There is a one-to-one relationship
  480. between userName and securityName.
  481. Blumenthal & Wijnen Standards Track [Page 12]
  482. RFC 3414 USM for SNMPv3 December 2002
  483. authProtocol
  484. An indication of whether messages sent on behalf of this user can
  485. be authenticated, and if so, the type of authentication protocol
  486. which is used. Two such protocols are defined in this memo:
  487. - the HMAC-MD5-96 authentication protocol.
  488. - the HMAC-SHA-96 authentication protocol.
  489. authKey
  490. If messages sent on behalf of this user can be authenticated, the
  491. (private) authentication key for use with the authentication
  492. protocol. Note that a user's authentication key will normally be
  493. different at different authoritative SNMP engines. The authKey is
  494. not accessible via SNMP. The length requirements of the authKey
  495. are defined by the authProtocol in use.
  496. authKeyChange and authOwnKeyChange
  497. The only way to remotely update the authentication key. Does that
  498. in a secure manner, so that the update can be completed without
  499. the need to employ privacy protection.
  500. privProtocol
  501. An indication of whether messages sent on behalf of this user can
  502. be protected from disclosure, and if so, the type of privacy
  503. protocol which is used. One such protocol is defined in this
  504. memo: the CBC-DES Symmetric Encryption Protocol.
  505. privKey
  506. If messages sent on behalf of this user can be en/decrypted, the
  507. (private) privacy key for use with the privacy protocol. Note
  508. that a user's privacy key will normally be different at different
  509. authoritative SNMP engines. The privKey is not accessible via
  510. SNMP. The length requirements of the privKey are defined by the
  511. privProtocol in use.
  512. privKeyChange and privOwnKeyChange
  513. The only way to remotely update the encryption key. Does that in
  514. a secure manner, so that the update can be completed without the
  515. need to employ privacy protection.
  516. 2.2. Replay Protection
  517. Each SNMP engine maintains three objects:
  518. - snmpEngineID, which (at least within an administrative domain)
  519. uniquely and unambiguously identifies an SNMP engine.
  520. Blumenthal & Wijnen Standards Track [Page 13]
  521. RFC 3414 USM for SNMPv3 December 2002
  522. - snmpEngineBoots, which is a count of the number of times the SNMP
  523. engine has re-booted/re-initialized since snmpEngineID was last
  524. configured; and,
  525. - snmpEngineTime, which is the number of seconds since the
  526. snmpEngineBoots counter was last incremented.
  527. Each SNMP engine is always authoritative with respect to these
  528. objects in its own SNMP entity. It is the responsibility of a non-
  529. authoritative SNMP engine to synchronize with the authoritative SNMP
  530. engine, as appropriate.
  531. An authoritative SNMP engine is required to maintain the values of
  532. its snmpEngineID and snmpEngineBoots in non-volatile storage.
  533. 2.2.1. msgAuthoritativeEngineID
  534. The msgAuthoritativeEngineID value contained in an authenticated
  535. message is used to defeat attacks in which messages from one SNMP
  536. engine to another SNMP engine are replayed to a different SNMP
  537. engine. It represents the snmpEngineID at the authoritative SNMP
  538. engine involved in the exchange of the message.
  539. When an authoritative SNMP engine is first installed, it sets its
  540. local value of snmpEngineID according to a enterprise-specific
  541. algorithm (see the definition of the Textual Convention for
  542. SnmpEngineID in the SNMP Architecture document [RFC3411]).
  543. 2.2.2. msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime
  544. The msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime values
  545. contained in an authenticated message are used to defeat attacks in
  546. which messages are replayed when they are no longer valid. They
  547. represent the snmpEngineBoots and snmpEngineTime values at the
  548. authoritative SNMP engine involved in the exchange of the message.
  549. Through use of snmpEngineBoots and snmpEngineTime, there is no
  550. requirement for an SNMP engine to have a non-volatile clock which
  551. ticks (i.e., increases with the passage of time) even when the
  552. SNMP engine is powered off. Rather, each time an SNMP engine
  553. re-boots, it retrieves, increments, and then stores snmpEngineBoots
  554. in non-volatile storage, and resets snmpEngineTime to zero.
  555. When an SNMP engine is first installed, it sets its local values of
  556. snmpEngineBoots and snmpEngineTime to zero. If snmpEngineTime ever
  557. reaches its maximum value (2147483647), then snmpEngineBoots is
  558. incremented as if the SNMP engine has re-booted and snmpEngineTime is
  559. reset to zero and starts incrementing again.
  560. Blumenthal & Wijnen Standards Track [Page 14]
  561. RFC 3414 USM for SNMPv3 December 2002
  562. Each time an authoritative SNMP engine re-boots, any SNMP engines
  563. holding that authoritative SNMP engine's values of snmpEngineBoots
  564. and snmpEngineTime need to re-synchronize prior to sending correctly
  565. authenticated messages to that authoritative SNMP engine (see Section
  566. 2.3 for (re-)synchronization procedures). Note, however, that the
  567. procedures do provide for a notification to be accepted as authentic
  568. by a receiving SNMP engine, when sent by an authoritative SNMP engine
  569. which has re-booted since the receiving SNMP engine last (re-
  570. )synchronized.
  571. If an authoritative SNMP engine is ever unable to determine its
  572. latest snmpEngineBoots value, then it must set its snmpEngineBoots
  573. value to 2147483647.
  574. Whenever the local value of snmpEngineBoots has the value 2147483647
  575. it latches at that value and an authenticated message always causes
  576. an notInTimeWindow authentication failure.
  577. In order to reset an SNMP engine whose snmpEngineBoots value has
  578. reached the value 2147483647, manual intervention is required. The
  579. engine must be physically visited and re-configured, either with a
  580. new snmpEngineID value, or with new secret values for the
  581. authentication and privacy protocols of all users known to that SNMP
  582. engine. Note that even if an SNMP engine re-boots once a second that
  583. it would still take approximately 68 years before the max value of
  584. 2147483647 would be reached.
  585. 2.2.3. Time Window
  586. The Time Window is a value that specifies the window of time in which
  587. a message generated on behalf of any user is valid. This memo
  588. specifies that the same value of the Time Window, 150 seconds, is
  589. used for all users.
  590. 2.3. Time Synchronization
  591. Time synchronization, required by a non-authoritative SNMP engine
  592. in order to proceed with authentic communications, has occurred
  593. when the non-authoritative SNMP engine has obtained a local notion
  594. of the authoritative SNMP engine's values of snmpEngineBoots and
  595. snmpEngineTime from the authoritative SNMP engine. These values
  596. must be (and remain) within the authoritative SNMP engine's Time
  597. Window. So the local notion of the authoritative SNMP engine's
  598. values must be kept loosely synchronized with the values stored
  599. at the authoritative SNMP engine. In addition to keeping a local
  600. copy of snmpEngineBoots and snmpEngineTime from the authoritative
  601. SNMP engine, a non-authoritative SNMP engine must also keep one
  602. Blumenthal & Wijnen Standards Track [Page 15]
  603. RFC 3414 USM for SNMPv3 December 2002
  604. local variable, latestReceivedEngineTime. This value records the
  605. highest value of snmpEngineTime that was received by the
  606. non-authoritative SNMP engine from the authoritative SNMP engine
  607. and is used to eliminate the possibility of replaying messages
  608. that would prevent the non-authoritative SNMP engine's notion of
  609. the snmpEngineTime from advancing.
  610. A non-authoritative SNMP engine must keep local notions of these
  611. values (snmpEngineBoots, snmpEngineTime and latestReceivedEngineTime)
  612. for each authoritative SNMP engine with which it wishes to
  613. communicate. Since each authoritative SNMP engine is uniquely and
  614. unambiguously identified by its value of snmpEngineID, the
  615. non-authoritative SNMP engine may use this value as a key in order to
  616. cache its local notions of these values.
  617. Time synchronization occurs as part of the procedures of receiving an
  618. SNMP message (Section 3.2, step 7b). As such, no explicit time
  619. synchronization procedure is required by a non-authoritative SNMP
  620. engine. Note, that whenever the local value of snmpEngineID is
  621. changed (e.g., through discovery) or when secure communications are
  622. first established with an authoritative SNMP engine, the local values
  623. of snmpEngineBoots and latestReceivedEngineTime should be set to
  624. zero. This will cause the time synchronization to occur when the
  625. next authentic message is received.
  626. 2.4. SNMP Messages Using this Security Model
  627. The syntax of an SNMP message using this Security Model adheres to
  628. the message format defined in the version-specific Message Processing
  629. Model document (for example [RFC3412]).
  630. The field msgSecurityParameters in SNMPv3 messages has a data type of
  631. OCTET STRING. Its value is the BER serialization of the following
  632. ASN.1 sequence:
  633. USMSecurityParametersSyntax DEFINITIONS IMPLICIT TAGS ::= BEGIN
  634. UsmSecurityParameters ::=
  635. SEQUENCE {
  636. -- global User-based security parameters
  637. msgAuthoritativeEngineID OCTET STRING,
  638. msgAuthoritativeEngineBoots INTEGER (0..2147483647),
  639. msgAuthoritativeEngineTime INTEGER (0..2147483647),
  640. msgUserName OCTET STRING (SIZE(0..32)),
  641. -- authentication protocol specific parameters
  642. msgAuthenticationParameters OCTET STRING,
  643. -- privacy protocol specific parameters
  644. msgPrivacyParameters OCTET STRING
  645. Blumenthal & Wijnen Standards Track [Page 16]
  646. RFC 3414 USM for SNMPv3 December 2002
  647. }
  648. END
  649. The fields of this sequence are:
  650. - The msgAuthoritativeEngineID specifies the snmpEngineID of the
  651. authoritative SNMP engine involved in the exchange of the message.
  652. - The msgAuthoritativeEngineBoots specifies the snmpEngineBoots value
  653. at the authoritative SNMP engine involved in the exchange of the
  654. message.
  655. - The msgAuthoritativeEngineTime specifies the snmpEngineTime value
  656. at the authoritative SNMP engine involved in the exchange of the
  657. message.
  658. - The msgUserName specifies the user (principal) on whose behalf the
  659. message is being exchanged. Note that a zero-length userName will
  660. not match any user, but it can be used for snmpEngineID discovery.
  661. - The msgAuthenticationParameters are defined by the authentication
  662. protocol in use for the message, as defined by the
  663. usmUserAuthProtocol column in the user's entry in the usmUserTable.
  664. - The msgPrivacyParameters are defined by the privacy protocol in use
  665. for the message, as defined by the usmUserPrivProtocol column in
  666. the user's entry in the usmUserTable).
  667. See appendix A.4 for an example of the BER encoding of field
  668. msgSecurityParameters.
  669. 2.5. Services provided by the User-based Security Model
  670. This section describes the services provided by the User-based
  671. Security Model with their inputs and outputs.
  672. The services are described as primitives of an abstract service
  673. interface and the inputs and outputs are described as abstract data
  674. elements as they are passed in these abstract service primitives.
  675. 2.5.1. Services for Generating an Outgoing SNMP Message
  676. When the Message Processing (MP) Subsystem invokes the User-based
  677. Security module to secure an outgoing SNMP message, it must use the
  678. appropriate service as provided by the Security module. These two
  679. services are provided:
  680. Blumenthal & Wijnen Standards Track [Page 17]
  681. RFC 3414 USM for SNMPv3 December 2002
  682. 1) A service to generate a Request message. The abstract service
  683. primitive is:
  684. statusInformation = -- success or errorIndication
  685. generateRequestMsg(
  686. IN messageProcessingModel -- typically, SNMP version
  687. IN globalData -- message header, admin data
  688. IN maxMessageSize -- of the sending SNMP entity
  689. IN securityModel -- for the outgoing message
  690. IN securityEngineID -- authoritative SNMP entity
  691. IN securityName -- on behalf of this principal
  692. IN securityLevel -- Level of Security requested
  693. IN scopedPDU -- message (plaintext) payload
  694. OUT securityParameters -- filled in by Security Module
  695. OUT wholeMsg -- complete generated message
  696. OUT wholeMsgLength -- length of generated message
  697. )
  698. 2) A service to generate a Response message. The abstract service
  699. primitive is:
  700. statusInformation = -- success or errorIndication
  701. generateResponseMsg(
  702. IN messageProcessingModel -- typically, SNMP version
  703. IN globalData -- message header, admin data
  704. IN maxMessageSize -- of the sending SNMP entity
  705. IN securityModel -- for the outgoing message
  706. IN securityEngineID -- authoritative SNMP entity
  707. IN securityName -- on behalf of this principal
  708. IN securityLevel -- Level of Security requested
  709. IN scopedPDU -- message (plaintext) payload
  710. IN securityStateReference -- reference to security state
  711. -- information from original
  712. -- request
  713. OUT securityParameters -- filled in by Security Module
  714. OUT wholeMsg -- complete generated message
  715. OUT wholeMsgLength -- length of generated message
  716. )
  717. The abstract data elements passed as parameters in the abstract
  718. service primitives are as follows:
  719. statusInformation
  720. An indication of whether the encoding and securing of the message
  721. was successful. If not it is an indication of the problem.
  722. Blumenthal & Wijnen Standards Track [Page 18]
  723. RFC 3414 USM for SNMPv3 December 2002
  724. messageProcessingModel
  725. The SNMP version number for the message to be generated. This
  726. data is not used by the User-based Security module.
  727. globalData
  728. The message header (i.e., its administrative information). This
  729. data is not used by the User-based Security module.
  730. maxMessageSize
  731. The maximum message size as included in the message. This data is
  732. not used by the User-based Security module.
  733. securityParameters
  734. These are the security parameters. They will be filled in by the
  735. User-based Security module.
  736. securityModel
  737. The securityModel in use. Should be User-based Security Model.
  738. This data is not used by the User-based Security module.
  739. securityName
  740. Together with the snmpEngineID it identifies a row in the
  741. usmUserTablethat is to be used for securing the message. The
  742. securityName has a format that is independent of the Security
  743. Model. In case of a response this parameter is ignored and the
  744. value from the cache is used.
  745. securityLevel
  746. The Level of Security from which the User-based Security module
  747. determines if the message needs to be protected from disclosure
  748. and if the message needs to be authenticated.
  749. securityEngineID
  750. The snmpEngineID of the authoritative SNMP engine to which a
  751. dateRequest message is to be sent. In case of a response it is
  752. implied to be the processing SNMP engine's snmpEngineID and so if
  753. it is specified, then it is ignored.
  754. scopedPDU
  755. The message payload. The data is opaque as far as the User-based
  756. Security Model is concerned.
  757. securityStateReference
  758. A handle/reference to cachedSecurityData to be used when securing
  759. an outgoing Response message. This is the exact same
  760. handle/reference as it was generated by the User-based Security
  761. module when processing the incoming Request message to which this
  762. is the Response message.
  763. Blumenthal & Wijnen Standards Track [Page 19]
  764. RFC 3414 USM for SNMPv3 December 2002
  765. wholeMsg
  766. The fully encoded and secured message ready for sending on the
  767. wire.
  768. wholeMsgLength
  769. The length of the encoded and secured message (wholeMsg).
  770. Upon completion of the process, the User-based Security module
  771. returns statusInformation. If the process was successful, the
  772. completed message with privacy and authentication applied if such was
  773. requested by the specified securityLevel is returned. If the process
  774. was not successful, then an errorIndication is returned.
  775. 2.5.2. Services for Processing an Incoming SNMP Message
  776. When the Message Processing (MP) Subsystem invokes the User-based
  777. Security module to verify proper security of an incoming message, it
  778. must use the service provided for an incoming message. The abstract
  779. service primitive is:
  780. statusInformation = -- errorIndication or success
  781. -- error counter OID/value if error
  782. processIncomingMsg(
  783. IN messageProcessingModel -- typically, SNMP version
  784. IN maxMessageSize -- of the sending SNMP entity
  785. IN securityParameters -- for the received message
  786. IN securityModel -- for the received message
  787. IN securityLevel -- Level of Security
  788. IN wholeMsg -- as received on the wire
  789. IN wholeMsgLength -- length as received on the wire
  790. OUT securityEngineID -- authoritative SNMP entity
  791. OUT securityName -- identification of the principal
  792. OUT scopedPDU, -- message (plaintext) payload
  793. OUT maxSizeResponseScopedPDU -- maximum size of the Response PDU
  794. OUT securityStateReference -- reference to security state
  795. ) -- information, needed for response
  796. The abstract data elements passed as parameters in the abstract
  797. service primitives are as follows:
  798. statusInformation
  799. An indication of whether the process was successful or not. If
  800. not, then the statusInformation includes the OID and the value of
  801. the error counter that was incremented.
  802. messageProcessingModel
  803. The SNMP version number as received in the message. This data is
  804. not used by the User-based Security module.
  805. Blumenthal & Wijnen Standards Track [Page 20]
  806. RFC 3414 USM for SNMPv3 December 2002
  807. maxMessageSize
  808. The maximum message size as included in the message. The User-bas
  809. User-based Security module uses this value to calculate the
  810. maxSizeResponseScopedPDU.
  811. securityParameters
  812. These are the security parameters as received in the message.
  813. securityModel
  814. The securityModel in use. Should be the User-based Security
  815. Model. This data is not used by the User-based Security module.
  816. securityLevel
  817. The Level of Security from which the User-based Security module
  818. determines if the message needs to be protected from disclosure
  819. and if the message needs to be authenticated.
  820. wholeMsg
  821. The whole message as it was received.
  822. wholeMsgLength
  823. The length of the message as it was received (wholeMsg).
  824. securityEngineID
  825. The snmpEngineID that was extracted from the field
  826. msgAuthoritativeEngineID and that was used to lookup the secrets
  827. in the usmUserTable.
  828. securityName
  829. The security name representing the user on whose behalf the
  830. message was received. The securityName has a format that is
  831. independent of the Security Model.
  832. scopedPDU
  833. The message payload. The data is opaque as far as the User-based
  834. Security Model is concerned.
  835. maxSizeResponseScopedPDU
  836. The maximum size of a scopedPDU to be included in a possible
  837. Response message. The User-based Security module calculates this
  838. size based on the msgMaxSize (as received in the message) and the
  839. space required for the message header (including the
  840. securityParameters) for such a Response message.
  841. securityStateReference
  842. A handle/reference to cachedSecurityData to be used when securing
  843. an outgoing Response message. When the Message Processing
  844. Subsystem calls the User-based Security module to generate a
  845. Blumenthal & Wijnen Standards Track [Page 21]
  846. RFC 3414 USM for SNMPv3 December 2002
  847. response to this incoming message it must pass this
  848. handle/reference.
  849. Upon completion of the process, the User-based Security module
  850. returns statusInformation and, if the process was successful, the
  851. additional data elements for further processing of the message. If
  852. the process was not successful, then an errorIndication, possibly
  853. with a OID and value pair of an error counter that was incremented.
  854. 2.6. Key Localization Algorithm.
  855. A localized key is a secret key shared between a user U and one
  856. authoritative SNMP engine E. Even though a user may have only one
  857. password and therefore one key for the whole network, the actual
  858. secrets shared between the user and each authoritative SNMP engine
  859. will be different. This is achieved by key localization [Localized-
  860. key].
  861. First, if a user uses a password, then the user's password is
  862. converted into a key Ku using one of the two algorithms described in
  863. Appendices A.2.1 and A.2.2.
  864. To convert key Ku into a localized key Kul of user U at the
  865. authoritative SNMP engine E, one appends the snmpEngineID of the
  866. authoritative SNMP engine to the key Ku and then appends the key Ku
  867. to the result, thus enveloping the snmpEngineID within the two copies
  868. of user's key Ku. Then one runs a secure hash function (which one
  869. depends on the authentication protocol defined for this user U at
  870. authoritative SNMP engine E; this document defines two authentication
  871. protocols with their associated algorithms based on MD5 and SHA).
  872. The output of the hash-function is the localized key Kul for user U
  873. at the authoritative SNMP engine E.
  874. 3. Elements of Procedure
  875. This section describes the security related procedures followed by an
  876. SNMP engine when processing SNMP messages according to the User-based
  877. Security Model.
  878. 3.1. Generating an Outgoing SNMP Message
  879. This section describes the procedure followed by an SNMP engine
  880. whenever it generates a message containing a management operation
  881. (like a request, a response, a notification, or a report) on behalf
  882. of a user, with a particular securityLevel.
  883. Blumenthal & Wijnen Standards Track [Page 22]
  884. RFC 3414 USM for SNMPv3 December 2002
  885. 1) a) If any securityStateReference is passed (Response or Report
  886. message), then information concerning the user is extracted
  887. from the cachedSecurityData. The cachedSecurityData can now be
  888. discarded. The securityEngineID is set to the local
  889. snmpEngineID. The securityLevel is set to the value specified
  890. by the calling module.
  891. Otherwise,
  892. b) based on the securityName, information concerning the user at
  893. the destination snmpEngineID, specified by the
  894. securityEngineID, is extracted from the Local Configuration
  895. Datastore (LCD, usmUserTable). If information about the user
  896. is absent from the LCD, then an error indication
  897. (unknownSecurityName) is returned to the calling module.
  898. 2) If the securityLevel specifies that the message is to be protected
  899. from disclosure, but the user does not support both an
  900. authentication and a privacy protocol then the message cannot be
  901. sent. An error indication (unsupportedSecurityLevel) is returned
  902. to the calling module.
  903. 3) If the securityLevel specifies that the message is to be
  904. authenticated, but the user does not support an authentication
  905. protocol, then the message cannot be sent. An error indication
  906. (unsupportedSecurityLevel) is returned to the calling module.
  907. 4) a) If the securityLevel specifies that the message is to be
  908. protected from disclosure, then the octet sequence representing
  909. the serialized scopedPDU is encrypted according to the user's
  910. privacy protocol. To do so a call is made to the privacy
  911. module that implements the user's privacy protocol according to
  912. the abstract primitive:
  913. statusInformation = -- success or failure
  914. encryptData(
  915. IN encryptKey -- user's localized privKey
  916. IN dataToEncrypt -- serialized scopedPDU
  917. OUT encryptedData -- serialized encryptedPDU
  918. OUT privParameters -- serialized privacy parameters
  919. )
  920. statusInformation
  921. indicates if the encryption process was successful or not.
  922. encryptKey
  923. the user's localized private privKey is the secret key that
  924. can be used by the encryption algorithm.
  925. Blumenthal & Wijnen Standards Track [Page 23]
  926. RFC 3414 USM for SNMPv3 December 2002
  927. dataToEncrypt
  928. the serialized scopedPDU is the data to be encrypted.
  929. encryptedData
  930. the encryptedPDU represents the encrypted scopedPDU, encoded
  931. as an OCTET STRING.
  932. privParameters
  933. the privacy parameters, encoded as an OCTET STRING.
  934. If the privacy module returns failure, then the message cannot
  935. be sent and an error indication (encryptionError) is returned
  936. to the calling module.
  937. If the privacy module returns success, then the returned
  938. privParameters are put into the msgPrivacyParameters field of
  939. the securityParameters and the encryptedPDU serves as the
  940. payload of the message being prepared.
  941. Otherwise,
  942. b) If the securityLevel specifies that the message is not to be be
  943. protected from disclosure, then a zero-length OCTET STRING is
  944. encoded into the msgPrivacyParameters field of the
  945. securityParameters and the plaintext scopedPDU serves as the
  946. payload of the message being prepared.
  947. 5) The securityEngineID is encoded as an OCTET STRING into the
  948. msgAuthoritativeEngineID field of the securityParameters. Note
  949. that an empty (zero length) securityEngineID is OK for a Request
  950. message, because that will cause the remote (authoritative) SNMP
  951. engine to return a Report PDU with the proper securityEngineID
  952. included in the msgAuthoritativeEngineID in the securityParameters
  953. of that returned Report PDU.
  954. 6) a) If the securityLevel specifies that the message is to be
  955. authenticated, then the current values of snmpEngineBoots and
  956. snmpEngineTime corresponding to the securityEngineID from the
  957. LCD are used.
  958. Otherwise,
  959. b) If this is a Response or Report message, then the current value
  960. of snmpEngineBoots and snmpEngineTime corresponding to the
  961. local snmpEngineID from the LCD are used.
  962. Blumenthal & Wijnen Standards Track [Page 24]
  963. RFC 3414 USM for SNMPv3 December 2002
  964. Otherwise,
  965. c) If this is a Request message, then a zero value is used for
  966. both snmpEngineBoots and snmpEngineTime. This zero value gets
  967. used if snmpEngineID is empty.
  968. The values are encoded as INTEGER respectively into the
  969. msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime
  970. fields of the securityParameters.
  971. 7) The userName is encoded as an OCTET STRING into the msgUserName
  972. field of the securityParameters.
  973. 8) a) If the securityLevel specifies that the message is to be
  974. authenticated, the message is authenticated according to the
  975. user's authentication protocol. To do so a call is made to the
  976. authentication module that implements the user's authentication
  977. protocol according to the abstract service primitive:
  978. statusInformation =
  979. authenticateOutgoingMsg(
  980. IN authKey -- the user's localized authKey
  981. IN wholeMsg -- unauthenticated message
  982. OUT authenticatedWholeMsg -- authenticated complete message
  983. )
  984. statusInformation
  985. indicates if authentication was successful or not.
  986. authKey
  987. the user's localized private authKey is the secret key that
  988. can be used by the authentication algorithm.
  989. wholeMsg
  990. the complete serialized message to be authenticated.
  991. authenticatedWholeMsg
  992. the same as the input given to the authenticateOutgoingMsg
  993. service, but with msgAuthenticationParameters properly
  994. filled in.
  995. If the authentication module returns failure, then the message
  996. cannot be sent and an error indication (authenticationFailure)
  997. is returned to the calling module.
  998. Blumenthal & Wijnen Standards Track [Page 25]
  999. RFC 3414 USM for SNMPv3 December 2002
  1000. If the authentication module returns success, then the
  1001. msgAuthenticationParameters field is put into the
  1002. securityParameters and the authenticatedWholeMsg represents the
  1003. serialization of the authenticated message being prepared.
  1004. Otherwise,
  1005. b) If the securityLevel specifies that the message is not to be
  1006. authenticated then a zero-length OCTET STRING is encoded into
  1007. the msgAuthenticationParameters field of the
  1008. securityParameters. The wholeMsg is now serialized and then
  1009. represents the unauthenticated message being prepared.
  1010. 9) The completed message with its length is returned to the calling
  1011. module with the statusInformation set to success.
  1012. 3.2. Processing an Incoming SNMP Message
  1013. This section describes the procedure followed by an SNMP engine
  1014. whenever it receives a message containing a management operation on
  1015. behalf of a user, with a particular securityLevel.
  1016. To simplify the elements of procedure, the release of state
  1017. information is not always explicitly specified. As a general rule,
  1018. if state information is available when a message gets discarded, the
  1019. state information should also be released. Also, an error indication
  1020. can return an OID and value for an incremented counter and optionally
  1021. a value for securityLevel, and values for contextEngineID or
  1022. contextName for the counter. In addition, the securityStateReference
  1023. data is returned if any such information is available at the point
  1024. where the error is detected.
  1025. 1) If the received securityParameters is not the serialization
  1026. (according to the conventions of [RFC3417]) of an OCTET STRING
  1027. formatted according to the UsmSecurityParameters defined in
  1028. section 2.4, then the snmpInASNParseErrs counter [RFC3418] is
  1029. incremented, and an error indication (parseError) is returned to
  1030. the calling module. Note that we return without the OID and
  1031. value of the incremented counter, because in this case there is
  1032. not enough information to generate a Report PDU.
  1033. 2) The values of the security parameter fields are extracted from
  1034. the securityParameters. The securityEngineID to be returned to
  1035. the caller is the value of the msgAuthoritativeEngineID field.
  1036. The cachedSecurityData is prepared and a securityStateReference
  1037. is prepared to reference this data. Values to be cached are:
  1038. msgUserName
  1039. Blumenthal & Wijnen Standards Track [Page 26]
  1040. RFC 3414 USM for SNMPv3 December 2002
  1041. 3) If the value of the msgAuthoritativeEngineID field in the
  1042. securityParameters is unknown then:
  1043. a) a non-authoritative SNMP engine that performs discovery may
  1044. optionally create a new entry in its Local Configuration
  1045. Datastore (LCD) and continue processing;
  1046. or
  1047. b) the usmStatsUnknownEngineIDs counter is incremented, and an
  1048. error indication (unknownEngineID) together with the OID and
  1049. value of the incremented counter is returned to the calling
  1050. module.
  1051. Note in the event that a zero-length, or other illegally sized
  1052. msgAuthoritativeEngineID is received, b) should be chosen to
  1053. facilitate engineID discovery. Otherwise the choice between a)
  1054. and b) is an implementation issue.
  1055. 4) Information about the value of the msgUserName and
  1056. msgAuthoritativeEngineID fields is extracted from the Local
  1057. Configuration Datastore (LCD, usmUserTable). If no information
  1058. is available for the user, then the usmStatsUnknownUserNames
  1059. counter is incremented and an error indication
  1060. (unknownSecurityName) together with the OID and value of the
  1061. incremented counter is returned to the calling module.
  1062. 5) If the information about the user indicates that it does not
  1063. support the securityLevel requested by the caller, then the
  1064. usmStatsUnsupportedSecLevels counter is incremented and an error
  1065. indication (unsupportedSecurityLevel) together with the OID and
  1066. value of the incremented counter is returned to the calling
  1067. module.
  1068. 6) If the securityLevel specifies that the message is to be
  1069. authenticated, then the message is authenticated according to the
  1070. user's authentication protocol. To do so a call is made to the
  1071. authentication module that implements the user's authentication
  1072. protocol according to the abstract service primitive:
  1073. statusInformation = -- success or failure
  1074. authenticateIncomingMsg(
  1075. IN authKey -- the user's localized authKey
  1076. IN authParameters -- as received on the wire
  1077. IN wholeMsg -- as received on the wire
  1078. OUT authenticatedWholeMsg -- checked for authentication
  1079. )
  1080. Blumenthal & Wijnen Standards Track [Page 27]
  1081. RFC 3414 USM for SNMPv3 December 2002
  1082. statusInformation
  1083. indicates if authentication was successful or not.
  1084. authKey
  1085. the user's localized private authKey is the secret key that
  1086. can be used by the authentication algorithm.
  1087. wholeMsg
  1088. the complete serialized message to be authenticated.
  1089. authenticatedWholeMsg
  1090. the same as the input given to the authenticateIncomingMsg
  1091. service, but after authentication has been checked.
  1092. If the authentication module returns failure, then the message
  1093. cannot be trusted, so the usmStatsWrongDigests counter is
  1094. incremented and an error indication (authenticationFailure)
  1095. together with the OID and value of the incremented counter is
  1096. returned to the calling module.
  1097. If the authentication module returns success, then the message is
  1098. authentic and can be trusted so processing continues.
  1099. 7) If the securityLevel indicates an authenticated message, then the
  1100. local values of snmpEngineBoots, snmpEngineTime and
  1101. latestReceivedEngineTime corresponding to the value of the
  1102. msgAuthoritativeEngineID field are extracted from the Local
  1103. Configuration Datastore.
  1104. a) If the extracted value of msgAuthoritativeEngineID is the same
  1105. as the value of snmpEngineID of the processing SNMP engine
  1106. (meaning this is the authoritative SNMP engine), then if any
  1107. of the following conditions is true, then the message is
  1108. considered to be outside of the Time Window:
  1109. - the local value of snmpEngineBoots is 2147483647;
  1110. - the value of the msgAuthoritativeEngineBoots field differs
  1111. from the local value of snmpEngineBoots; or,
  1112. - the value of the msgAuthoritativeEngineTime field differs
  1113. from the local notion of snmpEngineTime by more than +/- 150
  1114. seconds.
  1115. If the message is considered to be outside of the Time Window
  1116. then the usmStatsNotInTimeWindows counter is incremented and
  1117. an error indication (notInTimeWindow) together with the OID,
  1118. the value of the incremented counter, and an indication that
  1119. Blumenthal & Wijnen Standards Track [Page 28]
  1120. RFC 3414 USM for SNMPv3 December 2002
  1121. the error must be reported with a securityLevel of authNoPriv,
  1122. is returned to the calling module
  1123. b) If the extracted value of msgAuthoritativeEngineID is not the
  1124. same as the value snmpEngineID of the processing SNMP engine
  1125. (meaning this is not the authoritative SNMP engine), then:
  1126. 1) if at least one of the following conditions is true:
  1127. - the extracted value of the msgAuthoritativeEngineBoots
  1128. field is greater than the local notion of the value of
  1129. snmpEngineBoots; or,
  1130. - the extracted value of the msgAuthoritativeEngineBoots
  1131. field is equal to the local notion of the value of
  1132. snmpEngineBoots, and the extracted value of
  1133. msgAuthoritativeEngineTime field is greater than the
  1134. value of latestReceivedEngineTime,
  1135. then the LCD entry corresponding to the extracted value of
  1136. the msgAuthoritativeEngineID field is updated, by setting:
  1137. - the local notion of the value of snmpEngineBoots to the
  1138. value of the msgAuthoritativeEngineBoots field,
  1139. - the local notion of the value of snmpEngineTime to the
  1140. value of the msgAuthoritativeEngineTime field, and
  1141. - the latestReceivedEngineTime to the value of the value of
  1142. the msgAuthoritativeEngineTime field.
  1143. 2) if any of the following conditions is true, then the
  1144. message is considered to be outside of the Time Window:
  1145. - the local notion of the value of snmpEngineBoots is
  1146. 2147483647;
  1147. - the value of the msgAuthoritativeEngineBoots field is
  1148. less than the local notion of the value of
  1149. snmpEngineBoots; or,
  1150. - the value of the msgAuthoritativeEngineBoots field is
  1151. equal to the local notion of the value of snmpEngineBoots
  1152. and the value of the msgAuthoritativeEngineTime field is
  1153. more than 150 seconds less than the local notion of the
  1154. value of snmpEngineTime.
  1155. Blumenthal & Wijnen Standards Track [Page 29]
  1156. RFC 3414 USM for SNMPv3 December 2002
  1157. If the message is considered to be outside of the Time
  1158. Window then an error indication (notInTimeWindow) is
  1159. returned to the calling module.
  1160. Note that this means that a too old (possibly replayed)
  1161. message has been detected and is deemed unauthentic.
  1162. Note that this procedure allows for the value of
  1163. msgAuthoritativeEngineBoots in the message to be greater
  1164. than the local notion of the value of snmpEngineBoots to
  1165. allow for received messages to be accepted as authentic
  1166. when received from an authoritative SNMP engine that has
  1167. re-booted since the receiving SNMP engine last
  1168. (re-)synchronized.
  1169. 8) a) If the securityLevel indicates that the message was protected
  1170. from disclosure, then the OCTET STRING representing the
  1171. encryptedPDU is decrypted according to the user's privacy
  1172. protocol to obtain an unencrypted serialized scopedPDU value.
  1173. To do so a call is made to the privacy module that implements
  1174. the user's privacy protocol according to the abstract
  1175. primitive:
  1176. statusInformation = -- success or failure
  1177. decryptData(
  1178. IN decryptKey -- the user's localized privKey
  1179. IN privParameters -- as received on the wire
  1180. IN encryptedData -- encryptedPDU as received
  1181. OUT decryptedData -- serialized decrypted scopedPDU
  1182. )
  1183. statusInformation
  1184. indicates if the decryption process was successful or not.
  1185. decryptKey
  1186. the user's localized private privKey is the secret key that
  1187. can be used by the decryption algorithm.
  1188. privParameters
  1189. the msgPrivacyParameters, encoded as an OCTET STRING.
  1190. encryptedData
  1191. the encryptedPDU represents the encrypted scopedPDU,
  1192. encoded as an OCTET STRING.
  1193. decryptedData
  1194. the serialized scopedPDU if decryption is successful.
  1195. Blumenthal & Wijnen Standards Track [Page 30]
  1196. RFC 3414 USM for SNMPv3 December 2002
  1197. If the privacy module returns failure, then the message can
  1198. not be processed, so the usmStatsDecryptionErrors counter is
  1199. incremented and an error indication (decryptionError) together
  1200. with the OID and value of the incremented counter is returned
  1201. to the calling module.
  1202. If the privacy module returns success, then the decrypted
  1203. scopedPDU is the message payload to be returned to the calling
  1204. module.
  1205. Otherwise,
  1206. b) The scopedPDU component is assumed to be in plain text and is
  1207. the message payload to be returned to the calling module.
  1208. 9) The maxSizeResponseScopedPDU is calculated. This is the maximum
  1209. size allowed for a scopedPDU for a possible Response message.
  1210. Provision is made for a message header that allows the same
  1211. securityLevel as the received Request.
  1212. 10) The securityName for the user is retrieved from the usmUserTable.
  1213. 11) The security data is cached as cachedSecurityData, so that a
  1214. possible response to this message can and will use the same
  1215. authentication and privacy secrets. Information to be
  1216. saved/cached is as follows:
  1217. msgUserName,
  1218. usmUserAuthProtocol, usmUserAuthKey
  1219. usmUserPrivProtocol, usmUserPrivKey
  1220. 12) The statusInformation is set to success and a return is made to
  1221. the calling module passing back the OUT parameters as specified
  1222. in the processIncomingMsg primitive.
  1223. 4. Discovery
  1224. The User-based Security Model requires that a discovery process
  1225. obtains sufficient information about other SNMP engines in order to
  1226. communicate with them. Discovery requires an non-authoritative SNMP
  1227. engine to learn the authoritative SNMP engine's snmpEngineID value
  1228. before communication may proceed. This may be accomplished by
  1229. generating a Request message with a securityLevel of noAuthNoPriv, a
  1230. msgUserName of zero-length, a msgAuthoritativeEngineID value of zero
  1231. length, and the varBindList left empty. The response to this message
  1232. will be a Report message containing the snmpEngineID of the
  1233. authoritative SNMP engine as the value of the
  1234. msgAuthoritativeEngineID field within the msgSecurityParameters
  1235. Blumenthal & Wijnen Standards Track [Page 31]
  1236. RFC 3414 USM for SNMPv3 December 2002
  1237. field. It contains a Report PDU with the usmStatsUnknownEngineIDs
  1238. counter in the varBindList.
  1239. If authenticated communication is required, then the discovery
  1240. process should also establish time synchronization with the
  1241. authoritative SNMP engine. This may be accomplished by sending an
  1242. authenticated Request message with the value of
  1243. msgAuthoritativeEngineID set to the newly learned snmpEngineID and
  1244. with the values of msgAuthoritativeEngineBoots and
  1245. msgAuthoritativeEngineTime set to zero. For an authenticated Request
  1246. message, a valid userName must be used in the msgUserName field. The
  1247. response to this authenticated message will be a Report message
  1248. containing the up to date values of the authoritative SNMP engine's
  1249. snmpEngineBoots and snmpEngineTime as the value of the
  1250. msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime fields
  1251. respectively. It also contains the usmStatsNotInTimeWindows counter
  1252. in the varBindList of the Report PDU. The time synchronization then
  1253. happens automatically as part of the procedures in section 3.2 step
  1254. 7b. See also section 2.3.
  1255. 5. Definitions
  1256. SNMP-USER-BASED-SM-MIB DEFINITIONS ::= BEGIN
  1257. IMPORTS
  1258. MODULE-IDENTITY, OBJECT-TYPE,
  1259. OBJECT-IDENTITY,
  1260. snmpModules, Counter32 FROM SNMPv2-SMI
  1261. TEXTUAL-CONVENTION, TestAndIncr,
  1262. RowStatus, RowPointer,
  1263. StorageType, AutonomousType FROM SNMPv2-TC
  1264. MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF
  1265. SnmpAdminString, SnmpEngineID,
  1266. snmpAuthProtocols, snmpPrivProtocols FROM SNMP-FRAMEWORK-MIB;
  1267. snmpUsmMIB MODULE-IDENTITY
  1268. LAST-UPDATED "200210160000Z" -- 16 Oct 2002, midnight
  1269. ORGANIZATION "SNMPv3 Working Group"
  1270. CONTACT-INFO "WG-email: snmpv3@lists.tislabs.com
  1271. Subscribe: majordomo@lists.tislabs.com
  1272. In msg body: subscribe snmpv3
  1273. Chair: Russ Mundy
  1274. Network Associates Laboratories
  1275. postal: 15204 Omega Drive, Suite 300
  1276. Rockville, MD 20850-4601
  1277. USA
  1278. email: mundy@tislabs.com
  1279. Blumenthal & Wijnen Standards Track [Page 32]
  1280. RFC 3414 USM for SNMPv3 December 2002
  1281. phone: +1 301-947-7107
  1282. Co-Chair: David Harrington
  1283. Enterasys Networks
  1284. Postal: 35 Industrial Way
  1285. P. O. Box 5004
  1286. Rochester, New Hampshire 03866-5005
  1287. USA
  1288. EMail: dbh@enterasys.com
  1289. Phone: +1 603-337-2614
  1290. Co-editor Uri Blumenthal
  1291. Lucent Technologies
  1292. postal: 67 Whippany Rd.
  1293. Whippany, NJ 07981
  1294. USA
  1295. email: uri@lucent.com
  1296. phone: +1-973-386-2163
  1297. Co-editor: Bert Wijnen
  1298. Lucent Technologies
  1299. postal: Schagen 33
  1300. 3461 GL Linschoten
  1301. Netherlands
  1302. email: bwijnen@lucent.com
  1303. phone: +31-348-480-685
  1304. "
  1305. DESCRIPTION "The management information definitions for the
  1306. SNMP User-based Security Model.
  1307. Copyright (C) The Internet Society (2002). This
  1308. version of this MIB module is part of RFC 3414;
  1309. see the RFC itself for full legal notices.
  1310. "
  1311. -- Revision history
  1312. REVISION "200210160000Z" -- 16 Oct 2002, midnight
  1313. DESCRIPTION "Changes in this revision:
  1314. - Updated references and contact info.
  1315. - Clarification to usmUserCloneFrom DESCRIPTION
  1316. clause
  1317. - Fixed 'command responder' into 'command generator'
  1318. in last para of DESCRIPTION clause of
  1319. usmUserTable.
  1320. This revision published as RFC3414.
  1321. "
  1322. REVISION "199901200000Z" -- 20 Jan 1999, midnight
  1323. DESCRIPTION "Clarifications, published as RFC2574"
  1324. Blumenthal & Wijnen Standards Track [Page 33]
  1325. RFC 3414 USM for SNMPv3 December 2002
  1326. REVISION "199711200000Z" -- 20 Nov 1997, midnight
  1327. DESCRIPTION "Initial version, published as RFC2274"
  1328. ::= { snmpModules 15 }
  1329. -- Administrative assignments ****************************************
  1330. usmMIBObjects OBJECT IDENTIFIER ::= { snmpUsmMIB 1 }
  1331. usmMIBConformance OBJECT IDENTIFIER ::= { snmpUsmMIB 2 }
  1332. -- Identification of Authentication and Privacy Protocols ************
  1333. usmNoAuthProtocol OBJECT-IDENTITY
  1334. STATUS current
  1335. DESCRIPTION "No Authentication Protocol."
  1336. ::= { snmpAuthProtocols 1 }
  1337. usmHMACMD5AuthProtocol OBJECT-IDENTITY
  1338. STATUS current
  1339. DESCRIPTION "The HMAC-MD5-96 Digest Authentication Protocol."
  1340. REFERENCE "- H. Krawczyk, M. Bellare, R. Canetti HMAC:
  1341. Keyed-Hashing for Message Authentication,
  1342. RFC2104, Feb 1997.
  1343. - Rivest, R., Message Digest Algorithm MD5, RFC1321.
  1344. "
  1345. ::= { snmpAuthProtocols 2 }
  1346. usmHMACSHAAuthProtocol OBJECT-IDENTITY
  1347. STATUS current
  1348. DESCRIPTION "The HMAC-SHA-96 Digest Authentication Protocol."
  1349. REFERENCE "- H. Krawczyk, M. Bellare, R. Canetti, HMAC:
  1350. Keyed-Hashing for Message Authentication,
  1351. RFC2104, Feb 1997.
  1352. - Secure Hash Algorithm. NIST FIPS 180-1.
  1353. "
  1354. ::= { snmpAuthProtocols 3 }
  1355. usmNoPrivProtocol OBJECT-IDENTITY
  1356. STATUS current
  1357. DESCRIPTION "No Privacy Protocol."
  1358. ::= { snmpPrivProtocols 1 }
  1359. usmDESPrivProtocol OBJECT-IDENTITY
  1360. STATUS current
  1361. DESCRIPTION "The CBC-DES Symmetric Encryption Protocol."
  1362. REFERENCE "- Data Encryption Standard, National Institute of
  1363. Standards and Technology. Federal Information
  1364. Processing Standard (FIPS) Publication 46-1.
  1365. Blumenthal & Wijnen Standards Track [Page 34]
  1366. RFC 3414 USM for SNMPv3 December 2002
  1367. Supersedes FIPS Publication 46,
  1368. (January, 1977; reaffirmed January, 1988).
  1369. - Data Encryption Algorithm, American National
  1370. Standards Institute. ANSI X3.92-1981,
  1371. (December, 1980).
  1372. - DES Modes of Operation, National Institute of
  1373. Standards and Technology. Federal Information
  1374. Processing Standard (FIPS) Publication 81,
  1375. (December, 1980).
  1376. - Data Encryption Algorithm - Modes of Operation,
  1377. American National Standards Institute.
  1378. ANSI X3.106-1983, (May 1983).
  1379. "
  1380. ::= { snmpPrivProtocols 2 }
  1381. -- Textual Conventions ***********************************************
  1382. KeyChange ::= TEXTUAL-CONVENTION
  1383. STATUS current
  1384. DESCRIPTION
  1385. "Every definition of an object with this syntax must identify
  1386. a protocol P, a secret key K, and a hash algorithm H
  1387. that produces output of L octets.
  1388. The object's value is a manager-generated, partially-random
  1389. value which, when modified, causes the value of the secret
  1390. key K, to be modified via a one-way function.
  1391. The value of an instance of this object is the concatenation
  1392. of two components: first a 'random' component and then a
  1393. 'delta' component.
  1394. The lengths of the random and delta components
  1395. are given by the corresponding value of the protocol P;
  1396. if P requires K to be a fixed length, the length of both the
  1397. random and delta components is that fixed length; if P
  1398. allows the length of K to be variable up to a particular
  1399. maximum length, the length of the random component is that
  1400. maximum length and the length of the delta component is any
  1401. length less than or equal to that maximum length.
  1402. For example, usmHMACMD5AuthProtocol requires K to be a fixed
  1403. length of 16 octets and L - of 16 octets.
  1404. usmHMACSHAAuthProtocol requires K to be a fixed length of
  1405. 20 octets and L - of 20 octets. Other protocols may define
  1406. other sizes, as deemed appropriate.
  1407. Blumenthal & Wijnen Standards Track [Page 35]
  1408. RFC 3414 USM for SNMPv3 December 2002
  1409. When a requester wants to change the old key K to a new
  1410. key keyNew on a remote entity, the 'random' component is
  1411. obtained from either a true random generator, or from a
  1412. pseudorandom generator, and the 'delta' component is
  1413. computed as follows:
  1414. - a temporary variable is initialized to the existing value
  1415. of K;
  1416. - if the length of the keyNew is greater than L octets,
  1417. then:
  1418. - the random component is appended to the value of the
  1419. temporary variable, and the result is input to the
  1420. the hash algorithm H to produce a digest value, and
  1421. the temporary variable is set to this digest value;
  1422. - the value of the temporary variable is XOR-ed with
  1423. the first (next) L-octets (16 octets in case of MD5)
  1424. of the keyNew to produce the first (next) L-octets
  1425. (16 octets in case of MD5) of the 'delta' component.
  1426. - the above two steps are repeated until the unused
  1427. portion of the keyNew component is L octets or less,
  1428. - the random component is appended to the value of the
  1429. temporary variable, and the result is input to the
  1430. hash algorithm H to produce a digest value;
  1431. - this digest value, truncated if necessary to be the same
  1432. length as the unused portion of the keyNew, is XOR-ed
  1433. with the unused portion of the keyNew to produce the
  1434. (final portion of the) 'delta' component.
  1435. For example, using MD5 as the hash algorithm H:
  1436. iterations = (lenOfDelta - 1)/16; /* integer division */
  1437. temp = keyOld;
  1438. for (i = 0; i < iterations; i++) {
  1439. temp = MD5 (temp || random);
  1440. delta[i*16 .. (i*16)+15] =
  1441. temp XOR keyNew[i*16 .. (i*16)+15];
  1442. }
  1443. temp = MD5 (temp || random);
  1444. delta[i*16 .. lenOfDelta-1] =
  1445. temp XOR keyNew[i*16 .. lenOfDelta-1];
  1446. The 'random' and 'delta' components are then concatenated as
  1447. described above, and the resulting octet string is sent to
  1448. the recipient as the new value of an instance of this object.
  1449. At the receiver side, when an instance of this object is set
  1450. to a new value, then a new value of K is computed as follows:
  1451. Blumenthal & Wijnen Standards Track [Page 36]
  1452. RFC 3414 USM for SNMPv3 December 2002
  1453. - a temporary variable is initialized to the existing value
  1454. of K;
  1455. - if the length of the delta component is greater than L
  1456. octets, then:
  1457. - the random component is appended to the value of the
  1458. temporary variable, and the result is input to the
  1459. hash algorithm H to produce a digest value, and the
  1460. temporary variable is set to this digest value;
  1461. - the value of the temporary variable is XOR-ed with
  1462. the first (next) L-octets (16 octets in case of MD5)
  1463. of the delta component to produce the first (next)
  1464. L-octets (16 octets in case of MD5) of the new value
  1465. of K.
  1466. - the above two steps are repeated until the unused
  1467. portion of the delta component is L octets or less,
  1468. - the random component is appended to the value of the
  1469. temporary variable, and the result is input to the
  1470. hash algorithm H to produce a digest value;
  1471. - this digest value, truncated if necessary to be the same
  1472. length as the unused portion of the delta component, is
  1473. XOR-ed with the unused portion of the delta component to
  1474. produce the (final portion of the) new value of K.
  1475. For example, using MD5 as the hash algorithm H:
  1476. iterations = (lenOfDelta - 1)/16; /* integer division */
  1477. temp = keyOld;
  1478. for (i = 0; i < iterations; i++) {
  1479. temp = MD5 (temp || random);
  1480. keyNew[i*16 .. (i*16)+15] =
  1481. temp XOR delta[i*16 .. (i*16)+15];
  1482. }
  1483. temp = MD5 (temp || random);
  1484. keyNew[i*16 .. lenOfDelta-1] =
  1485. temp XOR delta[i*16 .. lenOfDelta-1];
  1486. The value of an object with this syntax, whenever it is
  1487. retrieved by the management protocol, is always the zero
  1488. length string.
  1489. Note that the keyOld and keyNew are the localized keys.
  1490. Note that it is probably wise that when an SNMP entity sends
  1491. a SetRequest to change a key, that it keeps a copy of the old
  1492. key until it has confirmed that the key change actually
  1493. succeeded.
  1494. "
  1495. SYNTAX OCTET STRING
  1496. Blumenthal & Wijnen Standards Track [Page 37]
  1497. RFC 3414 USM for SNMPv3 December 2002
  1498. -- Statistics for the User-based Security Model **********************
  1499. usmStats OBJECT IDENTIFIER ::= { usmMIBObjects 1 }
  1500. usmStatsUnsupportedSecLevels OBJECT-TYPE
  1501. SYNTAX Counter32
  1502. MAX-ACCESS read-only
  1503. STATUS current
  1504. DESCRIPTION "The total number of packets received by the SNMP
  1505. engine which were dropped because they requested a
  1506. securityLevel that was unknown to the SNMP engine
  1507. or otherwise unavailable.
  1508. "
  1509. ::= { usmStats 1 }
  1510. usmStatsNotInTimeWindows OBJECT-TYPE
  1511. SYNTAX Counter32
  1512. MAX-ACCESS read-only
  1513. STATUS current
  1514. DESCRIPTION "The total number of packets received by the SNMP
  1515. engine which were dropped because they appeared
  1516. outside of the authoritative SNMP engine's window.
  1517. "
  1518. ::= { usmStats 2 }
  1519. usmStatsUnknownUserNames OBJECT-TYPE
  1520. SYNTAX Counter32
  1521. MAX-ACCESS read-only
  1522. STATUS current
  1523. DESCRIPTION "The total number of packets received by the SNMP
  1524. engine which were dropped because they referenced a
  1525. user that was not known to the SNMP engine.
  1526. "
  1527. ::= { usmStats 3 }
  1528. usmStatsUnknownEngineIDs OBJECT-TYPE
  1529. SYNTAX Counter32
  1530. MAX-ACCESS read-only
  1531. STATUS current
  1532. DESCRIPTION "The total number of packets received by the SNMP
  1533. engine which were dropped because they referenced an
  1534. snmpEngineID that was not known to the SNMP engine.
  1535. "
  1536. ::= { usmStats 4 }
  1537. usmStatsWrongDigests OBJECT-TYPE
  1538. Blumenthal & Wijnen Standards Track [Page 38]
  1539. RFC 3414 USM for SNMPv3 December 2002
  1540. SYNTAX Counter32
  1541. MAX-ACCESS read-only
  1542. STATUS current
  1543. DESCRIPTION "The total number of packets received by the SNMP
  1544. engine which were dropped because they didn't
  1545. contain the expected digest value.
  1546. "
  1547. ::= { usmStats 5 }
  1548. usmStatsDecryptionErrors OBJECT-TYPE
  1549. SYNTAX Counter32
  1550. MAX-ACCESS read-only
  1551. STATUS current
  1552. DESCRIPTION "The total number of packets received by the SNMP
  1553. engine which were dropped because they could not be
  1554. decrypted.
  1555. "
  1556. ::= { usmStats 6 }
  1557. -- The usmUser Group ************************************************
  1558. usmUser OBJECT IDENTIFIER ::= { usmMIBObjects 2 }
  1559. usmUserSpinLock OBJECT-TYPE
  1560. SYNTAX TestAndIncr
  1561. MAX-ACCESS read-write
  1562. STATUS current
  1563. DESCRIPTION "An advisory lock used to allow several cooperating
  1564. Command Generator Applications to coordinate their
  1565. use of facilities to alter secrets in the
  1566. usmUserTable.
  1567. "
  1568. ::= { usmUser 1 }
  1569. -- The table of valid users for the User-based Security Model ********
  1570. usmUserTable OBJECT-TYPE
  1571. SYNTAX SEQUENCE OF UsmUserEntry
  1572. MAX-ACCESS not-accessible
  1573. STATUS current
  1574. DESCRIPTION "The table of users configured in the SNMP engine's
  1575. Local Configuration Datastore (LCD).
  1576. To create a new user (i.e., to instantiate a new
  1577. conceptual row in this table), it is recommended to
  1578. follow this procedure:
  1579. 1) GET(usmUserSpinLock.0) and save in sValue.
  1580. Blumenthal & Wijnen Standards Track [Page 39]
  1581. RFC 3414 USM for SNMPv3 December 2002
  1582. 2) SET(usmUserSpinLock.0=sValue,
  1583. usmUserCloneFrom=templateUser,
  1584. usmUserStatus=createAndWait)
  1585. You should use a template user to clone from
  1586. which has the proper auth/priv protocol defined.
  1587. If the new user is to use privacy:
  1588. 3) generate the keyChange value based on the secret
  1589. privKey of the clone-from user and the secret key
  1590. to be used for the new user. Let us call this
  1591. pkcValue.
  1592. 4) GET(usmUserSpinLock.0) and save in sValue.
  1593. 5) SET(usmUserSpinLock.0=sValue,
  1594. usmUserPrivKeyChange=pkcValue
  1595. usmUserPublic=randomValue1)
  1596. 6) GET(usmUserPulic) and check it has randomValue1.
  1597. If not, repeat steps 4-6.
  1598. If the new user will never use privacy:
  1599. 7) SET(usmUserPrivProtocol=usmNoPrivProtocol)
  1600. If the new user is to use authentication:
  1601. 8) generate the keyChange value based on the secret
  1602. authKey of the clone-from user and the secret key
  1603. to be used for the new user. Let us call this
  1604. akcValue.
  1605. 9) GET(usmUserSpinLock.0) and save in sValue.
  1606. 10) SET(usmUserSpinLock.0=sValue,
  1607. usmUserAuthKeyChange=akcValue
  1608. usmUserPublic=randomValue2)
  1609. 11) GET(usmUserPulic) and check it has randomValue2.
  1610. If not, repeat steps 9-11.
  1611. If the new user will never use authentication:
  1612. 12) SET(usmUserAuthProtocol=usmNoAuthProtocol)
  1613. Finally, activate the new user:
  1614. 13) SET(usmUserStatus=active)
  1615. The new user should now be available and ready to be
  1616. used for SNMPv3 communication. Note however that access
  1617. to MIB data must be provided via configuration of the
  1618. SNMP-VIEW-BASED-ACM-MIB.
  1619. Blumenthal & Wijnen Standards Track [Page 40]
  1620. RFC 3414 USM for SNMPv3 December 2002
  1621. The use of usmUserSpinlock is to avoid conflicts with
  1622. another SNMP command generator application which may
  1623. also be acting on the usmUserTable.
  1624. "
  1625. ::= { usmUser 2 }
  1626. usmUserEntry OBJECT-TYPE
  1627. SYNTAX UsmUserEntry
  1628. MAX-ACCESS not-accessible
  1629. STATUS current
  1630. DESCRIPTION "A user configured in the SNMP engine's Local
  1631. Configuration Datastore (LCD) for the User-based
  1632. Security Model.
  1633. "
  1634. INDEX { usmUserEngineID,
  1635. usmUserName
  1636. }
  1637. ::= { usmUserTable 1 }
  1638. UsmUserEntry ::= SEQUENCE
  1639. {
  1640. usmUserEngineID SnmpEngineID,
  1641. usmUserName SnmpAdminString,
  1642. usmUserSecurityName SnmpAdminString,
  1643. usmUserCloneFrom RowPointer,
  1644. usmUserAuthProtocol AutonomousType,
  1645. usmUserAuthKeyChange KeyChange,
  1646. usmUserOwnAuthKeyChange KeyChange,
  1647. usmUserPrivProtocol AutonomousType,
  1648. usmUserPrivKeyChange KeyChange,
  1649. usmUserOwnPrivKeyChange KeyChange,
  1650. usmUserPublic OCTET STRING,
  1651. usmUserStorageType StorageType,
  1652. usmUserStatus RowStatus
  1653. }
  1654. usmUserEngineID OBJECT-TYPE
  1655. SYNTAX SnmpEngineID
  1656. MAX-ACCESS not-accessible
  1657. STATUS current
  1658. DESCRIPTION "An SNMP engine's administratively-unique identifier.
  1659. In a simple agent, this value is always that agent's
  1660. own snmpEngineID value.
  1661. The value can also take the value of the snmpEngineID
  1662. of a remote SNMP engine with which this user can
  1663. communicate.
  1664. Blumenthal & Wijnen Standards Track [Page 41]
  1665. RFC 3414 USM for SNMPv3 December 2002
  1666. "
  1667. ::= { usmUserEntry 1 }
  1668. usmUserName OBJECT-TYPE
  1669. SYNTAX SnmpAdminString (SIZE(1..32))
  1670. MAX-ACCESS not-accessible
  1671. STATUS current
  1672. DESCRIPTION "A human readable string representing the name of
  1673. the user.
  1674. This is the (User-based Security) Model dependent
  1675. security ID.
  1676. "
  1677. ::= { usmUserEntry 2 }
  1678. usmUserSecurityName OBJECT-TYPE
  1679. SYNTAX SnmpAdminString
  1680. MAX-ACCESS read-only
  1681. STATUS current
  1682. DESCRIPTION "A human readable string representing the user in
  1683. Security Model independent format.
  1684. The default transformation of the User-based Security
  1685. Model dependent security ID to the securityName and
  1686. vice versa is the identity function so that the
  1687. securityName is the same as the userName.
  1688. "
  1689. ::= { usmUserEntry 3 }
  1690. usmUserCloneFrom OBJECT-TYPE
  1691. SYNTAX RowPointer
  1692. MAX-ACCESS read-create
  1693. STATUS current
  1694. DESCRIPTION "A pointer to another conceptual row in this
  1695. usmUserTable. The user in this other conceptual
  1696. row is called the clone-from user.
  1697. When a new user is created (i.e., a new conceptual
  1698. row is instantiated in this table), the privacy and
  1699. authentication parameters of the new user must be
  1700. cloned from its clone-from user. These parameters are:
  1701. - authentication protocol (usmUserAuthProtocol)
  1702. - privacy protocol (usmUserPrivProtocol)
  1703. They will be copied regardless of what the current
  1704. value is.
  1705. Cloning also causes the initial values of the secret
  1706. authentication key (authKey) and the secret encryption
  1707. Blumenthal & Wijnen Standards Track [Page 42]
  1708. RFC 3414 USM for SNMPv3 December 2002
  1709. key (privKey) of the new user to be set to the same
  1710. values as the corresponding secrets of the clone-from
  1711. user to allow the KeyChange process to occur as
  1712. required during user creation.
  1713. The first time an instance of this object is set by
  1714. a management operation (either at or after its
  1715. instantiation), the cloning process is invoked.
  1716. Subsequent writes are successful but invoke no
  1717. action to be taken by the receiver.
  1718. The cloning process fails with an 'inconsistentName'
  1719. error if the conceptual row representing the
  1720. clone-from user does not exist or is not in an active
  1721. state when the cloning process is invoked.
  1722. When this object is read, the ZeroDotZero OID
  1723. is returned.
  1724. "
  1725. ::= { usmUserEntry 4 }
  1726. usmUserAuthProtocol OBJECT-TYPE
  1727. SYNTAX AutonomousType
  1728. MAX-ACCESS read-create
  1729. STATUS current
  1730. DESCRIPTION "An indication of whether messages sent on behalf of
  1731. this user to/from the SNMP engine identified by
  1732. usmUserEngineID, can be authenticated, and if so,
  1733. the type of authentication protocol which is used.
  1734. An instance of this object is created concurrently
  1735. with the creation of any other object instance for
  1736. the same user (i.e., as part of the processing of
  1737. the set operation which creates the first object
  1738. instance in the same conceptual row).
  1739. If an initial set operation (i.e. at row creation time)
  1740. tries to set a value for an unknown or unsupported
  1741. protocol, then a 'wrongValue' error must be returned.
  1742. The value will be overwritten/set when a set operation
  1743. is performed on the corresponding instance of
  1744. usmUserCloneFrom.
  1745. Once instantiated, the value of such an instance of
  1746. this object can only be changed via a set operation to
  1747. the value of the usmNoAuthProtocol.
  1748. If a set operation tries to change the value of an
  1749. Blumenthal & Wijnen Standards Track [Page 43]
  1750. RFC 3414 USM for SNMPv3 December 2002
  1751. existing instance of this object to any value other
  1752. than usmNoAuthProtocol, then an 'inconsistentValue'
  1753. error must be returned.
  1754. If a set operation tries to set the value to the
  1755. usmNoAuthProtocol while the usmUserPrivProtocol value
  1756. in the same row is not equal to usmNoPrivProtocol,
  1757. then an 'inconsistentValue' error must be returned.
  1758. That means that an SNMP command generator application
  1759. must first ensure that the usmUserPrivProtocol is set
  1760. to the usmNoPrivProtocol value before it can set
  1761. the usmUserAuthProtocol value to usmNoAuthProtocol.
  1762. "
  1763. DEFVAL { usmNoAuthProtocol }
  1764. ::= { usmUserEntry 5 }
  1765. usmUserAuthKeyChange OBJECT-TYPE
  1766. SYNTAX KeyChange -- typically (SIZE (0 | 32)) for HMACMD5
  1767. -- typically (SIZE (0 | 40)) for HMACSHA
  1768. MAX-ACCESS read-create
  1769. STATUS current
  1770. DESCRIPTION "An object, which when modified, causes the secret
  1771. authentication key used for messages sent on behalf
  1772. of this user to/from the SNMP engine identified by
  1773. usmUserEngineID, to be modified via a one-way
  1774. function.
  1775. The associated protocol is the usmUserAuthProtocol.
  1776. The associated secret key is the user's secret
  1777. authentication key (authKey). The associated hash
  1778. algorithm is the algorithm used by the user's
  1779. usmUserAuthProtocol.
  1780. When creating a new user, it is an 'inconsistentName'
  1781. error for a set operation to refer to this object
  1782. unless it is previously or concurrently initialized
  1783. through a set operation on the corresponding instance
  1784. of usmUserCloneFrom.
  1785. When the value of the corresponding usmUserAuthProtocol
  1786. is usmNoAuthProtocol, then a set is successful, but
  1787. effectively is a no-op.
  1788. When this object is read, the zero-length (empty)
  1789. string is returned.
  1790. The recommended way to do a key change is as follows:
  1791. Blumenthal & Wijnen Standards Track [Page 44]
  1792. RFC 3414 USM for SNMPv3 December 2002
  1793. 1) GET(usmUserSpinLock.0) and save in sValue.
  1794. 2) generate the keyChange value based on the old
  1795. (existing) secret key and the new secret key,
  1796. let us call this kcValue.
  1797. If you do the key change on behalf of another user:
  1798. 3) SET(usmUserSpinLock.0=sValue,
  1799. usmUserAuthKeyChange=kcValue
  1800. usmUserPublic=randomValue)
  1801. If you do the key change for yourself:
  1802. 4) SET(usmUserSpinLock.0=sValue,
  1803. usmUserOwnAuthKeyChange=kcValue
  1804. usmUserPublic=randomValue)
  1805. If you get a response with error-status of noError,
  1806. then the SET succeeded and the new key is active.
  1807. If you do not get a response, then you can issue a
  1808. GET(usmUserPublic) and check if the value is equal
  1809. to the randomValue you did send in the SET. If so, then
  1810. the key change succeeded and the new key is active
  1811. (probably the response got lost). If not, then the SET
  1812. request probably never reached the target and so you
  1813. can start over with the procedure above.
  1814. "
  1815. DEFVAL { ''H } -- the empty string
  1816. ::= { usmUserEntry 6 }
  1817. usmUserOwnAuthKeyChange OBJECT-TYPE
  1818. SYNTAX KeyChange -- typically (SIZE (0 | 32)) for HMACMD5
  1819. -- typically (SIZE (0 | 40)) for HMACSHA
  1820. MAX-ACCESS read-create
  1821. STATUS current
  1822. DESCRIPTION "Behaves exactly as usmUserAuthKeyChange, with one
  1823. notable difference: in order for the set operation
  1824. to succeed, the usmUserName of the operation
  1825. requester must match the usmUserName that
  1826. indexes the row which is targeted by this
  1827. operation.
  1828. In addition, the USM security model must be
  1829. used for this operation.
  1830. The idea here is that access to this column can be
  1831. public, since it will only allow a user to change
  1832. his own secret authentication key (authKey).
  1833. Note that this can only be done once the row is active.
  1834. Blumenthal & Wijnen Standards Track [Page 45]
  1835. RFC 3414 USM for SNMPv3 December 2002
  1836. When a set is received and the usmUserName of the
  1837. requester is not the same as the umsUserName that
  1838. indexes the row which is targeted by this operation,
  1839. then a 'noAccess' error must be returned.
  1840. When a set is received and the security model in use
  1841. is not USM, then a 'noAccess' error must be returned.
  1842. "
  1843. DEFVAL { ''H } -- the empty string
  1844. ::= { usmUserEntry 7 }
  1845. usmUserPrivProtocol OBJECT-TYPE
  1846. SYNTAX AutonomousType
  1847. MAX-ACCESS read-create
  1848. STATUS current
  1849. DESCRIPTION "An indication of whether messages sent on behalf of
  1850. this user to/from the SNMP engine identified by
  1851. usmUserEngineID, can be protected from disclosure,
  1852. and if so, the type of privacy protocol which is used.
  1853. An instance of this object is created concurrently
  1854. with the creation of any other object instance for
  1855. the same user (i.e., as part of the processing of
  1856. the set operation which creates the first object
  1857. instance in the same conceptual row).
  1858. If an initial set operation (i.e. at row creation time)
  1859. tries to set a value for an unknown or unsupported
  1860. protocol, then a 'wrongValue' error must be returned.
  1861. The value will be overwritten/set when a set operation
  1862. is performed on the corresponding instance of
  1863. usmUserCloneFrom.
  1864. Once instantiated, the value of such an instance of
  1865. this object can only be changed via a set operation to
  1866. the value of the usmNoPrivProtocol.
  1867. If a set operation tries to change the value of an
  1868. existing instance of this object to any value other
  1869. than usmNoPrivProtocol, then an 'inconsistentValue'
  1870. error must be returned.
  1871. Note that if any privacy protocol is used, then you
  1872. must also use an authentication protocol. In other
  1873. words, if usmUserPrivProtocol is set to anything else
  1874. than usmNoPrivProtocol, then the corresponding instance
  1875. of usmUserAuthProtocol cannot have a value of
  1876. Blumenthal & Wijnen Standards Track [Page 46]
  1877. RFC 3414 USM for SNMPv3 December 2002
  1878. usmNoAuthProtocol. If it does, then an
  1879. 'inconsistentValue' error must be returned.
  1880. "
  1881. DEFVAL { usmNoPrivProtocol }
  1882. ::= { usmUserEntry 8 }
  1883. usmUserPrivKeyChange OBJECT-TYPE
  1884. SYNTAX KeyChange -- typically (SIZE (0 | 32)) for DES
  1885. MAX-ACCESS read-create
  1886. STATUS current
  1887. DESCRIPTION "An object, which when modified, causes the secret
  1888. encryption key used for messages sent on behalf
  1889. of this user to/from the SNMP engine identified by
  1890. usmUserEngineID, to be modified via a one-way
  1891. function.
  1892. The associated protocol is the usmUserPrivProtocol.
  1893. The associated secret key is the user's secret
  1894. privacy key (privKey). The associated hash
  1895. algorithm is the algorithm used by the user's
  1896. usmUserAuthProtocol.
  1897. When creating a new user, it is an 'inconsistentName'
  1898. error for a set operation to refer to this object
  1899. unless it is previously or concurrently initialized
  1900. through a set operation on the corresponding instance
  1901. of usmUserCloneFrom.
  1902. When the value of the corresponding usmUserPrivProtocol
  1903. is usmNoPrivProtocol, then a set is successful, but
  1904. effectively is a no-op.
  1905. When this object is read, the zero-length (empty)
  1906. string is returned.
  1907. See the description clause of usmUserAuthKeyChange for
  1908. a recommended procedure to do a key change.
  1909. "
  1910. DEFVAL { ''H } -- the empty string
  1911. ::= { usmUserEntry 9 }
  1912. usmUserOwnPrivKeyChange OBJECT-TYPE
  1913. SYNTAX KeyChange -- typically (SIZE (0 | 32)) for DES
  1914. MAX-ACCESS read-create
  1915. STATUS current
  1916. DESCRIPTION "Behaves exactly as usmUserPrivKeyChange, with one
  1917. notable difference: in order for the Set operation
  1918. to succeed, the usmUserName of the operation
  1919. requester must match the usmUserName that indexes
  1920. Blumenthal & Wijnen Standards Track [Page 47]
  1921. RFC 3414 USM for SNMPv3 December 2002
  1922. the row which is targeted by this operation.
  1923. In addition, the USM security model must be
  1924. used for this operation.
  1925. The idea here is that access to this column can be
  1926. public, since it will only allow a user to change
  1927. his own secret privacy key (privKey).
  1928. Note that this can only be done once the row is active.
  1929. When a set is received and the usmUserName of the
  1930. requester is not the same as the umsUserName that
  1931. indexes the row which is targeted by this operation,
  1932. then a 'noAccess' error must be returned.
  1933. When a set is received and the security model in use
  1934. is not USM, then a 'noAccess' error must be returned.
  1935. "
  1936. DEFVAL { ''H } -- the empty string
  1937. ::= { usmUserEntry 10 }
  1938. usmUserPublic OBJECT-TYPE
  1939. SYNTAX OCTET STRING (SIZE(0..32))
  1940. MAX-ACCESS read-create
  1941. STATUS current
  1942. DESCRIPTION "A publicly-readable value which can be written as part
  1943. of the procedure for changing a user's secret
  1944. authentication and/or privacy key, and later read to
  1945. determine whether the change of the secret was
  1946. effected.
  1947. "
  1948. DEFVAL { ''H } -- the empty string
  1949. ::= { usmUserEntry 11 }
  1950. usmUserStorageType OBJECT-TYPE
  1951. SYNTAX StorageType
  1952. MAX-ACCESS read-create
  1953. STATUS current
  1954. DESCRIPTION "The storage type for this conceptual row.
  1955. Conceptual rows having the value 'permanent' must
  1956. allow write-access at a minimum to:
  1957. - usmUserAuthKeyChange, usmUserOwnAuthKeyChange
  1958. and usmUserPublic for a user who employs
  1959. authentication, and
  1960. - usmUserPrivKeyChange, usmUserOwnPrivKeyChange
  1961. and usmUserPublic for a user who employs
  1962. privacy.
  1963. Blumenthal & Wijnen Standards Track [Page 48]
  1964. RFC 3414 USM for SNMPv3 December 2002
  1965. Note that any user who employs authentication or
  1966. privacy must allow its secret(s) to be updated and
  1967. thus cannot be 'readOnly'.
  1968. If an initial set operation tries to set the value to
  1969. 'readOnly' for a user who employs authentication or
  1970. privacy, then an 'inconsistentValue' error must be
  1971. returned. Note that if the value has been previously
  1972. set (implicit or explicit) to any value, then the rules
  1973. as defined in the StorageType Textual Convention apply.
  1974. It is an implementation issue to decide if a SET for
  1975. a readOnly or permanent row is accepted at all. In some
  1976. contexts this may make sense, in others it may not. If
  1977. a SET for a readOnly or permanent row is not accepted
  1978. at all, then a 'wrongValue' error must be returned.
  1979. "
  1980. DEFVAL { nonVolatile }
  1981. ::= { usmUserEntry 12 }
  1982. usmUserStatus OBJECT-TYPE
  1983. SYNTAX RowStatus
  1984. MAX-ACCESS read-create
  1985. STATUS current
  1986. DESCRIPTION "The status of this conceptual row.
  1987. Until instances of all corresponding columns are
  1988. appropriately configured, the value of the
  1989. corresponding instance of the usmUserStatus column
  1990. is 'notReady'.
  1991. In particular, a newly created row for a user who
  1992. employs authentication, cannot be made active until the
  1993. corresponding usmUserCloneFrom and usmUserAuthKeyChange
  1994. have been set.
  1995. Further, a newly created row for a user who also
  1996. employs privacy, cannot be made active until the
  1997. usmUserPrivKeyChange has been set.
  1998. The RowStatus TC [RFC2579] requires that this
  1999. DESCRIPTION clause states under which circumstances
  2000. other objects in this row can be modified:
  2001. The value of this object has no effect on whether
  2002. other objects in this conceptual row can be modified,
  2003. except for usmUserOwnAuthKeyChange and
  2004. usmUserOwnPrivKeyChange. For these 2 objects, the
  2005. Blumenthal & Wijnen Standards Track [Page 49]
  2006. RFC 3414 USM for SNMPv3 December 2002
  2007. value of usmUserStatus MUST be active.
  2008. "
  2009. ::= { usmUserEntry 13 }
  2010. -- Conformance Information *******************************************
  2011. usmMIBCompliances OBJECT IDENTIFIER ::= { usmMIBConformance 1 }
  2012. usmMIBGroups OBJECT IDENTIFIER ::= { usmMIBConformance 2 }
  2013. -- Compliance statements
  2014. usmMIBCompliance MODULE-COMPLIANCE
  2015. STATUS current
  2016. DESCRIPTION "The compliance statement for SNMP engines which
  2017. implement the SNMP-USER-BASED-SM-MIB.
  2018. "
  2019. MODULE -- this module
  2020. MANDATORY-GROUPS { usmMIBBasicGroup }
  2021. OBJECT usmUserAuthProtocol
  2022. MIN-ACCESS read-only
  2023. DESCRIPTION "Write access is not required."
  2024. OBJECT usmUserPrivProtocol
  2025. MIN-ACCESS read-only
  2026. DESCRIPTION "Write access is not required."
  2027. ::= { usmMIBCompliances 1 }
  2028. -- Units of compliance
  2029. usmMIBBasicGroup OBJECT-GROUP
  2030. OBJECTS {
  2031. usmStatsUnsupportedSecLevels,
  2032. usmStatsNotInTimeWindows,
  2033. usmStatsUnknownUserNames,
  2034. usmStatsUnknownEngineIDs,
  2035. usmStatsWrongDigests,
  2036. usmStatsDecryptionErrors,
  2037. usmUserSpinLock,
  2038. usmUserSecurityName,
  2039. usmUserCloneFrom,
  2040. usmUserAuthProtocol,
  2041. usmUserAuthKeyChange,
  2042. usmUserOwnAuthKeyChange,
  2043. usmUserPrivProtocol,
  2044. usmUserPrivKeyChange,
  2045. usmUserOwnPrivKeyChange,
  2046. Blumenthal & Wijnen Standards Track [Page 50]
  2047. RFC 3414 USM for SNMPv3 December 2002
  2048. usmUserPublic,
  2049. usmUserStorageType,
  2050. usmUserStatus
  2051. }
  2052. STATUS current
  2053. DESCRIPTION "A collection of objects providing for configuration
  2054. of an SNMP engine which implements the SNMP
  2055. User-based Security Model.
  2056. "
  2057. ::= { usmMIBGroups 1 }
  2058. END
  2059. 6. HMAC-MD5-96 Authentication Protocol
  2060. This section describes the HMAC-MD5-96 authentication protocol. This
  2061. authentication protocol is the first defined for the User-based
  2062. Security Model. It uses MD5 hash-function which is described in
  2063. [RFC1321], in HMAC mode described in [RFC2104], truncating the output
  2064. to 96 bits.
  2065. This protocol is identified by usmHMACMD5AuthProtocol.
  2066. Over time, other authentication protocols may be defined either as a
  2067. replacement of this protocol or in addition to this protocol.
  2068. 6.1. Mechanisms
  2069. - In support of data integrity, a message digest algorithm is
  2070. required. A digest is calculated over an appropriate portion of an
  2071. SNMP message and included as part of the message sent to the
  2072. recipient.
  2073. - In support of data origin authentication and data integrity, a
  2074. secret value is prepended to SNMP message prior to computing the
  2075. digest; the calculated digest is partially inserted into the SNMP
  2076. message prior to transmission, and the prepended value is not
  2077. transmitted. The secret value is shared by all SNMP engines
  2078. authorized to originate messages on behalf of the appropriate user.
  2079. 6.1.1. Digest Authentication Mechanism
  2080. The Digest Authentication Mechanism defined in this memo provides
  2081. for:
  2082. - verification of the integrity of a received message, i.e., the
  2083. message received is the message sent.
  2084. Blumenthal & Wijnen Standards Track [Page 51]
  2085. RFC 3414 USM for SNMPv3 December 2002
  2086. The integrity of the message is protected by computing a digest
  2087. over an appropriate portion of the message. The digest is computed
  2088. by the originator of the message, transmitted with the message, and
  2089. verified by the recipient of the message.
  2090. - verification of the user on whose behalf the message was generated.
  2091. A secret value known only to SNMP engines authorized to generate
  2092. messages on behalf of a user is used in HMAC mode (see [RFC2104]).
  2093. It also recommends the hash-function output used as Message
  2094. Authentication Code, to be truncated.
  2095. This protocol uses the MD5 [RFC1321] message digest algorithm. A
  2096. 128-bit MD5 digest is calculated in a special (HMAC) way over the
  2097. designated portion of an SNMP message and the first 96 bits of this
  2098. digest is included as part of the message sent to the recipient. The
  2099. size of the digest carried in a message is 12 octets. The size of
  2100. the private authentication key (the secret) is 16 octets. For the
  2101. details see section 6.3.
  2102. 6.2. Elements of the Digest Authentication Protocol
  2103. This section contains definitions required to realize the
  2104. authentication module defined in this section of this memo.
  2105. 6.2.1. Users
  2106. Authentication using this authentication protocol makes use of a
  2107. defined set of userNames. For any user on whose behalf a message
  2108. must be authenticated at a particular SNMP engine, that SNMP engine
  2109. must have knowledge of that user. An SNMP engine that wishes to
  2110. communicate with another SNMP engine must also have knowledge of a
  2111. user known to that engine, including knowledge of the applicable
  2112. attributes of that user.
  2113. A user and its attributes are defined as follows:
  2114. <userName>
  2115. A string representing the name of the user.
  2116. <authKey>
  2117. A user's secret key to be used when calculating a digest.
  2118. It MUST be 16 octets long for MD5.
  2119. Blumenthal & Wijnen Standards Track [Page 52]
  2120. RFC 3414 USM for SNMPv3 December 2002
  2121. 6.2.2. msgAuthoritativeEngineID
  2122. The msgAuthoritativeEngineID value contained in an authenticated
  2123. message specifies the authoritative SNMP engine for that particular
  2124. message (see the definition of SnmpEngineID in the SNMP Architecture
  2125. document [RFC3411]).
  2126. The user's (private) authentication key is normally different at each
  2127. authoritative SNMP engine and so the snmpEngineID is used to select
  2128. the proper key for the authentication process.
  2129. 6.2.3. SNMP Messages Using this Authentication Protocol
  2130. Messages using this authentication protocol carry a
  2131. msgAuthenticationParameters field as part of the
  2132. msgSecurityParameters. For this protocol, the
  2133. msgAuthenticationParameters field is the serialized OCTET STRING
  2134. representing the first 12 octets of the HMAC-MD5-96 output done over
  2135. the wholeMsg.
  2136. The digest is calculated over the wholeMsg so if a message is
  2137. authenticated, that also means that all the fields in the message are
  2138. intact and have not been tampered with.
  2139. 6.2.4. Services provided by the HMAC-MD5-96 Authentication Module
  2140. This section describes the inputs and outputs that the HMAC-MD5-96
  2141. Authentication module expects and produces when the User-based
  2142. Security module calls the HMAC-MD5-96 Authentication module for
  2143. services.
  2144. 6.2.4.1. Services for Generating an Outgoing SNMP Message
  2145. The HMAC-MD5-96 authentication protocol assumes that the selection of
  2146. the authKey is done by the caller and that the caller passes the
  2147. secret key to be used.
  2148. Upon completion the authentication module returns statusInformation
  2149. and, if the message digest was correctly calculated, the wholeMsg
  2150. with the digest inserted at the proper place. The abstract service
  2151. primitive is:
  2152. statusInformation = -- success or failure
  2153. authenticateOutgoingMsg(
  2154. IN authKey -- secret key for authentication
  2155. IN wholeMsg -- unauthenticated complete message
  2156. OUT authenticatedWholeMsg -- complete authenticated message
  2157. )
  2158. Blumenthal & Wijnen Standards Track [Page 53]
  2159. RFC 3414 USM for SNMPv3 December 2002
  2160. The abstract data elements are:
  2161. statusInformation
  2162. An indication of whether the authentication process was successful.
  2163. If not it is an indication of the problem.
  2164. authKey
  2165. The secret key to be used by the authentication algorithm. The
  2166. length of this key MUST be 16 octets.
  2167. wholeMsg
  2168. The message to be authenticated.
  2169. authenticatedWholeMsg
  2170. The authenticated message (including inserted digest) on output.
  2171. Note, that authParameters field is filled by the authentication
  2172. module and this module and this field should be already present in
  2173. the wholeMsg before the Message Authentication Code (MAC) is
  2174. generated.
  2175. 6.2.4.2. Services for Processing an Incoming SNMP Message
  2176. The HMAC-MD5-96 authentication protocol assumes that the selection of
  2177. the authKey is done by the caller and that the caller passes the
  2178. secret key to be used.
  2179. Upon completion the authentication module returns statusInformation
  2180. and, if the message digest was correctly calculated, the wholeMsg as
  2181. it was processed. The abstract service primitive is:
  2182. statusInformation = -- success or failure
  2183. authenticateIncomingMsg(
  2184. IN authKey -- secret key for authentication
  2185. IN authParameters -- as received on the wire
  2186. IN wholeMsg -- as received on the wire
  2187. OUT authenticatedWholeMsg -- complete authenticated message
  2188. )
  2189. The abstract data elements are:
  2190. statusInformation
  2191. An indication of whether the authentication process was successful.
  2192. If not it is an indication of the problem.
  2193. authKey
  2194. The secret key to be used by the authentication algorithm. The
  2195. length of this key MUST be 16 octets.
  2196. Blumenthal & Wijnen Standards Track [Page 54]
  2197. RFC 3414 USM for SNMPv3 December 2002
  2198. authParameters
  2199. The authParameters from the incoming message.
  2200. wholeMsg
  2201. The message to be authenticated on input and the authenticated
  2202. message on output.
  2203. authenticatedWholeMsg
  2204. The whole message after the authentication check is complete.
  2205. 6.3. Elements of Procedure
  2206. This section describes the procedures for the HMAC-MD5-96
  2207. authentication protocol.
  2208. 6.3.1. Processing an Outgoing Message
  2209. This section describes the procedure followed by an SNMP engine
  2210. whenever it must authenticate an outgoing message using the
  2211. usmHMACMD5AuthProtocol.
  2212. 1) The msgAuthenticationParameters field is set to the serialization,
  2213. according to the rules in [RFC3417], of an OCTET STRING containing
  2214. 12 zero octets.
  2215. 2) From the secret authKey, two keys K1 and K2 are derived:
  2216. a) extend the authKey to 64 octets by appending 48 zero octets;
  2217. save it as extendedAuthKey
  2218. b) obtain IPAD by replicating the octet 0x36 64 times;
  2219. c) obtain K1 by XORing extendedAuthKey with IPAD;
  2220. d) obtain OPAD by replicating the octet 0x5C 64 times;
  2221. e) obtain K2 by XORing extendedAuthKey with OPAD.
  2222. 3) Prepend K1 to the wholeMsg and calculate MD5 digest over it
  2223. according to [RFC1321].
  2224. 4) Prepend K2 to the result of the step 4 and calculate MD5 digest
  2225. over it according to [RFC1321]. Take the first 12 octets of the
  2226. final digest - this is Message Authentication Code (MAC).
  2227. 5) Replace the msgAuthenticationParameters field with MAC obtained in
  2228. the step 4.
  2229. Blumenthal & Wijnen Standards Track [Page 55]
  2230. RFC 3414 USM for SNMPv3 December 2002
  2231. 6) The authenticatedWholeMsg is then returned to the caller together
  2232. with statusInformation indicating success.
  2233. 6.3.2. Processing an Incoming Message
  2234. This section describes the procedure followed by an SNMP engine
  2235. whenever it must authenticate an incoming message using the
  2236. usmHMACMD5AuthProtocol.
  2237. 1) If the digest received in the msgAuthenticationParameters field is
  2238. not 12 octets long, then an failure and an errorIndication
  2239. (authenticationError) is returned to the calling module.
  2240. 2) The MAC received in the msgAuthenticationParameters field is
  2241. saved.
  2242. 3) The digest in the msgAuthenticationParameters field is replaced by
  2243. the 12 zero octets.
  2244. 4) From the secret authKey, two keys K1 and K2 are derived:
  2245. a) extend the authKey to 64 octets by appending 48 zero octets;
  2246. save it as extendedAuthKey
  2247. b) obtain IPAD by replicating the octet 0x36 64 times;
  2248. c) obtain K1 by XORing extendedAuthKey with IPAD;
  2249. d) obtain OPAD by replicating the octet 0x5C 64 times;
  2250. e) obtain K2 by XORing extendedAuthKey with OPAD.
  2251. 5) The MAC is calculated over the wholeMsg:
  2252. a) prepend K1 to the wholeMsg and calculate the MD5 digest over
  2253. it;
  2254. b) prepend K2 to the result of step 5.a and calculate the MD5
  2255. digest over it;
  2256. c) first 12 octets of the result of step 5.b is the MAC.
  2257. The msgAuthenticationParameters field is replaced with the MAC
  2258. value that was saved in step 2.
  2259. Blumenthal & Wijnen Standards Track [Page 56]
  2260. RFC 3414 USM for SNMPv3 December 2002
  2261. 6) Then the newly calculated MAC is compared with the MAC saved in
  2262. step 2. If they do not match, then an failure and an
  2263. errorIndication (authenticationFailure) is returned to the calling
  2264. module.
  2265. 7) The authenticatedWholeMsg and statusInformation indicating success
  2266. are then returned to the caller.
  2267. 7. HMAC-SHA-96 Authentication Protocol
  2268. This section describes the HMAC-SHA-96 authentication protocol. This
  2269. protocol uses the SHA hash-function which is described in [SHA-NIST],
  2270. in HMAC mode described in [RFC2104], truncating the output to 96
  2271. bits.
  2272. This protocol is identified by usmHMACSHAAuthProtocol.
  2273. Over time, other authentication protocols may be defined either as a
  2274. replacement of this protocol or in addition to this protocol.
  2275. 7.1. Mechanisms
  2276. - In support of data integrity, a message digest algorithm is
  2277. required. A digest is calculated over an appropriate portion of an
  2278. SNMP message and included as part of the message sent to the
  2279. recipient.
  2280. - In support of data origin authentication and data integrity, a
  2281. secret value is prepended to the SNMP message prior to computing
  2282. the digest; the calculated digest is then partially inserted into
  2283. the message prior to transmission. The prepended secret is not
  2284. transmitted. The secret value is shared by all SNMP engines
  2285. authorized to originate messages on behalf of the appropriate user.
  2286. 7.1.1. Digest Authentication Mechanism
  2287. The Digest Authentication Mechanism defined in this memo provides
  2288. for:
  2289. - verification of the integrity of a received message, i.e., the
  2290. message received is the message sent.
  2291. The integrity of the message is protected by computing a digest
  2292. over an appropriate portion of the message. The digest is computed
  2293. by the originator of the message, transmitted with the message, and
  2294. verified by the recipient of the message.
  2295. Blumenthal & Wijnen Standards Track [Page 57]
  2296. RFC 3414 USM for SNMPv3 December 2002
  2297. - verification of the user on whose behalf the message was generated.
  2298. A secret value known only to SNMP engines authorized to generate
  2299. messages on behalf of a user is used in HMAC mode (see [RFC2104]).
  2300. It also recommends the hash-function output used as Message
  2301. Authentication Code, to be truncated.
  2302. This mechanism uses the SHA [SHA-NIST] message digest algorithm. A
  2303. 160-bit SHA digest is calculated in a special (HMAC) way over the
  2304. designated portion of an SNMP message and the first 96 bits of this
  2305. digest is included as part of the message sent to the recipient. The
  2306. size of the digest carried in a message is 12 octets. The size of
  2307. the private authentication key (the secret) is 20 octets. For the
  2308. details see section 7.3.
  2309. 7.2. Elements of the HMAC-SHA-96 Authentication Protocol
  2310. This section contains definitions required to realize the
  2311. authentication module defined in this section of this memo.
  2312. 7.2.1. Users
  2313. Authentication using this authentication protocol makes use of a
  2314. defined set of userNames. For any user on whose behalf a message
  2315. must be authenticated at a particular SNMP engine, that SNMP engine
  2316. must have knowledge of that user. An SNMP engine that wishes to
  2317. communicate with another SNMP engine must also have knowledge of a
  2318. user known to that engine, including knowledge of the applicable
  2319. attributes of that user.
  2320. A user and its attributes are defined as follows:
  2321. <userName>
  2322. A string representing the name of the user.
  2323. <authKey>
  2324. A user's secret key to be used when calculating a digest.
  2325. It MUST be 20 octets long for SHA.
  2326. 7.2.2. msgAuthoritativeEngineID
  2327. The msgAuthoritativeEngineID value contained in an authenticated
  2328. message specifies the authoritative SNMP engine for that particular
  2329. message (see the definition of SnmpEngineID in the SNMP Architecture
  2330. document [RFC3411]).
  2331. The user's (private) authentication key is normally different at each
  2332. authoritative SNMP engine and so the snmpEngineID is used to select
  2333. the proper key for the authentication process.
  2334. Blumenthal & Wijnen Standards Track [Page 58]
  2335. RFC 3414 USM for SNMPv3 December 2002
  2336. 7.2.3. SNMP Messages Using this Authentication Protocol
  2337. Messages using this authentication protocol carry a
  2338. msgAuthenticationParameters field as part of the
  2339. msgSecurityParameters. For this protocol, the
  2340. msgAuthenticationParameters field is the serialized OCTET STRING
  2341. representing the first 12 octets of HMAC-SHA-96 output done over the
  2342. wholeMsg.
  2343. The digest is calculated over the wholeMsg so if a message is
  2344. authenticated, that also means that all the fields in the message are
  2345. intact and have not been tampered with.
  2346. 7.2.4. Services Provided by the HMAC-SHA-96 Authentication Module
  2347. This section describes the inputs and outputs that the HMAC-SHA-96
  2348. Authentication module expects and produces when the User-based
  2349. Security module calls the HMAC-SHA-96 Authentication module for
  2350. services.
  2351. 7.2.4.1. Services for Generating an Outgoing SNMP Message
  2352. HMAC-SHA-96 authentication protocol assumes that the selection of the
  2353. authKey is done by the caller and that the caller passes the secret
  2354. key to be used.
  2355. Upon completion the authentication module returns statusInformation
  2356. and, if the message digest was correctly calculated, the wholeMsg
  2357. with the digest inserted at the proper place. The abstract service
  2358. primitive is:
  2359. statusInformation = -- success or failure
  2360. authenticateOutgoingMsg(
  2361. IN authKey -- secret key for authentication
  2362. IN wholeMsg -- unauthenticated complete message
  2363. OUT authenticatedWholeMsg -- complete authenticated message
  2364. )
  2365. The abstract data elements are:
  2366. statusInformation
  2367. An indication of whether the authentication process was successful.
  2368. If not it is an indication of the problem.
  2369. authKey
  2370. The secret key to be used by the authentication algorithm. The
  2371. length of this key MUST be 20 octets.
  2372. Blumenthal & Wijnen Standards Track [Page 59]
  2373. RFC 3414 USM for SNMPv3 December 2002
  2374. wholeMsg
  2375. The message to be authenticated.
  2376. authenticatedWholeMsg
  2377. The authenticated message (including inserted digest) on output.
  2378. Note, that authParameters field is filled by the authentication
  2379. module and this field should be already present in the wholeMsg
  2380. before the Message Authentication Code (MAC) is generated.
  2381. 7.2.4.2. Services for Processing an Incoming SNMP Message
  2382. HMAC-SHA-96 authentication protocol assumes that the selection of the
  2383. authKey is done by the caller and that the caller passes the secret
  2384. key to be used.
  2385. Upon completion the authentication module returns statusInformation
  2386. and, if the message digest was correctly calculated, the wholeMsg as
  2387. it was processed. The abstract service primitive is:
  2388. statusInformation = -- success or failure
  2389. authenticateIncomingMsg(
  2390. IN authKey -- secret key for authentication
  2391. IN authParameters -- as received on the wire
  2392. IN wholeMsg -- as received on the wire
  2393. OUT authenticatedWholeMsg -- complete authenticated message
  2394. )
  2395. The abstract data elements are:
  2396. statusInformation
  2397. An indication of whether the authentication process was successful.
  2398. If not it is an indication of the problem.
  2399. authKey
  2400. The secret key to be used by the authentication algorithm. The
  2401. length of this key MUST be 20 octets.
  2402. authParameters
  2403. The authParameters from the incoming message.
  2404. wholeMsg
  2405. The message to be authenticated on input and the authenticated
  2406. message on output.
  2407. authenticatedWholeMsg
  2408. The whole message after the authentication check is complete.
  2409. Blumenthal & Wijnen Standards Track [Page 60]
  2410. RFC 3414 USM for SNMPv3 December 2002
  2411. 7.3. Elements of Procedure
  2412. This section describes the procedures for the HMAC-SHA-96
  2413. authentication protocol.
  2414. 7.3.1. Processing an Outgoing Message
  2415. This section describes the procedure followed by an SNMP engine
  2416. whenever it must authenticate an outgoing message using the
  2417. usmHMACSHAAuthProtocol.
  2418. 1) The msgAuthenticationParameters field is set to the serialization,
  2419. according to the rules in [RFC3417], of an OCTET STRING containing
  2420. 12 zero octets.
  2421. 2) From the secret authKey, two keys K1 and K2 are derived:
  2422. a) extend the authKey to 64 octets by appending 44 zero octets;
  2423. save it as extendedAuthKey
  2424. b) obtain IPAD by replicating the octet 0x36 64 times;
  2425. c) obtain K1 by XORing extendedAuthKey with IPAD;
  2426. d) obtain OPAD by replicating the octet 0x5C 64 times;
  2427. e) obtain K2 by XORing extendedAuthKey with OPAD.
  2428. 3) Prepend K1 to the wholeMsg and calculate the SHA digest over it
  2429. according to [SHA-NIST].
  2430. 4) Prepend K2 to the result of the step 4 and calculate SHA digest
  2431. over it according to [SHA-NIST]. Take the first 12 octets of the
  2432. final digest - this is Message Authentication Code (MAC).
  2433. 5) Replace the msgAuthenticationParameters field with MAC obtained in
  2434. the step 5.
  2435. 6) The authenticatedWholeMsg is then returned to the caller together
  2436. with statusInformation indicating success.
  2437. 7.3.2. Processing an Incoming Message
  2438. This section describes the procedure followed by an SNMP engine
  2439. whenever it must authenticate an incoming message using the
  2440. usmHMACSHAAuthProtocol.
  2441. Blumenthal & Wijnen Standards Track [Page 61]
  2442. RFC 3414 USM for SNMPv3 December 2002
  2443. 1) If the digest received in the msgAuthenticationParameters field is
  2444. not 12 octets long, then an failure and an errorIndication
  2445. (authenticationError) is returned to the calling module.
  2446. 2) The MAC received in the msgAuthenticationParameters field is
  2447. saved.
  2448. 3) The digest in the msgAuthenticationParameters field is replaced by
  2449. the 12 zero octets.
  2450. 4) From the secret authKey, two keys K1 and K2 are derived:
  2451. a) extend the authKey to 64 octets by appending 44 zero octets;
  2452. save it as extendedAuthKey
  2453. b) obtain IPAD by replicating the octet 0x36 64 times;
  2454. c) obtain K1 by XORing extendedAuthKey with IPAD;
  2455. d) obtain OPAD by replicating the octet 0x5C 64 times;
  2456. e) obtain K2 by XORing extendedAuthKey with OPAD.
  2457. 5) The MAC is calculated over the wholeMsg:
  2458. a) prepend K1 to the wholeMsg and calculate the SHA digest over
  2459. it;
  2460. b) prepend K2 to the result of step 5.a and calculate the SHA
  2461. digest over it;
  2462. c) first 12 octets of the result of step 5.b is the MAC.
  2463. The msgAuthenticationParameters field is replaced with the MAC
  2464. value that was saved in step 2.
  2465. 6) The the newly calculated MAC is compared with the MAC saved in
  2466. step 2. If they do not match, then a failure and an
  2467. errorIndication (authenticationFailure) are returned to the
  2468. calling module.
  2469. 7) The authenticatedWholeMsg and statusInformation indicating success
  2470. are then returned to the caller.
  2471. Blumenthal & Wijnen Standards Track [Page 62]
  2472. RFC 3414 USM for SNMPv3 December 2002
  2473. 8. CBC-DES Symmetric Encryption Protocol
  2474. This section describes the CBC-DES Symmetric Encryption Protocol.
  2475. This protocol is the first privacy protocol defined for the
  2476. User-based Security Model.
  2477. This protocol is identified by usmDESPrivProtocol.
  2478. Over time, other privacy protocols may be defined either as a
  2479. replacement of this protocol or in addition to this protocol.
  2480. 8.1. Mechanisms
  2481. - In support of data confidentiality, an encryption algorithm is
  2482. required. An appropriate portion of the message is encrypted prior
  2483. to being transmitted. The User-based Security Model specifies that
  2484. the scopedPDU is the portion of the message that needs to be
  2485. encrypted.
  2486. - A secret value in combination with a timeliness value is used to
  2487. create the en/decryption key and the initialization vector. The
  2488. secret value is shared by all SNMP engines authorized to originate
  2489. messages on behalf of the appropriate user.
  2490. 8.1.1. Symmetric Encryption Protocol
  2491. The Symmetric Encryption Protocol defined in this memo provides
  2492. support for data confidentiality. The designated portion of an SNMP
  2493. message is encrypted and included as part of the message sent to the
  2494. recipient.
  2495. Two organizations have published specifications defining the DES:
  2496. the National Institute of Standards and Technology (NIST) [DES-NIST]
  2497. and the American National Standards Institute [DES-ANSI]. There is a
  2498. companion Modes of Operation specification for each definition
  2499. ([DESO-NIST] and [DESO-ANSI], respectively).
  2500. The NIST has published three additional documents that implementors
  2501. may find useful.
  2502. - There is a document with guidelines for implementing and using the
  2503. DES, including functional specifications for the DES and its modes
  2504. of operation [DESG-NIST].
  2505. - There is a specification of a validation test suite for the DES
  2506. [DEST-NIST]. The suite is designed to test all aspects of the DES
  2507. and is useful for pinpointing specific problems.
  2508. Blumenthal & Wijnen Standards Track [Page 63]
  2509. RFC 3414 USM for SNMPv3 December 2002
  2510. - There is a specification of a maintenance test for the DES [DESM-
  2511. NIST]. The test utilizes a minimal amount of data and processing
  2512. to test all components of the DES. It provides a simple yes-or-no
  2513. indication of correct operation and is useful to run as part of an
  2514. initialization step, e.g., when a computer re-boots.
  2515. 8.1.1.1. DES key and Initialization Vector
  2516. The first 8 octets of the 16-octet secret (private privacy key) are
  2517. used as a DES key. Since DES uses only 56 bits, the Least
  2518. Significant Bit in each octet is disregarded.
  2519. The Initialization Vector for encryption is obtained using the
  2520. following procedure.
  2521. The last 8 octets of the 16-octet secret (private privacy key) are
  2522. used as pre-IV.
  2523. In order to ensure that the IV for two different packets encrypted by
  2524. the same key, are not the same (i.e., the IV does not repeat) we need
  2525. to "salt" the pre-IV with something unique per packet. An 8-octet
  2526. string is used as the "salt". The concatenation of the generating
  2527. SNMP engine's 32-bit snmpEngineBoots and a local 32-bit integer, that
  2528. the encryption engine maintains, is input to the "salt". The 32-bit
  2529. integer is initialized to an arbitrary value at boot time.
  2530. The 32-bit snmpEngineBoots is converted to the first 4 octets (Most
  2531. Significant Byte first) of our "salt". The 32-bit integer is then
  2532. converted to the last 4 octet (Most Significant Byte first) of our
  2533. "salt". The resulting "salt" is then XOR-ed with the pre-IV to
  2534. obtain the IV. The 8-octet "salt" is then put into the
  2535. privParameters field encoded as an OCTET STRING. The "salt" integer
  2536. is then modified. We recommend that it be incremented by one and
  2537. wrap when it reaches the maximum value.
  2538. How exactly the value of the "salt" (and thus of the IV) varies, is
  2539. an implementation issue, as long as the measures are taken to avoid
  2540. producing a duplicate IV.
  2541. The "salt" must be placed in the privParameters field to enable the
  2542. receiving entity to compute the correct IV and to decrypt the
  2543. message.
  2544. Blumenthal & Wijnen Standards Track [Page 64]
  2545. RFC 3414 USM for SNMPv3 December 2002
  2546. 8.1.1.2. Data Encryption
  2547. The data to be encrypted is treated as sequence of octets. Its
  2548. length should be an integral multiple of 8 - and if it is not, the
  2549. data is padded at the end as necessary. The actual pad value is
  2550. irrelevant.
  2551. The data is encrypted in Cipher Block Chaining mode.
  2552. The plaintext is divided into 64-bit blocks.
  2553. The plaintext for each block is XOR-ed with the ciphertext of the
  2554. previous block, the result is encrypted and the output of the
  2555. encryption is the ciphertext for the block. This procedure is
  2556. repeated until there are no more plaintext blocks.
  2557. For the very first block, the Initialization Vector is used instead
  2558. of the ciphertext of the previous block.
  2559. 8.1.1.3. Data Decryption
  2560. Before decryption, the encrypted data length is verified. If the
  2561. length of the OCTET STRING to be decrypted is not an integral
  2562. multiple of 8 octets, the decryption process is halted and an
  2563. appropriate exception noted. When decrypting, the padding is
  2564. ignored.
  2565. The first ciphertext block is decrypted, the decryption output is
  2566. XOR-ed with the Initialization Vector, and the result is the first
  2567. plaintext block.
  2568. For each subsequent block, the ciphertext block is decrypted, the
  2569. decryption output is XOR-ed with the previous ciphertext block and
  2570. the result is the plaintext block.
  2571. 8.2. Elements of the DES Privacy Protocol
  2572. This section contains definitions required to realize the privacy
  2573. module defined by this memo.
  2574. 8.2.1. Users
  2575. Data en/decryption using this Symmetric Encryption Protocol makes use
  2576. of a defined set of userNames. For any user on whose behalf a
  2577. message must be en/decrypted at a particular SNMP engine, that SNMP
  2578. engine must have knowledge of that user. An SNMP engine that wishes
  2579. Blumenthal & Wijnen Standards Track [Page 65]
  2580. RFC 3414 USM for SNMPv3 December 2002
  2581. to communicate with another SNMP engine must also have knowledge of a
  2582. user known to that SNMP engine, including knowledge of the applicable
  2583. attributes of that user.
  2584. A user and its attributes are defined as follows:
  2585. <userName>
  2586. An octet string representing the name of the user.
  2587. <privKey>
  2588. A user's secret key to be used as input for the DES key and IV.
  2589. The length of this key MUST be 16 octets.
  2590. 8.2.2. msgAuthoritativeEngineID
  2591. The msgAuthoritativeEngineID value contained in an authenticated
  2592. message specifies the authoritative SNMP engine for that particular
  2593. message (see the definition of SnmpEngineID in the SNMP Architecture
  2594. document [RFC3411]).
  2595. The user's (private) privacy key is normally different at each
  2596. authoritative SNMP engine and so the snmpEngineID is used to select
  2597. the proper key for the en/decryption process.
  2598. 8.2.3. SNMP Messages Using this Privacy Protocol
  2599. Messages using this privacy protocol carry a msgPrivacyParameters
  2600. field as part of the msgSecurityParameters. For this protocol, the
  2601. msgPrivacyParameters field is the serialized OCTET STRING
  2602. representing the "salt" that was used to create the IV.
  2603. 8.2.4. Services Provided by the DES Privacy Module
  2604. This section describes the inputs and outputs that the DES Privacy
  2605. module expects and produces when the User-based Security module
  2606. invokes the DES Privacy module for services.
  2607. 8.2.4.1. Services for Encrypting Outgoing Data
  2608. This DES privacy protocol assumes that the selection of the privKey
  2609. is done by the caller and that the caller passes the secret key to be
  2610. used.
  2611. Upon completion the privacy module returns statusInformation and, if
  2612. the encryption process was successful, the encryptedPDU and the
  2613. msgPrivacyParameters encoded as an OCTET STRING. The abstract
  2614. service primitive is:
  2615. Blumenthal & Wijnen Standards Track [Page 66]
  2616. RFC 3414 USM for SNMPv3 December 2002
  2617. statusInformation = -- success of failure
  2618. encryptData(
  2619. IN encryptKey -- secret key for encryption
  2620. IN dataToEncrypt -- data to encrypt (scopedPDU)
  2621. OUT encryptedData -- encrypted data (encryptedPDU)
  2622. OUT privParameters -- filled in by service provider
  2623. )
  2624. The abstract data elements are:
  2625. statusInformation
  2626. An indication of the success or failure of the encryption process.
  2627. In case of failure, it is an indication of the error.
  2628. encryptKey
  2629. The secret key to be used by the encryption algorithm. The length
  2630. of this key MUST be 16 octets.
  2631. dataToEncrypt
  2632. The data that must be encrypted.
  2633. encryptedData
  2634. The encrypted data upon successful completion.
  2635. privParameters
  2636. The privParameters encoded as an OCTET STRING.
  2637. 8.2.4.2. Services for Decrypting Incoming Data
  2638. This DES privacy protocol assumes that the selection of the privKey
  2639. is done by the caller and that the caller passes the secret key to be
  2640. used.
  2641. Upon completion the privacy module returns statusInformation and, if
  2642. the decryption process was successful, the scopedPDU in plain text.
  2643. The abstract service primitive is:
  2644. statusInformation =
  2645. decryptData(
  2646. IN decryptKey -- secret key for decryption
  2647. IN privParameters -- as received on the wire
  2648. IN encryptedData -- encrypted data (encryptedPDU)
  2649. OUT decryptedData -- decrypted data (scopedPDU)
  2650. )
  2651. Blumenthal & Wijnen Standards Track [Page 67]
  2652. RFC 3414 USM for SNMPv3 December 2002
  2653. The abstract data elements are:
  2654. statusInformation
  2655. An indication whether the data was successfully decrypted and if
  2656. not an indication of the error.
  2657. decryptKey
  2658. The secret key to be used by the decryption algorithm. The length
  2659. of this key MUST be 16 octets.
  2660. privParameters
  2661. The "salt" to be used to calculate the IV.
  2662. encryptedData
  2663. The data to be decrypted.
  2664. decryptedData
  2665. The decrypted data.
  2666. 8.3. Elements of Procedure.
  2667. This section describes the procedures for the DES privacy protocol.
  2668. 8.3.1. Processing an Outgoing Message
  2669. This section describes the procedure followed by an SNMP engine
  2670. whenever it must encrypt part of an outgoing message using the
  2671. usmDESPrivProtocol.
  2672. 1) The secret cryptKey is used to construct the DES encryption key,
  2673. the "salt" and the DES pre-IV (from which the IV is computed as
  2674. described in section 8.1.1.1).
  2675. 2) The privParameters field is set to the serialization according to
  2676. the rules in [RFC3417] of an OCTET STRING representing the "salt"
  2677. string.
  2678. 3) The scopedPDU is encrypted (as described in section 8.1.1.2)
  2679. and the encrypted data is serialized according to the rules in
  2680. [RFC3417] as an OCTET STRING.
  2681. 4) The serialized OCTET STRING representing the encrypted scopedPDU
  2682. together with the privParameters and statusInformation indicating
  2683. success is returned to the calling module.
  2684. Blumenthal & Wijnen Standards Track [Page 68]
  2685. RFC 3414 USM for SNMPv3 December 2002
  2686. 8.3.2. Processing an Incoming Message
  2687. This section describes the procedure followed by an SNMP engine
  2688. whenever it must decrypt part of an incoming message using the
  2689. usmDESPrivProtocol.
  2690. 1) If the privParameters field is not an 8-octet OCTET STRING, then
  2691. an error indication (decryptionError) is returned to the calling
  2692. module.
  2693. 2) The "salt" is extracted from the privParameters field.
  2694. 3) The secret cryptKey and the "salt" are then used to construct the
  2695. DES decryption key and pre-IV (from which the IV is computed as
  2696. described in section 8.1.1.1).
  2697. 4) The encryptedPDU is then decrypted (as described in section
  2698. 8.1.1.3).
  2699. 5) If the encryptedPDU cannot be decrypted, then an error indication
  2700. (decryptionError) is returned to the calling module.
  2701. 6) The decrypted scopedPDU and statusInformation indicating success
  2702. are returned to the calling module.
  2703. 9. Intellectual Property
  2704. The IETF takes no position regarding the validity or scope of any
  2705. intellectual property or other rights that might be claimed to
  2706. pertain to the implementation or use of the technology described in
  2707. this document or the extent to which any license under such rights
  2708. might or might not be available; neither does it represent that it
  2709. has made any effort to identify any such rights. Information on the
  2710. IETF's procedures with respect to rights in standards-track and
  2711. standards-related documentation can be found in BCP-11. Copies of
  2712. claims of rights made available for publication and any assurances of
  2713. licenses to be made available, or the result of an attempt made to
  2714. obtain a general license or permission for the use of such
  2715. proprietary rights by implementors or users of this specification can
  2716. be obtained from the IETF Secretariat.
  2717. The IETF invites any interested party to bring to its attention any
  2718. copyrights, patents or patent applications, or other proprietary
  2719. rights which may cover technology that may be required to practice
  2720. this standard. Please address the information to the IETF Executive
  2721. Director.
  2722. Blumenthal & Wijnen Standards Track [Page 69]
  2723. RFC 3414 USM for SNMPv3 December 2002
  2724. 10. Acknowledgements
  2725. This document is the result of the efforts of the SNMPv3 Working
  2726. Group. Some special thanks are in order to the following SNMPv3 WG
  2727. members:
  2728. Harald Tveit Alvestrand (Maxware)
  2729. Dave Battle (SNMP Research, Inc.)
  2730. Alan Beard (Disney Worldwide Services)
  2731. Paul Berrevoets (SWI Systemware/Halcyon Inc.)
  2732. Martin Bjorklund (Ericsson)
  2733. Uri Blumenthal (IBM T.J. Watson Research Center)
  2734. Jeff Case (SNMP Research, Inc.)
  2735. John Curran (BBN)
  2736. Mike Daniele (Compaq Computer Corporation))
  2737. T. Max Devlin (Eltrax Systems)
  2738. John Flick (Hewlett Packard)
  2739. Rob Frye (MCI)
  2740. Wes Hardaker (U.C.Davis, Information Technology - D.C.A.S.)
  2741. David Harrington (Cabletron Systems Inc.)
  2742. Lauren Heintz (BMC Software, Inc.)
  2743. N.C. Hien (IBM T.J. Watson Research Center)
  2744. Michael Kirkham (InterWorking Labs, Inc.)
  2745. Dave Levi (SNMP Research, Inc.)
  2746. Louis A Mamakos (UUNET Technologies Inc.)
  2747. Joe Marzot (Nortel Networks)
  2748. Paul Meyer (Secure Computing Corporation)
  2749. Keith McCloghrie (Cisco Systems)
  2750. Bob Moore (IBM)
  2751. Russ Mundy (TIS Labs at Network Associates)
  2752. Bob Natale (ACE*COMM Corporation)
  2753. Mike O'Dell (UUNET Technologies Inc.)
  2754. Dave Perkins (DeskTalk)
  2755. Peter Polkinghorne (Brunel University)
  2756. Randy Presuhn (BMC Software, Inc.)
  2757. David Reeder (TIS Labs at Network Associates)
  2758. David Reid (SNMP Research, Inc.)
  2759. Aleksey Romanov (Quality Quorum)
  2760. Shawn Routhier (Epilogue)
  2761. Juergen Schoenwaelder (TU Braunschweig)
  2762. Bob Stewart (Cisco Systems)
  2763. Mike Thatcher (Independent Consultant)
  2764. Bert Wijnen (IBM T.J. Watson Research Center)
  2765. Blumenthal & Wijnen Standards Track [Page 70]
  2766. RFC 3414 USM for SNMPv3 December 2002
  2767. The document is based on recommendations of the IETF Security and
  2768. Administrative Framework Evolution for SNMP Advisory Team. Members
  2769. of that Advisory Team were:
  2770. David Harrington (Cabletron Systems Inc.)
  2771. Jeff Johnson (Cisco Systems)
  2772. David Levi (SNMP Research Inc.)
  2773. John Linn (Openvision)
  2774. Russ Mundy (Trusted Information Systems) chair
  2775. Shawn Routhier (Epilogue)
  2776. Glenn Waters (Nortel)
  2777. Bert Wijnen (IBM T. J. Watson Research Center)
  2778. As recommended by the Advisory Team and the SNMPv3 Working Group
  2779. Charter, the design incorporates as much as practical from previous
  2780. RFCs and drafts. As a result, special thanks are due to the authors
  2781. of previous designs known as SNMPv2u and SNMPv2*:
  2782. Jeff Case (SNMP Research, Inc.)
  2783. David Harrington (Cabletron Systems Inc.)
  2784. David Levi (SNMP Research, Inc.)
  2785. Keith McCloghrie (Cisco Systems)
  2786. Brian O'Keefe (Hewlett Packard)
  2787. Marshall T. Rose (Dover Beach Consulting)
  2788. Jon Saperia (BGS Systems Inc.)
  2789. Steve Waldbusser (International Network Services)
  2790. Glenn W. Waters (Bell-Northern Research Ltd.)
  2791. 11. Security Considerations
  2792. 11.1. Recommended Practices
  2793. This section describes practices that contribute to the secure,
  2794. effective operation of the mechanisms defined in this memo.
  2795. - An SNMP engine must discard SNMP Response messages that do not
  2796. correspond to any currently outstanding Request message. It is the
  2797. responsibility of the Message Processing module to take care of
  2798. this. For example it can use a msgID for that.
  2799. An SNMP Command Generator Application must discard any Response
  2800. Class PDU for which there is no currently outstanding Confirmed
  2801. Class PDU; for example for SNMPv2 [RFC3416] PDUs, the request-id
  2802. component in the PDU can be used to correlate Responses to
  2803. outstanding Requests.
  2804. Blumenthal & Wijnen Standards Track [Page 71]
  2805. RFC 3414 USM for SNMPv3 December 2002
  2806. Although it would be typical for an SNMP engine and an SNMP Command
  2807. Generator Application to do this as a matter of course, when using
  2808. these security protocols it is significant due to the possibility
  2809. of message duplication (malicious or otherwise).
  2810. - If an SNMP engine uses a msgID for correlating Response messages to
  2811. outstanding Request messages, then it MUST use different msgIDs in
  2812. all such Request messages that it sends out during a Time Window
  2813. (150 seconds) period.
  2814. A Command Generator or Notification Originator Application MUST use
  2815. different request-ids in all Request PDUs that it sends out during
  2816. a TimeWindow (150 seconds) period.
  2817. This must be done to protect against the possibility of message
  2818. duplication (malicious or otherwise).
  2819. For example, starting operations with a msgID and/or request-id
  2820. value of zero is not a good idea. Initializing them with an
  2821. unpredictable number (so they do not start out the same after each
  2822. reboot) and then incrementing by one would be acceptable.
  2823. - An SNMP engine should perform time synchronization using
  2824. authenticated messages in order to protect against the possibility
  2825. of message duplication (malicious or otherwise).
  2826. - When sending state altering messages to a managed authoritative
  2827. SNMP engine, a Command Generator Application should delay sending
  2828. successive messages to that managed SNMP engine until a positive
  2829. acknowledgement is received for the previous message or until the
  2830. previous message expires.
  2831. No message ordering is imposed by the SNMP. Messages may be
  2832. received in any order relative to their time of generation and each
  2833. will be processed in the ordered received. Note that when an
  2834. authenticated message is sent to a managed SNMP engine, it will be
  2835. valid for a period of time of approximately 150 seconds under
  2836. normal circumstances, and is subject to replay during this period.
  2837. Indeed, an SNMP engine and SNMP Command Generator Applications must
  2838. cope with the loss and re-ordering of messages resulting from
  2839. anomalies in the network as a matter of course.
  2840. However, a managed object, snmpSetSerialNo [RFC3418], is
  2841. specifically defined for use with SNMP Set operations in order to
  2842. provide a mechanism to ensure that the processing of SNMP messages
  2843. occurs in a specific order.
  2844. Blumenthal & Wijnen Standards Track [Page 72]
  2845. RFC 3414 USM for SNMPv3 December 2002
  2846. - The frequency with which the secrets of a User-based Security Model
  2847. user should be changed is indirectly related to the frequency of
  2848. their use.
  2849. Protecting the secrets from disclosure is critical to the overall
  2850. security of the protocols. Frequent use of a secret provides a
  2851. continued source of data that may be useful to a cryptanalyst in
  2852. exploiting known or perceived weaknesses in an algorithm. Frequent
  2853. changes to the secret avoid this vulnerability.
  2854. Changing a secret after each use is generally regarded as the most
  2855. secure practice, but a significant amount of overhead may be
  2856. associated with that approach.
  2857. Note, too, in a local environment the threat of disclosure may be
  2858. less significant, and as such the changing of secrets may be less
  2859. frequent. However, when public data networks are used as the
  2860. communication paths, more caution is prudent.
  2861. 11.2 Defining Users
  2862. The mechanisms defined in this document employ the notion of users on
  2863. whose behalf messages are sent. How "users" are defined is subject
  2864. to the security policy of the network administration. For example,
  2865. users could be individuals (e.g., "joe" or "jane"), or a particular
  2866. role (e.g., "operator" or "administrator"), or a combination (e.g.,
  2867. "joe-operator", "jane-operator" or "joe-admin"). Furthermore, a user
  2868. may be a logical entity, such as an SNMP Application or a set of SNMP
  2869. Applications, acting on behalf of an individual or role, or set of
  2870. individuals, or set of roles, including combinations.
  2871. Appendix A describes an algorithm for mapping a user "password" to a
  2872. 16/20 octet value for use as either a user's authentication key or
  2873. privacy key (or both). Note however, that using the same password
  2874. (and therefore the same key) for both authentication and privacy is
  2875. very poor security practice and should be strongly discouraged.
  2876. Passwords are often generated, remembered, and input by a human.
  2877. Human-generated passwords may be less than the 16/20 octets required
  2878. by the authentication and privacy protocols, and brute force attacks
  2879. can be quite easy on a relatively short ASCII character set.
  2880. Therefore, the algorithm is Appendix A performs a transformation on
  2881. the password. If the Appendix A algorithm is used, SNMP
  2882. implementations (and SNMP configuration applications) must ensure
  2883. that passwords are at least 8 characters in length. Please note that
  2884. longer passwords with repetitive strings may result in exactly the
  2885. same key. For example, a password 'bertbert' will result in exactly
  2886. the same key as password 'bertbertbert'.
  2887. Blumenthal & Wijnen Standards Track [Page 73]
  2888. RFC 3414 USM for SNMPv3 December 2002
  2889. Because the Appendix A algorithm uses such passwords (nearly)
  2890. directly, it is very important that they not be easily guessed. It
  2891. is suggested that they be composed of mixed-case alphanumeric and
  2892. punctuation characters that don't form words or phrases that might be
  2893. found in a dictionary. Longer passwords improve the security of the
  2894. system. Users may wish to input multiword phrases to make their
  2895. password string longer while ensuring that it is memorable.
  2896. Since it is infeasible for human users to maintain different
  2897. passwords for every SNMP engine, but security requirements strongly
  2898. discourage having the same key for more than one SNMP engine, the
  2899. User-based Security Model employs a compromise proposed in
  2900. [Localized-key]. It derives the user keys for the SNMP engines from
  2901. user's password in such a way that it is practically impossible to
  2902. either determine the user's password, or user's key for another SNMP
  2903. engine from any combination of user's keys on SNMP engines.
  2904. Note however, that if user's password is disclosed, then key
  2905. localization will not help and network security may be compromised in
  2906. this case. Therefore a user's password or non-localized key MUST NOT
  2907. be stored on a managed device/node. Instead the localized key SHALL
  2908. be stored (if at all), so that, in case a device does get
  2909. compromised, no other managed or managing devices get compromised.
  2910. 11.3. Conformance
  2911. To be termed a "Secure SNMP implementation" based on the User-based
  2912. Security Model, an SNMP implementation MUST:
  2913. - implement one or more Authentication Protocol(s). The HMAC-MD5-96
  2914. and HMAC-SHA-96 Authentication Protocols defined in this memo are
  2915. examples of such protocols.
  2916. - to the maximum extent possible, prohibit access to the secret(s) of
  2917. each user about which it maintains information in a Local
  2918. Configuration Datastore (LCD) under all circumstances except as
  2919. required to generate and/or validate SNMP messages with respect to
  2920. that user.
  2921. - implement the key-localization mechanism.
  2922. - implement the SNMP-USER-BASED-SM-MIB.
  2923. In addition, an authoritative SNMP engine SHOULD provide initial
  2924. configuration in accordance with Appendix A.1.
  2925. Implementation of a Privacy Protocol (the DES Symmetric Encryption
  2926. Protocol defined in this memo is one such protocol) is optional.
  2927. Blumenthal & Wijnen Standards Track [Page 74]
  2928. RFC 3414 USM for SNMPv3 December 2002
  2929. 11.4. Use of Reports
  2930. The use of unsecure reports (i.e., sending them with a securityLevel
  2931. of noAuthNoPriv) potentially exposes a non-authoritative SNMP engine
  2932. to some form of attacks. Some people consider these denial of
  2933. service attacks, others don't. An installation should evaluate the
  2934. risk involved before deploying unsecure Report PDUs.
  2935. 11.5 Access to the SNMP-USER-BASED-SM-MIB
  2936. The objects in this MIB may be considered sensitive in many
  2937. environments. Specifically the objects in the usmUserTable contain
  2938. information about users and their authentication and privacy
  2939. protocols. It is important to closely control (both read and write)
  2940. access to these MIB objects by using appropriately configured Access
  2941. Control models (for example the View-based Access Control Model as
  2942. specified in [RFC3415]).
  2943. 12. References
  2944. 12.1 Normative References
  2945. [RFC1321] Rivest, R., "Message Digest Algorithm MD5", RFC 1321,
  2946. April 1992.
  2947. [RFC2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC:
  2948. Keyed-Hashing for Message Authentication", RFC 2104,
  2949. February 1997.
  2950. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  2951. Requirement Levels", BCP 14, RFC 2119, March 1997.
  2952. [RFC2578] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case,
  2953. J., Rose, M. and S. Waldbusser, "Structure of
  2954. Management Information Version 2 (SMIv2)", STD 58,
  2955. RFC 2578, April 1999.
  2956. [RFC2579] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case,
  2957. J., Rose, M. and S. Waldbusser, "Textual Conventions
  2958. for SMIv2", STD 58, RFC 2579, April 1999.
  2959. [RFC2580] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case,
  2960. J., Rose, M. and S. Waldbusser, "Conformance
  2961. Statements for SMIv2", STD 58, RFC 2580, April 1999.
  2962. Blumenthal & Wijnen Standards Track [Page 75]
  2963. RFC 3414 USM for SNMPv3 December 2002
  2964. [RFC3411] Harrington, D., Presuhn, R. and B. Wijnen, "An
  2965. Architecture for Describing Simple Network Management
  2966. Protocol (SNMP) Management Frameworks", STD 62, RFC
  2967. 3411, December 2002.
  2968. [RFC3412] Case, J., Harrington, D., Presuhn, R. and B. Wijnen,
  2969. "Message Processing and Dispatching for the Simple
  2970. Network Management Protocol (SNMP)", STD 62, RFC
  2971. 3412, December 2002.
  2972. [RFC3415] Wijnen, B., Presuhn, R. and K. McCloghrie, "View-
  2973. based Access Control Model (VACM) for the Simple
  2974. Network Management Protocol (SNMP)", STD 62, RFC
  2975. 3415, December 2002.
  2976. [RFC3416] Presuhn, R., Case, J., McCloghrie, K., Rose, M. and
  2977. S. Waldbusser, "Version 2 of the Protocol Operations
  2978. for the Simple Network Management Protocol (SNMP)",
  2979. STD 62, RFC 3416, December 2002.
  2980. [RFC3417] Presuhn, R., Case, J., McCloghrie, K., Rose, M. and
  2981. S. Waldbusser, "Transport Mappings for the Simple
  2982. Network Management Protocol (SNMP)", STD 62, RFC
  2983. 3417, December 2002.
  2984. [RFC3418] Presuhn, R., Case, J., McCloghrie, K., Rose, M. and
  2985. S. Waldbusser, "Management Information Base (MIB) for
  2986. the Simple Network Management Protocol (SNMP)", STD
  2987. 62, RFC 3418, December 2002.
  2988. [DES-NIST] Data Encryption Standard, National Institute of
  2989. Standards and Technology. Federal Information
  2990. Processing Standard (FIPS) Publication 46-1.
  2991. Supersedes FIPS Publication 46, (January, 1977;
  2992. reaffirmed January, 1988).
  2993. [DESO-NIST] DES Modes of Operation, National Institute of
  2994. Standards and Technology. Federal Information
  2995. Processing Standard (FIPS) Publication 81, (December,
  2996. 1980).
  2997. [SHA-NIST] Secure Hash Algorithm. NIST FIPS 180-1, (April, 1995)
  2998. http://csrc.nist.gov/fips/fip180-1.txt (ASCII)
  2999. http://csrc.nist.gov/fips/fip180-1.ps (Postscript)
  3000. Blumenthal & Wijnen Standards Track [Page 76]
  3001. RFC 3414 USM for SNMPv3 December 2002
  3002. 12.1 Informative References
  3003. [Localized-Key] U. Blumenthal, N. C. Hien, B. Wijnen "Key Derivation
  3004. for Network Management Applications" IEEE Network
  3005. Magazine, April/May issue, 1997.
  3006. [DES-ANSI] Data Encryption Algorithm, American National
  3007. Standards Institute. ANSI X3.92-1981, (December,
  3008. 1980).
  3009. [DESO-ANSI] Data Encryption Algorithm - Modes of Operation,
  3010. American National Standards Institute. ANSI X3.106-
  3011. 1983, (May 1983).
  3012. [DESG-NIST] Guidelines for Implementing and Using the NBS Data
  3013. Encryption Standard, National Institute of Standards
  3014. and Technology. Federal Information Processing
  3015. Standard (FIPS) Publication 74, (April, 1981).
  3016. [DEST-NIST] Validating the Correctness of Hardware
  3017. Implementations of the NBS Data Encryption Standard,
  3018. National Institute of Standards and Technology.
  3019. Special Publication 500-20.
  3020. [DESM-NIST] Maintenance Testing for the Data Encryption Standard,
  3021. National Institute of Standards and Technology.
  3022. Special Publication 500-61, (August, 1980).
  3023. [RFC3174] Eastlake, D. 3rd and P. Jones, "US Secure Hash
  3024. Algorithm 1 (SHA1)", RFC 3174, September 2001.
  3025. Blumenthal & Wijnen Standards Track [Page 77]
  3026. RFC 3414 USM for SNMPv3 December 2002
  3027. APPENDIX A - Installation
  3028. A.1. SNMP engine Installation Parameters
  3029. During installation, an authoritative SNMP engine SHOULD (in the
  3030. meaning as defined in [RFC2119]) be configured with several initial
  3031. parameters. These include:
  3032. 1) A Security Posture
  3033. The choice of security posture determines if initial configuration
  3034. is implemented and if so how. One of three possible choices is
  3035. selected:
  3036. minimum-secure,
  3037. semi-secure,
  3038. very-secure (i.e., no-initial-configuration)
  3039. In the case of a very-secure posture, there is no initial
  3040. configuration, and so the following steps are irrelevant.
  3041. 2) One or More Secrets
  3042. These are the authentication/privacy secrets for the first user to
  3043. be configured.
  3044. One way to accomplish this is to have the installer enter a
  3045. "password" for each required secret. The password is then
  3046. algorithmically converted into the required secret by:
  3047. - forming a string of length 1,048,576 octets by repeating the
  3048. value of the password as often as necessary, truncating
  3049. accordingly, and using the resulting string as the input to the
  3050. MD5 algorithm [RFC1321]. The resulting digest, termed
  3051. "digest1", is used in the next step.
  3052. - a second string is formed by concatenating digest1, the SNMP
  3053. engine's snmpEngineID value, and digest1. This string is used
  3054. as input to the MD5 algorithm [RFC1321].
  3055. The resulting digest is the required secret (see Appendix A.2).
  3056. Blumenthal & Wijnen Standards Track [Page 78]
  3057. RFC 3414 USM for SNMPv3 December 2002
  3058. With these configured parameters, the SNMP engine instantiates the
  3059. following usmUserEntry in the usmUserTable:
  3060. no privacy support privacy support
  3061. ------------------ ---------------
  3062. usmUserEngineID localEngineID localEngineID
  3063. usmUserName "initial" "initial"
  3064. usmUserSecurityName "initial" "initial"
  3065. usmUserCloneFrom ZeroDotZero ZeroDotZero
  3066. usmUserAuthProtocol usmHMACMD5AuthProtocol usmHMACMD5AuthProtocol
  3067. usmUserAuthKeyChange "" ""
  3068. usmUserOwnAuthKeyChange "" ""
  3069. usmUserPrivProtocol none usmDESPrivProtocol
  3070. usmUserPrivKeyChange "" ""
  3071. usmUserOwnPrivKeyChange "" ""
  3072. usmUserPublic "" ""
  3073. usmUserStorageType anyValidStorageType anyValidStorageType
  3074. usmUserStatus active active
  3075. It is recommended to also instantiate a set of template
  3076. usmUserEntries which can be used as clone-from users for newly
  3077. created usmUserEntries. These are the two suggested entries:
  3078. no privacy support privacy support
  3079. ------------------ ---------------
  3080. usmUserEngineID localEngineID localEngineID
  3081. usmUserName "templateMD5" "templateMD5"
  3082. usmUserSecurityName "templateMD5" "templateMD5"
  3083. usmUserCloneFrom ZeroDotZero ZeroDotZero
  3084. usmUserAuthProtocol usmHMACMD5AuthProtocol usmHMACMD5AuthProtocol
  3085. usmUserAuthKeyChange "" ""
  3086. usmUserOwnAuthKeyChange "" ""
  3087. usmUserPrivProtocol none usmDESPrivProtocol
  3088. usmUserPrivKeyChange "" ""
  3089. usmUserOwnPrivKeyChange "" ""
  3090. usmUserPublic "" ""
  3091. usmUserStorageType permanent permanent
  3092. usmUserStatus active active
  3093. Blumenthal & Wijnen Standards Track [Page 79]
  3094. RFC 3414 USM for SNMPv3 December 2002
  3095. no privacy support privacy support
  3096. ------------------ ---------------
  3097. usmUserEngineID localEngineID localEngineID
  3098. usmUserName "templateSHA" "templateSHA"
  3099. usmUserSecurityName "templateSHA" "templateSHA"
  3100. usmUserCloneFrom ZeroDotZero ZeroDotZero
  3101. usmUserAuthProtocol usmHMACSHAAuthProtocol usmHMACSHAAuthProtocol
  3102. usmUserAuthKeyChange "" ""
  3103. usmUserOwnAuthKeyChange "" ""
  3104. usmUserPrivProtocol none usmDESPrivProtocol
  3105. usmUserPrivKeyChange "" ""
  3106. usmUserOwnPrivKeyChange "" ""
  3107. usmUserPublic "" ""
  3108. usmUserStorageType permanent permanent
  3109. usmUserStatus active active
  3110. A.2. Password to Key Algorithm
  3111. A sample code fragment (section A.2.1) demonstrates the password to
  3112. key algorithm which can be used when mapping a password to an
  3113. authentication or privacy key using MD5. The reference source code
  3114. of MD5 is available in [RFC1321].
  3115. Another sample code fragment (section A.2.2) demonstrates the
  3116. password to key algorithm which can be used when mapping a password
  3117. to an authentication or privacy key using SHA (documented in SHA-
  3118. NIST).
  3119. An example of the results of a correct implementation is provided
  3120. (section A.3) which an implementor can use to check if his
  3121. implementation produces the same result.
  3122. Blumenthal & Wijnen Standards Track [Page 80]
  3123. RFC 3414 USM for SNMPv3 December 2002
  3124. A.2.1. Password to Key Sample Code for MD5
  3125. void password_to_key_md5(
  3126. u_char *password, /* IN */
  3127. u_int passwordlen, /* IN */
  3128. u_char *engineID, /* IN - pointer to snmpEngineID */
  3129. u_int engineLength,/* IN - length of snmpEngineID */
  3130. u_char *key) /* OUT - pointer to caller 16-octet buffer */
  3131. {
  3132. MD5_CTX MD;
  3133. u_char *cp, password_buf[64];
  3134. u_long password_index = 0;
  3135. u_long count = 0, i;
  3136. MD5Init (&MD); /* initialize MD5 */
  3137. /**********************************************/
  3138. /* Use while loop until we've done 1 Megabyte */
  3139. /**********************************************/
  3140. while (count < 1048576) {
  3141. cp = password_buf;
  3142. for (i = 0; i < 64; i++) {
  3143. /*************************************************/
  3144. /* Take the next octet of the password, wrapping */
  3145. /* to the beginning of the password as necessary.*/
  3146. /*************************************************/
  3147. *cp++ = password[password_index++ % passwordlen];
  3148. }
  3149. MD5Update (&MD, password_buf, 64);
  3150. count += 64;
  3151. }
  3152. MD5Final (key, &MD); /* tell MD5 we're done */
  3153. /*****************************************************/
  3154. /* Now localize the key with the engineID and pass */
  3155. /* through MD5 to produce final key */
  3156. /* May want to ensure that engineLength <= 32, */
  3157. /* otherwise need to use a buffer larger than 64 */
  3158. /*****************************************************/
  3159. memcpy(password_buf, key, 16);
  3160. memcpy(password_buf+16, engineID, engineLength);
  3161. memcpy(password_buf+16+engineLength, key, 16);
  3162. MD5Init(&MD);
  3163. MD5Update(&MD, password_buf, 32+engineLength);
  3164. MD5Final(key, &MD);
  3165. return;
  3166. }
  3167. Blumenthal & Wijnen Standards Track [Page 81]
  3168. RFC 3414 USM for SNMPv3 December 2002
  3169. A.2.2. Password to Key Sample Code for SHA
  3170. void password_to_key_sha(
  3171. u_char *password, /* IN */
  3172. u_int passwordlen, /* IN */
  3173. u_char *engineID, /* IN - pointer to snmpEngineID */
  3174. u_int engineLength,/* IN - length of snmpEngineID */
  3175. u_char *key) /* OUT - pointer to caller 20-octet buffer */
  3176. {
  3177. SHA_CTX SH;
  3178. u_char *cp, password_buf[72];
  3179. u_long password_index = 0;
  3180. u_long count = 0, i;
  3181. SHAInit (&SH); /* initialize SHA */
  3182. /**********************************************/
  3183. /* Use while loop until we've done 1 Megabyte */
  3184. /**********************************************/
  3185. while (count < 1048576) {
  3186. cp = password_buf;
  3187. for (i = 0; i < 64; i++) {
  3188. /*************************************************/
  3189. /* Take the next octet of the password, wrapping */
  3190. /* to the beginning of the password as necessary.*/
  3191. /*************************************************/
  3192. *cp++ = password[password_index++ % passwordlen];
  3193. }
  3194. SHAUpdate (&SH, password_buf, 64);
  3195. count += 64;
  3196. }
  3197. SHAFinal (key, &SH); /* tell SHA we're done */
  3198. /*****************************************************/
  3199. /* Now localize the key with the engineID and pass */
  3200. /* through SHA to produce final key */
  3201. /* May want to ensure that engineLength <= 32, */
  3202. /* otherwise need to use a buffer larger than 72 */
  3203. /*****************************************************/
  3204. memcpy(password_buf, key, 20);
  3205. memcpy(password_buf+20, engineID, engineLength);
  3206. memcpy(password_buf+20+engineLength, key, 20);
  3207. SHAInit(&SH);
  3208. SHAUpdate(&SH, password_buf, 40+engineLength);
  3209. SHAFinal(key, &SH);
  3210. return;
  3211. }
  3212. Blumenthal & Wijnen Standards Track [Page 82]
  3213. RFC 3414 USM for SNMPv3 December 2002
  3214. A.3. Password to Key Sample Results
  3215. A.3.1. Password to Key Sample Results using MD5
  3216. The following shows a sample output of the password to key algorithm
  3217. for a 16-octet key using MD5.
  3218. With a password of "maplesyrup" the output of the password to key
  3219. algorithm before the key is localized with the SNMP engine's
  3220. snmpEngineID is:
  3221. '9f af 32 83 88 4e 92 83 4e bc 98 47 d8 ed d9 63'H
  3222. After the intermediate key (shown above) is localized with the
  3223. snmpEngineID value of:
  3224. '00 00 00 00 00 00 00 00 00 00 00 02'H
  3225. the final output of the password to key algorithm is:
  3226. '52 6f 5e ed 9f cc e2 6f 89 64 c2 93 07 87 d8 2b'H
  3227. A.3.2. Password to Key Sample Results using SHA
  3228. The following shows a sample output of the password to key algorithm
  3229. for a 20-octet key using SHA.
  3230. With a password of "maplesyrup" the output of the password to key
  3231. algorithm before the key is localized with the SNMP engine's
  3232. snmpEngineID is:
  3233. '9f b5 cc 03 81 49 7b 37 93 52 89 39 ff 78 8d 5d 79 14 52 11'H
  3234. After the intermediate key (shown above) is localized with the
  3235. snmpEngineID value of:
  3236. '00 00 00 00 00 00 00 00 00 00 00 02'H
  3237. the final output of the password to key algorithm is:
  3238. '66 95 fe bc 92 88 e3 62 82 23 5f c7 15 1f 12 84 97 b3 8f 3f'H
  3239. A.4. Sample Encoding of msgSecurityParameters
  3240. The msgSecurityParameters in an SNMP message are represented as an
  3241. OCTET STRING. This OCTET STRING should be considered opaque outside
  3242. a specific Security Model.
  3243. Blumenthal & Wijnen Standards Track [Page 83]
  3244. RFC 3414 USM for SNMPv3 December 2002
  3245. The User-based Security Model defines the contents of the OCTET
  3246. STRING as a SEQUENCE (see section 2.4).
  3247. Given these two properties, the following is an example of they
  3248. msgSecurityParameters for the User-based Security Model, encoded as
  3249. an OCTET STRING:
  3250. 04 <length>
  3251. 30 <length>
  3252. 04 <length> <msgAuthoritativeEngineID>
  3253. 02 <length> <msgAuthoritativeEngineBoots>
  3254. 02 <length> <msgAuthoritativeEngineTime>
  3255. 04 <length> <msgUserName>
  3256. 04 0c <HMAC-MD5-96-digest>
  3257. 04 08 <salt>
  3258. Here is the example once more, but now with real values (except for
  3259. the digest in msgAuthenticationParameters and the salt in
  3260. msgPrivacyParameters, which depend on variable data that we have not
  3261. defined here):
  3262. Hex Data Description
  3263. -------------- -----------------------------------------------
  3264. 04 39 OCTET STRING, length 57
  3265. 30 37 SEQUENCE, length 55
  3266. 04 0c 80000002 msgAuthoritativeEngineID: IBM
  3267. 01 IPv4 address
  3268. 09840301 9.132.3.1
  3269. 02 01 01 msgAuthoritativeEngineBoots: 1
  3270. 02 02 0101 msgAuthoritativeEngineTime: 257
  3271. 04 04 62657274 msgUserName: bert
  3272. 04 0c 01234567 msgAuthenticationParameters: sample value
  3273. 89abcdef
  3274. fedcba98
  3275. 04 08 01234567 msgPrivacyParameters: sample value
  3276. 89abcdef
  3277. A.5. Sample keyChange Results
  3278. A.5.1. Sample keyChange Results using MD5
  3279. Let us assume that a user has a current password of "maplesyrup" as
  3280. in section A.3.1. and let us also assume the snmpEngineID of 12
  3281. octets:
  3282. '00 00 00 00 00 00 00 00 00 00 00 02'H
  3283. Blumenthal & Wijnen Standards Track [Page 84]
  3284. RFC 3414 USM for SNMPv3 December 2002
  3285. If we now want to change the password to "newsyrup", then we first
  3286. calculate the key for the new password. It is as follows:
  3287. '01 ad d2 73 10 7c 4e 59 6b 4b 00 f8 2b 1d 42 a7'H
  3288. If we localize it for the above snmpEngineID, then the localized new
  3289. key becomes:
  3290. '87 02 1d 7b d9 d1 01 ba 05 ea 6e 3b f9 d9 bd 4a'H
  3291. If we then use a (not so good, but easy to test) random value of:
  3292. '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'H
  3293. Then the value we must send for keyChange is:
  3294. '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  3295. 88 05 61 51 41 67 6c c9 19 61 74 e7 42 a3 25 51'H
  3296. If this were for the privacy key, then it would be exactly the same.
  3297. A.5.2. Sample keyChange Results using SHA
  3298. Let us assume that a user has a current password of "maplesyrup" as
  3299. in section A.3.2. and let us also assume the snmpEngineID of 12
  3300. octets:
  3301. '00 00 00 00 00 00 00 00 00 00 00 02'H
  3302. If we now want to change the password to "newsyrup", then we first
  3303. calculate the key for the new password. It is as follows:
  3304. '3a 51 a6 d7 36 aa 34 7b 83 dc 4a 87 e3 e5 5e e4 d6 98 ac 71'H
  3305. If we localize it for the above snmpEngineID, then the localized new
  3306. key becomes:
  3307. '78 e2 dc ce 79 d5 94 03 b5 8c 1b ba a5 bf f4 63 91 f1 cd 25'H
  3308. If we then use a (not so good, but easy to test) random value of:
  3309. '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'H
  3310. Then the value we must send for keyChange is:
  3311. '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  3312. 9c 10 17 f4 fd 48 3d 2d e8 d5 fa db f8 43 92 cb 06 45 70 51'
  3313. Blumenthal & Wijnen Standards Track [Page 85]
  3314. RFC 3414 USM for SNMPv3 December 2002
  3315. For the key used for privacy, the new nonlocalized key would be:
  3316. '3a 51 a6 d7 36 aa 34 7b 83 dc 4a 87 e3 e5 5e e4 d6 98 ac 71'H
  3317. For the key used for privacy, the new localized key would be (note
  3318. that they localized key gets truncated to 16 octets for DES):
  3319. '78 e2 dc ce 79 d5 94 03 b5 8c 1b ba a5 bf f4 63'H
  3320. If we then use a (not so good, but easy to test) random value of:
  3321. '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'H
  3322. Then the value we must send for keyChange for the privacy key is:
  3323. '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  3324. '7e f8 d8 a4 c9 cd b2 6b 47 59 1c d8 52 ff 88 b5'H
  3325. B. Change Log
  3326. Changes made since RFC2574:
  3327. - Updated references
  3328. - Updated contact info
  3329. - Clarifications
  3330. - to first constraint item 1) on page 6.
  3331. - to usmUserCloneFrom DESCRIPTION clause
  3332. - to securityName in section 2.1
  3333. - Fixed "command responder" into "command generator" in last para of
  3334. DESCRIPTION clause of usmUserTable.
  3335. Changes made since RFC2274:
  3336. - Fixed msgUserName to allow size of zero and explain that this can
  3337. be used for snmpEngineID discovery.
  3338. - Clarified section 3.1 steps 4.b, 5, 6 and 8.b.
  3339. - Clarified section 3.2 paragraph 2.
  3340. - Clarified section 3.2 step 7.a last paragraph, step 7.b.1 second
  3341. bullet and step 7.b.2 third bullet.
  3342. - Clarified section 4 to indicate that discovery can use a userName
  3343. of zero length in unAuthenticated messages, whereas a valid
  3344. userName must be used in authenticated messages.
  3345. - Added REVISION clauses to MODULE-IDENTITY
  3346. - Clarified KeyChange TC by adding a note that localized keys must be
  3347. used when calculating a KeyChange value.
  3348. - Added clarifying text to the DESCRIPTION clause of usmUserTable.
  3349. Added text describes a recommended procedure for adding a new user.
  3350. - Clarified the use of usmUserCloneFrom object.
  3351. Blumenthal & Wijnen Standards Track [Page 86]
  3352. RFC 3414 USM for SNMPv3 December 2002
  3353. - Clarified how and under which conditions the usmUserAuthProtocol
  3354. and usmUserPrivProtocol can be initialized and/or changed.
  3355. - Added comment on typical sizes for usmUserAuthKeyChange and
  3356. usmUserPrivKeyChange. Also for usmUserOwnAuthKeyChange and
  3357. usmUserOwnPrivKeyChange.
  3358. - Added clarifications to the DESCRIPTION clauses of
  3359. usmUserAuthKeyChange, usmUserOwnAuthKeychange, usmUserPrivKeyChange
  3360. and usmUserOwnPrivKeychange.
  3361. - Added clarification to DESCRIPTION clause of usmUserStorageType.
  3362. - Added clarification to DESCRIPTION clause of usmUserStatus.
  3363. - Clarified IV generation procedure in section 8.1.1.1 and in
  3364. addition clarified section 8.3.1 step 1 and section 8.3.2. step 3.
  3365. - Clarified section 11.2 and added a warning that different size
  3366. passwords with repetitive strings may result in same key.
  3367. - Added template users to appendix A for cloning process.
  3368. - Fixed C-code examples in Appendix A.
  3369. - Fixed examples of generated keys in Appendix A.
  3370. - Added examples of KeyChange values to Appendix A.
  3371. - Used PDU Classes instead of RFC1905 PDU types.
  3372. - Added text in the security section about Reports and Access Control
  3373. to the MIB.
  3374. - Removed a incorrect note at the end of section 3.2 step 7.
  3375. - Added a note in section 3.2 step 3.
  3376. - Corrected various spelling errors and typos.
  3377. - Corrected procedure for 3.2 step 2.a)
  3378. - various clarifications.
  3379. - Fixed references to new/revised documents
  3380. - Change to no longer cache data that is not used
  3381. Editors' Addresses
  3382. Uri Blumenthal
  3383. Lucent Technologies
  3384. 67 Whippany Rd.
  3385. Whippany, NJ 07981
  3386. USA
  3387. Phone: +1-973-386-2163
  3388. EMail: uri@lucent.com
  3389. Bert Wijnen
  3390. Lucent Technologies
  3391. Schagen 33
  3392. 3461 GL Linschoten
  3393. Netherlands
  3394. Phone: +31-348-480-685
  3395. EMail: bwijnen@lucent.com
  3396. Blumenthal & Wijnen Standards Track [Page 87]
  3397. RFC 3414 USM for SNMPv3 December 2002
  3398. Full Copyright Statement
  3399. Copyright (C) The Internet Society (2002). All Rights Reserved.
  3400. This document and translations of it may be copied and furnished to
  3401. others, and derivative works that comment on or otherwise explain it
  3402. or assist in its implementation may be prepared, copied, published
  3403. and distributed, in whole or in part, without restriction of any
  3404. kind, provided that the above copyright notice and this paragraph are
  3405. included on all such copies and derivative works. However, this
  3406. document itself may not be modified in any way, such as by removing
  3407. the copyright notice or references to the Internet Society or other
  3408. Internet organizations, except as needed for the purpose of
  3409. developing Internet standards in which case the procedures for
  3410. copyrights defined in the Internet Standards process must be
  3411. followed, or as required to translate it into languages other than
  3412. English.
  3413. The limited permissions granted above are perpetual and will not be
  3414. revoked by the Internet Society or its successors or assigns.
  3415. This document and the information contained herein is provided on an
  3416. "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  3417. TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  3418. BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  3419. HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  3420. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  3421. Acknowledgement
  3422. Funding for the RFC Editor function is currently provided by the
  3423. Internet Society.
  3424. Blumenthal & Wijnen Standards Track [Page 88]