testmgr.h 355 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731
  1. /*
  2. * Algorithm testing framework and tests.
  3. *
  4. * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
  5. * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
  6. * Copyright (c) 2007 Nokia Siemens Networks
  7. * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
  8. *
  9. * Updated RFC4106 AES-GCM testing. Some test vectors were taken from
  10. * http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/
  11. * gcm/gcm-test-vectors.tar.gz
  12. * Authors: Aidan O'Mahony (aidan.o.mahony@intel.com)
  13. * Adrian Hoban <adrian.hoban@intel.com>
  14. * Gabriele Paoloni <gabriele.paoloni@intel.com>
  15. * Tadeusz Struk (tadeusz.struk@intel.com)
  16. * Copyright (c) 2010, Intel Corporation.
  17. *
  18. * This program is free software; you can redistribute it and/or modify it
  19. * under the terms of the GNU General Public License as published by the Free
  20. * Software Foundation; either version 2 of the License, or (at your option)
  21. * any later version.
  22. *
  23. */
  24. #ifndef _CRYPTO_TESTMGR_H
  25. #define _CRYPTO_TESTMGR_H
  26. #include <linux/netlink.h>
  27. #include <linux/zlib.h>
  28. #include <crypto/compress.h>
  29. #define MAX_DIGEST_SIZE 64
  30. #define MAX_TAP 8
  31. #define MAX_KEYLEN 56
  32. #define MAX_IVLEN 32
  33. struct hash_testvec {
  34. /* only used with keyed hash algorithms */
  35. char *key;
  36. char *plaintext;
  37. char *digest;
  38. unsigned char tap[MAX_TAP];
  39. unsigned char psize;
  40. unsigned char np;
  41. unsigned char ksize;
  42. };
  43. struct cipher_testvec {
  44. char *key;
  45. char *iv;
  46. char *input;
  47. char *result;
  48. unsigned short tap[MAX_TAP];
  49. int np;
  50. unsigned char fail;
  51. unsigned char wk; /* weak key flag */
  52. unsigned char klen;
  53. unsigned short ilen;
  54. unsigned short rlen;
  55. };
  56. struct aead_testvec {
  57. char *key;
  58. char *iv;
  59. char *input;
  60. char *assoc;
  61. char *result;
  62. unsigned char tap[MAX_TAP];
  63. unsigned char atap[MAX_TAP];
  64. int np;
  65. int anp;
  66. unsigned char fail;
  67. unsigned char novrfy; /* ccm dec verification failure expected */
  68. unsigned char wk; /* weak key flag */
  69. unsigned char klen;
  70. unsigned short ilen;
  71. unsigned short alen;
  72. unsigned short rlen;
  73. };
  74. struct cprng_testvec {
  75. char *key;
  76. char *dt;
  77. char *v;
  78. char *result;
  79. unsigned char klen;
  80. unsigned short dtlen;
  81. unsigned short vlen;
  82. unsigned short rlen;
  83. unsigned short loops;
  84. };
  85. static char zeroed_string[48];
  86. /*
  87. * MD4 test vectors from RFC1320
  88. */
  89. #define MD4_TEST_VECTORS 7
  90. static struct hash_testvec md4_tv_template [] = {
  91. {
  92. .plaintext = "",
  93. .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
  94. "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
  95. }, {
  96. .plaintext = "a",
  97. .psize = 1,
  98. .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
  99. "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
  100. }, {
  101. .plaintext = "abc",
  102. .psize = 3,
  103. .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
  104. "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
  105. }, {
  106. .plaintext = "message digest",
  107. .psize = 14,
  108. .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
  109. "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
  110. }, {
  111. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  112. .psize = 26,
  113. .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
  114. "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
  115. .np = 2,
  116. .tap = { 13, 13 },
  117. }, {
  118. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  119. .psize = 62,
  120. .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
  121. "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
  122. }, {
  123. .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
  124. "45678901234567890",
  125. .psize = 80,
  126. .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
  127. "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
  128. },
  129. };
  130. /*
  131. * MD5 test vectors from RFC1321
  132. */
  133. #define MD5_TEST_VECTORS 7
  134. static struct hash_testvec md5_tv_template[] = {
  135. {
  136. .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
  137. "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
  138. }, {
  139. .plaintext = "a",
  140. .psize = 1,
  141. .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
  142. "\x31\xc3\x99\xe2\x69\x77\x26\x61",
  143. }, {
  144. .plaintext = "abc",
  145. .psize = 3,
  146. .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
  147. "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
  148. }, {
  149. .plaintext = "message digest",
  150. .psize = 14,
  151. .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
  152. "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
  153. }, {
  154. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  155. .psize = 26,
  156. .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
  157. "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
  158. .np = 2,
  159. .tap = {13, 13}
  160. }, {
  161. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  162. .psize = 62,
  163. .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
  164. "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
  165. }, {
  166. .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
  167. "345678901234567890",
  168. .psize = 80,
  169. .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
  170. "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
  171. }
  172. };
  173. /*
  174. * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
  175. */
  176. #define RMD128_TEST_VECTORS 10
  177. static struct hash_testvec rmd128_tv_template[] = {
  178. {
  179. .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
  180. "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
  181. }, {
  182. .plaintext = "a",
  183. .psize = 1,
  184. .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
  185. "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
  186. }, {
  187. .plaintext = "abc",
  188. .psize = 3,
  189. .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
  190. "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
  191. }, {
  192. .plaintext = "message digest",
  193. .psize = 14,
  194. .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
  195. "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
  196. }, {
  197. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  198. .psize = 26,
  199. .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
  200. "\x10\x71\x49\x22\xb3\x71\x83\x4e",
  201. }, {
  202. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  203. "fghijklmnopqrstuvwxyz0123456789",
  204. .psize = 62,
  205. .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
  206. "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
  207. }, {
  208. .plaintext = "1234567890123456789012345678901234567890"
  209. "1234567890123456789012345678901234567890",
  210. .psize = 80,
  211. .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
  212. "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
  213. }, {
  214. .plaintext = "abcdbcdecdefdefgefghfghighij"
  215. "hijkijkljklmklmnlmnomnopnopq",
  216. .psize = 56,
  217. .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
  218. "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
  219. .np = 2,
  220. .tap = { 28, 28 },
  221. }, {
  222. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  223. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  224. "lmnopqrsmnopqrstnopqrstu",
  225. .psize = 112,
  226. .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
  227. "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
  228. }, {
  229. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  230. .psize = 32,
  231. .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
  232. "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
  233. }
  234. };
  235. /*
  236. * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
  237. */
  238. #define RMD160_TEST_VECTORS 10
  239. static struct hash_testvec rmd160_tv_template[] = {
  240. {
  241. .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
  242. "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
  243. }, {
  244. .plaintext = "a",
  245. .psize = 1,
  246. .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
  247. "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
  248. }, {
  249. .plaintext = "abc",
  250. .psize = 3,
  251. .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
  252. "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
  253. }, {
  254. .plaintext = "message digest",
  255. .psize = 14,
  256. .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
  257. "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
  258. }, {
  259. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  260. .psize = 26,
  261. .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
  262. "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
  263. }, {
  264. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  265. "fghijklmnopqrstuvwxyz0123456789",
  266. .psize = 62,
  267. .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
  268. "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
  269. }, {
  270. .plaintext = "1234567890123456789012345678901234567890"
  271. "1234567890123456789012345678901234567890",
  272. .psize = 80,
  273. .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
  274. "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
  275. }, {
  276. .plaintext = "abcdbcdecdefdefgefghfghighij"
  277. "hijkijkljklmklmnlmnomnopnopq",
  278. .psize = 56,
  279. .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
  280. "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
  281. .np = 2,
  282. .tap = { 28, 28 },
  283. }, {
  284. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  285. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  286. "lmnopqrsmnopqrstnopqrstu",
  287. .psize = 112,
  288. .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
  289. "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
  290. }, {
  291. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  292. .psize = 32,
  293. .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
  294. "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
  295. }
  296. };
  297. /*
  298. * RIPEMD-256 test vectors
  299. */
  300. #define RMD256_TEST_VECTORS 8
  301. static struct hash_testvec rmd256_tv_template[] = {
  302. {
  303. .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
  304. "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
  305. "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
  306. "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
  307. }, {
  308. .plaintext = "a",
  309. .psize = 1,
  310. .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
  311. "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
  312. "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
  313. "\xcd\x88\x3a\x91\x34\x69\x29\x25",
  314. }, {
  315. .plaintext = "abc",
  316. .psize = 3,
  317. .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
  318. "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
  319. "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
  320. "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
  321. }, {
  322. .plaintext = "message digest",
  323. .psize = 14,
  324. .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
  325. "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
  326. "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
  327. "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
  328. }, {
  329. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  330. .psize = 26,
  331. .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
  332. "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
  333. "\x78\x96\x11\x8a\x51\x97\x96\x87"
  334. "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
  335. }, {
  336. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  337. "fghijklmnopqrstuvwxyz0123456789",
  338. .psize = 62,
  339. .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
  340. "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
  341. "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
  342. "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
  343. }, {
  344. .plaintext = "1234567890123456789012345678901234567890"
  345. "1234567890123456789012345678901234567890",
  346. .psize = 80,
  347. .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
  348. "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
  349. "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
  350. "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
  351. }, {
  352. .plaintext = "abcdbcdecdefdefgefghfghighij"
  353. "hijkijkljklmklmnlmnomnopnopq",
  354. .psize = 56,
  355. .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
  356. "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
  357. "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
  358. "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
  359. .np = 2,
  360. .tap = { 28, 28 },
  361. }
  362. };
  363. /*
  364. * RIPEMD-320 test vectors
  365. */
  366. #define RMD320_TEST_VECTORS 8
  367. static struct hash_testvec rmd320_tv_template[] = {
  368. {
  369. .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
  370. "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
  371. "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
  372. "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
  373. }, {
  374. .plaintext = "a",
  375. .psize = 1,
  376. .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
  377. "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
  378. "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
  379. "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
  380. }, {
  381. .plaintext = "abc",
  382. .psize = 3,
  383. .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
  384. "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
  385. "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
  386. "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
  387. }, {
  388. .plaintext = "message digest",
  389. .psize = 14,
  390. .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
  391. "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
  392. "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
  393. "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
  394. }, {
  395. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  396. .psize = 26,
  397. .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
  398. "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
  399. "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
  400. "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
  401. }, {
  402. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  403. "fghijklmnopqrstuvwxyz0123456789",
  404. .psize = 62,
  405. .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
  406. "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
  407. "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
  408. "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
  409. }, {
  410. .plaintext = "1234567890123456789012345678901234567890"
  411. "1234567890123456789012345678901234567890",
  412. .psize = 80,
  413. .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
  414. "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
  415. "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
  416. "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
  417. }, {
  418. .plaintext = "abcdbcdecdefdefgefghfghighij"
  419. "hijkijkljklmklmnlmnomnopnopq",
  420. .psize = 56,
  421. .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
  422. "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
  423. "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
  424. "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
  425. .np = 2,
  426. .tap = { 28, 28 },
  427. }
  428. };
  429. /*
  430. * SHA1 test vectors from from FIPS PUB 180-1
  431. * Long vector from CAVS 5.0
  432. */
  433. #define SHA1_TEST_VECTORS 3
  434. static struct hash_testvec sha1_tv_template[] = {
  435. {
  436. .plaintext = "abc",
  437. .psize = 3,
  438. .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
  439. "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
  440. }, {
  441. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  442. .psize = 56,
  443. .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
  444. "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
  445. .np = 2,
  446. .tap = { 28, 28 }
  447. }, {
  448. .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
  449. "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
  450. "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
  451. "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
  452. "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
  453. "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
  454. "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
  455. "\x72\x28\x26\xc0\x66\x86\x9e\xda"
  456. "\xcd\x73\xb2\x54\x80\x35\x18\x58"
  457. "\x13\xe2\x26\x34\xa9\xda\x44\x00"
  458. "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
  459. "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
  460. "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
  461. "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
  462. "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
  463. "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
  464. "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
  465. "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
  466. "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
  467. "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
  468. "\x5a\x90\x11",
  469. .psize = 163,
  470. .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
  471. "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
  472. .np = 4,
  473. .tap = { 63, 64, 31, 5 }
  474. }
  475. };
  476. /*
  477. * SHA224 test vectors from from FIPS PUB 180-2
  478. */
  479. #define SHA224_TEST_VECTORS 2
  480. static struct hash_testvec sha224_tv_template[] = {
  481. {
  482. .plaintext = "abc",
  483. .psize = 3,
  484. .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
  485. "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
  486. "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
  487. "\xE3\x6C\x9D\xA7",
  488. }, {
  489. .plaintext =
  490. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  491. .psize = 56,
  492. .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
  493. "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
  494. "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
  495. "\x52\x52\x25\x25",
  496. .np = 2,
  497. .tap = { 28, 28 }
  498. }
  499. };
  500. /*
  501. * SHA256 test vectors from from NIST
  502. */
  503. #define SHA256_TEST_VECTORS 2
  504. static struct hash_testvec sha256_tv_template[] = {
  505. {
  506. .plaintext = "abc",
  507. .psize = 3,
  508. .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
  509. "\x41\x41\x40\xde\x5d\xae\x22\x23"
  510. "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
  511. "\xb4\x10\xff\x61\xf2\x00\x15\xad",
  512. }, {
  513. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  514. .psize = 56,
  515. .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
  516. "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
  517. "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
  518. "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
  519. .np = 2,
  520. .tap = { 28, 28 }
  521. },
  522. };
  523. /*
  524. * SHA384 test vectors from from NIST and kerneli
  525. */
  526. #define SHA384_TEST_VECTORS 4
  527. static struct hash_testvec sha384_tv_template[] = {
  528. {
  529. .plaintext= "abc",
  530. .psize = 3,
  531. .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
  532. "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
  533. "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
  534. "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
  535. "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
  536. "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
  537. }, {
  538. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  539. .psize = 56,
  540. .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
  541. "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
  542. "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
  543. "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
  544. "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
  545. "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
  546. }, {
  547. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  548. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  549. .psize = 112,
  550. .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
  551. "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
  552. "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
  553. "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
  554. "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
  555. "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
  556. }, {
  557. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  558. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  559. .psize = 104,
  560. .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
  561. "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
  562. "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
  563. "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
  564. "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
  565. "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
  566. .np = 4,
  567. .tap = { 26, 26, 26, 26 }
  568. },
  569. };
  570. /*
  571. * SHA512 test vectors from from NIST and kerneli
  572. */
  573. #define SHA512_TEST_VECTORS 4
  574. static struct hash_testvec sha512_tv_template[] = {
  575. {
  576. .plaintext = "abc",
  577. .psize = 3,
  578. .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
  579. "\xcc\x41\x73\x49\xae\x20\x41\x31"
  580. "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
  581. "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
  582. "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
  583. "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
  584. "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
  585. "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
  586. }, {
  587. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  588. .psize = 56,
  589. .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
  590. "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
  591. "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
  592. "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
  593. "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
  594. "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
  595. "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
  596. "\x54\xec\x63\x12\x38\xca\x34\x45",
  597. }, {
  598. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  599. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  600. .psize = 112,
  601. .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
  602. "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
  603. "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
  604. "\x72\x99\xae\xad\xb6\x88\x90\x18"
  605. "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
  606. "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
  607. "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
  608. "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
  609. }, {
  610. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  611. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  612. .psize = 104,
  613. .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
  614. "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
  615. "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
  616. "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
  617. "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
  618. "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
  619. "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
  620. "\xed\xb4\x19\x87\x23\x28\x50\xc9",
  621. .np = 4,
  622. .tap = { 26, 26, 26, 26 }
  623. },
  624. };
  625. /*
  626. * WHIRLPOOL test vectors from Whirlpool package
  627. * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
  628. * submission
  629. */
  630. #define WP512_TEST_VECTORS 8
  631. static struct hash_testvec wp512_tv_template[] = {
  632. {
  633. .plaintext = "",
  634. .psize = 0,
  635. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  636. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  637. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  638. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  639. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  640. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
  641. "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
  642. "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
  643. }, {
  644. .plaintext = "a",
  645. .psize = 1,
  646. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  647. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  648. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  649. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  650. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  651. "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
  652. "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
  653. "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
  654. }, {
  655. .plaintext = "abc",
  656. .psize = 3,
  657. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  658. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  659. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  660. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  661. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  662. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
  663. "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
  664. "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
  665. }, {
  666. .plaintext = "message digest",
  667. .psize = 14,
  668. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  669. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  670. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  671. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  672. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  673. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
  674. "\x92\xED\x92\x00\x52\x83\x8F\x33"
  675. "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
  676. }, {
  677. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  678. .psize = 26,
  679. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  680. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  681. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  682. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  683. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  684. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
  685. "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
  686. "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
  687. }, {
  688. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  689. "abcdefghijklmnopqrstuvwxyz0123456789",
  690. .psize = 62,
  691. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  692. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  693. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  694. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  695. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  696. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
  697. "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
  698. "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
  699. }, {
  700. .plaintext = "1234567890123456789012345678901234567890"
  701. "1234567890123456789012345678901234567890",
  702. .psize = 80,
  703. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  704. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  705. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  706. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  707. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  708. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
  709. "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
  710. "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
  711. }, {
  712. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  713. .psize = 32,
  714. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  715. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  716. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  717. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  718. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  719. "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
  720. "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
  721. "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
  722. },
  723. };
  724. #define WP384_TEST_VECTORS 8
  725. static struct hash_testvec wp384_tv_template[] = {
  726. {
  727. .plaintext = "",
  728. .psize = 0,
  729. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  730. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  731. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  732. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  733. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  734. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
  735. }, {
  736. .plaintext = "a",
  737. .psize = 1,
  738. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  739. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  740. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  741. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  742. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  743. "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
  744. }, {
  745. .plaintext = "abc",
  746. .psize = 3,
  747. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  748. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  749. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  750. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  751. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  752. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
  753. }, {
  754. .plaintext = "message digest",
  755. .psize = 14,
  756. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  757. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  758. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  759. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  760. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  761. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
  762. }, {
  763. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  764. .psize = 26,
  765. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  766. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  767. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  768. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  769. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  770. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
  771. }, {
  772. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  773. "abcdefghijklmnopqrstuvwxyz0123456789",
  774. .psize = 62,
  775. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  776. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  777. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  778. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  779. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  780. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
  781. }, {
  782. .plaintext = "1234567890123456789012345678901234567890"
  783. "1234567890123456789012345678901234567890",
  784. .psize = 80,
  785. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  786. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  787. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  788. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  789. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  790. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
  791. }, {
  792. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  793. .psize = 32,
  794. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  795. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  796. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  797. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  798. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  799. "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
  800. },
  801. };
  802. #define WP256_TEST_VECTORS 8
  803. static struct hash_testvec wp256_tv_template[] = {
  804. {
  805. .plaintext = "",
  806. .psize = 0,
  807. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  808. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  809. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  810. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
  811. }, {
  812. .plaintext = "a",
  813. .psize = 1,
  814. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  815. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  816. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  817. "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
  818. }, {
  819. .plaintext = "abc",
  820. .psize = 3,
  821. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  822. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  823. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  824. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
  825. }, {
  826. .plaintext = "message digest",
  827. .psize = 14,
  828. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  829. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  830. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  831. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
  832. }, {
  833. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  834. .psize = 26,
  835. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  836. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  837. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  838. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
  839. }, {
  840. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  841. "abcdefghijklmnopqrstuvwxyz0123456789",
  842. .psize = 62,
  843. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  844. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  845. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  846. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
  847. }, {
  848. .plaintext = "1234567890123456789012345678901234567890"
  849. "1234567890123456789012345678901234567890",
  850. .psize = 80,
  851. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  852. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  853. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  854. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
  855. }, {
  856. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  857. .psize = 32,
  858. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  859. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  860. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  861. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
  862. },
  863. };
  864. /*
  865. * TIGER test vectors from Tiger website
  866. */
  867. #define TGR192_TEST_VECTORS 6
  868. static struct hash_testvec tgr192_tv_template[] = {
  869. {
  870. .plaintext = "",
  871. .psize = 0,
  872. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  873. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  874. "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
  875. }, {
  876. .plaintext = "abc",
  877. .psize = 3,
  878. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  879. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  880. "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
  881. }, {
  882. .plaintext = "Tiger",
  883. .psize = 5,
  884. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  885. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  886. "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
  887. }, {
  888. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  889. .psize = 64,
  890. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  891. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  892. "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
  893. }, {
  894. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  895. .psize = 64,
  896. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  897. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  898. "\x57\x89\x65\x65\x97\x5f\x91\x97",
  899. }, {
  900. .plaintext = "Tiger - A Fast New Hash Function, "
  901. "by Ross Anderson and Eli Biham, "
  902. "proceedings of Fast Software Encryption 3, "
  903. "Cambridge, 1996.",
  904. .psize = 125,
  905. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  906. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  907. "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
  908. },
  909. };
  910. #define TGR160_TEST_VECTORS 6
  911. static struct hash_testvec tgr160_tv_template[] = {
  912. {
  913. .plaintext = "",
  914. .psize = 0,
  915. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  916. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  917. "\xf3\x73\xde\x2d",
  918. }, {
  919. .plaintext = "abc",
  920. .psize = 3,
  921. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  922. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  923. "\x93\x5f\x7b\x95",
  924. }, {
  925. .plaintext = "Tiger",
  926. .psize = 5,
  927. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  928. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  929. "\x37\x79\x0c\x11",
  930. }, {
  931. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  932. .psize = 64,
  933. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  934. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  935. "\xb5\x86\x44\x50",
  936. }, {
  937. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  938. .psize = 64,
  939. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  940. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  941. "\x57\x89\x65\x65",
  942. }, {
  943. .plaintext = "Tiger - A Fast New Hash Function, "
  944. "by Ross Anderson and Eli Biham, "
  945. "proceedings of Fast Software Encryption 3, "
  946. "Cambridge, 1996.",
  947. .psize = 125,
  948. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  949. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  950. "\xdd\x68\x15\x1d",
  951. },
  952. };
  953. #define TGR128_TEST_VECTORS 6
  954. static struct hash_testvec tgr128_tv_template[] = {
  955. {
  956. .plaintext = "",
  957. .psize = 0,
  958. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  959. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
  960. }, {
  961. .plaintext = "abc",
  962. .psize = 3,
  963. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  964. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
  965. }, {
  966. .plaintext = "Tiger",
  967. .psize = 5,
  968. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  969. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
  970. }, {
  971. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  972. .psize = 64,
  973. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  974. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
  975. }, {
  976. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  977. .psize = 64,
  978. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  979. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
  980. }, {
  981. .plaintext = "Tiger - A Fast New Hash Function, "
  982. "by Ross Anderson and Eli Biham, "
  983. "proceedings of Fast Software Encryption 3, "
  984. "Cambridge, 1996.",
  985. .psize = 125,
  986. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  987. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
  988. },
  989. };
  990. #define GHASH_TEST_VECTORS 1
  991. static struct hash_testvec ghash_tv_template[] =
  992. {
  993. {
  994. .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
  995. .ksize = 16,
  996. .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
  997. .psize = 16,
  998. .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
  999. "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
  1000. },
  1001. };
  1002. /*
  1003. * HMAC-MD5 test vectors from RFC2202
  1004. * (These need to be fixed to not use strlen).
  1005. */
  1006. #define HMAC_MD5_TEST_VECTORS 7
  1007. static struct hash_testvec hmac_md5_tv_template[] =
  1008. {
  1009. {
  1010. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1011. .ksize = 16,
  1012. .plaintext = "Hi There",
  1013. .psize = 8,
  1014. .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
  1015. "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
  1016. }, {
  1017. .key = "Jefe",
  1018. .ksize = 4,
  1019. .plaintext = "what do ya want for nothing?",
  1020. .psize = 28,
  1021. .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
  1022. "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
  1023. .np = 2,
  1024. .tap = {14, 14}
  1025. }, {
  1026. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1027. .ksize = 16,
  1028. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1029. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1030. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1031. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1032. .psize = 50,
  1033. .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
  1034. "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
  1035. }, {
  1036. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1037. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1038. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1039. .ksize = 25,
  1040. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1041. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1042. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1043. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1044. .psize = 50,
  1045. .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
  1046. "\x3a\x75\x16\x47\x46\xff\xaa\x79",
  1047. }, {
  1048. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1049. .ksize = 16,
  1050. .plaintext = "Test With Truncation",
  1051. .psize = 20,
  1052. .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
  1053. "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
  1054. }, {
  1055. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1056. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1057. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1058. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1059. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1060. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1061. "\xaa\xaa",
  1062. .ksize = 80,
  1063. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1064. .psize = 54,
  1065. .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
  1066. "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
  1067. }, {
  1068. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1069. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1070. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1071. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1072. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1073. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1074. "\xaa\xaa",
  1075. .ksize = 80,
  1076. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1077. "Block-Size Data",
  1078. .psize = 73,
  1079. .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
  1080. "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
  1081. },
  1082. };
  1083. /*
  1084. * HMAC-RIPEMD128 test vectors from RFC2286
  1085. */
  1086. #define HMAC_RMD128_TEST_VECTORS 7
  1087. static struct hash_testvec hmac_rmd128_tv_template[] = {
  1088. {
  1089. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1090. .ksize = 16,
  1091. .plaintext = "Hi There",
  1092. .psize = 8,
  1093. .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
  1094. "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
  1095. }, {
  1096. .key = "Jefe",
  1097. .ksize = 4,
  1098. .plaintext = "what do ya want for nothing?",
  1099. .psize = 28,
  1100. .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
  1101. "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
  1102. .np = 2,
  1103. .tap = { 14, 14 },
  1104. }, {
  1105. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1106. .ksize = 16,
  1107. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1108. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1109. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1110. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1111. .psize = 50,
  1112. .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
  1113. "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
  1114. }, {
  1115. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1116. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1117. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1118. .ksize = 25,
  1119. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1120. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1121. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1122. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1123. .psize = 50,
  1124. .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
  1125. "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
  1126. }, {
  1127. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1128. .ksize = 16,
  1129. .plaintext = "Test With Truncation",
  1130. .psize = 20,
  1131. .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
  1132. "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
  1133. }, {
  1134. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1135. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1136. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1137. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1138. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1139. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1140. "\xaa\xaa",
  1141. .ksize = 80,
  1142. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1143. .psize = 54,
  1144. .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
  1145. "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
  1146. }, {
  1147. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1148. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1149. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1150. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1151. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1152. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1153. "\xaa\xaa",
  1154. .ksize = 80,
  1155. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1156. "Block-Size Data",
  1157. .psize = 73,
  1158. .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
  1159. "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
  1160. },
  1161. };
  1162. /*
  1163. * HMAC-RIPEMD160 test vectors from RFC2286
  1164. */
  1165. #define HMAC_RMD160_TEST_VECTORS 7
  1166. static struct hash_testvec hmac_rmd160_tv_template[] = {
  1167. {
  1168. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1169. .ksize = 20,
  1170. .plaintext = "Hi There",
  1171. .psize = 8,
  1172. .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
  1173. "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
  1174. }, {
  1175. .key = "Jefe",
  1176. .ksize = 4,
  1177. .plaintext = "what do ya want for nothing?",
  1178. .psize = 28,
  1179. .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
  1180. "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
  1181. .np = 2,
  1182. .tap = { 14, 14 },
  1183. }, {
  1184. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1185. .ksize = 20,
  1186. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1187. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1188. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1189. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1190. .psize = 50,
  1191. .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
  1192. "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
  1193. }, {
  1194. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1195. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1196. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1197. .ksize = 25,
  1198. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1199. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1200. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1201. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1202. .psize = 50,
  1203. .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
  1204. "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
  1205. }, {
  1206. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1207. .ksize = 20,
  1208. .plaintext = "Test With Truncation",
  1209. .psize = 20,
  1210. .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
  1211. "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
  1212. }, {
  1213. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1214. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1215. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1216. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1217. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1218. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1219. "\xaa\xaa",
  1220. .ksize = 80,
  1221. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1222. .psize = 54,
  1223. .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
  1224. "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
  1225. }, {
  1226. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1227. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1228. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1229. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1230. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1231. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1232. "\xaa\xaa",
  1233. .ksize = 80,
  1234. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1235. "Block-Size Data",
  1236. .psize = 73,
  1237. .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
  1238. "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
  1239. },
  1240. };
  1241. /*
  1242. * HMAC-SHA1 test vectors from RFC2202
  1243. */
  1244. #define HMAC_SHA1_TEST_VECTORS 7
  1245. static struct hash_testvec hmac_sha1_tv_template[] = {
  1246. {
  1247. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1248. .ksize = 20,
  1249. .plaintext = "Hi There",
  1250. .psize = 8,
  1251. .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
  1252. "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
  1253. "\x46\xbe",
  1254. }, {
  1255. .key = "Jefe",
  1256. .ksize = 4,
  1257. .plaintext = "what do ya want for nothing?",
  1258. .psize = 28,
  1259. .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
  1260. "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
  1261. .np = 2,
  1262. .tap = { 14, 14 }
  1263. }, {
  1264. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1265. .ksize = 20,
  1266. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1267. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1268. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1269. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1270. .psize = 50,
  1271. .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
  1272. "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
  1273. }, {
  1274. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1275. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1276. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1277. .ksize = 25,
  1278. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1279. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1280. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1281. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1282. .psize = 50,
  1283. .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
  1284. "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
  1285. }, {
  1286. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1287. .ksize = 20,
  1288. .plaintext = "Test With Truncation",
  1289. .psize = 20,
  1290. .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
  1291. "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
  1292. }, {
  1293. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1294. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1295. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1296. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1297. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1298. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1299. "\xaa\xaa",
  1300. .ksize = 80,
  1301. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1302. .psize = 54,
  1303. .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
  1304. "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
  1305. }, {
  1306. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1307. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1308. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1309. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1310. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1311. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1312. "\xaa\xaa",
  1313. .ksize = 80,
  1314. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1315. "Block-Size Data",
  1316. .psize = 73,
  1317. .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
  1318. "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
  1319. },
  1320. };
  1321. /*
  1322. * SHA224 HMAC test vectors from RFC4231
  1323. */
  1324. #define HMAC_SHA224_TEST_VECTORS 4
  1325. static struct hash_testvec hmac_sha224_tv_template[] = {
  1326. {
  1327. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1328. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1329. "\x0b\x0b\x0b\x0b",
  1330. .ksize = 20,
  1331. /* ("Hi There") */
  1332. .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
  1333. .psize = 8,
  1334. .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
  1335. "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
  1336. "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
  1337. "\x53\x68\x4b\x22",
  1338. }, {
  1339. .key = "Jefe",
  1340. .ksize = 4,
  1341. /* ("what do ya want for nothing?") */
  1342. .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
  1343. "\x79\x61\x20\x77\x61\x6e\x74\x20"
  1344. "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
  1345. "\x69\x6e\x67\x3f",
  1346. .psize = 28,
  1347. .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
  1348. "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
  1349. "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
  1350. "\x8f\xd0\x5e\x44",
  1351. .np = 4,
  1352. .tap = { 7, 7, 7, 7 }
  1353. }, {
  1354. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1355. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1356. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1357. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1358. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1359. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1360. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1361. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1362. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1363. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1364. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1365. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1366. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1367. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1368. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1369. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1370. "\xaa\xaa\xaa",
  1371. .ksize = 131,
  1372. /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
  1373. .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
  1374. "\x6e\x67\x20\x4c\x61\x72\x67\x65"
  1375. "\x72\x20\x54\x68\x61\x6e\x20\x42"
  1376. "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
  1377. "\x65\x20\x4b\x65\x79\x20\x2d\x20"
  1378. "\x48\x61\x73\x68\x20\x4b\x65\x79"
  1379. "\x20\x46\x69\x72\x73\x74",
  1380. .psize = 54,
  1381. .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
  1382. "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
  1383. "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
  1384. "\x3f\xa6\x87\x0e",
  1385. }, {
  1386. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1387. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1388. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1389. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1390. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1391. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1392. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1393. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1394. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1395. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1396. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1397. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1398. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1399. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1400. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1401. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1402. "\xaa\xaa\xaa",
  1403. .ksize = 131,
  1404. /* ("This is a test using a larger than block-size key and a")
  1405. (" larger than block-size data. The key needs to be")
  1406. (" hashed before being used by the HMAC algorithm.") */
  1407. .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
  1408. "\x61\x20\x74\x65\x73\x74\x20\x75"
  1409. "\x73\x69\x6e\x67\x20\x61\x20\x6c"
  1410. "\x61\x72\x67\x65\x72\x20\x74\x68"
  1411. "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
  1412. "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
  1413. "\x79\x20\x61\x6e\x64\x20\x61\x20"
  1414. "\x6c\x61\x72\x67\x65\x72\x20\x74"
  1415. "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
  1416. "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
  1417. "\x61\x74\x61\x2e\x20\x54\x68\x65"
  1418. "\x20\x6b\x65\x79\x20\x6e\x65\x65"
  1419. "\x64\x73\x20\x74\x6f\x20\x62\x65"
  1420. "\x20\x68\x61\x73\x68\x65\x64\x20"
  1421. "\x62\x65\x66\x6f\x72\x65\x20\x62"
  1422. "\x65\x69\x6e\x67\x20\x75\x73\x65"
  1423. "\x64\x20\x62\x79\x20\x74\x68\x65"
  1424. "\x20\x48\x4d\x41\x43\x20\x61\x6c"
  1425. "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
  1426. .psize = 152,
  1427. .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
  1428. "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
  1429. "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
  1430. "\xf6\xf5\x65\xd1",
  1431. },
  1432. };
  1433. /*
  1434. * HMAC-SHA256 test vectors from
  1435. * draft-ietf-ipsec-ciph-sha-256-01.txt
  1436. */
  1437. #define HMAC_SHA256_TEST_VECTORS 10
  1438. static struct hash_testvec hmac_sha256_tv_template[] = {
  1439. {
  1440. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1441. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1442. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1443. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1444. .ksize = 32,
  1445. .plaintext = "abc",
  1446. .psize = 3,
  1447. .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
  1448. "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
  1449. "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
  1450. "\x92\x75\x90\x21\xcf\xab\x81\x81",
  1451. }, {
  1452. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1453. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1454. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1455. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1456. .ksize = 32,
  1457. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1458. .psize = 56,
  1459. .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
  1460. "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
  1461. "\xe6\x98\xe3\x61\x19\x42\x11\x49"
  1462. "\xea\x8c\x71\x24\x56\x69\x7d\x30",
  1463. }, {
  1464. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1465. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1466. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1467. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1468. .ksize = 32,
  1469. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
  1470. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1471. .psize = 112,
  1472. .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
  1473. "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
  1474. "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
  1475. "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
  1476. }, {
  1477. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1478. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1479. "\x0b\x0b\x0b\x0b\x0b\x0b",
  1480. .ksize = 32,
  1481. .plaintext = "Hi There",
  1482. .psize = 8,
  1483. .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
  1484. "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
  1485. "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
  1486. "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
  1487. }, {
  1488. .key = "Jefe",
  1489. .ksize = 4,
  1490. .plaintext = "what do ya want for nothing?",
  1491. .psize = 28,
  1492. .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
  1493. "\x6a\x04\x24\x26\x08\x95\x75\xc7"
  1494. "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
  1495. "\x9d\xec\x58\xb9\x64\xec\x38\x43",
  1496. .np = 2,
  1497. .tap = { 14, 14 }
  1498. }, {
  1499. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1500. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1501. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1502. .ksize = 32,
  1503. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1504. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1505. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1506. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1507. .psize = 50,
  1508. .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
  1509. "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
  1510. "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
  1511. "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
  1512. }, {
  1513. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1514. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1515. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1516. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  1517. "\x21\x22\x23\x24\x25",
  1518. .ksize = 37,
  1519. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1520. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1521. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1522. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1523. .psize = 50,
  1524. .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
  1525. "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
  1526. "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
  1527. "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
  1528. }, {
  1529. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1530. "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1531. "\x0c\x0c\x0c\x0c\x0c\x0c",
  1532. .ksize = 32,
  1533. .plaintext = "Test With Truncation",
  1534. .psize = 20,
  1535. .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
  1536. "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
  1537. "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
  1538. "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
  1539. }, {
  1540. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1541. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1542. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1543. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1544. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1545. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1546. "\xaa\xaa",
  1547. .ksize = 80,
  1548. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1549. .psize = 54,
  1550. .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
  1551. "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
  1552. "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
  1553. "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
  1554. }, {
  1555. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1556. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1557. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1558. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1559. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1560. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1561. "\xaa\xaa",
  1562. .ksize = 80,
  1563. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
  1564. "One Block-Size Data",
  1565. .psize = 73,
  1566. .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
  1567. "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
  1568. "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
  1569. "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
  1570. },
  1571. };
  1572. #define XCBC_AES_TEST_VECTORS 6
  1573. static struct hash_testvec aes_xcbc128_tv_template[] = {
  1574. {
  1575. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1576. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1577. .plaintext = zeroed_string,
  1578. .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
  1579. "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
  1580. .psize = 0,
  1581. .ksize = 16,
  1582. }, {
  1583. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1584. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1585. .plaintext = "\x00\x01\x02",
  1586. .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
  1587. "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
  1588. .psize = 3,
  1589. .ksize = 16,
  1590. } , {
  1591. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1592. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1593. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1594. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1595. .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
  1596. "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
  1597. .psize = 16,
  1598. .ksize = 16,
  1599. }, {
  1600. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1601. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1602. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1603. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1604. "\x10\x11\x12\x13",
  1605. .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
  1606. "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
  1607. .tap = { 10, 10 },
  1608. .psize = 20,
  1609. .np = 2,
  1610. .ksize = 16,
  1611. }, {
  1612. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1613. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1614. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1615. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1616. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1617. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  1618. .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
  1619. "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
  1620. .psize = 32,
  1621. .ksize = 16,
  1622. }, {
  1623. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1624. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1625. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1626. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1627. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1628. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  1629. "\x20\x21",
  1630. .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
  1631. "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
  1632. .tap = { 17, 17 },
  1633. .psize = 34,
  1634. .np = 2,
  1635. .ksize = 16,
  1636. }
  1637. };
  1638. #define VMAC_AES_TEST_VECTORS 8
  1639. static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
  1640. '\x02', '\x03', '\x02', '\x02',
  1641. '\x02', '\x04', '\x01', '\x07',
  1642. '\x04', '\x01', '\x04', '\x03',};
  1643. static char vmac_string2[128] = {'a', 'b', 'c',};
  1644. static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
  1645. 'a', 'b', 'c', 'a', 'b', 'c',
  1646. 'a', 'b', 'c', 'a', 'b', 'c',
  1647. 'a', 'b', 'c', 'a', 'b', 'c',
  1648. 'a', 'b', 'c', 'a', 'b', 'c',
  1649. 'a', 'b', 'c', 'a', 'b', 'c',
  1650. 'a', 'b', 'c', 'a', 'b', 'c',
  1651. 'a', 'b', 'c', 'a', 'b', 'c',
  1652. };
  1653. static struct hash_testvec aes_vmac128_tv_template[] = {
  1654. {
  1655. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1656. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1657. .plaintext = NULL,
  1658. .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
  1659. .psize = 0,
  1660. .ksize = 16,
  1661. }, {
  1662. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1663. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1664. .plaintext = vmac_string1,
  1665. .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
  1666. .psize = 128,
  1667. .ksize = 16,
  1668. }, {
  1669. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1670. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1671. .plaintext = vmac_string2,
  1672. .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
  1673. .psize = 128,
  1674. .ksize = 16,
  1675. }, {
  1676. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1677. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1678. .plaintext = vmac_string3,
  1679. .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
  1680. .psize = 128,
  1681. .ksize = 16,
  1682. }, {
  1683. .key = "abcdefghijklmnop",
  1684. .plaintext = NULL,
  1685. .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
  1686. .psize = 0,
  1687. .ksize = 16,
  1688. }, {
  1689. .key = "abcdefghijklmnop",
  1690. .plaintext = vmac_string1,
  1691. .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
  1692. .psize = 128,
  1693. .ksize = 16,
  1694. }, {
  1695. .key = "abcdefghijklmnop",
  1696. .plaintext = vmac_string2,
  1697. .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
  1698. .psize = 128,
  1699. .ksize = 16,
  1700. }, {
  1701. .key = "abcdefghijklmnop",
  1702. .plaintext = vmac_string3,
  1703. .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
  1704. .psize = 128,
  1705. .ksize = 16,
  1706. },
  1707. };
  1708. /*
  1709. * SHA384 HMAC test vectors from RFC4231
  1710. */
  1711. #define HMAC_SHA384_TEST_VECTORS 4
  1712. static struct hash_testvec hmac_sha384_tv_template[] = {
  1713. {
  1714. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1715. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1716. "\x0b\x0b\x0b\x0b",
  1717. .ksize = 20,
  1718. .plaintext = "Hi There",
  1719. .psize = 8,
  1720. .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
  1721. "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
  1722. "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
  1723. "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
  1724. "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
  1725. "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
  1726. }, {
  1727. .key = "Jefe",
  1728. .ksize = 4,
  1729. .plaintext = "what do ya want for nothing?",
  1730. .psize = 28,
  1731. .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
  1732. "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
  1733. "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
  1734. "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
  1735. "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
  1736. "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
  1737. .np = 4,
  1738. .tap = { 7, 7, 7, 7 }
  1739. }, {
  1740. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1741. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1742. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1743. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1744. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1745. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1746. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1747. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1748. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1749. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1750. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1751. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1752. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1753. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1754. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1755. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1756. "\xaa\xaa\xaa",
  1757. .ksize = 131,
  1758. .plaintext = "Test Using Larger Than Block-Siz"
  1759. "e Key - Hash Key First",
  1760. .psize = 54,
  1761. .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
  1762. "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
  1763. "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
  1764. "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
  1765. "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
  1766. "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
  1767. }, {
  1768. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1769. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1770. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1771. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1772. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1773. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1774. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1775. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1776. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1777. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1778. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1779. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1780. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1781. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1782. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1783. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1784. "\xaa\xaa\xaa",
  1785. .ksize = 131,
  1786. .plaintext = "This is a test u"
  1787. "sing a larger th"
  1788. "an block-size ke"
  1789. "y and a larger t"
  1790. "han block-size d"
  1791. "ata. The key nee"
  1792. "ds to be hashed "
  1793. "before being use"
  1794. "d by the HMAC al"
  1795. "gorithm.",
  1796. .psize = 152,
  1797. .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
  1798. "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
  1799. "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
  1800. "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
  1801. "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
  1802. "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
  1803. },
  1804. };
  1805. /*
  1806. * SHA512 HMAC test vectors from RFC4231
  1807. */
  1808. #define HMAC_SHA512_TEST_VECTORS 4
  1809. static struct hash_testvec hmac_sha512_tv_template[] = {
  1810. {
  1811. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1812. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1813. "\x0b\x0b\x0b\x0b",
  1814. .ksize = 20,
  1815. .plaintext = "Hi There",
  1816. .psize = 8,
  1817. .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
  1818. "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
  1819. "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
  1820. "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
  1821. "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
  1822. "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
  1823. "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
  1824. "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
  1825. }, {
  1826. .key = "Jefe",
  1827. .ksize = 4,
  1828. .plaintext = "what do ya want for nothing?",
  1829. .psize = 28,
  1830. .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
  1831. "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
  1832. "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
  1833. "\x10\x27\x0c\xd7\xea\x25\x05\x54"
  1834. "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
  1835. "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
  1836. "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
  1837. "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
  1838. .np = 4,
  1839. .tap = { 7, 7, 7, 7 }
  1840. }, {
  1841. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1842. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1843. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1844. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1845. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1846. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1847. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1848. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1849. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1850. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1851. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1852. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1853. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1854. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1855. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1856. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1857. "\xaa\xaa\xaa",
  1858. .ksize = 131,
  1859. .plaintext = "Test Using Large"
  1860. "r Than Block-Siz"
  1861. "e Key - Hash Key"
  1862. " First",
  1863. .psize = 54,
  1864. .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
  1865. "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
  1866. "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
  1867. "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
  1868. "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
  1869. "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
  1870. "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
  1871. "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
  1872. }, {
  1873. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1874. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1875. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1876. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1877. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1878. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1879. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1880. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1881. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1882. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1883. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1884. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1885. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1886. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1887. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1888. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1889. "\xaa\xaa\xaa",
  1890. .ksize = 131,
  1891. .plaintext =
  1892. "This is a test u"
  1893. "sing a larger th"
  1894. "an block-size ke"
  1895. "y and a larger t"
  1896. "han block-size d"
  1897. "ata. The key nee"
  1898. "ds to be hashed "
  1899. "before being use"
  1900. "d by the HMAC al"
  1901. "gorithm.",
  1902. .psize = 152,
  1903. .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
  1904. "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
  1905. "\xde\xbd\x71\xf8\x86\x72\x89\x86"
  1906. "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
  1907. "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
  1908. "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
  1909. "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
  1910. "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
  1911. },
  1912. };
  1913. /*
  1914. * DES test vectors.
  1915. */
  1916. #define DES_ENC_TEST_VECTORS 10
  1917. #define DES_DEC_TEST_VECTORS 4
  1918. #define DES_CBC_ENC_TEST_VECTORS 5
  1919. #define DES_CBC_DEC_TEST_VECTORS 4
  1920. #define DES3_EDE_ENC_TEST_VECTORS 3
  1921. #define DES3_EDE_DEC_TEST_VECTORS 3
  1922. #define DES3_EDE_CBC_ENC_TEST_VECTORS 1
  1923. #define DES3_EDE_CBC_DEC_TEST_VECTORS 1
  1924. static struct cipher_testvec des_enc_tv_template[] = {
  1925. { /* From Applied Cryptography */
  1926. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1927. .klen = 8,
  1928. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1929. .ilen = 8,
  1930. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1931. .rlen = 8,
  1932. }, { /* Same key, different plaintext block */
  1933. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1934. .klen = 8,
  1935. .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
  1936. .ilen = 8,
  1937. .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1938. .rlen = 8,
  1939. }, { /* Sbox test from NBS */
  1940. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1941. .klen = 8,
  1942. .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1943. .ilen = 8,
  1944. .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1945. .rlen = 8,
  1946. }, { /* Three blocks */
  1947. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1948. .klen = 8,
  1949. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1950. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1951. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1952. .ilen = 24,
  1953. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1954. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1955. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1956. .rlen = 24,
  1957. }, { /* Weak key */
  1958. .fail = 1,
  1959. .wk = 1,
  1960. .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
  1961. .klen = 8,
  1962. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1963. .ilen = 8,
  1964. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1965. .rlen = 8,
  1966. }, { /* Two blocks -- for testing encryption across pages */
  1967. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1968. .klen = 8,
  1969. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1970. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1971. .ilen = 16,
  1972. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1973. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1974. .rlen = 16,
  1975. .np = 2,
  1976. .tap = { 8, 8 }
  1977. }, { /* Four blocks -- for testing encryption with chunking */
  1978. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1979. .klen = 8,
  1980. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1981. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1982. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
  1983. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1984. .ilen = 32,
  1985. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1986. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1987. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
  1988. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1989. .rlen = 32,
  1990. .np = 3,
  1991. .tap = { 14, 10, 8 }
  1992. }, {
  1993. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1994. .klen = 8,
  1995. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1996. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1997. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1998. .ilen = 24,
  1999. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2000. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  2001. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  2002. .rlen = 24,
  2003. .np = 4,
  2004. .tap = { 2, 1, 3, 18 }
  2005. }, {
  2006. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2007. .klen = 8,
  2008. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2009. "\x22\x33\x44\x55\x66\x77\x88\x99",
  2010. .ilen = 16,
  2011. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2012. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  2013. .rlen = 16,
  2014. .np = 5,
  2015. .tap = { 2, 2, 2, 2, 8 }
  2016. }, {
  2017. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2018. .klen = 8,
  2019. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  2020. .ilen = 8,
  2021. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  2022. .rlen = 8,
  2023. .np = 8,
  2024. .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
  2025. },
  2026. };
  2027. static struct cipher_testvec des_dec_tv_template[] = {
  2028. { /* From Applied Cryptography */
  2029. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2030. .klen = 8,
  2031. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  2032. .ilen = 8,
  2033. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  2034. .rlen = 8,
  2035. }, { /* Sbox test from NBS */
  2036. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  2037. .klen = 8,
  2038. .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2039. .ilen = 8,
  2040. .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  2041. .rlen = 8,
  2042. }, { /* Two blocks, for chunking test */
  2043. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2044. .klen = 8,
  2045. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2046. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2047. .ilen = 16,
  2048. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2049. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  2050. .rlen = 16,
  2051. .np = 2,
  2052. .tap = { 8, 8 }
  2053. }, {
  2054. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2055. .klen = 8,
  2056. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2057. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2058. .ilen = 16,
  2059. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2060. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  2061. .rlen = 16,
  2062. .np = 3,
  2063. .tap = { 3, 12, 1 }
  2064. },
  2065. };
  2066. static struct cipher_testvec des_cbc_enc_tv_template[] = {
  2067. { /* From OpenSSL */
  2068. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2069. .klen = 8,
  2070. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2071. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2072. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2073. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2074. .ilen = 24,
  2075. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  2076. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  2077. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  2078. .rlen = 24,
  2079. }, { /* FIPS Pub 81 */
  2080. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2081. .klen = 8,
  2082. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  2083. .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  2084. .ilen = 8,
  2085. .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2086. .rlen = 8,
  2087. }, {
  2088. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2089. .klen = 8,
  2090. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2091. .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2092. .ilen = 8,
  2093. .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2094. .rlen = 8,
  2095. }, {
  2096. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2097. .klen = 8,
  2098. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2099. .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2100. .ilen = 8,
  2101. .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2102. .rlen = 8,
  2103. }, { /* Copy of openssl vector for chunk testing */
  2104. /* From OpenSSL */
  2105. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2106. .klen = 8,
  2107. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2108. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2109. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2110. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2111. .ilen = 24,
  2112. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  2113. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  2114. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  2115. .rlen = 24,
  2116. .np = 2,
  2117. .tap = { 13, 11 }
  2118. },
  2119. };
  2120. static struct cipher_testvec des_cbc_dec_tv_template[] = {
  2121. { /* FIPS Pub 81 */
  2122. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2123. .klen = 8,
  2124. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  2125. .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2126. .ilen = 8,
  2127. .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  2128. .rlen = 8,
  2129. }, {
  2130. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2131. .klen = 8,
  2132. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2133. .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2134. .ilen = 8,
  2135. .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2136. .rlen = 8,
  2137. }, {
  2138. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2139. .klen = 8,
  2140. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2141. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2142. .ilen = 8,
  2143. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2144. .rlen = 8,
  2145. }, { /* Copy of above, for chunk testing */
  2146. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2147. .klen = 8,
  2148. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2149. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2150. .ilen = 8,
  2151. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2152. .rlen = 8,
  2153. .np = 2,
  2154. .tap = { 4, 4 }
  2155. },
  2156. };
  2157. static struct cipher_testvec des3_ede_enc_tv_template[] = {
  2158. { /* These are from openssl */
  2159. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2160. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2161. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2162. .klen = 24,
  2163. .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2164. .ilen = 8,
  2165. .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2166. .rlen = 8,
  2167. }, {
  2168. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2169. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2170. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2171. .klen = 24,
  2172. .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2173. .ilen = 8,
  2174. .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2175. .rlen = 8,
  2176. }, {
  2177. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2178. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2179. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2180. .klen = 24,
  2181. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2182. .ilen = 8,
  2183. .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2184. .rlen = 8,
  2185. },
  2186. };
  2187. static struct cipher_testvec des3_ede_dec_tv_template[] = {
  2188. { /* These are from openssl */
  2189. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2190. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2191. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2192. .klen = 24,
  2193. .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2194. .ilen = 8,
  2195. .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2196. .rlen = 8,
  2197. }, {
  2198. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2199. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2200. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2201. .klen = 24,
  2202. .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2203. .ilen = 8,
  2204. .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2205. .rlen = 8,
  2206. }, {
  2207. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2208. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2209. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2210. .klen = 24,
  2211. .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2212. .ilen = 8,
  2213. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2214. .rlen = 8,
  2215. },
  2216. };
  2217. static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
  2218. { /* Generated from openssl */
  2219. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2220. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2221. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2222. .klen = 24,
  2223. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2224. .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2225. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2226. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2227. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2228. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2229. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2230. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2231. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2232. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2233. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2234. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2235. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2236. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2237. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2238. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2239. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2240. .ilen = 128,
  2241. .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2242. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2243. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2244. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2245. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2246. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2247. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2248. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2249. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2250. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2251. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2252. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2253. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2254. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2255. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2256. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2257. .rlen = 128,
  2258. },
  2259. };
  2260. static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
  2261. { /* Generated from openssl */
  2262. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2263. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2264. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2265. .klen = 24,
  2266. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2267. .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2268. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2269. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2270. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2271. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2272. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2273. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2274. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2275. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2276. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2277. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2278. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2279. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2280. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2281. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2282. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2283. .ilen = 128,
  2284. .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2285. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2286. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2287. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2288. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2289. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2290. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2291. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2292. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2293. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2294. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2295. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2296. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2297. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2298. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2299. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2300. .rlen = 128,
  2301. },
  2302. };
  2303. /*
  2304. * Blowfish test vectors.
  2305. */
  2306. #define BF_ENC_TEST_VECTORS 7
  2307. #define BF_DEC_TEST_VECTORS 7
  2308. #define BF_CBC_ENC_TEST_VECTORS 2
  2309. #define BF_CBC_DEC_TEST_VECTORS 2
  2310. #define BF_CTR_ENC_TEST_VECTORS 2
  2311. #define BF_CTR_DEC_TEST_VECTORS 2
  2312. static struct cipher_testvec bf_enc_tv_template[] = {
  2313. { /* DES test vectors from OpenSSL */
  2314. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2315. .klen = 8,
  2316. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2317. .ilen = 8,
  2318. .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2319. .rlen = 8,
  2320. }, {
  2321. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2322. .klen = 8,
  2323. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2324. .ilen = 8,
  2325. .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2326. .rlen = 8,
  2327. }, {
  2328. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2329. .klen = 8,
  2330. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2331. .ilen = 8,
  2332. .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2333. .rlen = 8,
  2334. }, { /* Vary the keylength... */
  2335. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2336. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2337. .klen = 16,
  2338. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2339. .ilen = 8,
  2340. .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2341. .rlen = 8,
  2342. }, {
  2343. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2344. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2345. "\x00\x11\x22\x33\x44",
  2346. .klen = 21,
  2347. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2348. .ilen = 8,
  2349. .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2350. .rlen = 8,
  2351. }, { /* Generated with bf488 */
  2352. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2353. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2354. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2355. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2356. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2357. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2358. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2359. .klen = 56,
  2360. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2361. .ilen = 8,
  2362. .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2363. .rlen = 8,
  2364. }, { /* Generated with Crypto++ */
  2365. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2366. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2367. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2368. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2369. .klen = 32,
  2370. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2371. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2372. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2373. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2374. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2375. .ilen = 40,
  2376. .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
  2377. "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
  2378. "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
  2379. "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
  2380. "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
  2381. .rlen = 40,
  2382. },
  2383. };
  2384. static struct cipher_testvec bf_dec_tv_template[] = {
  2385. { /* DES test vectors from OpenSSL */
  2386. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2387. .klen = 8,
  2388. .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2389. .ilen = 8,
  2390. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2391. .rlen = 8,
  2392. }, {
  2393. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2394. .klen = 8,
  2395. .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2396. .ilen = 8,
  2397. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2398. .rlen = 8,
  2399. }, {
  2400. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2401. .klen = 8,
  2402. .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2403. .ilen = 8,
  2404. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2405. .rlen = 8,
  2406. }, { /* Vary the keylength... */
  2407. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2408. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2409. .klen = 16,
  2410. .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2411. .ilen = 8,
  2412. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2413. .rlen = 8,
  2414. }, {
  2415. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2416. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2417. "\x00\x11\x22\x33\x44",
  2418. .klen = 21,
  2419. .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2420. .ilen = 8,
  2421. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2422. .rlen = 8,
  2423. }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
  2424. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2425. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2426. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2427. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2428. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2429. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2430. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2431. .klen = 56,
  2432. .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2433. .ilen = 8,
  2434. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2435. .rlen = 8,
  2436. }, { /* Generated with Crypto++ */
  2437. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2438. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2439. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2440. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2441. .klen = 32,
  2442. .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
  2443. "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
  2444. "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
  2445. "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
  2446. "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
  2447. .ilen = 40,
  2448. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2449. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2450. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2451. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2452. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2453. .rlen = 40,
  2454. },
  2455. };
  2456. static struct cipher_testvec bf_cbc_enc_tv_template[] = {
  2457. { /* From OpenSSL */
  2458. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2459. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2460. .klen = 16,
  2461. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2462. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2463. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2464. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2465. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2466. .ilen = 32,
  2467. .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2468. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2469. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2470. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2471. .rlen = 32,
  2472. }, { /* Generated with Crypto++ */
  2473. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2474. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2475. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2476. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2477. .klen = 32,
  2478. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2479. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2480. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2481. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2482. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2483. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2484. .ilen = 40,
  2485. .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
  2486. "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
  2487. "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
  2488. "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
  2489. "\x01\x9C\x93\x63\x51\x60\x82\xD2",
  2490. .rlen = 40,
  2491. },
  2492. };
  2493. static struct cipher_testvec bf_cbc_dec_tv_template[] = {
  2494. { /* From OpenSSL */
  2495. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2496. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2497. .klen = 16,
  2498. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2499. .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2500. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2501. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2502. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2503. .ilen = 32,
  2504. .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2505. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2506. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2507. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2508. .rlen = 32,
  2509. }, { /* Generated with Crypto++ */
  2510. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2511. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2512. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2513. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2514. .klen = 32,
  2515. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2516. .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
  2517. "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
  2518. "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
  2519. "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
  2520. "\x01\x9C\x93\x63\x51\x60\x82\xD2",
  2521. .ilen = 40,
  2522. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2523. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2524. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2525. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2526. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2527. .rlen = 40,
  2528. },
  2529. };
  2530. static struct cipher_testvec bf_ctr_enc_tv_template[] = {
  2531. { /* Generated with Crypto++ */
  2532. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2533. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2534. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2535. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2536. .klen = 32,
  2537. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2538. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2539. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2540. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2541. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2542. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2543. .ilen = 40,
  2544. .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2545. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2546. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2547. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2548. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
  2549. .rlen = 40,
  2550. }, { /* Generated with Crypto++ */
  2551. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2552. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2553. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2554. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2555. .klen = 32,
  2556. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2557. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2558. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2559. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2560. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2561. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2562. "\x6D\x04\x9B",
  2563. .ilen = 43,
  2564. .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2565. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2566. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2567. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2568. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
  2569. "\x3D\xA7\xE9",
  2570. .rlen = 43,
  2571. },
  2572. };
  2573. static struct cipher_testvec bf_ctr_dec_tv_template[] = {
  2574. { /* Generated with Crypto++ */
  2575. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2576. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2577. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2578. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2579. .klen = 32,
  2580. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2581. .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2582. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2583. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2584. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2585. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
  2586. .ilen = 40,
  2587. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2588. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2589. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2590. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2591. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2592. .rlen = 40,
  2593. }, { /* Generated with Crypto++ */
  2594. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2595. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2596. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2597. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2598. .klen = 32,
  2599. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2600. .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2601. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2602. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2603. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2604. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
  2605. "\x3D\xA7\xE9",
  2606. .ilen = 43,
  2607. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2608. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2609. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2610. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2611. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2612. "\x6D\x04\x9B",
  2613. .rlen = 43,
  2614. },
  2615. };
  2616. /*
  2617. * Twofish test vectors.
  2618. */
  2619. #define TF_ENC_TEST_VECTORS 4
  2620. #define TF_DEC_TEST_VECTORS 4
  2621. #define TF_CBC_ENC_TEST_VECTORS 5
  2622. #define TF_CBC_DEC_TEST_VECTORS 5
  2623. #define TF_CTR_ENC_TEST_VECTORS 2
  2624. #define TF_CTR_DEC_TEST_VECTORS 2
  2625. static struct cipher_testvec tf_enc_tv_template[] = {
  2626. {
  2627. .key = zeroed_string,
  2628. .klen = 16,
  2629. .input = zeroed_string,
  2630. .ilen = 16,
  2631. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2632. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2633. .rlen = 16,
  2634. }, {
  2635. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2636. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2637. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2638. .klen = 24,
  2639. .input = zeroed_string,
  2640. .ilen = 16,
  2641. .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2642. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2643. .rlen = 16,
  2644. }, {
  2645. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2646. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2647. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2648. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2649. .klen = 32,
  2650. .input = zeroed_string,
  2651. .ilen = 16,
  2652. .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2653. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2654. .rlen = 16,
  2655. }, { /* Generated with Crypto++ */
  2656. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  2657. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  2658. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  2659. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  2660. .klen = 32,
  2661. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2662. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2663. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2664. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2665. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2666. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2667. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2668. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2669. .ilen = 64,
  2670. .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
  2671. "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
  2672. "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
  2673. "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
  2674. "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
  2675. "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
  2676. "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
  2677. "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
  2678. .rlen = 64,
  2679. },
  2680. };
  2681. static struct cipher_testvec tf_dec_tv_template[] = {
  2682. {
  2683. .key = zeroed_string,
  2684. .klen = 16,
  2685. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2686. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2687. .ilen = 16,
  2688. .result = zeroed_string,
  2689. .rlen = 16,
  2690. }, {
  2691. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2692. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2693. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2694. .klen = 24,
  2695. .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2696. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2697. .ilen = 16,
  2698. .result = zeroed_string,
  2699. .rlen = 16,
  2700. }, {
  2701. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2702. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2703. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2704. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2705. .klen = 32,
  2706. .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2707. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2708. .ilen = 16,
  2709. .result = zeroed_string,
  2710. .rlen = 16,
  2711. }, { /* Generated with Crypto++ */
  2712. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  2713. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  2714. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  2715. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  2716. .klen = 32,
  2717. .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
  2718. "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
  2719. "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
  2720. "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
  2721. "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
  2722. "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
  2723. "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
  2724. "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
  2725. .ilen = 64,
  2726. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2727. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2728. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2729. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2730. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2731. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2732. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2733. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2734. .rlen = 64,
  2735. },
  2736. };
  2737. static struct cipher_testvec tf_cbc_enc_tv_template[] = {
  2738. { /* Generated with Nettle */
  2739. .key = zeroed_string,
  2740. .klen = 16,
  2741. .iv = zeroed_string,
  2742. .input = zeroed_string,
  2743. .ilen = 16,
  2744. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2745. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2746. .rlen = 16,
  2747. }, {
  2748. .key = zeroed_string,
  2749. .klen = 16,
  2750. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2751. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2752. .input = zeroed_string,
  2753. .ilen = 16,
  2754. .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2755. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2756. .rlen = 16,
  2757. }, {
  2758. .key = zeroed_string,
  2759. .klen = 16,
  2760. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2761. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2762. .input = zeroed_string,
  2763. .ilen = 16,
  2764. .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2765. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2766. .rlen = 16,
  2767. }, {
  2768. .key = zeroed_string,
  2769. .klen = 16,
  2770. .iv = zeroed_string,
  2771. .input = zeroed_string,
  2772. .ilen = 48,
  2773. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2774. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2775. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2776. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2777. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2778. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2779. .rlen = 48,
  2780. }, { /* Generated with Crypto++ */
  2781. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2782. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2783. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2784. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2785. .klen = 32,
  2786. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2787. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2788. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2789. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2790. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2791. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2792. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2793. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2794. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2795. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2796. .ilen = 64,
  2797. .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
  2798. "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
  2799. "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
  2800. "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
  2801. "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
  2802. "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
  2803. "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
  2804. "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
  2805. .rlen = 64,
  2806. },
  2807. };
  2808. static struct cipher_testvec tf_cbc_dec_tv_template[] = {
  2809. { /* Reverse of the first four above */
  2810. .key = zeroed_string,
  2811. .klen = 16,
  2812. .iv = zeroed_string,
  2813. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2814. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2815. .ilen = 16,
  2816. .result = zeroed_string,
  2817. .rlen = 16,
  2818. }, {
  2819. .key = zeroed_string,
  2820. .klen = 16,
  2821. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2822. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2823. .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2824. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2825. .ilen = 16,
  2826. .result = zeroed_string,
  2827. .rlen = 16,
  2828. }, {
  2829. .key = zeroed_string,
  2830. .klen = 16,
  2831. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2832. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2833. .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2834. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2835. .ilen = 16,
  2836. .result = zeroed_string,
  2837. .rlen = 16,
  2838. }, {
  2839. .key = zeroed_string,
  2840. .klen = 16,
  2841. .iv = zeroed_string,
  2842. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2843. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2844. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2845. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2846. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2847. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2848. .ilen = 48,
  2849. .result = zeroed_string,
  2850. .rlen = 48,
  2851. }, { /* Generated with Crypto++ */
  2852. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2853. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2854. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2855. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2856. .klen = 32,
  2857. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2858. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2859. .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
  2860. "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
  2861. "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
  2862. "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
  2863. "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
  2864. "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
  2865. "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
  2866. "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
  2867. .ilen = 64,
  2868. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2869. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2870. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2871. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2872. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2873. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2874. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2875. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2876. .rlen = 64,
  2877. },
  2878. };
  2879. static struct cipher_testvec tf_ctr_enc_tv_template[] = {
  2880. { /* Generated with Crypto++ */
  2881. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2882. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2883. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2884. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2885. .klen = 32,
  2886. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2887. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2888. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2889. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2890. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2891. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2892. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2893. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2894. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2895. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2896. .ilen = 64,
  2897. .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2898. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2899. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2900. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2901. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2902. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2903. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2904. "\x01\x41\x21\x12\x38\xAB\x52\x4F",
  2905. .rlen = 64,
  2906. }, { /* Generated with Crypto++ */
  2907. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2908. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2909. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2910. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2911. .klen = 32,
  2912. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2913. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2914. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2915. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2916. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2917. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2918. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2919. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2920. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2921. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  2922. "\xC3\x37\xCE",
  2923. .ilen = 67,
  2924. .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2925. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2926. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2927. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2928. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2929. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2930. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2931. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  2932. "\xA8\x57\x20",
  2933. .rlen = 67,
  2934. },
  2935. };
  2936. static struct cipher_testvec tf_ctr_dec_tv_template[] = {
  2937. { /* Generated with Crypto++ */
  2938. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2939. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2940. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2941. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2942. .klen = 32,
  2943. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2944. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2945. .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2946. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2947. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2948. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2949. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2950. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2951. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2952. "\x01\x41\x21\x12\x38\xAB\x52\x4F",
  2953. .ilen = 64,
  2954. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2955. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2956. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2957. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2958. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2959. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2960. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2961. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2962. .rlen = 64,
  2963. }, { /* Generated with Crypto++ */
  2964. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2965. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2966. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2967. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2968. .klen = 32,
  2969. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2970. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2971. .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2972. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2973. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2974. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2975. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2976. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2977. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2978. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  2979. "\xA8\x57\x20",
  2980. .ilen = 67,
  2981. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2982. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2983. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2984. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2985. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2986. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2987. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2988. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  2989. "\xC3\x37\xCE",
  2990. .rlen = 67,
  2991. },
  2992. };
  2993. /*
  2994. * Serpent test vectors. These are backwards because Serpent writes
  2995. * octet sequences in right-to-left mode.
  2996. */
  2997. #define SERPENT_ENC_TEST_VECTORS 4
  2998. #define SERPENT_DEC_TEST_VECTORS 4
  2999. #define TNEPRES_ENC_TEST_VECTORS 4
  3000. #define TNEPRES_DEC_TEST_VECTORS 4
  3001. static struct cipher_testvec serpent_enc_tv_template[] = {
  3002. {
  3003. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3004. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3005. .ilen = 16,
  3006. .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  3007. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  3008. .rlen = 16,
  3009. }, {
  3010. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3011. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3012. .klen = 16,
  3013. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3014. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3015. .ilen = 16,
  3016. .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  3017. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  3018. .rlen = 16,
  3019. }, {
  3020. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3021. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3022. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3023. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3024. .klen = 32,
  3025. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3026. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3027. .ilen = 16,
  3028. .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  3029. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  3030. .rlen = 16,
  3031. }, {
  3032. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  3033. .klen = 16,
  3034. .input = zeroed_string,
  3035. .ilen = 16,
  3036. .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  3037. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  3038. .rlen = 16,
  3039. },
  3040. };
  3041. static struct cipher_testvec tnepres_enc_tv_template[] = {
  3042. { /* KeySize=128, PT=0, I=1 */
  3043. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3044. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3045. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  3046. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3047. .klen = 16,
  3048. .ilen = 16,
  3049. .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
  3050. "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
  3051. .rlen = 16,
  3052. }, { /* KeySize=192, PT=0, I=1 */
  3053. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  3054. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3055. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3056. .klen = 24,
  3057. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3058. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3059. .ilen = 16,
  3060. .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
  3061. "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
  3062. .rlen = 16,
  3063. }, { /* KeySize=256, PT=0, I=1 */
  3064. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  3065. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3066. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3067. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3068. .klen = 32,
  3069. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3070. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3071. .ilen = 16,
  3072. .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
  3073. "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
  3074. .rlen = 16,
  3075. }, { /* KeySize=256, I=257 */
  3076. .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
  3077. "\x17\x16\x15\x14\x13\x12\x11\x10"
  3078. "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  3079. "\x07\x06\x05\x04\x03\x02\x01\x00",
  3080. .klen = 32,
  3081. .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  3082. "\x07\x06\x05\x04\x03\x02\x01\x00",
  3083. .ilen = 16,
  3084. .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
  3085. "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
  3086. .rlen = 16,
  3087. },
  3088. };
  3089. static struct cipher_testvec serpent_dec_tv_template[] = {
  3090. {
  3091. .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  3092. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  3093. .ilen = 16,
  3094. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3095. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3096. .rlen = 16,
  3097. }, {
  3098. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3099. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3100. .klen = 16,
  3101. .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  3102. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  3103. .ilen = 16,
  3104. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3105. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3106. .rlen = 16,
  3107. }, {
  3108. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3109. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3110. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3111. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3112. .klen = 32,
  3113. .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  3114. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  3115. .ilen = 16,
  3116. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3117. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3118. .rlen = 16,
  3119. }, {
  3120. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  3121. .klen = 16,
  3122. .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  3123. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  3124. .ilen = 16,
  3125. .result = zeroed_string,
  3126. .rlen = 16,
  3127. },
  3128. };
  3129. static struct cipher_testvec tnepres_dec_tv_template[] = {
  3130. {
  3131. .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
  3132. "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
  3133. .ilen = 16,
  3134. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3135. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3136. .rlen = 16,
  3137. }, {
  3138. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3139. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3140. .klen = 16,
  3141. .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
  3142. "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
  3143. .ilen = 16,
  3144. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3145. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3146. .rlen = 16,
  3147. }, {
  3148. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3149. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3150. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3151. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3152. .klen = 32,
  3153. .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
  3154. "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
  3155. .ilen = 16,
  3156. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3157. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3158. .rlen = 16,
  3159. }, { /* KeySize=128, I=121 */
  3160. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  3161. .klen = 16,
  3162. .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
  3163. "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
  3164. .ilen = 16,
  3165. .result = zeroed_string,
  3166. .rlen = 16,
  3167. },
  3168. };
  3169. /* Cast6 test vectors from RFC 2612 */
  3170. #define CAST6_ENC_TEST_VECTORS 3
  3171. #define CAST6_DEC_TEST_VECTORS 3
  3172. static struct cipher_testvec cast6_enc_tv_template[] = {
  3173. {
  3174. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  3175. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  3176. .klen = 16,
  3177. .input = zeroed_string,
  3178. .ilen = 16,
  3179. .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  3180. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  3181. .rlen = 16,
  3182. }, {
  3183. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  3184. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  3185. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  3186. .klen = 24,
  3187. .input = zeroed_string,
  3188. .ilen = 16,
  3189. .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  3190. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  3191. .rlen = 16,
  3192. }, {
  3193. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  3194. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  3195. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  3196. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  3197. .klen = 32,
  3198. .input = zeroed_string,
  3199. .ilen = 16,
  3200. .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  3201. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  3202. .rlen = 16,
  3203. },
  3204. };
  3205. static struct cipher_testvec cast6_dec_tv_template[] = {
  3206. {
  3207. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  3208. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  3209. .klen = 16,
  3210. .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  3211. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  3212. .ilen = 16,
  3213. .result = zeroed_string,
  3214. .rlen = 16,
  3215. }, {
  3216. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  3217. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  3218. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  3219. .klen = 24,
  3220. .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  3221. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  3222. .ilen = 16,
  3223. .result = zeroed_string,
  3224. .rlen = 16,
  3225. }, {
  3226. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  3227. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  3228. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  3229. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  3230. .klen = 32,
  3231. .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  3232. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  3233. .ilen = 16,
  3234. .result = zeroed_string,
  3235. .rlen = 16,
  3236. },
  3237. };
  3238. /*
  3239. * AES test vectors.
  3240. */
  3241. #define AES_ENC_TEST_VECTORS 3
  3242. #define AES_DEC_TEST_VECTORS 3
  3243. #define AES_CBC_ENC_TEST_VECTORS 4
  3244. #define AES_CBC_DEC_TEST_VECTORS 4
  3245. #define AES_LRW_ENC_TEST_VECTORS 8
  3246. #define AES_LRW_DEC_TEST_VECTORS 8
  3247. #define AES_XTS_ENC_TEST_VECTORS 5
  3248. #define AES_XTS_DEC_TEST_VECTORS 5
  3249. #define AES_CTR_ENC_TEST_VECTORS 3
  3250. #define AES_CTR_DEC_TEST_VECTORS 3
  3251. #define AES_OFB_ENC_TEST_VECTORS 1
  3252. #define AES_OFB_DEC_TEST_VECTORS 1
  3253. #define AES_CTR_3686_ENC_TEST_VECTORS 7
  3254. #define AES_CTR_3686_DEC_TEST_VECTORS 6
  3255. #define AES_GCM_ENC_TEST_VECTORS 9
  3256. #define AES_GCM_DEC_TEST_VECTORS 8
  3257. #define AES_GCM_4106_ENC_TEST_VECTORS 7
  3258. #define AES_GCM_4106_DEC_TEST_VECTORS 7
  3259. #define AES_CCM_ENC_TEST_VECTORS 7
  3260. #define AES_CCM_DEC_TEST_VECTORS 7
  3261. #define AES_CCM_4309_ENC_TEST_VECTORS 7
  3262. #define AES_CCM_4309_DEC_TEST_VECTORS 10
  3263. static struct cipher_testvec aes_enc_tv_template[] = {
  3264. { /* From FIPS-197 */
  3265. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3266. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3267. .klen = 16,
  3268. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  3269. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  3270. .ilen = 16,
  3271. .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  3272. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  3273. .rlen = 16,
  3274. }, {
  3275. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3276. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3277. "\x10\x11\x12\x13\x14\x15\x16\x17",
  3278. .klen = 24,
  3279. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  3280. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  3281. .ilen = 16,
  3282. .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  3283. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  3284. .rlen = 16,
  3285. }, {
  3286. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3287. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3288. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3289. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3290. .klen = 32,
  3291. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  3292. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  3293. .ilen = 16,
  3294. .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  3295. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  3296. .rlen = 16,
  3297. },
  3298. };
  3299. static struct cipher_testvec aes_dec_tv_template[] = {
  3300. { /* From FIPS-197 */
  3301. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3302. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3303. .klen = 16,
  3304. .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  3305. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  3306. .ilen = 16,
  3307. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  3308. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  3309. .rlen = 16,
  3310. }, {
  3311. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3312. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3313. "\x10\x11\x12\x13\x14\x15\x16\x17",
  3314. .klen = 24,
  3315. .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  3316. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  3317. .ilen = 16,
  3318. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  3319. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  3320. .rlen = 16,
  3321. }, {
  3322. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3323. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3324. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3325. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3326. .klen = 32,
  3327. .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  3328. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  3329. .ilen = 16,
  3330. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  3331. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  3332. .rlen = 16,
  3333. },
  3334. };
  3335. static struct cipher_testvec aes_cbc_enc_tv_template[] = {
  3336. { /* From RFC 3602 */
  3337. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  3338. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  3339. .klen = 16,
  3340. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  3341. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  3342. .input = "Single block msg",
  3343. .ilen = 16,
  3344. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  3345. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  3346. .rlen = 16,
  3347. }, {
  3348. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  3349. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  3350. .klen = 16,
  3351. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  3352. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  3353. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3354. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3355. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3356. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3357. .ilen = 32,
  3358. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  3359. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  3360. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  3361. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  3362. .rlen = 32,
  3363. }, { /* From NIST SP800-38A */
  3364. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  3365. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  3366. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  3367. .klen = 24,
  3368. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3369. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3370. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3371. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3372. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3373. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3374. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3375. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3376. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3377. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3378. .ilen = 64,
  3379. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  3380. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  3381. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  3382. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  3383. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  3384. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  3385. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  3386. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  3387. .rlen = 64,
  3388. }, {
  3389. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  3390. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  3391. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  3392. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  3393. .klen = 32,
  3394. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3395. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3396. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3397. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3398. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3399. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3400. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3401. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3402. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3403. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3404. .ilen = 64,
  3405. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  3406. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  3407. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  3408. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  3409. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  3410. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  3411. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  3412. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  3413. .rlen = 64,
  3414. },
  3415. };
  3416. static struct cipher_testvec aes_cbc_dec_tv_template[] = {
  3417. { /* From RFC 3602 */
  3418. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  3419. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  3420. .klen = 16,
  3421. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  3422. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  3423. .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  3424. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  3425. .ilen = 16,
  3426. .result = "Single block msg",
  3427. .rlen = 16,
  3428. }, {
  3429. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  3430. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  3431. .klen = 16,
  3432. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  3433. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  3434. .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  3435. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  3436. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  3437. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  3438. .ilen = 32,
  3439. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3440. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3441. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3442. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3443. .rlen = 32,
  3444. }, { /* From NIST SP800-38A */
  3445. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  3446. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  3447. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  3448. .klen = 24,
  3449. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3450. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3451. .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  3452. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  3453. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  3454. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  3455. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  3456. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  3457. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  3458. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  3459. .ilen = 64,
  3460. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3461. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3462. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3463. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3464. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3465. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3466. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3467. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3468. .rlen = 64,
  3469. }, {
  3470. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  3471. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  3472. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  3473. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  3474. .klen = 32,
  3475. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3476. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3477. .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  3478. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  3479. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  3480. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  3481. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  3482. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  3483. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  3484. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  3485. .ilen = 64,
  3486. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3487. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3488. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3489. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3490. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3491. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3492. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3493. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3494. .rlen = 64,
  3495. },
  3496. };
  3497. static struct cipher_testvec aes_lrw_enc_tv_template[] = {
  3498. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  3499. { /* LRW-32-AES 1 */
  3500. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3501. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3502. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3503. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3504. .klen = 32,
  3505. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3506. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3507. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3508. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3509. .ilen = 16,
  3510. .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  3511. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  3512. .rlen = 16,
  3513. }, { /* LRW-32-AES 2 */
  3514. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3515. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3516. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3517. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3518. .klen = 32,
  3519. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3520. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3521. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3522. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3523. .ilen = 16,
  3524. .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  3525. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  3526. .rlen = 16,
  3527. }, { /* LRW-32-AES 3 */
  3528. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3529. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3530. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3531. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3532. .klen = 32,
  3533. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3534. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3535. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3536. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3537. .ilen = 16,
  3538. .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  3539. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  3540. .rlen = 16,
  3541. }, { /* LRW-32-AES 4 */
  3542. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3543. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3544. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3545. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3546. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3547. .klen = 40,
  3548. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3549. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3550. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3551. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3552. .ilen = 16,
  3553. .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  3554. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  3555. .rlen = 16,
  3556. }, { /* LRW-32-AES 5 */
  3557. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3558. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3559. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3560. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3561. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3562. .klen = 40,
  3563. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3564. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3565. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3566. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3567. .ilen = 16,
  3568. .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  3569. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  3570. .rlen = 16,
  3571. }, { /* LRW-32-AES 6 */
  3572. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3573. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3574. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3575. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3576. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3577. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3578. .klen = 48,
  3579. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3580. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3581. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3582. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3583. .ilen = 16,
  3584. .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  3585. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  3586. .rlen = 16,
  3587. }, { /* LRW-32-AES 7 */
  3588. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3589. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3590. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3591. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3592. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3593. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3594. .klen = 48,
  3595. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3596. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3597. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3598. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3599. .ilen = 16,
  3600. .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  3601. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  3602. .rlen = 16,
  3603. }, {
  3604. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  3605. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3606. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3607. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3608. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3609. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3610. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3611. .klen = 48,
  3612. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3613. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3614. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3615. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3616. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3617. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3618. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3619. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3620. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3621. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3622. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3623. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3624. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3625. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3626. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3627. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3628. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3629. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3630. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3631. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3632. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3633. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3634. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3635. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3636. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3637. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3638. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3639. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3640. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3641. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3642. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3643. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3644. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3645. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3646. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3647. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3648. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3649. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3650. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3651. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3652. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3653. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3654. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3655. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3656. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3657. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3658. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3659. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3660. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3661. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3662. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3663. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3664. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3665. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3666. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3667. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3668. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3669. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3670. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3671. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3672. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3673. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3674. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3675. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3676. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3677. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3678. .ilen = 512,
  3679. .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  3680. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  3681. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  3682. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  3683. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  3684. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  3685. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  3686. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  3687. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  3688. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  3689. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  3690. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  3691. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  3692. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  3693. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  3694. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  3695. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  3696. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  3697. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  3698. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  3699. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  3700. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  3701. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  3702. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  3703. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  3704. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  3705. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  3706. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  3707. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  3708. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  3709. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  3710. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  3711. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  3712. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  3713. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  3714. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  3715. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  3716. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  3717. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  3718. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  3719. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  3720. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  3721. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  3722. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  3723. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  3724. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  3725. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  3726. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  3727. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  3728. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  3729. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  3730. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  3731. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  3732. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  3733. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  3734. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  3735. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  3736. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  3737. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  3738. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  3739. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  3740. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  3741. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  3742. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  3743. .rlen = 512,
  3744. }
  3745. };
  3746. static struct cipher_testvec aes_lrw_dec_tv_template[] = {
  3747. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  3748. /* same as enc vectors with input and result reversed */
  3749. { /* LRW-32-AES 1 */
  3750. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3751. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3752. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3753. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3754. .klen = 32,
  3755. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3756. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3757. .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  3758. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  3759. .ilen = 16,
  3760. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3761. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3762. .rlen = 16,
  3763. }, { /* LRW-32-AES 2 */
  3764. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3765. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3766. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3767. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3768. .klen = 32,
  3769. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3770. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3771. .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  3772. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  3773. .ilen = 16,
  3774. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3775. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3776. .rlen = 16,
  3777. }, { /* LRW-32-AES 3 */
  3778. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3779. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3780. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3781. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3782. .klen = 32,
  3783. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3784. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3785. .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  3786. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  3787. .ilen = 16,
  3788. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3789. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3790. .rlen = 16,
  3791. }, { /* LRW-32-AES 4 */
  3792. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3793. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3794. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3795. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3796. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3797. .klen = 40,
  3798. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3799. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3800. .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  3801. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  3802. .ilen = 16,
  3803. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3804. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3805. .rlen = 16,
  3806. }, { /* LRW-32-AES 5 */
  3807. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3808. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3809. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3810. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3811. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3812. .klen = 40,
  3813. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3814. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3815. .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  3816. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  3817. .ilen = 16,
  3818. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3819. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3820. .rlen = 16,
  3821. }, { /* LRW-32-AES 6 */
  3822. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3823. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3824. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3825. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3826. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3827. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3828. .klen = 48,
  3829. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3830. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3831. .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  3832. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  3833. .ilen = 16,
  3834. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3835. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3836. .rlen = 16,
  3837. }, { /* LRW-32-AES 7 */
  3838. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3839. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3840. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3841. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3842. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3843. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3844. .klen = 48,
  3845. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3846. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3847. .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  3848. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  3849. .ilen = 16,
  3850. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3851. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3852. .rlen = 16,
  3853. }, {
  3854. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  3855. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3856. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3857. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3858. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3859. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3860. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3861. .klen = 48,
  3862. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3863. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3864. .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  3865. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  3866. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  3867. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  3868. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  3869. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  3870. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  3871. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  3872. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  3873. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  3874. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  3875. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  3876. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  3877. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  3878. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  3879. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  3880. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  3881. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  3882. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  3883. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  3884. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  3885. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  3886. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  3887. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  3888. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  3889. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  3890. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  3891. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  3892. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  3893. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  3894. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  3895. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  3896. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  3897. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  3898. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  3899. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  3900. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  3901. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  3902. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  3903. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  3904. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  3905. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  3906. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  3907. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  3908. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  3909. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  3910. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  3911. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  3912. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  3913. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  3914. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  3915. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  3916. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  3917. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  3918. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  3919. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  3920. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  3921. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  3922. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  3923. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  3924. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  3925. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  3926. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  3927. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  3928. .ilen = 512,
  3929. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3930. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3931. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3932. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3933. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3934. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3935. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3936. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3937. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3938. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3939. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3940. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3941. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3942. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3943. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3944. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3945. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3946. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3947. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3948. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3949. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3950. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3951. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3952. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3953. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3954. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3955. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3956. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3957. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3958. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3959. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3960. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3961. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3962. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3963. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3964. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3965. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3966. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3967. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3968. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3969. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3970. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3971. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3972. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3973. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3974. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3975. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3976. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3977. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3978. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3979. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3980. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3981. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3982. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3983. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3984. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3985. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3986. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3987. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3988. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3989. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3990. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3991. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3992. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3993. .rlen = 512,
  3994. }
  3995. };
  3996. static struct cipher_testvec aes_xts_enc_tv_template[] = {
  3997. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  3998. { /* XTS-AES 1 */
  3999. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4000. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4001. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4002. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4003. .klen = 32,
  4004. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4005. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4006. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4007. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4008. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4009. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4010. .ilen = 32,
  4011. .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  4012. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  4013. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  4014. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  4015. .rlen = 32,
  4016. }, { /* XTS-AES 2 */
  4017. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  4018. "\x11\x11\x11\x11\x11\x11\x11\x11"
  4019. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4020. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4021. .klen = 32,
  4022. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4023. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4024. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4025. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4026. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4027. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4028. .ilen = 32,
  4029. .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  4030. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  4031. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  4032. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  4033. .rlen = 32,
  4034. }, { /* XTS-AES 3 */
  4035. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  4036. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  4037. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4038. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4039. .klen = 32,
  4040. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4041. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4042. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4043. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4044. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4045. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4046. .ilen = 32,
  4047. .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  4048. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  4049. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  4050. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  4051. .rlen = 32,
  4052. }, { /* XTS-AES 4 */
  4053. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4054. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4055. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4056. "\x23\x84\x62\x64\x33\x83\x27\x95",
  4057. .klen = 32,
  4058. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4059. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4060. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4061. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4062. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4063. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4064. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4065. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4066. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4067. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4068. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4069. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4070. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4071. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4072. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4073. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4074. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4075. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4076. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4077. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4078. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4079. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4080. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4081. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4082. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4083. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4084. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4085. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4086. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4087. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4088. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4089. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4090. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4091. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4092. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4093. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4094. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4095. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4096. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4097. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4098. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4099. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4100. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4101. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4102. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4103. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4104. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4105. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4106. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4107. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4108. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4109. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4110. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4111. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4112. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4113. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4114. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4115. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4116. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4117. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4118. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4119. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4120. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4121. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4122. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4123. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4124. .ilen = 512,
  4125. .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  4126. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  4127. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  4128. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  4129. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  4130. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  4131. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  4132. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  4133. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  4134. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  4135. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  4136. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  4137. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  4138. "\x22\x97\x61\x46\xae\x20\xce\x84"
  4139. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  4140. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  4141. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  4142. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  4143. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  4144. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  4145. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  4146. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  4147. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  4148. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  4149. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  4150. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  4151. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  4152. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  4153. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  4154. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  4155. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  4156. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  4157. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  4158. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  4159. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  4160. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  4161. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  4162. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  4163. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  4164. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  4165. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  4166. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  4167. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  4168. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  4169. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  4170. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  4171. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  4172. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  4173. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  4174. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  4175. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  4176. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  4177. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  4178. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  4179. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  4180. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  4181. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  4182. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  4183. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  4184. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  4185. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  4186. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  4187. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  4188. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  4189. .rlen = 512,
  4190. }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
  4191. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4192. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4193. "\x62\x49\x77\x57\x24\x70\x93\x69"
  4194. "\x99\x59\x57\x49\x66\x96\x76\x27"
  4195. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4196. "\x23\x84\x62\x64\x33\x83\x27\x95"
  4197. "\x02\x88\x41\x97\x16\x93\x99\x37"
  4198. "\x51\x05\x82\x09\x74\x94\x45\x92",
  4199. .klen = 64,
  4200. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  4201. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4202. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4203. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4204. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4205. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4206. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4207. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4208. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4209. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4210. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4211. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4212. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4213. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4214. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4215. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4216. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4217. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4218. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4219. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4220. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4221. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4222. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4223. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4224. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4225. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4226. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4227. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4228. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4229. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4230. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4231. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4232. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4233. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4234. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4235. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4236. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4237. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4238. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4239. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4240. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4241. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4242. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4243. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4244. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4245. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4246. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4247. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4248. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4249. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4250. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4251. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4252. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4253. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4254. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4255. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4256. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4257. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4258. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4259. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4260. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4261. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4262. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4263. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4264. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4265. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4266. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4267. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4268. .ilen = 512,
  4269. .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
  4270. "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
  4271. "\xea\x00\x80\x3f\x5e\x48\x23\x57"
  4272. "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
  4273. "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
  4274. "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
  4275. "\x68\x0a\x86\xac\x35\xad\xfc\x33"
  4276. "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
  4277. "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
  4278. "\xb1\x08\xfd\x10\x98\xba\xec\x70"
  4279. "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
  4280. "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
  4281. "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
  4282. "\xae\xba\x12\x29\x61\xd0\x3a\x75"
  4283. "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
  4284. "\x00\x02\x08\x87\x89\x14\x29\xca"
  4285. "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
  4286. "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
  4287. "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
  4288. "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
  4289. "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
  4290. "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
  4291. "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
  4292. "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
  4293. "\x93\xec\x05\xc5\x2e\x04\x93\xef"
  4294. "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
  4295. "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
  4296. "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
  4297. "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
  4298. "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
  4299. "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
  4300. "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
  4301. "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
  4302. "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
  4303. "\xbc\x48\x14\x57\x77\x8f\x61\x60"
  4304. "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
  4305. "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
  4306. "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
  4307. "\xf4\xc3\x33\xec\x44\x23\x88\x51"
  4308. "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
  4309. "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
  4310. "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
  4311. "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
  4312. "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
  4313. "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
  4314. "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
  4315. "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
  4316. "\x92\x5f\xed\xc4\xae\x74\xff\xac"
  4317. "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
  4318. "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
  4319. "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
  4320. "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
  4321. "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
  4322. "\x94\x30\x54\xff\x84\x01\x14\x93"
  4323. "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
  4324. "\x53\x76\x44\x1a\x77\xed\x43\x85"
  4325. "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
  4326. "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
  4327. "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
  4328. "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
  4329. "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
  4330. "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
  4331. "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
  4332. "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
  4333. .rlen = 512,
  4334. }
  4335. };
  4336. static struct cipher_testvec aes_xts_dec_tv_template[] = {
  4337. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  4338. { /* XTS-AES 1 */
  4339. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4340. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4341. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4342. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4343. .klen = 32,
  4344. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4345. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4346. .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  4347. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  4348. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  4349. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  4350. .ilen = 32,
  4351. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4352. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4353. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4354. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4355. .rlen = 32,
  4356. }, { /* XTS-AES 2 */
  4357. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  4358. "\x11\x11\x11\x11\x11\x11\x11\x11"
  4359. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4360. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4361. .klen = 32,
  4362. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4363. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4364. .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  4365. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  4366. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  4367. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  4368. .ilen = 32,
  4369. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4370. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4371. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4372. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4373. .rlen = 32,
  4374. }, { /* XTS-AES 3 */
  4375. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  4376. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  4377. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4378. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4379. .klen = 32,
  4380. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4381. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4382. .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  4383. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  4384. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  4385. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  4386. .ilen = 32,
  4387. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4388. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4389. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4390. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4391. .rlen = 32,
  4392. }, { /* XTS-AES 4 */
  4393. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4394. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4395. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4396. "\x23\x84\x62\x64\x33\x83\x27\x95",
  4397. .klen = 32,
  4398. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4399. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4400. .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  4401. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  4402. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  4403. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  4404. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  4405. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  4406. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  4407. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  4408. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  4409. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  4410. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  4411. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  4412. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  4413. "\x22\x97\x61\x46\xae\x20\xce\x84"
  4414. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  4415. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  4416. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  4417. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  4418. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  4419. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  4420. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  4421. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  4422. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  4423. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  4424. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  4425. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  4426. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  4427. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  4428. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  4429. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  4430. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  4431. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  4432. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  4433. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  4434. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  4435. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  4436. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  4437. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  4438. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  4439. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  4440. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  4441. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  4442. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  4443. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  4444. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  4445. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  4446. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  4447. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  4448. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  4449. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  4450. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  4451. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  4452. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  4453. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  4454. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  4455. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  4456. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  4457. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  4458. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  4459. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  4460. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  4461. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  4462. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  4463. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  4464. .ilen = 512,
  4465. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4466. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4467. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4468. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4469. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4470. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4471. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4472. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4473. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4474. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4475. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4476. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4477. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4478. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4479. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4480. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4481. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4482. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4483. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4484. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4485. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4486. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4487. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4488. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4489. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4490. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4491. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4492. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4493. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4494. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4495. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4496. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4497. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4498. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4499. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4500. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4501. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4502. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4503. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4504. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4505. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4506. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4507. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4508. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4509. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4510. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4511. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4512. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4513. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4514. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4515. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4516. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4517. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4518. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4519. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4520. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4521. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4522. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4523. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4524. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4525. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4526. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4527. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4528. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4529. .rlen = 512,
  4530. }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
  4531. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4532. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4533. "\x62\x49\x77\x57\x24\x70\x93\x69"
  4534. "\x99\x59\x57\x49\x66\x96\x76\x27"
  4535. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4536. "\x23\x84\x62\x64\x33\x83\x27\x95"
  4537. "\x02\x88\x41\x97\x16\x93\x99\x37"
  4538. "\x51\x05\x82\x09\x74\x94\x45\x92",
  4539. .klen = 64,
  4540. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  4541. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4542. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4543. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4544. .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
  4545. "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
  4546. "\xea\x00\x80\x3f\x5e\x48\x23\x57"
  4547. "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
  4548. "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
  4549. "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
  4550. "\x68\x0a\x86\xac\x35\xad\xfc\x33"
  4551. "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
  4552. "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
  4553. "\xb1\x08\xfd\x10\x98\xba\xec\x70"
  4554. "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
  4555. "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
  4556. "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
  4557. "\xae\xba\x12\x29\x61\xd0\x3a\x75"
  4558. "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
  4559. "\x00\x02\x08\x87\x89\x14\x29\xca"
  4560. "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
  4561. "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
  4562. "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
  4563. "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
  4564. "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
  4565. "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
  4566. "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
  4567. "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
  4568. "\x93\xec\x05\xc5\x2e\x04\x93\xef"
  4569. "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
  4570. "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
  4571. "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
  4572. "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
  4573. "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
  4574. "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
  4575. "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
  4576. "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
  4577. "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
  4578. "\xbc\x48\x14\x57\x77\x8f\x61\x60"
  4579. "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
  4580. "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
  4581. "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
  4582. "\xf4\xc3\x33\xec\x44\x23\x88\x51"
  4583. "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
  4584. "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
  4585. "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
  4586. "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
  4587. "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
  4588. "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
  4589. "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
  4590. "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
  4591. "\x92\x5f\xed\xc4\xae\x74\xff\xac"
  4592. "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
  4593. "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
  4594. "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
  4595. "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
  4596. "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
  4597. "\x94\x30\x54\xff\x84\x01\x14\x93"
  4598. "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
  4599. "\x53\x76\x44\x1a\x77\xed\x43\x85"
  4600. "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
  4601. "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
  4602. "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
  4603. "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
  4604. "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
  4605. "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
  4606. "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
  4607. "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
  4608. .ilen = 512,
  4609. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4610. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4611. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4612. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4613. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4614. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4615. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4616. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4617. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4618. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4619. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4620. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4621. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4622. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4623. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4624. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4625. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4626. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4627. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4628. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4629. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4630. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4631. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4632. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4633. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4634. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4635. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4636. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4637. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4638. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4639. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4640. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4641. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4642. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4643. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4644. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4645. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4646. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4647. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4648. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4649. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4650. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4651. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4652. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4653. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4654. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4655. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4656. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4657. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4658. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4659. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4660. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4661. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4662. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4663. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4664. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4665. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4666. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4667. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4668. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4669. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4670. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4671. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4672. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4673. .rlen = 512,
  4674. }
  4675. };
  4676. static struct cipher_testvec aes_ctr_enc_tv_template[] = {
  4677. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  4678. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  4679. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  4680. .klen = 16,
  4681. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4682. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4683. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4684. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4685. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4686. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4687. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4688. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4689. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4690. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4691. .ilen = 64,
  4692. .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  4693. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  4694. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  4695. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  4696. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  4697. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  4698. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  4699. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  4700. .rlen = 64,
  4701. }, {
  4702. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  4703. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  4704. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  4705. .klen = 24,
  4706. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4707. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4708. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4709. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4710. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4711. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4712. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4713. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4714. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4715. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4716. .ilen = 64,
  4717. .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  4718. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  4719. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  4720. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  4721. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  4722. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  4723. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  4724. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  4725. .rlen = 64,
  4726. }, {
  4727. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  4728. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  4729. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  4730. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  4731. .klen = 32,
  4732. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4733. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4734. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4735. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4736. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4737. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4738. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4739. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4740. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4741. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4742. .ilen = 64,
  4743. .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  4744. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  4745. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  4746. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  4747. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  4748. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  4749. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  4750. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  4751. .rlen = 64,
  4752. }
  4753. };
  4754. static struct cipher_testvec aes_ctr_dec_tv_template[] = {
  4755. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  4756. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  4757. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  4758. .klen = 16,
  4759. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4760. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4761. .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  4762. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  4763. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  4764. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  4765. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  4766. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  4767. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  4768. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  4769. .ilen = 64,
  4770. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4771. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4772. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4773. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4774. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4775. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4776. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4777. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4778. .rlen = 64,
  4779. }, {
  4780. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  4781. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  4782. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  4783. .klen = 24,
  4784. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4785. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4786. .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  4787. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  4788. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  4789. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  4790. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  4791. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  4792. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  4793. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  4794. .ilen = 64,
  4795. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4796. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4797. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4798. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4799. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4800. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4801. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4802. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4803. .rlen = 64,
  4804. }, {
  4805. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  4806. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  4807. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  4808. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  4809. .klen = 32,
  4810. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4811. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4812. .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  4813. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  4814. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  4815. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  4816. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  4817. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  4818. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  4819. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  4820. .ilen = 64,
  4821. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4822. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4823. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4824. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4825. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4826. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4827. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4828. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4829. .rlen = 64,
  4830. }
  4831. };
  4832. static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
  4833. { /* From RFC 3686 */
  4834. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  4835. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  4836. "\x00\x00\x00\x30",
  4837. .klen = 20,
  4838. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  4839. .input = "Single block msg",
  4840. .ilen = 16,
  4841. .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  4842. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  4843. .rlen = 16,
  4844. }, {
  4845. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  4846. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  4847. "\x00\x6c\xb6\xdb",
  4848. .klen = 20,
  4849. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  4850. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4851. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4852. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4853. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4854. .ilen = 32,
  4855. .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  4856. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  4857. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  4858. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  4859. .rlen = 32,
  4860. }, {
  4861. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  4862. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  4863. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  4864. "\x00\x00\x00\x48",
  4865. .klen = 28,
  4866. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  4867. .input = "Single block msg",
  4868. .ilen = 16,
  4869. .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  4870. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  4871. .rlen = 16,
  4872. }, {
  4873. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  4874. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  4875. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  4876. "\x00\x96\xb0\x3b",
  4877. .klen = 28,
  4878. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  4879. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4880. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4881. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4882. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4883. .ilen = 32,
  4884. .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  4885. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  4886. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  4887. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  4888. .rlen = 32,
  4889. }, {
  4890. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  4891. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  4892. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  4893. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  4894. "\x00\x00\x00\x60",
  4895. .klen = 36,
  4896. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  4897. .input = "Single block msg",
  4898. .ilen = 16,
  4899. .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  4900. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  4901. .rlen = 16,
  4902. }, {
  4903. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  4904. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  4905. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  4906. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  4907. "\x00\xfa\xac\x24",
  4908. .klen = 36,
  4909. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  4910. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4911. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4912. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4913. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4914. .ilen = 32,
  4915. .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  4916. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  4917. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  4918. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  4919. .rlen = 32,
  4920. }, {
  4921. // generated using Crypto++
  4922. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4923. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4924. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4925. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4926. "\x00\x00\x00\x00",
  4927. .klen = 32 + 4,
  4928. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  4929. .input =
  4930. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4931. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4932. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4933. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4934. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4935. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4936. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4937. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4938. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4939. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4940. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4941. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4942. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4943. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4944. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4945. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4946. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4947. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4948. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4949. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4950. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4951. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4952. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4953. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4954. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4955. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4956. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4957. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4958. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4959. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4960. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4961. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4962. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  4963. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  4964. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  4965. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  4966. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  4967. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  4968. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  4969. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  4970. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  4971. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  4972. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  4973. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  4974. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  4975. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  4976. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  4977. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  4978. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  4979. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  4980. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  4981. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  4982. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  4983. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  4984. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  4985. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  4986. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  4987. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  4988. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  4989. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  4990. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  4991. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  4992. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  4993. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  4994. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  4995. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  4996. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  4997. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  4998. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  4999. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  5000. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  5001. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  5002. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  5003. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  5004. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  5005. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  5006. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  5007. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  5008. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  5009. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  5010. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  5011. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  5012. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  5013. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  5014. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  5015. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  5016. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  5017. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  5018. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  5019. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  5020. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  5021. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  5022. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  5023. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  5024. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  5025. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  5026. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  5027. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  5028. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  5029. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  5030. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  5031. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  5032. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  5033. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  5034. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  5035. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  5036. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  5037. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  5038. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  5039. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  5040. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  5041. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  5042. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  5043. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  5044. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  5045. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  5046. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  5047. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  5048. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  5049. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  5050. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  5051. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  5052. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  5053. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  5054. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  5055. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  5056. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  5057. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  5058. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  5059. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  5060. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  5061. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  5062. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  5063. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  5064. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  5065. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  5066. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  5067. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  5068. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  5069. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  5070. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  5071. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  5072. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  5073. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  5074. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  5075. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  5076. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  5077. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  5078. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  5079. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  5080. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  5081. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  5082. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  5083. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  5084. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  5085. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  5086. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  5087. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  5088. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  5089. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  5090. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  5091. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  5092. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  5093. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  5094. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  5095. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  5096. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  5097. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  5098. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  5099. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  5100. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  5101. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  5102. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  5103. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  5104. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  5105. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  5106. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  5107. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  5108. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  5109. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  5110. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  5111. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  5112. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  5113. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  5114. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  5115. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  5116. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  5117. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  5118. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  5119. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  5120. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  5121. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  5122. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  5123. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  5124. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  5125. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  5126. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  5127. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  5128. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  5129. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  5130. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  5131. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  5132. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  5133. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  5134. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  5135. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  5136. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  5137. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  5138. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  5139. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  5140. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  5141. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  5142. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  5143. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  5144. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  5145. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  5146. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  5147. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  5148. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  5149. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  5150. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  5151. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  5152. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  5153. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  5154. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  5155. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  5156. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  5157. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  5158. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  5159. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  5160. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  5161. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  5162. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  5163. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  5164. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  5165. "\x28\x37\x46\x55\x64\x73\x82\x91"
  5166. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  5167. "\x18\x27\x36\x45\x54\x63\x72\x81"
  5168. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  5169. "\x08\x17\x26\x35\x44\x53\x62\x71"
  5170. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  5171. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  5172. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  5173. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  5174. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  5175. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  5176. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  5177. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  5178. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  5179. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  5180. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  5181. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  5182. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  5183. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  5184. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  5185. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  5186. "\x00\x11\x22\x33\x44\x55\x66\x77"
  5187. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  5188. "\x10\x21\x32\x43\x54\x65\x76\x87"
  5189. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  5190. "\x20\x31\x42\x53\x64\x75\x86\x97"
  5191. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  5192. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  5193. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  5194. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  5195. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  5196. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  5197. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  5198. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  5199. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  5200. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  5201. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  5202. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  5203. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  5204. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  5205. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  5206. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  5207. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  5208. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  5209. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  5210. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  5211. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  5212. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  5213. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  5214. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  5215. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  5216. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  5217. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  5218. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  5219. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  5220. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  5221. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  5222. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  5223. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  5224. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  5225. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  5226. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  5227. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  5228. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  5229. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  5230. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  5231. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  5232. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  5233. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  5234. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  5235. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  5236. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  5237. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  5238. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  5239. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  5240. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  5241. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  5242. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  5243. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  5244. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  5245. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  5246. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  5247. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  5248. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  5249. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  5250. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  5251. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  5252. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  5253. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  5254. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  5255. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  5256. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  5257. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  5258. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  5259. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  5260. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  5261. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  5262. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  5263. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  5264. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  5265. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  5266. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  5267. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  5268. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  5269. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  5270. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  5271. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  5272. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  5273. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  5274. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  5275. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  5276. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  5277. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  5278. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  5279. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  5280. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  5281. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  5282. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  5283. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  5284. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  5285. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  5286. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  5287. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  5288. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  5289. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  5290. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  5291. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  5292. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  5293. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  5294. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  5295. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  5296. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  5297. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  5298. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  5299. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  5300. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  5301. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  5302. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  5303. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  5304. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  5305. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  5306. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  5307. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  5308. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  5309. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  5310. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  5311. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  5312. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  5313. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  5314. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  5315. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  5316. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  5317. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  5318. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  5319. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  5320. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  5321. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  5322. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  5323. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  5324. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  5325. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  5326. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  5327. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  5328. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  5329. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  5330. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  5331. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  5332. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  5333. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  5334. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  5335. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  5336. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  5337. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  5338. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  5339. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  5340. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  5341. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  5342. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  5343. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  5344. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  5345. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  5346. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  5347. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  5348. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  5349. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  5350. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  5351. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  5352. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  5353. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  5354. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  5355. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  5356. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  5357. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  5358. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  5359. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  5360. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  5361. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  5362. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  5363. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  5364. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  5365. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  5366. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  5367. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  5368. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  5369. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  5370. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  5371. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  5372. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  5373. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  5374. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  5375. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  5376. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  5377. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  5378. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  5379. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  5380. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  5381. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  5382. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  5383. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  5384. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  5385. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  5386. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  5387. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  5388. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  5389. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  5390. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  5391. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  5392. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  5393. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  5394. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  5395. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  5396. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  5397. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  5398. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  5399. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  5400. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  5401. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  5402. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  5403. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  5404. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  5405. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  5406. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  5407. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  5408. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  5409. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  5410. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  5411. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  5412. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  5413. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  5414. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  5415. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  5416. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  5417. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  5418. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  5419. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  5420. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  5421. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  5422. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  5423. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  5424. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  5425. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  5426. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  5427. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  5428. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  5429. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  5430. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  5431. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  5432. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  5433. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  5434. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  5435. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  5436. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  5437. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  5438. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  5439. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  5440. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  5441. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  5442. "\x00\x21\x42\x63",
  5443. .ilen = 4100,
  5444. .result =
  5445. "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
  5446. "\xae\xff\x91\x3a\x44\xcf\x38\x32"
  5447. "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
  5448. "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
  5449. "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
  5450. "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
  5451. "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
  5452. "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
  5453. "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
  5454. "\x18\xff\x75\x6d\x06\x2d\x00\xab"
  5455. "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
  5456. "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
  5457. "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
  5458. "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
  5459. "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
  5460. "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
  5461. "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
  5462. "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
  5463. "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
  5464. "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
  5465. "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
  5466. "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
  5467. "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
  5468. "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
  5469. "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
  5470. "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
  5471. "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
  5472. "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
  5473. "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
  5474. "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
  5475. "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
  5476. "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
  5477. "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
  5478. "\x6a\x25\x15\x33\x4e\x45\x08\xec"
  5479. "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
  5480. "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
  5481. "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
  5482. "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
  5483. "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
  5484. "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
  5485. "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
  5486. "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
  5487. "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
  5488. "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
  5489. "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
  5490. "\x04\x02\xef\xd3\x44\xde\x76\x31"
  5491. "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
  5492. "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
  5493. "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
  5494. "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
  5495. "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
  5496. "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
  5497. "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
  5498. "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
  5499. "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
  5500. "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
  5501. "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
  5502. "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
  5503. "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
  5504. "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
  5505. "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
  5506. "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
  5507. "\x32\x03\xed\xf0\x50\x1c\x56\x39"
  5508. "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
  5509. "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
  5510. "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
  5511. "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
  5512. "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
  5513. "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
  5514. "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
  5515. "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
  5516. "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
  5517. "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
  5518. "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
  5519. "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
  5520. "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
  5521. "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
  5522. "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
  5523. "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
  5524. "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
  5525. "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
  5526. "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
  5527. "\x69\x3a\x29\x23\xac\x86\x32\xa5"
  5528. "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
  5529. "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
  5530. "\x59\x6a\xd3\x50\x59\x43\x59\xde"
  5531. "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
  5532. "\x18\x34\x0d\x1a\x63\x33\xed\x10"
  5533. "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
  5534. "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
  5535. "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
  5536. "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
  5537. "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
  5538. "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
  5539. "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
  5540. "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
  5541. "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
  5542. "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
  5543. "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
  5544. "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
  5545. "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
  5546. "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
  5547. "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
  5548. "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
  5549. "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
  5550. "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
  5551. "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
  5552. "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
  5553. "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
  5554. "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
  5555. "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
  5556. "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
  5557. "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
  5558. "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
  5559. "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
  5560. "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
  5561. "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
  5562. "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
  5563. "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
  5564. "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
  5565. "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
  5566. "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
  5567. "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
  5568. "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
  5569. "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
  5570. "\x26\x39\x83\x94\xef\x27\xd8\x53"
  5571. "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
  5572. "\x43\x7c\x95\x0a\x53\xef\x66\xda"
  5573. "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
  5574. "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
  5575. "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
  5576. "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
  5577. "\x88\xee\x73\xcf\x66\x2f\x52\x56"
  5578. "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
  5579. "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
  5580. "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
  5581. "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
  5582. "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
  5583. "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
  5584. "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
  5585. "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
  5586. "\xba\x61\x34\x38\x7c\xda\x48\x3e"
  5587. "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
  5588. "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
  5589. "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
  5590. "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
  5591. "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
  5592. "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
  5593. "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
  5594. "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
  5595. "\x35\x12\xe3\x36\x28\x27\x36\x58"
  5596. "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
  5597. "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
  5598. "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
  5599. "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
  5600. "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
  5601. "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
  5602. "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
  5603. "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
  5604. "\x89\xf3\x78\x35\x44\x62\x78\x72"
  5605. "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
  5606. "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
  5607. "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
  5608. "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
  5609. "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
  5610. "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
  5611. "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
  5612. "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
  5613. "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
  5614. "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
  5615. "\xd2\x49\x77\x81\x6d\x90\x70\xae"
  5616. "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
  5617. "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
  5618. "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
  5619. "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
  5620. "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
  5621. "\x45\x42\x27\x75\x50\xe5\xee\xb8"
  5622. "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
  5623. "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
  5624. "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
  5625. "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
  5626. "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
  5627. "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
  5628. "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
  5629. "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
  5630. "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
  5631. "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
  5632. "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
  5633. "\xa9\x21\x2b\x92\x94\x87\x62\x57"
  5634. "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
  5635. "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
  5636. "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
  5637. "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
  5638. "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
  5639. "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
  5640. "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
  5641. "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
  5642. "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
  5643. "\x69\x34\x78\x61\x24\x21\x9c\x8a"
  5644. "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
  5645. "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
  5646. "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
  5647. "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
  5648. "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
  5649. "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
  5650. "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
  5651. "\xb1\x95\x28\x86\x20\xe9\x17\x49"
  5652. "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
  5653. "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
  5654. "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
  5655. "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
  5656. "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
  5657. "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
  5658. "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
  5659. "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
  5660. "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
  5661. "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
  5662. "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
  5663. "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
  5664. "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
  5665. "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
  5666. "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
  5667. "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
  5668. "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
  5669. "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
  5670. "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
  5671. "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
  5672. "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
  5673. "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
  5674. "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
  5675. "\x29\x90\x46\x30\x92\x69\x7d\x13"
  5676. "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
  5677. "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
  5678. "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
  5679. "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
  5680. "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
  5681. "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
  5682. "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
  5683. "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
  5684. "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
  5685. "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
  5686. "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
  5687. "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
  5688. "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
  5689. "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
  5690. "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
  5691. "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
  5692. "\x77\x65\x08\x60\x11\x76\x4c\x8d"
  5693. "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
  5694. "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
  5695. "\x03\xd1\x24\x95\xec\x6d\xab\x38"
  5696. "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
  5697. "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
  5698. "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
  5699. "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
  5700. "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
  5701. "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
  5702. "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
  5703. "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
  5704. "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
  5705. "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
  5706. "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
  5707. "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
  5708. "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
  5709. "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
  5710. "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
  5711. "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
  5712. "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
  5713. "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
  5714. "\xe5\x79\x81\x73\xcd\x43\x59\x68"
  5715. "\x73\x02\x3b\x78\x21\x72\x43\x00"
  5716. "\x49\x17\xf7\x00\xaf\x68\x24\x53"
  5717. "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
  5718. "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
  5719. "\x11\x94\x13\x69\x51\x09\x28\xde"
  5720. "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
  5721. "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
  5722. "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
  5723. "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
  5724. "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
  5725. "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
  5726. "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
  5727. "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
  5728. "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
  5729. "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
  5730. "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
  5731. "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
  5732. "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
  5733. "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
  5734. "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
  5735. "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
  5736. "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
  5737. "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
  5738. "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
  5739. "\x69\xdc\xab\x24\x57\x60\x47\xc1"
  5740. "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
  5741. "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
  5742. "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
  5743. "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
  5744. "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
  5745. "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
  5746. "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
  5747. "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
  5748. "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
  5749. "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
  5750. "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
  5751. "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
  5752. "\x85\x62\x82\x70\x18\xe2\x9a\x78"
  5753. "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
  5754. "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
  5755. "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
  5756. "\x35\xf3\x61\x06\x72\x84\xc4\x32"
  5757. "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
  5758. "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
  5759. "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
  5760. "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
  5761. "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
  5762. "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
  5763. "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
  5764. "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
  5765. "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
  5766. "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
  5767. "\x4f\x73\x38\x09\x75\x64\x48\xe0"
  5768. "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
  5769. "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
  5770. "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
  5771. "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
  5772. "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
  5773. "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
  5774. "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
  5775. "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
  5776. "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
  5777. "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
  5778. "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
  5779. "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
  5780. "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
  5781. "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
  5782. "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
  5783. "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
  5784. "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
  5785. "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
  5786. "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
  5787. "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
  5788. "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
  5789. "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
  5790. "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
  5791. "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
  5792. "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
  5793. "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
  5794. "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
  5795. "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
  5796. "\xce\x4d\x5f\x18\x60\xce\x87\x22"
  5797. "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
  5798. "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
  5799. "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
  5800. "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
  5801. "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
  5802. "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
  5803. "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
  5804. "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
  5805. "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
  5806. "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
  5807. "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
  5808. "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
  5809. "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
  5810. "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
  5811. "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
  5812. "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
  5813. "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
  5814. "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
  5815. "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
  5816. "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
  5817. "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
  5818. "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
  5819. "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
  5820. "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
  5821. "\xce\x54\xf9\x18\x58\xb5\xff\x44"
  5822. "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
  5823. "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
  5824. "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
  5825. "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
  5826. "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
  5827. "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
  5828. "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
  5829. "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
  5830. "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
  5831. "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
  5832. "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
  5833. "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
  5834. "\x0c\xd6\x04\x14\xde\x51\x74\x75"
  5835. "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
  5836. "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
  5837. "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
  5838. "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
  5839. "\x75\x46\x65\x4e\x07\x34\x37\xa3"
  5840. "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
  5841. "\x69\x24\x0e\x38\x67\x43\x8c\xde"
  5842. "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
  5843. "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
  5844. "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
  5845. "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
  5846. "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
  5847. "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
  5848. "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
  5849. "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
  5850. "\x91\x7d\x62\x64\x96\x72\xde\xfc"
  5851. "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
  5852. "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
  5853. "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
  5854. "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
  5855. "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
  5856. "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
  5857. "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
  5858. "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
  5859. "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
  5860. "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
  5861. "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
  5862. "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
  5863. "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
  5864. "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
  5865. "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
  5866. "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
  5867. "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
  5868. "\xae\xed\x39\x88\x42\x11\x3c\xed"
  5869. "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
  5870. "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
  5871. "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
  5872. "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
  5873. "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
  5874. "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
  5875. "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
  5876. "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
  5877. "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
  5878. "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
  5879. "\x34\x17\xde\xba\x47\xf1\x06\x18"
  5880. "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
  5881. "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
  5882. "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
  5883. "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
  5884. "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
  5885. "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
  5886. "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
  5887. "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
  5888. "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
  5889. "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
  5890. "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
  5891. "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
  5892. "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
  5893. "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
  5894. "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
  5895. "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
  5896. "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
  5897. "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
  5898. "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
  5899. "\x2c\x56\x39\x79\x0f\x69\x44\x75"
  5900. "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
  5901. "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
  5902. "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
  5903. "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
  5904. "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
  5905. "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
  5906. "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
  5907. "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
  5908. "\x63\x9b\xce\x61\x24\x79\xc0\x70"
  5909. "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
  5910. "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
  5911. "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
  5912. "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
  5913. "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
  5914. "\x74\x56\x58\x40\x02\x37\x52\x2c"
  5915. "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
  5916. "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
  5917. "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
  5918. "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
  5919. "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
  5920. "\xed\x38\x80\x36\x72\x43\x27\x49"
  5921. "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
  5922. "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
  5923. "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
  5924. "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
  5925. "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
  5926. "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
  5927. "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
  5928. "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
  5929. "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
  5930. "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
  5931. "\x12\xee\x30\xfe\xd8\x30\xef\x34"
  5932. "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
  5933. "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
  5934. "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
  5935. "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
  5936. "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
  5937. "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
  5938. "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
  5939. "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
  5940. "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
  5941. "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
  5942. "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
  5943. "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
  5944. "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
  5945. "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
  5946. "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
  5947. "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
  5948. "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
  5949. "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
  5950. "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
  5951. "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
  5952. "\x44\x12\xfb\x73\x77\xd4\x13\x39"
  5953. "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
  5954. "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
  5955. "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
  5956. "\x4b\xef\x31\x18\xea\xac\xb1\x84"
  5957. "\x21\xed\xda\x86",
  5958. .rlen = 4100,
  5959. .np = 2,
  5960. .tap = { 4064, 36 },
  5961. },
  5962. };
  5963. static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
  5964. { /* From RFC 3686 */
  5965. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  5966. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  5967. "\x00\x00\x00\x30",
  5968. .klen = 20,
  5969. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5970. .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  5971. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  5972. .ilen = 16,
  5973. .result = "Single block msg",
  5974. .rlen = 16,
  5975. }, {
  5976. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  5977. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  5978. "\x00\x6c\xb6\xdb",
  5979. .klen = 20,
  5980. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  5981. .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  5982. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  5983. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  5984. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  5985. .ilen = 32,
  5986. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5987. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5988. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5989. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5990. .rlen = 32,
  5991. }, {
  5992. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  5993. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  5994. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  5995. "\x00\x00\x00\x48",
  5996. .klen = 28,
  5997. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  5998. .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  5999. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  6000. .ilen = 16,
  6001. .result = "Single block msg",
  6002. .rlen = 16,
  6003. }, {
  6004. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  6005. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  6006. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  6007. "\x00\x96\xb0\x3b",
  6008. .klen = 28,
  6009. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  6010. .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  6011. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  6012. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  6013. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  6014. .ilen = 32,
  6015. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6016. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6017. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6018. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6019. .rlen = 32,
  6020. }, {
  6021. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  6022. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  6023. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  6024. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  6025. "\x00\x00\x00\x60",
  6026. .klen = 36,
  6027. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  6028. .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  6029. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  6030. .ilen = 16,
  6031. .result = "Single block msg",
  6032. .rlen = 16,
  6033. }, {
  6034. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  6035. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  6036. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  6037. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  6038. "\x00\xfa\xac\x24",
  6039. .klen = 36,
  6040. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  6041. .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  6042. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  6043. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  6044. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  6045. .ilen = 32,
  6046. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6047. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6048. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6049. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6050. .rlen = 32,
  6051. },
  6052. };
  6053. static struct cipher_testvec aes_ofb_enc_tv_template[] = {
  6054. /* From NIST Special Publication 800-38A, Appendix F.5 */
  6055. {
  6056. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  6057. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  6058. .klen = 16,
  6059. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
  6060. "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6061. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6062. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6063. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6064. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6065. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6066. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6067. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6068. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6069. .ilen = 64,
  6070. .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
  6071. "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
  6072. "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
  6073. "\x3c\x52\xda\xc5\x4e\xd8\x25"
  6074. "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
  6075. "\x44\xf7\xa8\x22\x60\xed\xcc"
  6076. "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
  6077. "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
  6078. .rlen = 64,
  6079. }
  6080. };
  6081. static struct cipher_testvec aes_ofb_dec_tv_template[] = {
  6082. /* From NIST Special Publication 800-38A, Appendix F.5 */
  6083. {
  6084. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  6085. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  6086. .klen = 16,
  6087. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
  6088. "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6089. .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
  6090. "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
  6091. "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
  6092. "\x3c\x52\xda\xc5\x4e\xd8\x25"
  6093. "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
  6094. "\x44\xf7\xa8\x22\x60\xed\xcc"
  6095. "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
  6096. "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
  6097. .ilen = 64,
  6098. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6099. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6100. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6101. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6102. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6103. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6104. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6105. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6106. .rlen = 64,
  6107. }
  6108. };
  6109. static struct aead_testvec aes_gcm_enc_tv_template[] = {
  6110. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  6111. .key = zeroed_string,
  6112. .klen = 16,
  6113. .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
  6114. "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
  6115. .rlen = 16,
  6116. }, {
  6117. .key = zeroed_string,
  6118. .klen = 16,
  6119. .input = zeroed_string,
  6120. .ilen = 16,
  6121. .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
  6122. "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
  6123. "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
  6124. "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
  6125. .rlen = 32,
  6126. }, {
  6127. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6128. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  6129. .klen = 16,
  6130. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  6131. "\xde\xca\xf8\x88",
  6132. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  6133. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  6134. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  6135. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  6136. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  6137. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  6138. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  6139. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  6140. .ilen = 64,
  6141. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  6142. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  6143. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  6144. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  6145. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  6146. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  6147. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  6148. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  6149. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  6150. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  6151. .rlen = 80,
  6152. }, {
  6153. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6154. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  6155. .klen = 16,
  6156. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  6157. "\xde\xca\xf8\x88",
  6158. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  6159. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  6160. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  6161. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  6162. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  6163. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  6164. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  6165. "\xba\x63\x7b\x39",
  6166. .ilen = 60,
  6167. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  6168. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  6169. "\xab\xad\xda\xd2",
  6170. .alen = 20,
  6171. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  6172. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  6173. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  6174. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  6175. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  6176. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  6177. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  6178. "\x3d\x58\xe0\x91"
  6179. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  6180. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  6181. .rlen = 76,
  6182. }, {
  6183. .key = zeroed_string,
  6184. .klen = 24,
  6185. .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
  6186. "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
  6187. .rlen = 16,
  6188. }, {
  6189. .key = zeroed_string,
  6190. .klen = 24,
  6191. .input = zeroed_string,
  6192. .ilen = 16,
  6193. .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  6194. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  6195. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  6196. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  6197. .rlen = 32,
  6198. }, {
  6199. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6200. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6201. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  6202. .klen = 24,
  6203. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  6204. "\xde\xca\xf8\x88",
  6205. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  6206. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  6207. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  6208. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  6209. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  6210. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  6211. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  6212. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  6213. .ilen = 64,
  6214. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  6215. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  6216. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  6217. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  6218. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  6219. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  6220. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  6221. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  6222. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  6223. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  6224. .rlen = 80,
  6225. }, {
  6226. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6227. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6228. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  6229. .klen = 24,
  6230. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  6231. "\xde\xca\xf8\x88",
  6232. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  6233. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  6234. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  6235. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  6236. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  6237. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  6238. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  6239. "\xba\x63\x7b\x39",
  6240. .ilen = 60,
  6241. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  6242. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  6243. "\xab\xad\xda\xd2",
  6244. .alen = 20,
  6245. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  6246. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  6247. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  6248. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  6249. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  6250. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  6251. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  6252. "\xcc\xda\x27\x10"
  6253. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  6254. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  6255. .rlen = 76,
  6256. .np = 2,
  6257. .tap = { 32, 28 },
  6258. .anp = 2,
  6259. .atap = { 8, 12 }
  6260. }, {
  6261. .key = zeroed_string,
  6262. .klen = 32,
  6263. .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
  6264. "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
  6265. .rlen = 16,
  6266. }
  6267. };
  6268. static struct aead_testvec aes_gcm_dec_tv_template[] = {
  6269. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  6270. .key = zeroed_string,
  6271. .klen = 32,
  6272. .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
  6273. "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
  6274. "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
  6275. "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
  6276. .ilen = 32,
  6277. .result = zeroed_string,
  6278. .rlen = 16,
  6279. }, {
  6280. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6281. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6282. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6283. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  6284. .klen = 32,
  6285. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  6286. "\xde\xca\xf8\x88",
  6287. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  6288. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  6289. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  6290. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  6291. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  6292. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  6293. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  6294. "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
  6295. "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
  6296. "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
  6297. .ilen = 80,
  6298. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  6299. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  6300. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  6301. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  6302. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  6303. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  6304. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  6305. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  6306. .rlen = 64,
  6307. }, {
  6308. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6309. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6310. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6311. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  6312. .klen = 32,
  6313. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  6314. "\xde\xca\xf8\x88",
  6315. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  6316. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  6317. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  6318. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  6319. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  6320. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  6321. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  6322. "\xbc\xc9\xf6\x62"
  6323. "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
  6324. "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
  6325. .ilen = 76,
  6326. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  6327. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  6328. "\xab\xad\xda\xd2",
  6329. .alen = 20,
  6330. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  6331. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  6332. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  6333. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  6334. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  6335. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  6336. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  6337. "\xba\x63\x7b\x39",
  6338. .rlen = 60,
  6339. .np = 2,
  6340. .tap = { 48, 28 },
  6341. .anp = 3,
  6342. .atap = { 8, 8, 4 }
  6343. }, {
  6344. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6345. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  6346. .klen = 16,
  6347. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  6348. "\xde\xca\xf8\x88",
  6349. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  6350. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  6351. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  6352. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  6353. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  6354. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  6355. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  6356. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  6357. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  6358. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  6359. .ilen = 80,
  6360. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  6361. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  6362. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  6363. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  6364. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  6365. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  6366. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  6367. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  6368. .rlen = 64,
  6369. }, {
  6370. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6371. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  6372. .klen = 16,
  6373. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  6374. "\xde\xca\xf8\x88",
  6375. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  6376. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  6377. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  6378. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  6379. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  6380. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  6381. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  6382. "\x3d\x58\xe0\x91"
  6383. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  6384. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  6385. .ilen = 76,
  6386. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  6387. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  6388. "\xab\xad\xda\xd2",
  6389. .alen = 20,
  6390. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  6391. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  6392. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  6393. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  6394. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  6395. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  6396. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  6397. "\xba\x63\x7b\x39",
  6398. .rlen = 60,
  6399. }, {
  6400. .key = zeroed_string,
  6401. .klen = 24,
  6402. .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  6403. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  6404. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  6405. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  6406. .ilen = 32,
  6407. .result = zeroed_string,
  6408. .rlen = 16,
  6409. }, {
  6410. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6411. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6412. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  6413. .klen = 24,
  6414. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  6415. "\xde\xca\xf8\x88",
  6416. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  6417. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  6418. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  6419. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  6420. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  6421. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  6422. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  6423. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  6424. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  6425. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  6426. .ilen = 80,
  6427. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  6428. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  6429. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  6430. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  6431. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  6432. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  6433. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  6434. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  6435. .rlen = 64,
  6436. }, {
  6437. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6438. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6439. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  6440. .klen = 24,
  6441. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  6442. "\xde\xca\xf8\x88",
  6443. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  6444. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  6445. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  6446. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  6447. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  6448. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  6449. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  6450. "\xcc\xda\x27\x10"
  6451. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  6452. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  6453. .ilen = 76,
  6454. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  6455. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  6456. "\xab\xad\xda\xd2",
  6457. .alen = 20,
  6458. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  6459. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  6460. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  6461. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  6462. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  6463. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  6464. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  6465. "\xba\x63\x7b\x39",
  6466. .rlen = 60,
  6467. }
  6468. };
  6469. static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
  6470. { /* Generated using Crypto++ */
  6471. .key = zeroed_string,
  6472. .klen = 20,
  6473. .iv = zeroed_string,
  6474. .input = zeroed_string,
  6475. .ilen = 16,
  6476. .assoc = zeroed_string,
  6477. .alen = 8,
  6478. .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
  6479. "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
  6480. "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
  6481. "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
  6482. .rlen = 32,
  6483. },{
  6484. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6485. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6486. "\x00\x00\x00\x00",
  6487. .klen = 20,
  6488. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  6489. "\x00\x00\x00\x00",
  6490. .input = zeroed_string,
  6491. .ilen = 16,
  6492. .assoc = zeroed_string,
  6493. .alen = 8,
  6494. .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
  6495. "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
  6496. "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
  6497. "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
  6498. .rlen = 32,
  6499. }, {
  6500. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6501. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6502. "\x00\x00\x00\x00",
  6503. .klen = 20,
  6504. .iv = zeroed_string,
  6505. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  6506. "\x01\x01\x01\x01\x01\x01\x01\x01",
  6507. .ilen = 16,
  6508. .assoc = zeroed_string,
  6509. .alen = 8,
  6510. .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  6511. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  6512. "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
  6513. "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
  6514. .rlen = 32,
  6515. }, {
  6516. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6517. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6518. "\x00\x00\x00\x00",
  6519. .klen = 20,
  6520. .iv = zeroed_string,
  6521. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  6522. "\x01\x01\x01\x01\x01\x01\x01\x01",
  6523. .ilen = 16,
  6524. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  6525. .alen = 8,
  6526. .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  6527. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  6528. "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
  6529. "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
  6530. .rlen = 32,
  6531. }, {
  6532. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6533. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6534. "\x00\x00\x00\x00",
  6535. .klen = 20,
  6536. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  6537. "\x00\x00\x00\x00",
  6538. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  6539. "\x01\x01\x01\x01\x01\x01\x01\x01",
  6540. .ilen = 16,
  6541. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  6542. .alen = 8,
  6543. .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  6544. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  6545. "\x64\x50\xF9\x32\x13\xFB\x74\x61"
  6546. "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
  6547. .rlen = 32,
  6548. }, {
  6549. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6550. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6551. "\x00\x00\x00\x00",
  6552. .klen = 20,
  6553. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  6554. "\x00\x00\x00\x00",
  6555. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  6556. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6557. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6558. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6559. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6560. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6561. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6562. "\x01\x01\x01\x01\x01\x01\x01\x01",
  6563. .ilen = 64,
  6564. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  6565. .alen = 8,
  6566. .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  6567. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  6568. "\x98\x14\xA1\x42\x37\x80\xFD\x90"
  6569. "\x68\x12\x01\xA8\x91\x89\xB9\x83"
  6570. "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
  6571. "\x94\x5F\x18\x12\xBA\x27\x09\x39"
  6572. "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
  6573. "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
  6574. "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
  6575. "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
  6576. .rlen = 80,
  6577. }, {
  6578. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6579. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6580. "\x00\x00\x00\x00",
  6581. .klen = 20,
  6582. .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
  6583. "\x00\x00\x00\x00",
  6584. .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
  6585. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6586. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6587. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6588. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6589. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6590. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6591. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6592. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6593. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6594. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6595. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6596. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6597. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6598. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6599. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6600. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6601. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6602. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6603. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6604. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6605. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6606. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6607. "\xff\xff\xff\xff\xff\xff\xff\xff",
  6608. .ilen = 192,
  6609. .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  6610. "\xaa\xaa\xaa\xaa",
  6611. .alen = 12,
  6612. .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
  6613. "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
  6614. "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
  6615. "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
  6616. "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
  6617. "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
  6618. "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
  6619. "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
  6620. "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
  6621. "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
  6622. "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
  6623. "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
  6624. "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
  6625. "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
  6626. "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
  6627. "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
  6628. "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
  6629. "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
  6630. "\x7E\x13\x06\x82\x08\x17\xA4\x35"
  6631. "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
  6632. "\xA3\x05\x38\x95\x20\x1A\x47\x04"
  6633. "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
  6634. "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
  6635. "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
  6636. "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
  6637. "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
  6638. .rlen = 208,
  6639. }
  6640. };
  6641. static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
  6642. { /* Generated using Crypto++ */
  6643. .key = zeroed_string,
  6644. .klen = 20,
  6645. .iv = zeroed_string,
  6646. .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
  6647. "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
  6648. "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
  6649. "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
  6650. .ilen = 32,
  6651. .assoc = zeroed_string,
  6652. .alen = 8,
  6653. .result = zeroed_string,
  6654. .rlen = 16,
  6655. },{
  6656. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6657. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6658. "\x00\x00\x00\x00",
  6659. .klen = 20,
  6660. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  6661. "\x00\x00\x00\x00",
  6662. .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
  6663. "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
  6664. "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
  6665. "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
  6666. .ilen = 32,
  6667. .assoc = zeroed_string,
  6668. .alen = 8,
  6669. .result = zeroed_string,
  6670. .rlen = 16,
  6671. }, {
  6672. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6673. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6674. "\x00\x00\x00\x00",
  6675. .klen = 20,
  6676. .iv = zeroed_string,
  6677. .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  6678. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  6679. "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
  6680. "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
  6681. .ilen = 32,
  6682. .assoc = zeroed_string,
  6683. .alen = 8,
  6684. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  6685. "\x01\x01\x01\x01\x01\x01\x01\x01",
  6686. .rlen = 16,
  6687. }, {
  6688. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6689. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6690. "\x00\x00\x00\x00",
  6691. .klen = 20,
  6692. .iv = zeroed_string,
  6693. .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  6694. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  6695. "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
  6696. "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
  6697. .ilen = 32,
  6698. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  6699. .alen = 8,
  6700. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  6701. "\x01\x01\x01\x01\x01\x01\x01\x01",
  6702. .rlen = 16,
  6703. }, {
  6704. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6705. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6706. "\x00\x00\x00\x00",
  6707. .klen = 20,
  6708. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  6709. "\x00\x00\x00\x00",
  6710. .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  6711. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  6712. "\x64\x50\xF9\x32\x13\xFB\x74\x61"
  6713. "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
  6714. .ilen = 32,
  6715. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  6716. .alen = 8,
  6717. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  6718. "\x01\x01\x01\x01\x01\x01\x01\x01",
  6719. .rlen = 16,
  6720. }, {
  6721. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  6722. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  6723. "\x00\x00\x00\x00",
  6724. .klen = 20,
  6725. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  6726. "\x00\x00\x00\x00",
  6727. .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  6728. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  6729. "\x98\x14\xA1\x42\x37\x80\xFD\x90"
  6730. "\x68\x12\x01\xA8\x91\x89\xB9\x83"
  6731. "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
  6732. "\x94\x5F\x18\x12\xBA\x27\x09\x39"
  6733. "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
  6734. "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
  6735. "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
  6736. "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
  6737. .ilen = 80,
  6738. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  6739. .alen = 8,
  6740. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  6741. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6742. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6743. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6744. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6745. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6746. "\x01\x01\x01\x01\x01\x01\x01\x01"
  6747. "\x01\x01\x01\x01\x01\x01\x01\x01",
  6748. .rlen = 64,
  6749. }, {
  6750. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6751. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6752. "\x00\x00\x00\x00",
  6753. .klen = 20,
  6754. .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
  6755. "\x00\x00\x00\x00",
  6756. .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
  6757. "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
  6758. "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
  6759. "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
  6760. "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
  6761. "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
  6762. "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
  6763. "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
  6764. "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
  6765. "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
  6766. "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
  6767. "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
  6768. "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
  6769. "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
  6770. "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
  6771. "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
  6772. "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
  6773. "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
  6774. "\x7E\x13\x06\x82\x08\x17\xA4\x35"
  6775. "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
  6776. "\xA3\x05\x38\x95\x20\x1A\x47\x04"
  6777. "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
  6778. "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
  6779. "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
  6780. "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
  6781. "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
  6782. .ilen = 208,
  6783. .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  6784. "\xaa\xaa\xaa\xaa",
  6785. .alen = 12,
  6786. .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
  6787. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6788. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6789. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6790. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6791. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6792. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6793. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6794. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6795. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6796. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6797. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6798. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6799. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6800. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6801. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6802. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6803. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6804. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6805. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6806. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6807. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6808. "\xff\xff\xff\xff\xff\xff\xff\xff"
  6809. "\xff\xff\xff\xff\xff\xff\xff\xff",
  6810. .rlen = 192,
  6811. }
  6812. };
  6813. static struct aead_testvec aes_ccm_enc_tv_template[] = {
  6814. { /* From RFC 3610 */
  6815. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6816. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  6817. .klen = 16,
  6818. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  6819. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  6820. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  6821. .alen = 8,
  6822. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6823. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6824. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  6825. .ilen = 23,
  6826. .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  6827. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  6828. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  6829. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  6830. .rlen = 31,
  6831. }, {
  6832. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6833. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  6834. .klen = 16,
  6835. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  6836. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  6837. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6838. "\x08\x09\x0a\x0b",
  6839. .alen = 12,
  6840. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  6841. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  6842. "\x1c\x1d\x1e\x1f",
  6843. .ilen = 20,
  6844. .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  6845. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  6846. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  6847. "\x7d\x9c\x2d\x93",
  6848. .rlen = 28,
  6849. }, {
  6850. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6851. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  6852. .klen = 16,
  6853. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  6854. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  6855. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  6856. .alen = 8,
  6857. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6858. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6859. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6860. "\x20",
  6861. .ilen = 25,
  6862. .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  6863. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  6864. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  6865. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  6866. "\x7e\x5f\x4e",
  6867. .rlen = 35,
  6868. }, {
  6869. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6870. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  6871. .klen = 16,
  6872. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  6873. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  6874. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6875. "\x08\x09\x0a\x0b",
  6876. .alen = 12,
  6877. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  6878. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  6879. "\x1c\x1d\x1e",
  6880. .ilen = 19,
  6881. .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
  6882. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  6883. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  6884. "\x4d\x99\x99\x88\xdd",
  6885. .rlen = 29,
  6886. }, {
  6887. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  6888. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  6889. .klen = 16,
  6890. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  6891. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  6892. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  6893. .alen = 8,
  6894. .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  6895. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  6896. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  6897. .ilen = 24,
  6898. .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  6899. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  6900. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  6901. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  6902. .rlen = 32,
  6903. }, {
  6904. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  6905. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  6906. .klen = 16,
  6907. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  6908. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  6909. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  6910. "\x20\xea\x60\xc0",
  6911. .alen = 12,
  6912. .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  6913. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  6914. "\x3a\x80\x3b\xa8\x7f",
  6915. .ilen = 21,
  6916. .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  6917. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  6918. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  6919. "\x5a\xe0\x70\x45\x51",
  6920. .rlen = 29,
  6921. }, {
  6922. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  6923. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  6924. .klen = 16,
  6925. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  6926. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  6927. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  6928. .alen = 8,
  6929. .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  6930. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  6931. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  6932. .ilen = 23,
  6933. .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  6934. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  6935. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  6936. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  6937. "\xba",
  6938. .rlen = 33,
  6939. },
  6940. };
  6941. static struct aead_testvec aes_ccm_dec_tv_template[] = {
  6942. { /* From RFC 3610 */
  6943. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6944. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  6945. .klen = 16,
  6946. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  6947. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  6948. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  6949. .alen = 8,
  6950. .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  6951. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  6952. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  6953. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  6954. .ilen = 31,
  6955. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6956. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6957. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  6958. .rlen = 23,
  6959. }, {
  6960. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6961. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  6962. .klen = 16,
  6963. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  6964. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  6965. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6966. "\x08\x09\x0a\x0b",
  6967. .alen = 12,
  6968. .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  6969. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  6970. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  6971. "\x7d\x9c\x2d\x93",
  6972. .ilen = 28,
  6973. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  6974. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  6975. "\x1c\x1d\x1e\x1f",
  6976. .rlen = 20,
  6977. }, {
  6978. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6979. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  6980. .klen = 16,
  6981. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  6982. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  6983. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  6984. .alen = 8,
  6985. .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  6986. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  6987. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  6988. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  6989. "\x7e\x5f\x4e",
  6990. .ilen = 35,
  6991. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6992. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6993. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6994. "\x20",
  6995. .rlen = 25,
  6996. }, {
  6997. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6998. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  6999. .klen = 16,
  7000. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  7001. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  7002. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7003. "\x08\x09\x0a\x0b",
  7004. .alen = 12,
  7005. .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
  7006. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  7007. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  7008. "\x4d\x99\x99\x88\xdd",
  7009. .ilen = 29,
  7010. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  7011. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  7012. "\x1c\x1d\x1e",
  7013. .rlen = 19,
  7014. }, {
  7015. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  7016. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  7017. .klen = 16,
  7018. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  7019. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  7020. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  7021. .alen = 8,
  7022. .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  7023. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  7024. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  7025. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  7026. .ilen = 32,
  7027. .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  7028. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  7029. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  7030. .rlen = 24,
  7031. }, {
  7032. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  7033. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  7034. .klen = 16,
  7035. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  7036. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  7037. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  7038. "\x20\xea\x60\xc0",
  7039. .alen = 12,
  7040. .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  7041. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  7042. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  7043. "\x5a\xe0\x70\x45\x51",
  7044. .ilen = 29,
  7045. .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  7046. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  7047. "\x3a\x80\x3b\xa8\x7f",
  7048. .rlen = 21,
  7049. }, {
  7050. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  7051. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  7052. .klen = 16,
  7053. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  7054. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  7055. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  7056. .alen = 8,
  7057. .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  7058. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  7059. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  7060. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  7061. "\xba",
  7062. .ilen = 33,
  7063. .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  7064. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  7065. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  7066. .rlen = 23,
  7067. },
  7068. };
  7069. /*
  7070. * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
  7071. * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
  7072. * Special Publication 800-38C's test vectors also use nonce lengths our
  7073. * implementation doesn't support. The following are taken from fips cavs
  7074. * fax files on hand at Red Hat.
  7075. *
  7076. * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
  7077. * part of the nonce which combine w/the iv, but need to be input this way.
  7078. */
  7079. static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
  7080. {
  7081. .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
  7082. "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
  7083. "\x96\xac\x59",
  7084. .klen = 19,
  7085. .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
  7086. .alen = 0,
  7087. .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
  7088. "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
  7089. "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
  7090. "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
  7091. .ilen = 32,
  7092. .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
  7093. "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
  7094. "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
  7095. "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
  7096. "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
  7097. "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
  7098. .rlen = 48,
  7099. }, {
  7100. .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
  7101. "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
  7102. "\x4f\xa3\x19",
  7103. .klen = 19,
  7104. .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
  7105. .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
  7106. "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
  7107. "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
  7108. "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
  7109. .alen = 32,
  7110. .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
  7111. "\xa9\x28\x63\xba\x12\xa3\x14\x85"
  7112. "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
  7113. "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
  7114. .ilen = 32,
  7115. .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
  7116. "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
  7117. "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
  7118. "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
  7119. "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
  7120. "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
  7121. .rlen = 48,
  7122. }, {
  7123. .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
  7124. "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
  7125. "\x53\x14\x73\x66\x8d\x88\xf6\x80"
  7126. "\xa0\x20\x35",
  7127. .klen = 27,
  7128. .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
  7129. .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
  7130. "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
  7131. "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
  7132. "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
  7133. .alen = 32,
  7134. .ilen = 0,
  7135. .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
  7136. "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
  7137. .rlen = 16,
  7138. }, {
  7139. .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
  7140. "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
  7141. "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
  7142. "\xd6\x3c\x8c",
  7143. .klen = 27,
  7144. .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
  7145. .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
  7146. "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
  7147. "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
  7148. "\xe3\x00\x73\x69\x84\x69\x87\x79",
  7149. .alen = 32,
  7150. .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
  7151. "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
  7152. "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
  7153. "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
  7154. .ilen = 32,
  7155. .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
  7156. "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
  7157. "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
  7158. "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
  7159. "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
  7160. "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
  7161. .rlen = 48,
  7162. }, {
  7163. .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
  7164. "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
  7165. "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
  7166. "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
  7167. "\x1e\x29\x91",
  7168. .klen = 35,
  7169. .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
  7170. .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
  7171. "\x78\x2b\x94\x02\x29\x0f\x42\x27"
  7172. "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
  7173. "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
  7174. .alen = 32,
  7175. .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
  7176. "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
  7177. "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
  7178. "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
  7179. .ilen = 32,
  7180. .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
  7181. "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
  7182. "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
  7183. "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
  7184. "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
  7185. .rlen = 40,
  7186. }, {
  7187. .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
  7188. "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
  7189. "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
  7190. "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
  7191. "\xf9\xd9\x4e",
  7192. .klen = 35,
  7193. .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
  7194. .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
  7195. "\x13\x02\x01\x0c\x83\x4c\x96\x35"
  7196. "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
  7197. "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
  7198. .alen = 32,
  7199. .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
  7200. "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
  7201. "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
  7202. "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
  7203. .ilen = 32,
  7204. .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
  7205. "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
  7206. "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
  7207. "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
  7208. "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
  7209. "\x7b\x72\x8a\xf7",
  7210. .rlen = 44,
  7211. }, {
  7212. .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
  7213. "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
  7214. "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
  7215. "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
  7216. "\x24\xa7\x8b",
  7217. .klen = 35,
  7218. .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
  7219. .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
  7220. "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
  7221. "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
  7222. "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
  7223. .alen = 32,
  7224. .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
  7225. "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
  7226. "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
  7227. "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
  7228. .ilen = 32,
  7229. .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
  7230. "\xef\xbb\x80\x21\x04\x6c\x58\x09"
  7231. "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
  7232. "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
  7233. "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
  7234. "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
  7235. .rlen = 48,
  7236. },
  7237. };
  7238. static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
  7239. {
  7240. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  7241. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  7242. "\xc6\xfb\x7d",
  7243. .klen = 19,
  7244. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  7245. .alen = 0,
  7246. .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
  7247. .ilen = 8,
  7248. .result = "\x00",
  7249. .rlen = 0,
  7250. .novrfy = 1,
  7251. }, {
  7252. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  7253. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  7254. "\xaf\x94\x87",
  7255. .klen = 19,
  7256. .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
  7257. .alen = 0,
  7258. .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
  7259. .ilen = 8,
  7260. .result = "\x00",
  7261. .rlen = 0,
  7262. }, {
  7263. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  7264. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  7265. "\xc6\xfb\x7d",
  7266. .klen = 19,
  7267. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  7268. .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
  7269. "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
  7270. "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
  7271. "\xd8\x94\x99\x91\x81\x54\x62\x57",
  7272. .alen = 32,
  7273. .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
  7274. "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
  7275. "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
  7276. "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
  7277. "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
  7278. "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
  7279. .ilen = 48,
  7280. .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
  7281. "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
  7282. "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
  7283. "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
  7284. .rlen = 32,
  7285. .novrfy = 1,
  7286. }, {
  7287. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  7288. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  7289. "\x05\xe0\xc9",
  7290. .klen = 19,
  7291. .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
  7292. .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
  7293. "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
  7294. "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
  7295. "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
  7296. .alen = 32,
  7297. .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
  7298. "\xad\x83\x52\x6d\x71\x03\x25\x1c"
  7299. "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
  7300. "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
  7301. "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
  7302. "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
  7303. .ilen = 48,
  7304. .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
  7305. "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
  7306. "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
  7307. "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
  7308. .rlen = 32,
  7309. }, {
  7310. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  7311. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  7312. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  7313. "\xee\x49\x83",
  7314. .klen = 27,
  7315. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  7316. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  7317. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  7318. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  7319. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  7320. .alen = 32,
  7321. .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
  7322. .ilen = 8,
  7323. .result = "\x00",
  7324. .rlen = 0,
  7325. }, {
  7326. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  7327. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  7328. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  7329. "\xee\x49\x83",
  7330. .klen = 27,
  7331. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  7332. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  7333. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  7334. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  7335. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  7336. .alen = 32,
  7337. .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
  7338. "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
  7339. "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
  7340. "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
  7341. "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
  7342. .ilen = 40,
  7343. .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
  7344. "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
  7345. "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
  7346. "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
  7347. .rlen = 32,
  7348. }, {
  7349. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  7350. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  7351. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  7352. "\xd1\xfc\x57",
  7353. .klen = 27,
  7354. .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
  7355. .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
  7356. "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
  7357. "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
  7358. "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
  7359. .alen = 32,
  7360. .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
  7361. "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
  7362. "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
  7363. "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
  7364. "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
  7365. "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
  7366. .ilen = 48,
  7367. .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
  7368. "\x99\x2a\xa8\xca\x04\x25\x45\x90"
  7369. "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
  7370. "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
  7371. .rlen = 32,
  7372. .novrfy = 1,
  7373. }, {
  7374. .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
  7375. "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
  7376. "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
  7377. "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
  7378. "\xee\x49\x83",
  7379. .klen = 35,
  7380. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  7381. .alen = 0,
  7382. .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
  7383. .ilen = 8,
  7384. .result = "\x00",
  7385. .rlen = 0,
  7386. }, {
  7387. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  7388. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  7389. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  7390. "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
  7391. "\x85\x34\x66",
  7392. .klen = 35,
  7393. .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
  7394. .alen = 0,
  7395. .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
  7396. "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
  7397. "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
  7398. "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
  7399. "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
  7400. "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
  7401. .ilen = 48,
  7402. .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
  7403. "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
  7404. "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
  7405. "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
  7406. .rlen = 32,
  7407. .novrfy = 1,
  7408. }, {
  7409. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  7410. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  7411. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  7412. "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
  7413. "\xcf\x76\x3f",
  7414. .klen = 35,
  7415. .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
  7416. .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
  7417. "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
  7418. "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
  7419. "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
  7420. .alen = 32,
  7421. .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
  7422. "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
  7423. "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
  7424. "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
  7425. "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
  7426. "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
  7427. .ilen = 48,
  7428. .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
  7429. "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
  7430. "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
  7431. "\x04\x49\x3b\x19\x93\x57\x25\x5d",
  7432. .rlen = 32,
  7433. },
  7434. };
  7435. /*
  7436. * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
  7437. * test vectors, taken from Appendix B.2.9 and B.2.10:
  7438. * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
  7439. * Only AES-128 is supported at this time.
  7440. */
  7441. #define ANSI_CPRNG_AES_TEST_VECTORS 6
  7442. static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
  7443. {
  7444. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  7445. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  7446. .klen = 16,
  7447. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  7448. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
  7449. .dtlen = 16,
  7450. .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
  7451. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7452. .vlen = 16,
  7453. .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
  7454. "\x84\x79\x66\x85\xc1\x2f\x76\x41",
  7455. .rlen = 16,
  7456. .loops = 1,
  7457. }, {
  7458. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  7459. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  7460. .klen = 16,
  7461. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  7462. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
  7463. .dtlen = 16,
  7464. .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
  7465. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7466. .vlen = 16,
  7467. .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
  7468. "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
  7469. .rlen = 16,
  7470. .loops = 1,
  7471. }, {
  7472. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  7473. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  7474. .klen = 16,
  7475. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  7476. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
  7477. .dtlen = 16,
  7478. .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
  7479. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7480. .vlen = 16,
  7481. .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
  7482. "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
  7483. .rlen = 16,
  7484. .loops = 1,
  7485. }, {
  7486. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  7487. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  7488. .klen = 16,
  7489. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  7490. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
  7491. .dtlen = 16,
  7492. .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
  7493. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7494. .vlen = 16,
  7495. .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
  7496. "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
  7497. .rlen = 16,
  7498. .loops = 1,
  7499. }, {
  7500. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  7501. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  7502. .klen = 16,
  7503. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  7504. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
  7505. .dtlen = 16,
  7506. .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
  7507. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7508. .vlen = 16,
  7509. .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
  7510. "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
  7511. .rlen = 16,
  7512. .loops = 1,
  7513. }, { /* Monte Carlo Test */
  7514. .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
  7515. "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
  7516. .klen = 16,
  7517. .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
  7518. "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
  7519. .dtlen = 16,
  7520. .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
  7521. "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
  7522. .vlen = 16,
  7523. .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
  7524. "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
  7525. .rlen = 16,
  7526. .loops = 10000,
  7527. },
  7528. };
  7529. /* Cast5 test vectors from RFC 2144 */
  7530. #define CAST5_ENC_TEST_VECTORS 3
  7531. #define CAST5_DEC_TEST_VECTORS 3
  7532. static struct cipher_testvec cast5_enc_tv_template[] = {
  7533. {
  7534. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  7535. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  7536. .klen = 16,
  7537. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7538. .ilen = 8,
  7539. .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  7540. .rlen = 8,
  7541. }, {
  7542. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  7543. "\x23\x45",
  7544. .klen = 10,
  7545. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7546. .ilen = 8,
  7547. .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  7548. .rlen = 8,
  7549. }, {
  7550. .key = "\x01\x23\x45\x67\x12",
  7551. .klen = 5,
  7552. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7553. .ilen = 8,
  7554. .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  7555. .rlen = 8,
  7556. },
  7557. };
  7558. static struct cipher_testvec cast5_dec_tv_template[] = {
  7559. {
  7560. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  7561. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  7562. .klen = 16,
  7563. .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  7564. .ilen = 8,
  7565. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7566. .rlen = 8,
  7567. }, {
  7568. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  7569. "\x23\x45",
  7570. .klen = 10,
  7571. .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  7572. .ilen = 8,
  7573. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7574. .rlen = 8,
  7575. }, {
  7576. .key = "\x01\x23\x45\x67\x12",
  7577. .klen = 5,
  7578. .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  7579. .ilen = 8,
  7580. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7581. .rlen = 8,
  7582. },
  7583. };
  7584. /*
  7585. * ARC4 test vectors from OpenSSL
  7586. */
  7587. #define ARC4_ENC_TEST_VECTORS 7
  7588. #define ARC4_DEC_TEST_VECTORS 7
  7589. static struct cipher_testvec arc4_enc_tv_template[] = {
  7590. {
  7591. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7592. .klen = 8,
  7593. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7594. .ilen = 8,
  7595. .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  7596. .rlen = 8,
  7597. }, {
  7598. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7599. .klen = 8,
  7600. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7601. .ilen = 8,
  7602. .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  7603. .rlen = 8,
  7604. }, {
  7605. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7606. .klen = 8,
  7607. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7608. .ilen = 8,
  7609. .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  7610. .rlen = 8,
  7611. }, {
  7612. .key = "\xef\x01\x23\x45",
  7613. .klen = 4,
  7614. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7615. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7616. "\x00\x00\x00\x00",
  7617. .ilen = 20,
  7618. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  7619. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  7620. "\x36\xb6\x78\x58",
  7621. .rlen = 20,
  7622. }, {
  7623. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7624. .klen = 8,
  7625. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  7626. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  7627. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  7628. "\x12\x34\x56\x78",
  7629. .ilen = 28,
  7630. .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  7631. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  7632. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  7633. "\x40\x01\x1e\xcf",
  7634. .rlen = 28,
  7635. }, {
  7636. .key = "\xef\x01\x23\x45",
  7637. .klen = 4,
  7638. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7639. "\x00\x00",
  7640. .ilen = 10,
  7641. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  7642. "\xbd\x61",
  7643. .rlen = 10,
  7644. }, {
  7645. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  7646. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7647. .klen = 16,
  7648. .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  7649. .ilen = 8,
  7650. .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  7651. .rlen = 8,
  7652. },
  7653. };
  7654. static struct cipher_testvec arc4_dec_tv_template[] = {
  7655. {
  7656. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7657. .klen = 8,
  7658. .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  7659. .ilen = 8,
  7660. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7661. .rlen = 8,
  7662. }, {
  7663. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7664. .klen = 8,
  7665. .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  7666. .ilen = 8,
  7667. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7668. .rlen = 8,
  7669. }, {
  7670. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7671. .klen = 8,
  7672. .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  7673. .ilen = 8,
  7674. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7675. .rlen = 8,
  7676. }, {
  7677. .key = "\xef\x01\x23\x45",
  7678. .klen = 4,
  7679. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  7680. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  7681. "\x36\xb6\x78\x58",
  7682. .ilen = 20,
  7683. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7684. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7685. "\x00\x00\x00\x00",
  7686. .rlen = 20,
  7687. }, {
  7688. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  7689. .klen = 8,
  7690. .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  7691. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  7692. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  7693. "\x40\x01\x1e\xcf",
  7694. .ilen = 28,
  7695. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  7696. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  7697. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  7698. "\x12\x34\x56\x78",
  7699. .rlen = 28,
  7700. }, {
  7701. .key = "\xef\x01\x23\x45",
  7702. .klen = 4,
  7703. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  7704. "\xbd\x61",
  7705. .ilen = 10,
  7706. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7707. "\x00\x00",
  7708. .rlen = 10,
  7709. }, {
  7710. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  7711. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7712. .klen = 16,
  7713. .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  7714. .ilen = 8,
  7715. .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  7716. .rlen = 8,
  7717. },
  7718. };
  7719. /*
  7720. * TEA test vectors
  7721. */
  7722. #define TEA_ENC_TEST_VECTORS 4
  7723. #define TEA_DEC_TEST_VECTORS 4
  7724. static struct cipher_testvec tea_enc_tv_template[] = {
  7725. {
  7726. .key = zeroed_string,
  7727. .klen = 16,
  7728. .input = zeroed_string,
  7729. .ilen = 8,
  7730. .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  7731. .rlen = 8,
  7732. }, {
  7733. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  7734. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  7735. .klen = 16,
  7736. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  7737. .ilen = 8,
  7738. .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  7739. .rlen = 8,
  7740. }, {
  7741. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  7742. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  7743. .klen = 16,
  7744. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  7745. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  7746. .ilen = 16,
  7747. .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  7748. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  7749. .rlen = 16,
  7750. }, {
  7751. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  7752. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  7753. .klen = 16,
  7754. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  7755. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  7756. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  7757. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  7758. .ilen = 32,
  7759. .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  7760. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  7761. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  7762. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  7763. .rlen = 32,
  7764. }
  7765. };
  7766. static struct cipher_testvec tea_dec_tv_template[] = {
  7767. {
  7768. .key = zeroed_string,
  7769. .klen = 16,
  7770. .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  7771. .ilen = 8,
  7772. .result = zeroed_string,
  7773. .rlen = 8,
  7774. }, {
  7775. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  7776. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  7777. .klen = 16,
  7778. .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  7779. .ilen = 8,
  7780. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  7781. .rlen = 8,
  7782. }, {
  7783. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  7784. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  7785. .klen = 16,
  7786. .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  7787. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  7788. .ilen = 16,
  7789. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  7790. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  7791. .rlen = 16,
  7792. }, {
  7793. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  7794. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  7795. .klen = 16,
  7796. .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  7797. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  7798. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  7799. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  7800. .ilen = 32,
  7801. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  7802. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  7803. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  7804. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  7805. .rlen = 32,
  7806. }
  7807. };
  7808. /*
  7809. * XTEA test vectors
  7810. */
  7811. #define XTEA_ENC_TEST_VECTORS 4
  7812. #define XTEA_DEC_TEST_VECTORS 4
  7813. static struct cipher_testvec xtea_enc_tv_template[] = {
  7814. {
  7815. .key = zeroed_string,
  7816. .klen = 16,
  7817. .input = zeroed_string,
  7818. .ilen = 8,
  7819. .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  7820. .rlen = 8,
  7821. }, {
  7822. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  7823. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  7824. .klen = 16,
  7825. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  7826. .ilen = 8,
  7827. .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  7828. .rlen = 8,
  7829. }, {
  7830. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  7831. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  7832. .klen = 16,
  7833. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  7834. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  7835. .ilen = 16,
  7836. .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  7837. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  7838. .rlen = 16,
  7839. }, {
  7840. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  7841. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  7842. .klen = 16,
  7843. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  7844. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  7845. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  7846. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  7847. .ilen = 32,
  7848. .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  7849. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  7850. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  7851. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  7852. .rlen = 32,
  7853. }
  7854. };
  7855. static struct cipher_testvec xtea_dec_tv_template[] = {
  7856. {
  7857. .key = zeroed_string,
  7858. .klen = 16,
  7859. .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  7860. .ilen = 8,
  7861. .result = zeroed_string,
  7862. .rlen = 8,
  7863. }, {
  7864. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  7865. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  7866. .klen = 16,
  7867. .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  7868. .ilen = 8,
  7869. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  7870. .rlen = 8,
  7871. }, {
  7872. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  7873. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  7874. .klen = 16,
  7875. .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  7876. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  7877. .ilen = 16,
  7878. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  7879. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  7880. .rlen = 16,
  7881. }, {
  7882. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  7883. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  7884. .klen = 16,
  7885. .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  7886. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  7887. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  7888. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  7889. .ilen = 32,
  7890. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  7891. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  7892. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  7893. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  7894. .rlen = 32,
  7895. }
  7896. };
  7897. /*
  7898. * KHAZAD test vectors.
  7899. */
  7900. #define KHAZAD_ENC_TEST_VECTORS 5
  7901. #define KHAZAD_DEC_TEST_VECTORS 5
  7902. static struct cipher_testvec khazad_enc_tv_template[] = {
  7903. {
  7904. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  7905. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7906. .klen = 16,
  7907. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7908. .ilen = 8,
  7909. .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  7910. .rlen = 8,
  7911. }, {
  7912. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  7913. "\x38\x38\x38\x38\x38\x38\x38\x38",
  7914. .klen = 16,
  7915. .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
  7916. .ilen = 8,
  7917. .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  7918. .rlen = 8,
  7919. }, {
  7920. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  7921. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  7922. .klen = 16,
  7923. .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  7924. .ilen = 8,
  7925. .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  7926. .rlen = 8,
  7927. }, {
  7928. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  7929. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  7930. .klen = 16,
  7931. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  7932. .ilen = 8,
  7933. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  7934. .rlen = 8,
  7935. }, {
  7936. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  7937. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  7938. .klen = 16,
  7939. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  7940. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  7941. .ilen = 16,
  7942. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  7943. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  7944. .rlen = 16,
  7945. },
  7946. };
  7947. static struct cipher_testvec khazad_dec_tv_template[] = {
  7948. {
  7949. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  7950. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7951. .klen = 16,
  7952. .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  7953. .ilen = 8,
  7954. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7955. .rlen = 8,
  7956. }, {
  7957. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  7958. "\x38\x38\x38\x38\x38\x38\x38\x38",
  7959. .klen = 16,
  7960. .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  7961. .ilen = 8,
  7962. .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
  7963. .rlen = 8,
  7964. }, {
  7965. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  7966. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  7967. .klen = 16,
  7968. .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  7969. .ilen = 8,
  7970. .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  7971. .rlen = 8,
  7972. }, {
  7973. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  7974. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  7975. .klen = 16,
  7976. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  7977. .ilen = 8,
  7978. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  7979. .rlen = 8,
  7980. }, {
  7981. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  7982. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  7983. .klen = 16,
  7984. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  7985. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  7986. .ilen = 16,
  7987. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  7988. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  7989. .rlen = 16,
  7990. },
  7991. };
  7992. /*
  7993. * Anubis test vectors.
  7994. */
  7995. #define ANUBIS_ENC_TEST_VECTORS 5
  7996. #define ANUBIS_DEC_TEST_VECTORS 5
  7997. #define ANUBIS_CBC_ENC_TEST_VECTORS 2
  7998. #define ANUBIS_CBC_DEC_TEST_VECTORS 2
  7999. static struct cipher_testvec anubis_enc_tv_template[] = {
  8000. {
  8001. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8002. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  8003. .klen = 16,
  8004. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8005. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  8006. .ilen = 16,
  8007. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  8008. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  8009. .rlen = 16,
  8010. }, {
  8011. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  8012. "\x03\x03\x03\x03\x03\x03\x03\x03"
  8013. "\x03\x03\x03\x03",
  8014. .klen = 20,
  8015. .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
  8016. "\x03\x03\x03\x03\x03\x03\x03\x03",
  8017. .ilen = 16,
  8018. .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  8019. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  8020. .rlen = 16,
  8021. }, {
  8022. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  8023. "\x24\x24\x24\x24\x24\x24\x24\x24"
  8024. "\x24\x24\x24\x24\x24\x24\x24\x24"
  8025. "\x24\x24\x24\x24",
  8026. .klen = 28,
  8027. .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
  8028. "\x24\x24\x24\x24\x24\x24\x24\x24",
  8029. .ilen = 16,
  8030. .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  8031. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  8032. .rlen = 16,
  8033. }, {
  8034. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  8035. "\x25\x25\x25\x25\x25\x25\x25\x25"
  8036. "\x25\x25\x25\x25\x25\x25\x25\x25"
  8037. "\x25\x25\x25\x25\x25\x25\x25\x25",
  8038. .klen = 32,
  8039. .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
  8040. "\x25\x25\x25\x25\x25\x25\x25\x25",
  8041. .ilen = 16,
  8042. .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  8043. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  8044. .rlen = 16,
  8045. }, {
  8046. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  8047. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8048. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8049. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8050. "\x35\x35\x35\x35\x35\x35\x35\x35",
  8051. .klen = 40,
  8052. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  8053. "\x35\x35\x35\x35\x35\x35\x35\x35",
  8054. .ilen = 16,
  8055. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  8056. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  8057. .rlen = 16,
  8058. },
  8059. };
  8060. static struct cipher_testvec anubis_dec_tv_template[] = {
  8061. {
  8062. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8063. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  8064. .klen = 16,
  8065. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  8066. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  8067. .ilen = 16,
  8068. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8069. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  8070. .rlen = 16,
  8071. }, {
  8072. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  8073. "\x03\x03\x03\x03\x03\x03\x03\x03"
  8074. "\x03\x03\x03\x03",
  8075. .klen = 20,
  8076. .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  8077. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  8078. .ilen = 16,
  8079. .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
  8080. "\x03\x03\x03\x03\x03\x03\x03\x03",
  8081. .rlen = 16,
  8082. }, {
  8083. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  8084. "\x24\x24\x24\x24\x24\x24\x24\x24"
  8085. "\x24\x24\x24\x24\x24\x24\x24\x24"
  8086. "\x24\x24\x24\x24",
  8087. .klen = 28,
  8088. .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  8089. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  8090. .ilen = 16,
  8091. .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
  8092. "\x24\x24\x24\x24\x24\x24\x24\x24",
  8093. .rlen = 16,
  8094. }, {
  8095. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  8096. "\x25\x25\x25\x25\x25\x25\x25\x25"
  8097. "\x25\x25\x25\x25\x25\x25\x25\x25"
  8098. "\x25\x25\x25\x25\x25\x25\x25\x25",
  8099. .klen = 32,
  8100. .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  8101. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  8102. .ilen = 16,
  8103. .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
  8104. "\x25\x25\x25\x25\x25\x25\x25\x25",
  8105. .rlen = 16,
  8106. }, {
  8107. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  8108. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8109. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8110. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8111. "\x35\x35\x35\x35\x35\x35\x35\x35",
  8112. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  8113. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  8114. .klen = 40,
  8115. .ilen = 16,
  8116. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  8117. "\x35\x35\x35\x35\x35\x35\x35\x35",
  8118. .rlen = 16,
  8119. },
  8120. };
  8121. static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
  8122. {
  8123. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8124. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  8125. .klen = 16,
  8126. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8127. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8128. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8129. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  8130. .ilen = 32,
  8131. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  8132. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  8133. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  8134. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  8135. .rlen = 32,
  8136. }, {
  8137. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  8138. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8139. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8140. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8141. "\x35\x35\x35\x35\x35\x35\x35\x35",
  8142. .klen = 40,
  8143. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  8144. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8145. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8146. "\x35\x35\x35\x35\x35\x35\x35\x35",
  8147. .ilen = 32,
  8148. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  8149. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  8150. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  8151. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  8152. .rlen = 32,
  8153. },
  8154. };
  8155. static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
  8156. {
  8157. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8158. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  8159. .klen = 16,
  8160. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  8161. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  8162. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  8163. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  8164. .ilen = 32,
  8165. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8166. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8167. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  8168. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  8169. .rlen = 32,
  8170. }, {
  8171. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  8172. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8173. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8174. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8175. "\x35\x35\x35\x35\x35\x35\x35\x35",
  8176. .klen = 40,
  8177. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  8178. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  8179. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  8180. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  8181. .ilen = 32,
  8182. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  8183. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8184. "\x35\x35\x35\x35\x35\x35\x35\x35"
  8185. "\x35\x35\x35\x35\x35\x35\x35\x35",
  8186. .rlen = 32,
  8187. },
  8188. };
  8189. /*
  8190. * XETA test vectors
  8191. */
  8192. #define XETA_ENC_TEST_VECTORS 4
  8193. #define XETA_DEC_TEST_VECTORS 4
  8194. static struct cipher_testvec xeta_enc_tv_template[] = {
  8195. {
  8196. .key = zeroed_string,
  8197. .klen = 16,
  8198. .input = zeroed_string,
  8199. .ilen = 8,
  8200. .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  8201. .rlen = 8,
  8202. }, {
  8203. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  8204. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  8205. .klen = 16,
  8206. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  8207. .ilen = 8,
  8208. .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  8209. .rlen = 8,
  8210. }, {
  8211. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  8212. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  8213. .klen = 16,
  8214. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  8215. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  8216. .ilen = 16,
  8217. .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  8218. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  8219. .rlen = 16,
  8220. }, {
  8221. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  8222. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  8223. .klen = 16,
  8224. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  8225. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  8226. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  8227. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  8228. .ilen = 32,
  8229. .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  8230. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  8231. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  8232. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  8233. .rlen = 32,
  8234. }
  8235. };
  8236. static struct cipher_testvec xeta_dec_tv_template[] = {
  8237. {
  8238. .key = zeroed_string,
  8239. .klen = 16,
  8240. .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  8241. .ilen = 8,
  8242. .result = zeroed_string,
  8243. .rlen = 8,
  8244. }, {
  8245. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  8246. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  8247. .klen = 16,
  8248. .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  8249. .ilen = 8,
  8250. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  8251. .rlen = 8,
  8252. }, {
  8253. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  8254. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  8255. .klen = 16,
  8256. .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  8257. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  8258. .ilen = 16,
  8259. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  8260. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  8261. .rlen = 16,
  8262. }, {
  8263. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  8264. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  8265. .klen = 16,
  8266. .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  8267. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  8268. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  8269. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  8270. .ilen = 32,
  8271. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  8272. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  8273. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  8274. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  8275. .rlen = 32,
  8276. }
  8277. };
  8278. /*
  8279. * FCrypt test vectors
  8280. */
  8281. #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
  8282. #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
  8283. static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
  8284. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  8285. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8286. .klen = 8,
  8287. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8288. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8289. .ilen = 8,
  8290. .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  8291. .rlen = 8,
  8292. }, {
  8293. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  8294. .klen = 8,
  8295. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8296. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  8297. .ilen = 8,
  8298. .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  8299. .rlen = 8,
  8300. }, { /* From Arla */
  8301. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  8302. .klen = 8,
  8303. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8304. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  8305. .ilen = 48,
  8306. .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  8307. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  8308. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  8309. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  8310. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  8311. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  8312. .rlen = 48,
  8313. }, {
  8314. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8315. .klen = 8,
  8316. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  8317. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  8318. .ilen = 48,
  8319. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  8320. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  8321. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  8322. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  8323. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  8324. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  8325. .rlen = 48,
  8326. }, { /* split-page version */
  8327. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8328. .klen = 8,
  8329. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  8330. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  8331. .ilen = 48,
  8332. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  8333. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  8334. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  8335. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  8336. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  8337. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  8338. .rlen = 48,
  8339. .np = 2,
  8340. .tap = { 20, 28 },
  8341. }
  8342. };
  8343. static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
  8344. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  8345. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8346. .klen = 8,
  8347. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8348. .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  8349. .ilen = 8,
  8350. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8351. .rlen = 8,
  8352. }, {
  8353. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  8354. .klen = 8,
  8355. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8356. .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  8357. .ilen = 8,
  8358. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  8359. .rlen = 8,
  8360. }, { /* From Arla */
  8361. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  8362. .klen = 8,
  8363. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8364. .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  8365. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  8366. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  8367. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  8368. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  8369. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  8370. .ilen = 48,
  8371. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  8372. .rlen = 48,
  8373. }, {
  8374. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8375. .klen = 8,
  8376. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  8377. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  8378. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  8379. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  8380. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  8381. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  8382. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  8383. .ilen = 48,
  8384. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  8385. .rlen = 48,
  8386. }, { /* split-page version */
  8387. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8388. .klen = 8,
  8389. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  8390. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  8391. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  8392. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  8393. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  8394. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  8395. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  8396. .ilen = 48,
  8397. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  8398. .rlen = 48,
  8399. .np = 2,
  8400. .tap = { 20, 28 },
  8401. }
  8402. };
  8403. /*
  8404. * CAMELLIA test vectors.
  8405. */
  8406. #define CAMELLIA_ENC_TEST_VECTORS 3
  8407. #define CAMELLIA_DEC_TEST_VECTORS 3
  8408. #define CAMELLIA_CBC_ENC_TEST_VECTORS 2
  8409. #define CAMELLIA_CBC_DEC_TEST_VECTORS 2
  8410. static struct cipher_testvec camellia_enc_tv_template[] = {
  8411. {
  8412. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8413. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8414. .klen = 16,
  8415. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8416. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8417. .ilen = 16,
  8418. .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
  8419. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  8420. .rlen = 16,
  8421. }, {
  8422. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8423. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  8424. "\x00\x11\x22\x33\x44\x55\x66\x77",
  8425. .klen = 24,
  8426. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8427. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8428. .ilen = 16,
  8429. .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  8430. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  8431. .rlen = 16,
  8432. }, {
  8433. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8434. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  8435. "\x00\x11\x22\x33\x44\x55\x66\x77"
  8436. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  8437. .klen = 32,
  8438. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8439. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8440. .ilen = 16,
  8441. .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  8442. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  8443. .rlen = 16,
  8444. },
  8445. };
  8446. static struct cipher_testvec camellia_dec_tv_template[] = {
  8447. {
  8448. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8449. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8450. .klen = 16,
  8451. .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
  8452. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  8453. .ilen = 16,
  8454. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8455. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8456. .rlen = 16,
  8457. }, {
  8458. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8459. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  8460. "\x00\x11\x22\x33\x44\x55\x66\x77",
  8461. .klen = 24,
  8462. .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  8463. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  8464. .ilen = 16,
  8465. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8466. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8467. .rlen = 16,
  8468. }, {
  8469. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8470. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  8471. "\x00\x11\x22\x33\x44\x55\x66\x77"
  8472. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  8473. .klen = 32,
  8474. .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  8475. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  8476. .ilen = 16,
  8477. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  8478. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  8479. .rlen = 16,
  8480. },
  8481. };
  8482. static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
  8483. {
  8484. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  8485. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  8486. .klen = 16,
  8487. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  8488. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  8489. .input = "Single block msg",
  8490. .ilen = 16,
  8491. .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  8492. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  8493. .rlen = 16,
  8494. }, {
  8495. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  8496. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  8497. .klen = 16,
  8498. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  8499. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  8500. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8501. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8502. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8503. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8504. .ilen = 32,
  8505. .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  8506. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  8507. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  8508. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  8509. .rlen = 32,
  8510. },
  8511. };
  8512. static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
  8513. {
  8514. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  8515. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  8516. .klen = 16,
  8517. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  8518. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  8519. .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  8520. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  8521. .ilen = 16,
  8522. .result = "Single block msg",
  8523. .rlen = 16,
  8524. }, {
  8525. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  8526. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  8527. .klen = 16,
  8528. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  8529. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  8530. .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  8531. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  8532. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  8533. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  8534. .ilen = 32,
  8535. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8536. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8537. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8538. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8539. .rlen = 32,
  8540. },
  8541. };
  8542. /*
  8543. * SEED test vectors
  8544. */
  8545. #define SEED_ENC_TEST_VECTORS 4
  8546. #define SEED_DEC_TEST_VECTORS 4
  8547. static struct cipher_testvec seed_enc_tv_template[] = {
  8548. {
  8549. .key = zeroed_string,
  8550. .klen = 16,
  8551. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8552. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8553. .ilen = 16,
  8554. .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  8555. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  8556. .rlen = 16,
  8557. }, {
  8558. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8559. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8560. .klen = 16,
  8561. .input = zeroed_string,
  8562. .ilen = 16,
  8563. .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  8564. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  8565. .rlen = 16,
  8566. }, {
  8567. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  8568. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  8569. .klen = 16,
  8570. .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  8571. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  8572. .ilen = 16,
  8573. .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  8574. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  8575. .rlen = 16,
  8576. }, {
  8577. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  8578. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  8579. .klen = 16,
  8580. .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  8581. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  8582. .ilen = 16,
  8583. .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  8584. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  8585. .rlen = 16,
  8586. }
  8587. };
  8588. static struct cipher_testvec seed_dec_tv_template[] = {
  8589. {
  8590. .key = zeroed_string,
  8591. .klen = 16,
  8592. .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  8593. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  8594. .ilen = 16,
  8595. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8596. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8597. .rlen = 16,
  8598. }, {
  8599. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8600. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8601. .klen = 16,
  8602. .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  8603. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  8604. .ilen = 16,
  8605. .result = zeroed_string,
  8606. .rlen = 16,
  8607. }, {
  8608. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  8609. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  8610. .klen = 16,
  8611. .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  8612. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  8613. .ilen = 16,
  8614. .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  8615. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  8616. .rlen = 16,
  8617. }, {
  8618. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  8619. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  8620. .klen = 16,
  8621. .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  8622. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  8623. .ilen = 16,
  8624. .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  8625. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  8626. .rlen = 16,
  8627. }
  8628. };
  8629. #define SALSA20_STREAM_ENC_TEST_VECTORS 5
  8630. static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
  8631. /*
  8632. * Testvectors from verified.test-vectors submitted to ECRYPT.
  8633. * They are truncated to size 39, 64, 111, 129 to test a variety
  8634. * of input length.
  8635. */
  8636. { /* Set 3, vector 0 */
  8637. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8638. "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
  8639. .klen = 16,
  8640. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8641. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8642. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8643. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8644. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8645. "\x00\x00\x00\x00\x00\x00\x00",
  8646. .ilen = 39,
  8647. .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
  8648. "\x68\x02\x41\x0C\x68\x86\x88\x89"
  8649. "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
  8650. "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
  8651. "\x58\x3F\x52\x79\x70\xEB\xC1",
  8652. .rlen = 39,
  8653. }, { /* Set 5, vector 0 */
  8654. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8655. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8656. .klen = 16,
  8657. .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
  8658. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8659. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8660. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8661. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8662. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8663. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8664. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8665. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8666. .ilen = 64,
  8667. .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
  8668. "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
  8669. "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
  8670. "\x46\x26\xBF\x44\x3F\x21\x97\x76"
  8671. "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
  8672. "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
  8673. "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
  8674. "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
  8675. .rlen = 64,
  8676. }, { /* Set 3, vector 27 */
  8677. .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
  8678. "\x23\x24\x25\x26\x27\x28\x29\x2A"
  8679. "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
  8680. "\x33\x34\x35\x36\x37\x38\x39\x3A",
  8681. .klen = 32,
  8682. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8683. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8684. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8685. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8686. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8687. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8688. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8689. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8690. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8691. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8692. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8693. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8694. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8695. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8696. "\x00\x00\x00\x00\x00\x00\x00",
  8697. .ilen = 111,
  8698. .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
  8699. "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
  8700. "\x87\xD9\x47\xF8\x28\x91\x35\x98"
  8701. "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
  8702. "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
  8703. "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
  8704. "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
  8705. "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
  8706. "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
  8707. "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
  8708. "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
  8709. "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
  8710. "\x95\x46\x45\x54\xE9\x75\x03\x08"
  8711. "\x44\xAF\xE5\x8A\x81\x12\x09",
  8712. .rlen = 111,
  8713. }, { /* Set 5, vector 27 */
  8714. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8715. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8716. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8717. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8718. .klen = 32,
  8719. .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
  8720. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8721. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8722. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8723. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8724. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8725. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8726. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8727. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8728. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8729. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8730. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8731. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8732. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8733. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8734. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8735. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8736. "\x00",
  8737. .ilen = 129,
  8738. .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
  8739. "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
  8740. "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
  8741. "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
  8742. "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
  8743. "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
  8744. "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
  8745. "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
  8746. "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
  8747. "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
  8748. "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
  8749. "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
  8750. "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
  8751. "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
  8752. "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
  8753. "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
  8754. "\x5A",
  8755. .rlen = 129,
  8756. }, { /* large test vector generated using Crypto++ */
  8757. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8758. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8759. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8760. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8761. .klen = 32,
  8762. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8763. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8764. .input =
  8765. "\x00\x01\x02\x03\x04\x05\x06\x07"
  8766. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8767. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8768. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8769. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8770. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8771. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8772. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8773. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8774. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8775. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8776. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8777. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8778. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8779. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8780. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8781. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8782. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8783. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8784. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8785. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8786. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8787. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8788. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8789. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8790. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8791. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8792. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8793. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8794. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8795. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8796. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  8797. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  8798. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  8799. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  8800. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  8801. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  8802. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  8803. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  8804. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  8805. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  8806. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  8807. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  8808. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  8809. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  8810. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  8811. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  8812. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  8813. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  8814. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  8815. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  8816. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  8817. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  8818. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  8819. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  8820. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  8821. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  8822. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  8823. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  8824. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  8825. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  8826. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  8827. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  8828. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  8829. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  8830. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  8831. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  8832. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  8833. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  8834. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  8835. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  8836. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  8837. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  8838. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  8839. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  8840. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  8841. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  8842. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  8843. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  8844. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  8845. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  8846. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  8847. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  8848. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  8849. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  8850. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  8851. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  8852. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  8853. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  8854. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  8855. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  8856. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  8857. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  8858. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  8859. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  8860. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  8861. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  8862. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  8863. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  8864. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  8865. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  8866. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  8867. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  8868. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  8869. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  8870. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  8871. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  8872. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  8873. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  8874. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  8875. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  8876. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  8877. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  8878. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  8879. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  8880. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  8881. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  8882. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  8883. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  8884. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  8885. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  8886. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  8887. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  8888. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  8889. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  8890. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  8891. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  8892. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  8893. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  8894. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  8895. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  8896. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  8897. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  8898. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  8899. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  8900. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  8901. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  8902. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  8903. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  8904. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  8905. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  8906. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  8907. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  8908. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  8909. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  8910. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  8911. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  8912. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  8913. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  8914. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  8915. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  8916. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  8917. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  8918. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  8919. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  8920. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  8921. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  8922. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  8923. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  8924. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  8925. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  8926. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  8927. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  8928. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  8929. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  8930. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  8931. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  8932. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  8933. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  8934. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  8935. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  8936. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  8937. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  8938. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  8939. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  8940. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  8941. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  8942. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  8943. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  8944. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  8945. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  8946. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  8947. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  8948. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  8949. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  8950. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  8951. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  8952. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  8953. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  8954. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  8955. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  8956. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  8957. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  8958. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  8959. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  8960. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  8961. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  8962. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  8963. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  8964. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  8965. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  8966. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  8967. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  8968. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  8969. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  8970. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  8971. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  8972. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  8973. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  8974. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  8975. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  8976. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  8977. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  8978. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  8979. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  8980. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  8981. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  8982. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  8983. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  8984. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  8985. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  8986. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  8987. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  8988. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  8989. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  8990. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  8991. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  8992. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  8993. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  8994. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  8995. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  8996. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  8997. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  8998. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  8999. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  9000. "\x28\x37\x46\x55\x64\x73\x82\x91"
  9001. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  9002. "\x18\x27\x36\x45\x54\x63\x72\x81"
  9003. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  9004. "\x08\x17\x26\x35\x44\x53\x62\x71"
  9005. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  9006. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  9007. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  9008. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  9009. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  9010. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  9011. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  9012. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  9013. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  9014. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  9015. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  9016. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  9017. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  9018. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  9019. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  9020. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  9021. "\x00\x11\x22\x33\x44\x55\x66\x77"
  9022. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  9023. "\x10\x21\x32\x43\x54\x65\x76\x87"
  9024. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  9025. "\x20\x31\x42\x53\x64\x75\x86\x97"
  9026. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  9027. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  9028. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  9029. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  9030. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  9031. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  9032. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  9033. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  9034. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  9035. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  9036. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  9037. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  9038. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  9039. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  9040. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  9041. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  9042. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  9043. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  9044. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  9045. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  9046. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  9047. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  9048. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  9049. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  9050. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  9051. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  9052. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  9053. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  9054. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  9055. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  9056. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  9057. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  9058. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  9059. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  9060. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  9061. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  9062. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  9063. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  9064. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  9065. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  9066. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  9067. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  9068. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  9069. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  9070. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  9071. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  9072. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  9073. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  9074. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  9075. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  9076. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  9077. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  9078. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  9079. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  9080. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  9081. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  9082. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  9083. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  9084. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  9085. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  9086. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  9087. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  9088. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  9089. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  9090. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  9091. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  9092. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  9093. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  9094. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  9095. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  9096. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  9097. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  9098. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  9099. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  9100. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  9101. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  9102. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  9103. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  9104. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  9105. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  9106. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  9107. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  9108. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  9109. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  9110. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  9111. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  9112. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  9113. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  9114. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  9115. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  9116. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  9117. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  9118. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  9119. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  9120. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  9121. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  9122. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  9123. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  9124. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  9125. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  9126. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  9127. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  9128. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  9129. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  9130. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  9131. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  9132. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  9133. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  9134. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  9135. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  9136. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  9137. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  9138. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  9139. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  9140. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  9141. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  9142. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  9143. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  9144. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  9145. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  9146. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  9147. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  9148. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  9149. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  9150. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  9151. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  9152. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  9153. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  9154. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  9155. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  9156. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  9157. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  9158. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  9159. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  9160. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  9161. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  9162. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  9163. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  9164. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  9165. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  9166. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  9167. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  9168. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  9169. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  9170. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  9171. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  9172. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  9173. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  9174. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  9175. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  9176. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  9177. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  9178. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  9179. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  9180. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  9181. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  9182. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  9183. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  9184. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  9185. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  9186. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  9187. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  9188. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  9189. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  9190. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  9191. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  9192. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  9193. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  9194. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  9195. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  9196. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  9197. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  9198. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  9199. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  9200. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  9201. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  9202. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  9203. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  9204. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  9205. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  9206. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  9207. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  9208. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  9209. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  9210. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  9211. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  9212. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  9213. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  9214. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  9215. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  9216. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  9217. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  9218. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  9219. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  9220. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  9221. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  9222. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  9223. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  9224. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  9225. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  9226. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  9227. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  9228. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  9229. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  9230. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  9231. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  9232. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  9233. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  9234. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  9235. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  9236. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  9237. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  9238. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  9239. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  9240. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  9241. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  9242. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  9243. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  9244. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  9245. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  9246. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  9247. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  9248. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  9249. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  9250. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  9251. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  9252. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  9253. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  9254. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  9255. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  9256. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  9257. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  9258. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  9259. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  9260. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  9261. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  9262. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  9263. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  9264. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  9265. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  9266. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  9267. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  9268. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  9269. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  9270. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  9271. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  9272. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  9273. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  9274. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  9275. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  9276. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  9277. "\x00\x21\x42\x63",
  9278. .ilen = 4100,
  9279. .result =
  9280. "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
  9281. "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
  9282. "\x29\x01\xce\x98\x55\x53\xf9\x0c"
  9283. "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
  9284. "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
  9285. "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
  9286. "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
  9287. "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
  9288. "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
  9289. "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
  9290. "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
  9291. "\xbb\xde\x56\x86\xab\x65\x21\x30"
  9292. "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
  9293. "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
  9294. "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
  9295. "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
  9296. "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
  9297. "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
  9298. "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
  9299. "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
  9300. "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
  9301. "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
  9302. "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
  9303. "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
  9304. "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
  9305. "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
  9306. "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
  9307. "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
  9308. "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
  9309. "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
  9310. "\x45\xff\x3f\xce\x55\xf6\x95\x10"
  9311. "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
  9312. "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
  9313. "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
  9314. "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
  9315. "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
  9316. "\x62\x08\x18\x7a\x25\x49\x28\xac"
  9317. "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
  9318. "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
  9319. "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
  9320. "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
  9321. "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
  9322. "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
  9323. "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
  9324. "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
  9325. "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
  9326. "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
  9327. "\x33\xee\x14\x19\x22\x52\x89\xa7"
  9328. "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
  9329. "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
  9330. "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
  9331. "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
  9332. "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
  9333. "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
  9334. "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
  9335. "\x04\x07\x08\x52\xe6\xc0\xda\x93"
  9336. "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
  9337. "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
  9338. "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
  9339. "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
  9340. "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
  9341. "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
  9342. "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
  9343. "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
  9344. "\x5a\x90\xae\x75\x0a\x74\x18\x89"
  9345. "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
  9346. "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
  9347. "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
  9348. "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
  9349. "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
  9350. "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
  9351. "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
  9352. "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
  9353. "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
  9354. "\x49\x97\x33\xab\x36\x14\x0a\x70"
  9355. "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
  9356. "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
  9357. "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
  9358. "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
  9359. "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
  9360. "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
  9361. "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
  9362. "\x47\x13\x28\x73\x3c\xbb\x00\x90"
  9363. "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
  9364. "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
  9365. "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
  9366. "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
  9367. "\xad\x04\x07\xae\x22\x90\x4a\x93"
  9368. "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
  9369. "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
  9370. "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
  9371. "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
  9372. "\x53\xf9\x80\x10\xde\x80\xa2\x41"
  9373. "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
  9374. "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
  9375. "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
  9376. "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
  9377. "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
  9378. "\xde\xff\x07\x44\xdd\x56\x1b\xad"
  9379. "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
  9380. "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
  9381. "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
  9382. "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
  9383. "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
  9384. "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
  9385. "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
  9386. "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
  9387. "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
  9388. "\x23\xf8\x66\x18\x14\x28\x34\x0f"
  9389. "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
  9390. "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
  9391. "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
  9392. "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
  9393. "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
  9394. "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
  9395. "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
  9396. "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
  9397. "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
  9398. "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
  9399. "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
  9400. "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
  9401. "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
  9402. "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
  9403. "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
  9404. "\xca\x8e\x61\x87\xde\xad\x80\xd2"
  9405. "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
  9406. "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
  9407. "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
  9408. "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
  9409. "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
  9410. "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
  9411. "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
  9412. "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
  9413. "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
  9414. "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
  9415. "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
  9416. "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
  9417. "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
  9418. "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
  9419. "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
  9420. "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
  9421. "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
  9422. "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
  9423. "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
  9424. "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
  9425. "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
  9426. "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
  9427. "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
  9428. "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
  9429. "\x54\xda\x24\x6a\xc4\x41\x65\x46"
  9430. "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
  9431. "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
  9432. "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
  9433. "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
  9434. "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
  9435. "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
  9436. "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
  9437. "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
  9438. "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
  9439. "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
  9440. "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
  9441. "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
  9442. "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
  9443. "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
  9444. "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
  9445. "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
  9446. "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
  9447. "\xef\xcc\xa7\xec\xab\x43\x09\x18"
  9448. "\xd3\xab\x68\xd1\x07\x99\x44\x47"
  9449. "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
  9450. "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
  9451. "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
  9452. "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
  9453. "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
  9454. "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
  9455. "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
  9456. "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
  9457. "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
  9458. "\x71\x6e\x9f\x58\x15\x67\x72\x87"
  9459. "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
  9460. "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
  9461. "\xba\x41\x54\xac\xf0\xfc\x59\x12"
  9462. "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
  9463. "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
  9464. "\x2e\x53\x49\x97\x94\x33\xae\x40"
  9465. "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
  9466. "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
  9467. "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
  9468. "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
  9469. "\xce\x87\xad\xcc\x72\x05\x00\x29"
  9470. "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
  9471. "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
  9472. "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
  9473. "\xac\xc0\x79\x50\x69\xca\x59\x32"
  9474. "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
  9475. "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
  9476. "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
  9477. "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
  9478. "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
  9479. "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
  9480. "\x05\x68\x6b\xab\xe3\x41\x49\xed"
  9481. "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
  9482. "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
  9483. "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
  9484. "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
  9485. "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
  9486. "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
  9487. "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
  9488. "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
  9489. "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
  9490. "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
  9491. "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
  9492. "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
  9493. "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
  9494. "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
  9495. "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
  9496. "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
  9497. "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
  9498. "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
  9499. "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
  9500. "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
  9501. "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
  9502. "\x85\x75\xe6\x43\xf6\x87\x08\x68"
  9503. "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
  9504. "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
  9505. "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
  9506. "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
  9507. "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
  9508. "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
  9509. "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
  9510. "\xaf\x55\xeb\x22\xac\x93\x68\x32"
  9511. "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
  9512. "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
  9513. "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
  9514. "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
  9515. "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
  9516. "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
  9517. "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
  9518. "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
  9519. "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
  9520. "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
  9521. "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
  9522. "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
  9523. "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
  9524. "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
  9525. "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
  9526. "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
  9527. "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
  9528. "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
  9529. "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
  9530. "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
  9531. "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
  9532. "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
  9533. "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
  9534. "\x38\x55\xab\x33\x26\xef\x9f\x43"
  9535. "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
  9536. "\x58\x09\x09\x1b\xc3\x65\x46\x46"
  9537. "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
  9538. "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
  9539. "\x63\x86\xf2\x03\x67\x45\xd2\x72"
  9540. "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
  9541. "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
  9542. "\x2b\x82\x39\xbd\x69\x54\xed\x62"
  9543. "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
  9544. "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
  9545. "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
  9546. "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
  9547. "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
  9548. "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
  9549. "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
  9550. "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
  9551. "\x55\xad\xa4\xd1\x22\x54\x70\x94"
  9552. "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
  9553. "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
  9554. "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
  9555. "\x62\x36\x43\xb2\x82\x15\x75\x50"
  9556. "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
  9557. "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
  9558. "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
  9559. "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
  9560. "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
  9561. "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
  9562. "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
  9563. "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
  9564. "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
  9565. "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
  9566. "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
  9567. "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
  9568. "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
  9569. "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
  9570. "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
  9571. "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
  9572. "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
  9573. "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
  9574. "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
  9575. "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
  9576. "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
  9577. "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
  9578. "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
  9579. "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
  9580. "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
  9581. "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
  9582. "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
  9583. "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
  9584. "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
  9585. "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
  9586. "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
  9587. "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
  9588. "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
  9589. "\x42\x19\x23\x7d\xc8\x73\xee\x25"
  9590. "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
  9591. "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
  9592. "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
  9593. "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
  9594. "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
  9595. "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
  9596. "\xdb\x87\xee\xef\x55\x89\x2a\x59"
  9597. "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
  9598. "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
  9599. "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
  9600. "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
  9601. "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
  9602. "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
  9603. "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
  9604. "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
  9605. "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
  9606. "\xae\xab\x86\x09\x89\xc9\xc2\x40"
  9607. "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
  9608. "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
  9609. "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
  9610. "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
  9611. "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
  9612. "\x95\xd9\x34\x34\x86\xc6\x41\x94"
  9613. "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
  9614. "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
  9615. "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
  9616. "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
  9617. "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
  9618. "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
  9619. "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
  9620. "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
  9621. "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
  9622. "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
  9623. "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
  9624. "\xa7\x33\x34\x86\xca\xe4\x96\x23"
  9625. "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
  9626. "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
  9627. "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
  9628. "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
  9629. "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
  9630. "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
  9631. "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
  9632. "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
  9633. "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
  9634. "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
  9635. "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
  9636. "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
  9637. "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
  9638. "\x68\xc8\x7f\x51\x22\x42\xef\x49"
  9639. "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
  9640. "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
  9641. "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
  9642. "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
  9643. "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
  9644. "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
  9645. "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
  9646. "\x73\x2e\x71\x79\x16\x06\x63\x28"
  9647. "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
  9648. "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
  9649. "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
  9650. "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
  9651. "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
  9652. "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
  9653. "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
  9654. "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
  9655. "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
  9656. "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
  9657. "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
  9658. "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
  9659. "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
  9660. "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
  9661. "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
  9662. "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
  9663. "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
  9664. "\x19\x07\xaf\x90\x62\x5c\x68\x98"
  9665. "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
  9666. "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
  9667. "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
  9668. "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
  9669. "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
  9670. "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
  9671. "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
  9672. "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
  9673. "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
  9674. "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
  9675. "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
  9676. "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
  9677. "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
  9678. "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
  9679. "\x21\x33\x44\xfe\x7f\x35\x32\x93"
  9680. "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
  9681. "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
  9682. "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
  9683. "\x64\xf0\x48\xe5\x57\x99\xee\x75"
  9684. "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
  9685. "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
  9686. "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
  9687. "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
  9688. "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
  9689. "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
  9690. "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
  9691. "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
  9692. "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
  9693. "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
  9694. "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
  9695. "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
  9696. "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
  9697. "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
  9698. "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
  9699. "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
  9700. "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
  9701. "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
  9702. "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
  9703. "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
  9704. "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
  9705. "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
  9706. "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
  9707. "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
  9708. "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
  9709. "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
  9710. "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
  9711. "\x56\xf5\x4e\x01\x35\x27\x45\x77"
  9712. "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
  9713. "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
  9714. "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
  9715. "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
  9716. "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
  9717. "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
  9718. "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
  9719. "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
  9720. "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
  9721. "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
  9722. "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
  9723. "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
  9724. "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
  9725. "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
  9726. "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
  9727. "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
  9728. "\x87\x8f\x03\x21\x28\x95\x0c\x89"
  9729. "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
  9730. "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
  9731. "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
  9732. "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
  9733. "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
  9734. "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
  9735. "\x85\x73\x78\x45\x20\x7f\xae\x13"
  9736. "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
  9737. "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
  9738. "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
  9739. "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
  9740. "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
  9741. "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
  9742. "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
  9743. "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
  9744. "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
  9745. "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
  9746. "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
  9747. "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
  9748. "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
  9749. "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
  9750. "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
  9751. "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
  9752. "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
  9753. "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
  9754. "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
  9755. "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
  9756. "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
  9757. "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
  9758. "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
  9759. "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
  9760. "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
  9761. "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
  9762. "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
  9763. "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
  9764. "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
  9765. "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
  9766. "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
  9767. "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
  9768. "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
  9769. "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
  9770. "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
  9771. "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
  9772. "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
  9773. "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
  9774. "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
  9775. "\x6e\x12\x17\x72\x63\x57\xc7\xba"
  9776. "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
  9777. "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
  9778. "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
  9779. "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
  9780. "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
  9781. "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
  9782. "\x0c\x24\x43\x31\x40\x57\xf1\x72"
  9783. "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
  9784. "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
  9785. "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
  9786. "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
  9787. "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
  9788. "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
  9789. "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
  9790. "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
  9791. "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
  9792. "\xaf\xdf\x11\x95",
  9793. .rlen = 4100,
  9794. .np = 2,
  9795. .tap = { 4064, 36 },
  9796. },
  9797. };
  9798. /*
  9799. * CTS (Cipher Text Stealing) mode tests
  9800. */
  9801. #define CTS_MODE_ENC_TEST_VECTORS 6
  9802. #define CTS_MODE_DEC_TEST_VECTORS 6
  9803. static struct cipher_testvec cts_mode_enc_tv_template[] = {
  9804. { /* from rfc3962 */
  9805. .klen = 16,
  9806. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9807. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9808. .ilen = 17,
  9809. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9810. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9811. "\x20",
  9812. .rlen = 17,
  9813. .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  9814. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  9815. "\x97",
  9816. }, {
  9817. .klen = 16,
  9818. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9819. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9820. .ilen = 31,
  9821. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9822. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9823. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  9824. "\x20\x47\x61\x75\x27\x73\x20",
  9825. .rlen = 31,
  9826. .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  9827. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  9828. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  9829. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  9830. }, {
  9831. .klen = 16,
  9832. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9833. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9834. .ilen = 32,
  9835. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9836. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9837. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  9838. "\x20\x47\x61\x75\x27\x73\x20\x43",
  9839. .rlen = 32,
  9840. .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  9841. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  9842. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  9843. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  9844. }, {
  9845. .klen = 16,
  9846. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9847. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9848. .ilen = 47,
  9849. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9850. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9851. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  9852. "\x20\x47\x61\x75\x27\x73\x20\x43"
  9853. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  9854. "\x70\x6c\x65\x61\x73\x65\x2c",
  9855. .rlen = 47,
  9856. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  9857. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  9858. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  9859. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  9860. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  9861. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  9862. }, {
  9863. .klen = 16,
  9864. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9865. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9866. .ilen = 48,
  9867. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9868. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9869. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  9870. "\x20\x47\x61\x75\x27\x73\x20\x43"
  9871. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  9872. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  9873. .rlen = 48,
  9874. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  9875. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  9876. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  9877. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  9878. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  9879. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  9880. }, {
  9881. .klen = 16,
  9882. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9883. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9884. .ilen = 64,
  9885. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9886. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9887. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  9888. "\x20\x47\x61\x75\x27\x73\x20\x43"
  9889. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  9890. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  9891. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  9892. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  9893. .rlen = 64,
  9894. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  9895. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  9896. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  9897. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  9898. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  9899. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  9900. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  9901. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  9902. }
  9903. };
  9904. static struct cipher_testvec cts_mode_dec_tv_template[] = {
  9905. { /* from rfc3962 */
  9906. .klen = 16,
  9907. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9908. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9909. .rlen = 17,
  9910. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9911. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9912. "\x20",
  9913. .ilen = 17,
  9914. .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  9915. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  9916. "\x97",
  9917. }, {
  9918. .klen = 16,
  9919. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9920. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9921. .rlen = 31,
  9922. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9923. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9924. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  9925. "\x20\x47\x61\x75\x27\x73\x20",
  9926. .ilen = 31,
  9927. .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  9928. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  9929. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  9930. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  9931. }, {
  9932. .klen = 16,
  9933. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9934. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9935. .rlen = 32,
  9936. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9937. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9938. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  9939. "\x20\x47\x61\x75\x27\x73\x20\x43",
  9940. .ilen = 32,
  9941. .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  9942. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  9943. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  9944. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  9945. }, {
  9946. .klen = 16,
  9947. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9948. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9949. .rlen = 47,
  9950. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9951. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9952. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  9953. "\x20\x47\x61\x75\x27\x73\x20\x43"
  9954. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  9955. "\x70\x6c\x65\x61\x73\x65\x2c",
  9956. .ilen = 47,
  9957. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  9958. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  9959. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  9960. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  9961. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  9962. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  9963. }, {
  9964. .klen = 16,
  9965. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9966. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9967. .rlen = 48,
  9968. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9969. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9970. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  9971. "\x20\x47\x61\x75\x27\x73\x20\x43"
  9972. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  9973. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  9974. .ilen = 48,
  9975. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  9976. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  9977. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  9978. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  9979. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  9980. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  9981. }, {
  9982. .klen = 16,
  9983. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  9984. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  9985. .rlen = 64,
  9986. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  9987. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  9988. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  9989. "\x20\x47\x61\x75\x27\x73\x20\x43"
  9990. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  9991. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  9992. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  9993. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  9994. .ilen = 64,
  9995. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  9996. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  9997. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  9998. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  9999. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  10000. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  10001. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  10002. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  10003. }
  10004. };
  10005. /*
  10006. * Compression stuff.
  10007. */
  10008. #define COMP_BUF_SIZE 512
  10009. struct comp_testvec {
  10010. int inlen, outlen;
  10011. char input[COMP_BUF_SIZE];
  10012. char output[COMP_BUF_SIZE];
  10013. };
  10014. struct pcomp_testvec {
  10015. void *params;
  10016. unsigned int paramsize;
  10017. int inlen, outlen;
  10018. char input[COMP_BUF_SIZE];
  10019. char output[COMP_BUF_SIZE];
  10020. };
  10021. /*
  10022. * Deflate test vectors (null-terminated strings).
  10023. * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
  10024. */
  10025. #define DEFLATE_COMP_TEST_VECTORS 2
  10026. #define DEFLATE_DECOMP_TEST_VECTORS 2
  10027. static struct comp_testvec deflate_comp_tv_template[] = {
  10028. {
  10029. .inlen = 70,
  10030. .outlen = 38,
  10031. .input = "Join us now and share the software "
  10032. "Join us now and share the software ",
  10033. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  10034. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  10035. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  10036. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  10037. "\x71\xbc\x08\x2b\x01\x00",
  10038. }, {
  10039. .inlen = 191,
  10040. .outlen = 122,
  10041. .input = "This document describes a compression method based on the DEFLATE"
  10042. "compression algorithm. This document defines the application of "
  10043. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  10044. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  10045. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  10046. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  10047. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  10048. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  10049. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  10050. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  10051. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  10052. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  10053. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  10054. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  10055. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  10056. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  10057. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  10058. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  10059. "\xfa\x02",
  10060. },
  10061. };
  10062. static struct comp_testvec deflate_decomp_tv_template[] = {
  10063. {
  10064. .inlen = 122,
  10065. .outlen = 191,
  10066. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  10067. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  10068. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  10069. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  10070. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  10071. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  10072. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  10073. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  10074. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  10075. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  10076. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  10077. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  10078. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  10079. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  10080. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  10081. "\xfa\x02",
  10082. .output = "This document describes a compression method based on the DEFLATE"
  10083. "compression algorithm. This document defines the application of "
  10084. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  10085. }, {
  10086. .inlen = 38,
  10087. .outlen = 70,
  10088. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  10089. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  10090. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  10091. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  10092. "\x71\xbc\x08\x2b\x01\x00",
  10093. .output = "Join us now and share the software "
  10094. "Join us now and share the software ",
  10095. },
  10096. };
  10097. #define ZLIB_COMP_TEST_VECTORS 2
  10098. #define ZLIB_DECOMP_TEST_VECTORS 2
  10099. static const struct {
  10100. struct nlattr nla;
  10101. int val;
  10102. } deflate_comp_params[] = {
  10103. {
  10104. .nla = {
  10105. .nla_len = NLA_HDRLEN + sizeof(int),
  10106. .nla_type = ZLIB_COMP_LEVEL,
  10107. },
  10108. .val = Z_DEFAULT_COMPRESSION,
  10109. }, {
  10110. .nla = {
  10111. .nla_len = NLA_HDRLEN + sizeof(int),
  10112. .nla_type = ZLIB_COMP_METHOD,
  10113. },
  10114. .val = Z_DEFLATED,
  10115. }, {
  10116. .nla = {
  10117. .nla_len = NLA_HDRLEN + sizeof(int),
  10118. .nla_type = ZLIB_COMP_WINDOWBITS,
  10119. },
  10120. .val = -11,
  10121. }, {
  10122. .nla = {
  10123. .nla_len = NLA_HDRLEN + sizeof(int),
  10124. .nla_type = ZLIB_COMP_MEMLEVEL,
  10125. },
  10126. .val = MAX_MEM_LEVEL,
  10127. }, {
  10128. .nla = {
  10129. .nla_len = NLA_HDRLEN + sizeof(int),
  10130. .nla_type = ZLIB_COMP_STRATEGY,
  10131. },
  10132. .val = Z_DEFAULT_STRATEGY,
  10133. }
  10134. };
  10135. static const struct {
  10136. struct nlattr nla;
  10137. int val;
  10138. } deflate_decomp_params[] = {
  10139. {
  10140. .nla = {
  10141. .nla_len = NLA_HDRLEN + sizeof(int),
  10142. .nla_type = ZLIB_DECOMP_WINDOWBITS,
  10143. },
  10144. .val = -11,
  10145. }
  10146. };
  10147. static struct pcomp_testvec zlib_comp_tv_template[] = {
  10148. {
  10149. .params = &deflate_comp_params,
  10150. .paramsize = sizeof(deflate_comp_params),
  10151. .inlen = 70,
  10152. .outlen = 38,
  10153. .input = "Join us now and share the software "
  10154. "Join us now and share the software ",
  10155. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  10156. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  10157. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  10158. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  10159. "\x71\xbc\x08\x2b\x01\x00",
  10160. }, {
  10161. .params = &deflate_comp_params,
  10162. .paramsize = sizeof(deflate_comp_params),
  10163. .inlen = 191,
  10164. .outlen = 122,
  10165. .input = "This document describes a compression method based on the DEFLATE"
  10166. "compression algorithm. This document defines the application of "
  10167. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  10168. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  10169. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  10170. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  10171. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  10172. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  10173. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  10174. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  10175. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  10176. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  10177. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  10178. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  10179. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  10180. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  10181. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  10182. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  10183. "\xfa\x02",
  10184. },
  10185. };
  10186. static struct pcomp_testvec zlib_decomp_tv_template[] = {
  10187. {
  10188. .params = &deflate_decomp_params,
  10189. .paramsize = sizeof(deflate_decomp_params),
  10190. .inlen = 122,
  10191. .outlen = 191,
  10192. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  10193. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  10194. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  10195. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  10196. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  10197. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  10198. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  10199. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  10200. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  10201. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  10202. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  10203. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  10204. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  10205. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  10206. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  10207. "\xfa\x02",
  10208. .output = "This document describes a compression method based on the DEFLATE"
  10209. "compression algorithm. This document defines the application of "
  10210. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  10211. }, {
  10212. .params = &deflate_decomp_params,
  10213. .paramsize = sizeof(deflate_decomp_params),
  10214. .inlen = 38,
  10215. .outlen = 70,
  10216. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  10217. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  10218. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  10219. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  10220. "\x71\xbc\x08\x2b\x01\x00",
  10221. .output = "Join us now and share the software "
  10222. "Join us now and share the software ",
  10223. },
  10224. };
  10225. /*
  10226. * LZO test vectors (null-terminated strings).
  10227. */
  10228. #define LZO_COMP_TEST_VECTORS 2
  10229. #define LZO_DECOMP_TEST_VECTORS 2
  10230. static struct comp_testvec lzo_comp_tv_template[] = {
  10231. {
  10232. .inlen = 70,
  10233. .outlen = 46,
  10234. .input = "Join us now and share the software "
  10235. "Join us now and share the software ",
  10236. .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  10237. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  10238. "\x64\x20\x73\x68\x61\x72\x65\x20"
  10239. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  10240. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  10241. "\x3d\x88\x00\x11\x00\x00",
  10242. }, {
  10243. .inlen = 159,
  10244. .outlen = 133,
  10245. .input = "This document describes a compression method based on the LZO "
  10246. "compression algorithm. This document defines the application of "
  10247. "the LZO algorithm used in UBIFS.",
  10248. .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  10249. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  10250. "\x64\x65\x73\x63\x72\x69\x62\x65"
  10251. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  10252. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  10253. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  10254. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  10255. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  10256. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  10257. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  10258. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  10259. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  10260. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  10261. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  10262. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  10263. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  10264. "\x53\x2e\x11\x00\x00",
  10265. },
  10266. };
  10267. static struct comp_testvec lzo_decomp_tv_template[] = {
  10268. {
  10269. .inlen = 133,
  10270. .outlen = 159,
  10271. .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  10272. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  10273. "\x64\x65\x73\x63\x72\x69\x62\x65"
  10274. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  10275. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  10276. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  10277. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  10278. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  10279. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  10280. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  10281. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  10282. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  10283. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  10284. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  10285. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  10286. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  10287. "\x53\x2e\x11\x00\x00",
  10288. .output = "This document describes a compression method based on the LZO "
  10289. "compression algorithm. This document defines the application of "
  10290. "the LZO algorithm used in UBIFS.",
  10291. }, {
  10292. .inlen = 46,
  10293. .outlen = 70,
  10294. .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  10295. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  10296. "\x64\x20\x73\x68\x61\x72\x65\x20"
  10297. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  10298. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  10299. "\x3d\x88\x00\x11\x00\x00",
  10300. .output = "Join us now and share the software "
  10301. "Join us now and share the software ",
  10302. },
  10303. };
  10304. /*
  10305. * Michael MIC test vectors from IEEE 802.11i
  10306. */
  10307. #define MICHAEL_MIC_TEST_VECTORS 6
  10308. static struct hash_testvec michael_mic_tv_template[] = {
  10309. {
  10310. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10311. .ksize = 8,
  10312. .plaintext = zeroed_string,
  10313. .psize = 0,
  10314. .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  10315. },
  10316. {
  10317. .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  10318. .ksize = 8,
  10319. .plaintext = "M",
  10320. .psize = 1,
  10321. .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  10322. },
  10323. {
  10324. .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  10325. .ksize = 8,
  10326. .plaintext = "Mi",
  10327. .psize = 2,
  10328. .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  10329. },
  10330. {
  10331. .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  10332. .ksize = 8,
  10333. .plaintext = "Mic",
  10334. .psize = 3,
  10335. .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  10336. },
  10337. {
  10338. .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  10339. .ksize = 8,
  10340. .plaintext = "Mich",
  10341. .psize = 4,
  10342. .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  10343. },
  10344. {
  10345. .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  10346. .ksize = 8,
  10347. .plaintext = "Michael",
  10348. .psize = 7,
  10349. .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
  10350. }
  10351. };
  10352. /*
  10353. * CRC32C test vectors
  10354. */
  10355. #define CRC32C_TEST_VECTORS 14
  10356. static struct hash_testvec crc32c_tv_template[] = {
  10357. {
  10358. .psize = 0,
  10359. .digest = "\x00\x00\x00\x00",
  10360. },
  10361. {
  10362. .key = "\x87\xa9\xcb\xed",
  10363. .ksize = 4,
  10364. .psize = 0,
  10365. .digest = "\x78\x56\x34\x12",
  10366. },
  10367. {
  10368. .key = "\xff\xff\xff\xff",
  10369. .ksize = 4,
  10370. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  10371. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  10372. "\x11\x12\x13\x14\x15\x16\x17\x18"
  10373. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  10374. "\x21\x22\x23\x24\x25\x26\x27\x28",
  10375. .psize = 40,
  10376. .digest = "\x7f\x15\x2c\x0e",
  10377. },
  10378. {
  10379. .key = "\xff\xff\xff\xff",
  10380. .ksize = 4,
  10381. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  10382. "\x31\x32\x33\x34\x35\x36\x37\x38"
  10383. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  10384. "\x41\x42\x43\x44\x45\x46\x47\x48"
  10385. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  10386. .psize = 40,
  10387. .digest = "\xf6\xeb\x80\xe9",
  10388. },
  10389. {
  10390. .key = "\xff\xff\xff\xff",
  10391. .ksize = 4,
  10392. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  10393. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  10394. "\x61\x62\x63\x64\x65\x66\x67\x68"
  10395. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  10396. "\x71\x72\x73\x74\x75\x76\x77\x78",
  10397. .psize = 40,
  10398. .digest = "\xed\xbd\x74\xde",
  10399. },
  10400. {
  10401. .key = "\xff\xff\xff\xff",
  10402. .ksize = 4,
  10403. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  10404. "\x81\x82\x83\x84\x85\x86\x87\x88"
  10405. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  10406. "\x91\x92\x93\x94\x95\x96\x97\x98"
  10407. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  10408. .psize = 40,
  10409. .digest = "\x62\xc8\x79\xd5",
  10410. },
  10411. {
  10412. .key = "\xff\xff\xff\xff",
  10413. .ksize = 4,
  10414. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  10415. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  10416. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  10417. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  10418. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  10419. .psize = 40,
  10420. .digest = "\xd0\x9a\x97\xba",
  10421. },
  10422. {
  10423. .key = "\xff\xff\xff\xff",
  10424. .ksize = 4,
  10425. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  10426. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  10427. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  10428. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  10429. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  10430. .psize = 40,
  10431. .digest = "\x13\xd9\x29\x2b",
  10432. },
  10433. {
  10434. .key = "\x80\xea\xd3\xf1",
  10435. .ksize = 4,
  10436. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  10437. "\x31\x32\x33\x34\x35\x36\x37\x38"
  10438. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  10439. "\x41\x42\x43\x44\x45\x46\x47\x48"
  10440. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  10441. .psize = 40,
  10442. .digest = "\x0c\xb5\xe2\xa2",
  10443. },
  10444. {
  10445. .key = "\xf3\x4a\x1d\x5d",
  10446. .ksize = 4,
  10447. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  10448. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  10449. "\x61\x62\x63\x64\x65\x66\x67\x68"
  10450. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  10451. "\x71\x72\x73\x74\x75\x76\x77\x78",
  10452. .psize = 40,
  10453. .digest = "\xd1\x7f\xfb\xa6",
  10454. },
  10455. {
  10456. .key = "\x2e\x80\x04\x59",
  10457. .ksize = 4,
  10458. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  10459. "\x81\x82\x83\x84\x85\x86\x87\x88"
  10460. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  10461. "\x91\x92\x93\x94\x95\x96\x97\x98"
  10462. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  10463. .psize = 40,
  10464. .digest = "\x59\x33\xe6\x7a",
  10465. },
  10466. {
  10467. .key = "\xa6\xcc\x19\x85",
  10468. .ksize = 4,
  10469. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  10470. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  10471. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  10472. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  10473. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  10474. .psize = 40,
  10475. .digest = "\xbe\x03\x01\xd2",
  10476. },
  10477. {
  10478. .key = "\x41\xfc\xfe\x2d",
  10479. .ksize = 4,
  10480. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  10481. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  10482. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  10483. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  10484. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  10485. .psize = 40,
  10486. .digest = "\x75\xd3\xc5\x24",
  10487. },
  10488. {
  10489. .key = "\xff\xff\xff\xff",
  10490. .ksize = 4,
  10491. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  10492. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  10493. "\x11\x12\x13\x14\x15\x16\x17\x18"
  10494. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  10495. "\x21\x22\x23\x24\x25\x26\x27\x28"
  10496. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  10497. "\x31\x32\x33\x34\x35\x36\x37\x38"
  10498. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  10499. "\x41\x42\x43\x44\x45\x46\x47\x48"
  10500. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  10501. "\x51\x52\x53\x54\x55\x56\x57\x58"
  10502. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  10503. "\x61\x62\x63\x64\x65\x66\x67\x68"
  10504. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  10505. "\x71\x72\x73\x74\x75\x76\x77\x78"
  10506. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  10507. "\x81\x82\x83\x84\x85\x86\x87\x88"
  10508. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  10509. "\x91\x92\x93\x94\x95\x96\x97\x98"
  10510. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  10511. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  10512. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  10513. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  10514. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  10515. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  10516. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  10517. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  10518. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  10519. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  10520. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  10521. .psize = 240,
  10522. .digest = "\x75\xd3\xc5\x24",
  10523. .np = 2,
  10524. .tap = { 31, 209 }
  10525. },
  10526. };
  10527. #endif /* _CRYPTO_TESTMGR_H */