testmgr.h 310 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540
  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. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the Free
  11. * Software Foundation; either version 2 of the License, or (at your option)
  12. * any later version.
  13. *
  14. */
  15. #ifndef _CRYPTO_TESTMGR_H
  16. #define _CRYPTO_TESTMGR_H
  17. #include <linux/netlink.h>
  18. #include <linux/zlib.h>
  19. #include <crypto/compress.h>
  20. #define MAX_DIGEST_SIZE 64
  21. #define MAX_TAP 8
  22. #define MAX_KEYLEN 56
  23. #define MAX_IVLEN 32
  24. struct hash_testvec {
  25. /* only used with keyed hash algorithms */
  26. char *key;
  27. char *plaintext;
  28. char *digest;
  29. unsigned char tap[MAX_TAP];
  30. unsigned char psize;
  31. unsigned char np;
  32. unsigned char ksize;
  33. };
  34. struct cipher_testvec {
  35. char *key;
  36. char *iv;
  37. char *input;
  38. char *result;
  39. unsigned short tap[MAX_TAP];
  40. int np;
  41. unsigned char fail;
  42. unsigned char wk; /* weak key flag */
  43. unsigned char klen;
  44. unsigned short ilen;
  45. unsigned short rlen;
  46. };
  47. struct aead_testvec {
  48. char *key;
  49. char *iv;
  50. char *input;
  51. char *assoc;
  52. char *result;
  53. unsigned char tap[MAX_TAP];
  54. unsigned char atap[MAX_TAP];
  55. int np;
  56. int anp;
  57. unsigned char fail;
  58. unsigned char novrfy; /* ccm dec verification failure expected */
  59. unsigned char wk; /* weak key flag */
  60. unsigned char klen;
  61. unsigned short ilen;
  62. unsigned short alen;
  63. unsigned short rlen;
  64. };
  65. struct cprng_testvec {
  66. char *key;
  67. char *dt;
  68. char *v;
  69. char *result;
  70. unsigned char klen;
  71. unsigned short dtlen;
  72. unsigned short vlen;
  73. unsigned short rlen;
  74. unsigned short loops;
  75. };
  76. static char zeroed_string[48];
  77. /*
  78. * MD4 test vectors from RFC1320
  79. */
  80. #define MD4_TEST_VECTORS 7
  81. static struct hash_testvec md4_tv_template [] = {
  82. {
  83. .plaintext = "",
  84. .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
  85. "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
  86. }, {
  87. .plaintext = "a",
  88. .psize = 1,
  89. .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
  90. "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
  91. }, {
  92. .plaintext = "abc",
  93. .psize = 3,
  94. .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
  95. "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
  96. }, {
  97. .plaintext = "message digest",
  98. .psize = 14,
  99. .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
  100. "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
  101. }, {
  102. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  103. .psize = 26,
  104. .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
  105. "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
  106. .np = 2,
  107. .tap = { 13, 13 },
  108. }, {
  109. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  110. .psize = 62,
  111. .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
  112. "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
  113. }, {
  114. .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
  115. "45678901234567890",
  116. .psize = 80,
  117. .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
  118. "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
  119. },
  120. };
  121. /*
  122. * MD5 test vectors from RFC1321
  123. */
  124. #define MD5_TEST_VECTORS 7
  125. static struct hash_testvec md5_tv_template[] = {
  126. {
  127. .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
  128. "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
  129. }, {
  130. .plaintext = "a",
  131. .psize = 1,
  132. .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
  133. "\x31\xc3\x99\xe2\x69\x77\x26\x61",
  134. }, {
  135. .plaintext = "abc",
  136. .psize = 3,
  137. .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
  138. "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
  139. }, {
  140. .plaintext = "message digest",
  141. .psize = 14,
  142. .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
  143. "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
  144. }, {
  145. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  146. .psize = 26,
  147. .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
  148. "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
  149. .np = 2,
  150. .tap = {13, 13}
  151. }, {
  152. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  153. .psize = 62,
  154. .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
  155. "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
  156. }, {
  157. .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
  158. "345678901234567890",
  159. .psize = 80,
  160. .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
  161. "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
  162. }
  163. };
  164. /*
  165. * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
  166. */
  167. #define RMD128_TEST_VECTORS 10
  168. static struct hash_testvec rmd128_tv_template[] = {
  169. {
  170. .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
  171. "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
  172. }, {
  173. .plaintext = "a",
  174. .psize = 1,
  175. .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
  176. "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
  177. }, {
  178. .plaintext = "abc",
  179. .psize = 3,
  180. .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
  181. "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
  182. }, {
  183. .plaintext = "message digest",
  184. .psize = 14,
  185. .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
  186. "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
  187. }, {
  188. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  189. .psize = 26,
  190. .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
  191. "\x10\x71\x49\x22\xb3\x71\x83\x4e",
  192. }, {
  193. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  194. "fghijklmnopqrstuvwxyz0123456789",
  195. .psize = 62,
  196. .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
  197. "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
  198. }, {
  199. .plaintext = "1234567890123456789012345678901234567890"
  200. "1234567890123456789012345678901234567890",
  201. .psize = 80,
  202. .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
  203. "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
  204. }, {
  205. .plaintext = "abcdbcdecdefdefgefghfghighij"
  206. "hijkijkljklmklmnlmnomnopnopq",
  207. .psize = 56,
  208. .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
  209. "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
  210. .np = 2,
  211. .tap = { 28, 28 },
  212. }, {
  213. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  214. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  215. "lmnopqrsmnopqrstnopqrstu",
  216. .psize = 112,
  217. .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
  218. "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
  219. }, {
  220. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  221. .psize = 32,
  222. .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
  223. "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
  224. }
  225. };
  226. /*
  227. * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
  228. */
  229. #define RMD160_TEST_VECTORS 10
  230. static struct hash_testvec rmd160_tv_template[] = {
  231. {
  232. .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
  233. "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
  234. }, {
  235. .plaintext = "a",
  236. .psize = 1,
  237. .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
  238. "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
  239. }, {
  240. .plaintext = "abc",
  241. .psize = 3,
  242. .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
  243. "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
  244. }, {
  245. .plaintext = "message digest",
  246. .psize = 14,
  247. .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
  248. "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
  249. }, {
  250. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  251. .psize = 26,
  252. .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
  253. "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
  254. }, {
  255. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  256. "fghijklmnopqrstuvwxyz0123456789",
  257. .psize = 62,
  258. .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
  259. "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
  260. }, {
  261. .plaintext = "1234567890123456789012345678901234567890"
  262. "1234567890123456789012345678901234567890",
  263. .psize = 80,
  264. .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
  265. "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
  266. }, {
  267. .plaintext = "abcdbcdecdefdefgefghfghighij"
  268. "hijkijkljklmklmnlmnomnopnopq",
  269. .psize = 56,
  270. .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
  271. "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
  272. .np = 2,
  273. .tap = { 28, 28 },
  274. }, {
  275. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  276. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  277. "lmnopqrsmnopqrstnopqrstu",
  278. .psize = 112,
  279. .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
  280. "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
  281. }, {
  282. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  283. .psize = 32,
  284. .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
  285. "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
  286. }
  287. };
  288. /*
  289. * RIPEMD-256 test vectors
  290. */
  291. #define RMD256_TEST_VECTORS 8
  292. static struct hash_testvec rmd256_tv_template[] = {
  293. {
  294. .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
  295. "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
  296. "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
  297. "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
  298. }, {
  299. .plaintext = "a",
  300. .psize = 1,
  301. .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
  302. "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
  303. "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
  304. "\xcd\x88\x3a\x91\x34\x69\x29\x25",
  305. }, {
  306. .plaintext = "abc",
  307. .psize = 3,
  308. .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
  309. "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
  310. "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
  311. "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
  312. }, {
  313. .plaintext = "message digest",
  314. .psize = 14,
  315. .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
  316. "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
  317. "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
  318. "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
  319. }, {
  320. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  321. .psize = 26,
  322. .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
  323. "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
  324. "\x78\x96\x11\x8a\x51\x97\x96\x87"
  325. "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
  326. }, {
  327. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  328. "fghijklmnopqrstuvwxyz0123456789",
  329. .psize = 62,
  330. .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
  331. "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
  332. "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
  333. "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
  334. }, {
  335. .plaintext = "1234567890123456789012345678901234567890"
  336. "1234567890123456789012345678901234567890",
  337. .psize = 80,
  338. .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
  339. "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
  340. "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
  341. "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
  342. }, {
  343. .plaintext = "abcdbcdecdefdefgefghfghighij"
  344. "hijkijkljklmklmnlmnomnopnopq",
  345. .psize = 56,
  346. .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
  347. "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
  348. "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
  349. "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
  350. .np = 2,
  351. .tap = { 28, 28 },
  352. }
  353. };
  354. /*
  355. * RIPEMD-320 test vectors
  356. */
  357. #define RMD320_TEST_VECTORS 8
  358. static struct hash_testvec rmd320_tv_template[] = {
  359. {
  360. .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
  361. "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
  362. "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
  363. "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
  364. }, {
  365. .plaintext = "a",
  366. .psize = 1,
  367. .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
  368. "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
  369. "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
  370. "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
  371. }, {
  372. .plaintext = "abc",
  373. .psize = 3,
  374. .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
  375. "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
  376. "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
  377. "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
  378. }, {
  379. .plaintext = "message digest",
  380. .psize = 14,
  381. .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
  382. "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
  383. "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
  384. "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
  385. }, {
  386. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  387. .psize = 26,
  388. .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
  389. "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
  390. "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
  391. "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
  392. }, {
  393. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  394. "fghijklmnopqrstuvwxyz0123456789",
  395. .psize = 62,
  396. .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
  397. "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
  398. "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
  399. "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
  400. }, {
  401. .plaintext = "1234567890123456789012345678901234567890"
  402. "1234567890123456789012345678901234567890",
  403. .psize = 80,
  404. .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
  405. "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
  406. "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
  407. "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
  408. }, {
  409. .plaintext = "abcdbcdecdefdefgefghfghighij"
  410. "hijkijkljklmklmnlmnomnopnopq",
  411. .psize = 56,
  412. .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
  413. "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
  414. "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
  415. "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
  416. .np = 2,
  417. .tap = { 28, 28 },
  418. }
  419. };
  420. /*
  421. * SHA1 test vectors from from FIPS PUB 180-1
  422. */
  423. #define SHA1_TEST_VECTORS 2
  424. static struct hash_testvec sha1_tv_template[] = {
  425. {
  426. .plaintext = "abc",
  427. .psize = 3,
  428. .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
  429. "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
  430. }, {
  431. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  432. .psize = 56,
  433. .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
  434. "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
  435. .np = 2,
  436. .tap = { 28, 28 }
  437. }
  438. };
  439. /*
  440. * SHA224 test vectors from from FIPS PUB 180-2
  441. */
  442. #define SHA224_TEST_VECTORS 2
  443. static struct hash_testvec sha224_tv_template[] = {
  444. {
  445. .plaintext = "abc",
  446. .psize = 3,
  447. .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
  448. "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
  449. "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
  450. "\xE3\x6C\x9D\xA7",
  451. }, {
  452. .plaintext =
  453. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  454. .psize = 56,
  455. .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
  456. "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
  457. "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
  458. "\x52\x52\x25\x25",
  459. .np = 2,
  460. .tap = { 28, 28 }
  461. }
  462. };
  463. /*
  464. * SHA256 test vectors from from NIST
  465. */
  466. #define SHA256_TEST_VECTORS 2
  467. static struct hash_testvec sha256_tv_template[] = {
  468. {
  469. .plaintext = "abc",
  470. .psize = 3,
  471. .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
  472. "\x41\x41\x40\xde\x5d\xae\x22\x23"
  473. "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
  474. "\xb4\x10\xff\x61\xf2\x00\x15\xad",
  475. }, {
  476. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  477. .psize = 56,
  478. .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
  479. "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
  480. "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
  481. "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
  482. .np = 2,
  483. .tap = { 28, 28 }
  484. },
  485. };
  486. /*
  487. * SHA384 test vectors from from NIST and kerneli
  488. */
  489. #define SHA384_TEST_VECTORS 4
  490. static struct hash_testvec sha384_tv_template[] = {
  491. {
  492. .plaintext= "abc",
  493. .psize = 3,
  494. .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
  495. "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
  496. "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
  497. "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
  498. "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
  499. "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
  500. }, {
  501. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  502. .psize = 56,
  503. .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
  504. "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
  505. "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
  506. "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
  507. "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
  508. "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
  509. }, {
  510. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  511. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  512. .psize = 112,
  513. .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
  514. "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
  515. "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
  516. "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
  517. "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
  518. "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
  519. }, {
  520. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  521. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  522. .psize = 104,
  523. .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
  524. "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
  525. "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
  526. "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
  527. "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
  528. "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
  529. .np = 4,
  530. .tap = { 26, 26, 26, 26 }
  531. },
  532. };
  533. /*
  534. * SHA512 test vectors from from NIST and kerneli
  535. */
  536. #define SHA512_TEST_VECTORS 4
  537. static struct hash_testvec sha512_tv_template[] = {
  538. {
  539. .plaintext = "abc",
  540. .psize = 3,
  541. .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
  542. "\xcc\x41\x73\x49\xae\x20\x41\x31"
  543. "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
  544. "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
  545. "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
  546. "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
  547. "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
  548. "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
  549. }, {
  550. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  551. .psize = 56,
  552. .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
  553. "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
  554. "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
  555. "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
  556. "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
  557. "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
  558. "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
  559. "\x54\xec\x63\x12\x38\xca\x34\x45",
  560. }, {
  561. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  562. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  563. .psize = 112,
  564. .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
  565. "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
  566. "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
  567. "\x72\x99\xae\xad\xb6\x88\x90\x18"
  568. "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
  569. "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
  570. "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
  571. "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
  572. }, {
  573. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  574. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  575. .psize = 104,
  576. .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
  577. "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
  578. "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
  579. "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
  580. "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
  581. "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
  582. "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
  583. "\xed\xb4\x19\x87\x23\x28\x50\xc9",
  584. .np = 4,
  585. .tap = { 26, 26, 26, 26 }
  586. },
  587. };
  588. /*
  589. * WHIRLPOOL test vectors from Whirlpool package
  590. * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
  591. * submission
  592. */
  593. #define WP512_TEST_VECTORS 8
  594. static struct hash_testvec wp512_tv_template[] = {
  595. {
  596. .plaintext = "",
  597. .psize = 0,
  598. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  599. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  600. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  601. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  602. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  603. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
  604. "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
  605. "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
  606. }, {
  607. .plaintext = "a",
  608. .psize = 1,
  609. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  610. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  611. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  612. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  613. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  614. "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
  615. "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
  616. "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
  617. }, {
  618. .plaintext = "abc",
  619. .psize = 3,
  620. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  621. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  622. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  623. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  624. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  625. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
  626. "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
  627. "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
  628. }, {
  629. .plaintext = "message digest",
  630. .psize = 14,
  631. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  632. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  633. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  634. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  635. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  636. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
  637. "\x92\xED\x92\x00\x52\x83\x8F\x33"
  638. "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
  639. }, {
  640. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  641. .psize = 26,
  642. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  643. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  644. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  645. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  646. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  647. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
  648. "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
  649. "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
  650. }, {
  651. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  652. "abcdefghijklmnopqrstuvwxyz0123456789",
  653. .psize = 62,
  654. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  655. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  656. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  657. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  658. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  659. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
  660. "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
  661. "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
  662. }, {
  663. .plaintext = "1234567890123456789012345678901234567890"
  664. "1234567890123456789012345678901234567890",
  665. .psize = 80,
  666. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  667. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  668. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  669. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  670. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  671. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
  672. "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
  673. "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
  674. }, {
  675. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  676. .psize = 32,
  677. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  678. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  679. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  680. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  681. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  682. "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
  683. "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
  684. "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
  685. },
  686. };
  687. #define WP384_TEST_VECTORS 8
  688. static struct hash_testvec wp384_tv_template[] = {
  689. {
  690. .plaintext = "",
  691. .psize = 0,
  692. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  693. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  694. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  695. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  696. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  697. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
  698. }, {
  699. .plaintext = "a",
  700. .psize = 1,
  701. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  702. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  703. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  704. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  705. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  706. "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
  707. }, {
  708. .plaintext = "abc",
  709. .psize = 3,
  710. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  711. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  712. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  713. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  714. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  715. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
  716. }, {
  717. .plaintext = "message digest",
  718. .psize = 14,
  719. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  720. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  721. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  722. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  723. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  724. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
  725. }, {
  726. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  727. .psize = 26,
  728. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  729. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  730. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  731. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  732. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  733. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
  734. }, {
  735. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  736. "abcdefghijklmnopqrstuvwxyz0123456789",
  737. .psize = 62,
  738. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  739. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  740. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  741. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  742. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  743. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
  744. }, {
  745. .plaintext = "1234567890123456789012345678901234567890"
  746. "1234567890123456789012345678901234567890",
  747. .psize = 80,
  748. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  749. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  750. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  751. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  752. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  753. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
  754. }, {
  755. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  756. .psize = 32,
  757. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  758. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  759. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  760. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  761. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  762. "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
  763. },
  764. };
  765. #define WP256_TEST_VECTORS 8
  766. static struct hash_testvec wp256_tv_template[] = {
  767. {
  768. .plaintext = "",
  769. .psize = 0,
  770. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  771. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  772. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  773. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
  774. }, {
  775. .plaintext = "a",
  776. .psize = 1,
  777. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  778. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  779. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  780. "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
  781. }, {
  782. .plaintext = "abc",
  783. .psize = 3,
  784. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  785. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  786. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  787. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
  788. }, {
  789. .plaintext = "message digest",
  790. .psize = 14,
  791. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  792. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  793. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  794. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
  795. }, {
  796. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  797. .psize = 26,
  798. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  799. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  800. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  801. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
  802. }, {
  803. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  804. "abcdefghijklmnopqrstuvwxyz0123456789",
  805. .psize = 62,
  806. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  807. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  808. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  809. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
  810. }, {
  811. .plaintext = "1234567890123456789012345678901234567890"
  812. "1234567890123456789012345678901234567890",
  813. .psize = 80,
  814. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  815. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  816. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  817. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
  818. }, {
  819. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  820. .psize = 32,
  821. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  822. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  823. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  824. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
  825. },
  826. };
  827. /*
  828. * TIGER test vectors from Tiger website
  829. */
  830. #define TGR192_TEST_VECTORS 6
  831. static struct hash_testvec tgr192_tv_template[] = {
  832. {
  833. .plaintext = "",
  834. .psize = 0,
  835. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  836. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  837. "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
  838. }, {
  839. .plaintext = "abc",
  840. .psize = 3,
  841. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  842. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  843. "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
  844. }, {
  845. .plaintext = "Tiger",
  846. .psize = 5,
  847. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  848. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  849. "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
  850. }, {
  851. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  852. .psize = 64,
  853. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  854. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  855. "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
  856. }, {
  857. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  858. .psize = 64,
  859. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  860. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  861. "\x57\x89\x65\x65\x97\x5f\x91\x97",
  862. }, {
  863. .plaintext = "Tiger - A Fast New Hash Function, "
  864. "by Ross Anderson and Eli Biham, "
  865. "proceedings of Fast Software Encryption 3, "
  866. "Cambridge, 1996.",
  867. .psize = 125,
  868. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  869. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  870. "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
  871. },
  872. };
  873. #define TGR160_TEST_VECTORS 6
  874. static struct hash_testvec tgr160_tv_template[] = {
  875. {
  876. .plaintext = "",
  877. .psize = 0,
  878. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  879. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  880. "\xf3\x73\xde\x2d",
  881. }, {
  882. .plaintext = "abc",
  883. .psize = 3,
  884. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  885. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  886. "\x93\x5f\x7b\x95",
  887. }, {
  888. .plaintext = "Tiger",
  889. .psize = 5,
  890. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  891. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  892. "\x37\x79\x0c\x11",
  893. }, {
  894. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  895. .psize = 64,
  896. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  897. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  898. "\xb5\x86\x44\x50",
  899. }, {
  900. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  901. .psize = 64,
  902. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  903. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  904. "\x57\x89\x65\x65",
  905. }, {
  906. .plaintext = "Tiger - A Fast New Hash Function, "
  907. "by Ross Anderson and Eli Biham, "
  908. "proceedings of Fast Software Encryption 3, "
  909. "Cambridge, 1996.",
  910. .psize = 125,
  911. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  912. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  913. "\xdd\x68\x15\x1d",
  914. },
  915. };
  916. #define TGR128_TEST_VECTORS 6
  917. static struct hash_testvec tgr128_tv_template[] = {
  918. {
  919. .plaintext = "",
  920. .psize = 0,
  921. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  922. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
  923. }, {
  924. .plaintext = "abc",
  925. .psize = 3,
  926. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  927. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
  928. }, {
  929. .plaintext = "Tiger",
  930. .psize = 5,
  931. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  932. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
  933. }, {
  934. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  935. .psize = 64,
  936. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  937. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
  938. }, {
  939. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  940. .psize = 64,
  941. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  942. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
  943. }, {
  944. .plaintext = "Tiger - A Fast New Hash Function, "
  945. "by Ross Anderson and Eli Biham, "
  946. "proceedings of Fast Software Encryption 3, "
  947. "Cambridge, 1996.",
  948. .psize = 125,
  949. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  950. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
  951. },
  952. };
  953. /*
  954. * HMAC-MD5 test vectors from RFC2202
  955. * (These need to be fixed to not use strlen).
  956. */
  957. #define HMAC_MD5_TEST_VECTORS 7
  958. static struct hash_testvec hmac_md5_tv_template[] =
  959. {
  960. {
  961. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  962. .ksize = 16,
  963. .plaintext = "Hi There",
  964. .psize = 8,
  965. .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
  966. "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
  967. }, {
  968. .key = "Jefe",
  969. .ksize = 4,
  970. .plaintext = "what do ya want for nothing?",
  971. .psize = 28,
  972. .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
  973. "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
  974. .np = 2,
  975. .tap = {14, 14}
  976. }, {
  977. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  978. .ksize = 16,
  979. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  980. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  981. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  982. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  983. .psize = 50,
  984. .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
  985. "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
  986. }, {
  987. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  988. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  989. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  990. .ksize = 25,
  991. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  992. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  993. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  994. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  995. .psize = 50,
  996. .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
  997. "\x3a\x75\x16\x47\x46\xff\xaa\x79",
  998. }, {
  999. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1000. .ksize = 16,
  1001. .plaintext = "Test With Truncation",
  1002. .psize = 20,
  1003. .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
  1004. "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
  1005. }, {
  1006. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1007. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1008. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1009. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1010. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1011. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1012. "\xaa\xaa",
  1013. .ksize = 80,
  1014. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1015. .psize = 54,
  1016. .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
  1017. "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
  1018. }, {
  1019. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1020. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1021. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1022. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1023. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1024. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1025. "\xaa\xaa",
  1026. .ksize = 80,
  1027. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1028. "Block-Size Data",
  1029. .psize = 73,
  1030. .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
  1031. "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
  1032. },
  1033. };
  1034. /*
  1035. * HMAC-RIPEMD128 test vectors from RFC2286
  1036. */
  1037. #define HMAC_RMD128_TEST_VECTORS 7
  1038. static struct hash_testvec hmac_rmd128_tv_template[] = {
  1039. {
  1040. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1041. .ksize = 16,
  1042. .plaintext = "Hi There",
  1043. .psize = 8,
  1044. .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
  1045. "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
  1046. }, {
  1047. .key = "Jefe",
  1048. .ksize = 4,
  1049. .plaintext = "what do ya want for nothing?",
  1050. .psize = 28,
  1051. .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
  1052. "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
  1053. .np = 2,
  1054. .tap = { 14, 14 },
  1055. }, {
  1056. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1057. .ksize = 16,
  1058. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1059. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1060. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1061. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1062. .psize = 50,
  1063. .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
  1064. "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
  1065. }, {
  1066. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1067. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1068. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1069. .ksize = 25,
  1070. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1071. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1072. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1073. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1074. .psize = 50,
  1075. .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
  1076. "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
  1077. }, {
  1078. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1079. .ksize = 16,
  1080. .plaintext = "Test With Truncation",
  1081. .psize = 20,
  1082. .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
  1083. "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
  1084. }, {
  1085. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1086. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1087. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1088. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1089. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1090. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1091. "\xaa\xaa",
  1092. .ksize = 80,
  1093. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1094. .psize = 54,
  1095. .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
  1096. "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
  1097. }, {
  1098. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1099. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1100. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1101. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1102. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1103. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1104. "\xaa\xaa",
  1105. .ksize = 80,
  1106. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1107. "Block-Size Data",
  1108. .psize = 73,
  1109. .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
  1110. "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
  1111. },
  1112. };
  1113. /*
  1114. * HMAC-RIPEMD160 test vectors from RFC2286
  1115. */
  1116. #define HMAC_RMD160_TEST_VECTORS 7
  1117. static struct hash_testvec hmac_rmd160_tv_template[] = {
  1118. {
  1119. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1120. .ksize = 20,
  1121. .plaintext = "Hi There",
  1122. .psize = 8,
  1123. .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
  1124. "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
  1125. }, {
  1126. .key = "Jefe",
  1127. .ksize = 4,
  1128. .plaintext = "what do ya want for nothing?",
  1129. .psize = 28,
  1130. .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
  1131. "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
  1132. .np = 2,
  1133. .tap = { 14, 14 },
  1134. }, {
  1135. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1136. .ksize = 20,
  1137. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1138. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1139. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1140. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1141. .psize = 50,
  1142. .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
  1143. "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
  1144. }, {
  1145. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1146. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1147. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1148. .ksize = 25,
  1149. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1150. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1151. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1152. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1153. .psize = 50,
  1154. .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
  1155. "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
  1156. }, {
  1157. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1158. .ksize = 20,
  1159. .plaintext = "Test With Truncation",
  1160. .psize = 20,
  1161. .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
  1162. "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
  1163. }, {
  1164. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1165. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1166. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1167. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1168. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1169. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1170. "\xaa\xaa",
  1171. .ksize = 80,
  1172. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1173. .psize = 54,
  1174. .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
  1175. "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
  1176. }, {
  1177. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1178. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1179. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1180. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1181. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1182. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1183. "\xaa\xaa",
  1184. .ksize = 80,
  1185. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1186. "Block-Size Data",
  1187. .psize = 73,
  1188. .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
  1189. "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
  1190. },
  1191. };
  1192. /*
  1193. * HMAC-SHA1 test vectors from RFC2202
  1194. */
  1195. #define HMAC_SHA1_TEST_VECTORS 7
  1196. static struct hash_testvec hmac_sha1_tv_template[] = {
  1197. {
  1198. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1199. .ksize = 20,
  1200. .plaintext = "Hi There",
  1201. .psize = 8,
  1202. .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
  1203. "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
  1204. "\x46\xbe",
  1205. }, {
  1206. .key = "Jefe",
  1207. .ksize = 4,
  1208. .plaintext = "what do ya want for nothing?",
  1209. .psize = 28,
  1210. .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
  1211. "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
  1212. .np = 2,
  1213. .tap = { 14, 14 }
  1214. }, {
  1215. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1216. .ksize = 20,
  1217. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1218. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1219. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1220. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1221. .psize = 50,
  1222. .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
  1223. "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
  1224. }, {
  1225. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1226. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1227. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1228. .ksize = 25,
  1229. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1230. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1231. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1232. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1233. .psize = 50,
  1234. .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
  1235. "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
  1236. }, {
  1237. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1238. .ksize = 20,
  1239. .plaintext = "Test With Truncation",
  1240. .psize = 20,
  1241. .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
  1242. "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
  1243. }, {
  1244. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1245. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1246. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1247. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1248. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1249. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1250. "\xaa\xaa",
  1251. .ksize = 80,
  1252. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1253. .psize = 54,
  1254. .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
  1255. "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
  1256. }, {
  1257. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1258. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1259. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1260. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1261. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1262. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1263. "\xaa\xaa",
  1264. .ksize = 80,
  1265. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1266. "Block-Size Data",
  1267. .psize = 73,
  1268. .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
  1269. "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
  1270. },
  1271. };
  1272. /*
  1273. * SHA224 HMAC test vectors from RFC4231
  1274. */
  1275. #define HMAC_SHA224_TEST_VECTORS 4
  1276. static struct hash_testvec hmac_sha224_tv_template[] = {
  1277. {
  1278. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1279. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1280. "\x0b\x0b\x0b\x0b",
  1281. .ksize = 20,
  1282. /* ("Hi There") */
  1283. .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
  1284. .psize = 8,
  1285. .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
  1286. "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
  1287. "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
  1288. "\x53\x68\x4b\x22",
  1289. }, {
  1290. .key = "Jefe",
  1291. .ksize = 4,
  1292. /* ("what do ya want for nothing?") */
  1293. .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
  1294. "\x79\x61\x20\x77\x61\x6e\x74\x20"
  1295. "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
  1296. "\x69\x6e\x67\x3f",
  1297. .psize = 28,
  1298. .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
  1299. "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
  1300. "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
  1301. "\x8f\xd0\x5e\x44",
  1302. .np = 4,
  1303. .tap = { 7, 7, 7, 7 }
  1304. }, {
  1305. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1306. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1307. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1308. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1309. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1310. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1311. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1312. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1313. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1314. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1315. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1316. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1317. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1318. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1319. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1320. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1321. "\xaa\xaa\xaa",
  1322. .ksize = 131,
  1323. /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
  1324. .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
  1325. "\x6e\x67\x20\x4c\x61\x72\x67\x65"
  1326. "\x72\x20\x54\x68\x61\x6e\x20\x42"
  1327. "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
  1328. "\x65\x20\x4b\x65\x79\x20\x2d\x20"
  1329. "\x48\x61\x73\x68\x20\x4b\x65\x79"
  1330. "\x20\x46\x69\x72\x73\x74",
  1331. .psize = 54,
  1332. .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
  1333. "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
  1334. "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
  1335. "\x3f\xa6\x87\x0e",
  1336. }, {
  1337. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1338. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1339. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1340. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1341. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1342. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1343. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1344. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1345. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1346. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1347. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1348. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1349. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1350. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1351. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1352. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1353. "\xaa\xaa\xaa",
  1354. .ksize = 131,
  1355. /* ("This is a test using a larger than block-size key and a")
  1356. (" larger than block-size data. The key needs to be")
  1357. (" hashed before being used by the HMAC algorithm.") */
  1358. .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
  1359. "\x61\x20\x74\x65\x73\x74\x20\x75"
  1360. "\x73\x69\x6e\x67\x20\x61\x20\x6c"
  1361. "\x61\x72\x67\x65\x72\x20\x74\x68"
  1362. "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
  1363. "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
  1364. "\x79\x20\x61\x6e\x64\x20\x61\x20"
  1365. "\x6c\x61\x72\x67\x65\x72\x20\x74"
  1366. "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
  1367. "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
  1368. "\x61\x74\x61\x2e\x20\x54\x68\x65"
  1369. "\x20\x6b\x65\x79\x20\x6e\x65\x65"
  1370. "\x64\x73\x20\x74\x6f\x20\x62\x65"
  1371. "\x20\x68\x61\x73\x68\x65\x64\x20"
  1372. "\x62\x65\x66\x6f\x72\x65\x20\x62"
  1373. "\x65\x69\x6e\x67\x20\x75\x73\x65"
  1374. "\x64\x20\x62\x79\x20\x74\x68\x65"
  1375. "\x20\x48\x4d\x41\x43\x20\x61\x6c"
  1376. "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
  1377. .psize = 152,
  1378. .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
  1379. "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
  1380. "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
  1381. "\xf6\xf5\x65\xd1",
  1382. },
  1383. };
  1384. /*
  1385. * HMAC-SHA256 test vectors from
  1386. * draft-ietf-ipsec-ciph-sha-256-01.txt
  1387. */
  1388. #define HMAC_SHA256_TEST_VECTORS 10
  1389. static struct hash_testvec hmac_sha256_tv_template[] = {
  1390. {
  1391. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1392. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1393. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1394. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1395. .ksize = 32,
  1396. .plaintext = "abc",
  1397. .psize = 3,
  1398. .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
  1399. "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
  1400. "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
  1401. "\x92\x75\x90\x21\xcf\xab\x81\x81",
  1402. }, {
  1403. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1404. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1405. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1406. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1407. .ksize = 32,
  1408. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1409. .psize = 56,
  1410. .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
  1411. "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
  1412. "\xe6\x98\xe3\x61\x19\x42\x11\x49"
  1413. "\xea\x8c\x71\x24\x56\x69\x7d\x30",
  1414. }, {
  1415. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1416. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1417. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1418. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1419. .ksize = 32,
  1420. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
  1421. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1422. .psize = 112,
  1423. .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
  1424. "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
  1425. "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
  1426. "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
  1427. }, {
  1428. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1429. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1430. "\x0b\x0b\x0b\x0b\x0b\x0b",
  1431. .ksize = 32,
  1432. .plaintext = "Hi There",
  1433. .psize = 8,
  1434. .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
  1435. "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
  1436. "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
  1437. "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
  1438. }, {
  1439. .key = "Jefe",
  1440. .ksize = 4,
  1441. .plaintext = "what do ya want for nothing?",
  1442. .psize = 28,
  1443. .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
  1444. "\x6a\x04\x24\x26\x08\x95\x75\xc7"
  1445. "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
  1446. "\x9d\xec\x58\xb9\x64\xec\x38\x43",
  1447. .np = 2,
  1448. .tap = { 14, 14 }
  1449. }, {
  1450. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1451. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1452. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1453. .ksize = 32,
  1454. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1455. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1456. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1457. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1458. .psize = 50,
  1459. .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
  1460. "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
  1461. "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
  1462. "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
  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. "\x21\x22\x23\x24\x25",
  1469. .ksize = 37,
  1470. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1471. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1472. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1473. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1474. .psize = 50,
  1475. .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
  1476. "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
  1477. "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
  1478. "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
  1479. }, {
  1480. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1481. "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1482. "\x0c\x0c\x0c\x0c\x0c\x0c",
  1483. .ksize = 32,
  1484. .plaintext = "Test With Truncation",
  1485. .psize = 20,
  1486. .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
  1487. "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
  1488. "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
  1489. "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
  1490. }, {
  1491. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1492. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1493. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1494. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1495. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1496. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1497. "\xaa\xaa",
  1498. .ksize = 80,
  1499. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1500. .psize = 54,
  1501. .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
  1502. "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
  1503. "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
  1504. "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
  1505. }, {
  1506. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1507. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1508. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1509. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1510. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1511. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1512. "\xaa\xaa",
  1513. .ksize = 80,
  1514. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
  1515. "One Block-Size Data",
  1516. .psize = 73,
  1517. .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
  1518. "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
  1519. "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
  1520. "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
  1521. },
  1522. };
  1523. #define XCBC_AES_TEST_VECTORS 6
  1524. static struct hash_testvec aes_xcbc128_tv_template[] = {
  1525. {
  1526. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1527. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1528. .plaintext = zeroed_string,
  1529. .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
  1530. "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
  1531. .psize = 0,
  1532. .ksize = 16,
  1533. }, {
  1534. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1535. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1536. .plaintext = "\x00\x01\x02",
  1537. .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
  1538. "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
  1539. .psize = 3,
  1540. .ksize = 16,
  1541. } , {
  1542. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1543. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1544. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1545. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1546. .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
  1547. "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
  1548. .psize = 16,
  1549. .ksize = 16,
  1550. }, {
  1551. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1552. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1553. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1554. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1555. "\x10\x11\x12\x13",
  1556. .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
  1557. "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
  1558. .tap = { 10, 10 },
  1559. .psize = 20,
  1560. .np = 2,
  1561. .ksize = 16,
  1562. }, {
  1563. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1564. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1565. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1566. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1567. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1568. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  1569. .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
  1570. "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
  1571. .psize = 32,
  1572. .ksize = 16,
  1573. }, {
  1574. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1575. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1576. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1577. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1578. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1579. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  1580. "\x20\x21",
  1581. .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
  1582. "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
  1583. .tap = { 17, 17 },
  1584. .psize = 34,
  1585. .np = 2,
  1586. .ksize = 16,
  1587. }
  1588. };
  1589. #define VMAC_AES_TEST_VECTORS 1
  1590. static char vmac_string[128] = {'\x01', '\x01', '\x01', '\x01',
  1591. '\x02', '\x03', '\x02', '\x02',
  1592. '\x02', '\x04', '\x01', '\x07',
  1593. '\x04', '\x01', '\x04', '\x03',};
  1594. static struct hash_testvec aes_vmac128_tv_template[] = {
  1595. {
  1596. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1597. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1598. .plaintext = vmac_string,
  1599. .digest = "\xcb\xd7\x8a\xfd\xb7\x33\x79\xe7",
  1600. .psize = 128,
  1601. .ksize = 16,
  1602. },
  1603. };
  1604. /*
  1605. * SHA384 HMAC test vectors from RFC4231
  1606. */
  1607. #define HMAC_SHA384_TEST_VECTORS 4
  1608. static struct hash_testvec hmac_sha384_tv_template[] = {
  1609. {
  1610. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1611. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1612. "\x0b\x0b\x0b\x0b",
  1613. .ksize = 20,
  1614. .plaintext = "Hi There",
  1615. .psize = 8,
  1616. .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
  1617. "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
  1618. "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
  1619. "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
  1620. "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
  1621. "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
  1622. }, {
  1623. .key = "Jefe",
  1624. .ksize = 4,
  1625. .plaintext = "what do ya want for nothing?",
  1626. .psize = 28,
  1627. .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
  1628. "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
  1629. "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
  1630. "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
  1631. "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
  1632. "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
  1633. .np = 4,
  1634. .tap = { 7, 7, 7, 7 }
  1635. }, {
  1636. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1637. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1638. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1639. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1640. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1641. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1642. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1643. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1644. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1645. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1646. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1647. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1648. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1649. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1650. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1651. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1652. "\xaa\xaa\xaa",
  1653. .ksize = 131,
  1654. .plaintext = "Test Using Larger Than Block-Siz"
  1655. "e Key - Hash Key First",
  1656. .psize = 54,
  1657. .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
  1658. "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
  1659. "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
  1660. "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
  1661. "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
  1662. "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
  1663. }, {
  1664. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1665. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1666. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1667. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1668. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1669. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1670. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1671. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1672. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1673. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1674. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1675. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1676. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1677. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1678. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1679. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1680. "\xaa\xaa\xaa",
  1681. .ksize = 131,
  1682. .plaintext = "This is a test u"
  1683. "sing a larger th"
  1684. "an block-size ke"
  1685. "y and a larger t"
  1686. "han block-size d"
  1687. "ata. The key nee"
  1688. "ds to be hashed "
  1689. "before being use"
  1690. "d by the HMAC al"
  1691. "gorithm.",
  1692. .psize = 152,
  1693. .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
  1694. "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
  1695. "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
  1696. "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
  1697. "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
  1698. "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
  1699. },
  1700. };
  1701. /*
  1702. * SHA512 HMAC test vectors from RFC4231
  1703. */
  1704. #define HMAC_SHA512_TEST_VECTORS 4
  1705. static struct hash_testvec hmac_sha512_tv_template[] = {
  1706. {
  1707. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1708. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1709. "\x0b\x0b\x0b\x0b",
  1710. .ksize = 20,
  1711. .plaintext = "Hi There",
  1712. .psize = 8,
  1713. .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
  1714. "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
  1715. "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
  1716. "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
  1717. "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
  1718. "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
  1719. "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
  1720. "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
  1721. }, {
  1722. .key = "Jefe",
  1723. .ksize = 4,
  1724. .plaintext = "what do ya want for nothing?",
  1725. .psize = 28,
  1726. .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
  1727. "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
  1728. "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
  1729. "\x10\x27\x0c\xd7\xea\x25\x05\x54"
  1730. "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
  1731. "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
  1732. "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
  1733. "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
  1734. .np = 4,
  1735. .tap = { 7, 7, 7, 7 }
  1736. }, {
  1737. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1738. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1739. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1740. "\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",
  1754. .ksize = 131,
  1755. .plaintext = "Test Using Large"
  1756. "r Than Block-Siz"
  1757. "e Key - Hash Key"
  1758. " First",
  1759. .psize = 54,
  1760. .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
  1761. "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
  1762. "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
  1763. "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
  1764. "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
  1765. "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
  1766. "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
  1767. "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
  1768. }, {
  1769. .key = "\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\xaa\xaa\xaa\xaa\xaa"
  1785. "\xaa\xaa\xaa",
  1786. .ksize = 131,
  1787. .plaintext =
  1788. "This is a test u"
  1789. "sing a larger th"
  1790. "an block-size ke"
  1791. "y and a larger t"
  1792. "han block-size d"
  1793. "ata. The key nee"
  1794. "ds to be hashed "
  1795. "before being use"
  1796. "d by the HMAC al"
  1797. "gorithm.",
  1798. .psize = 152,
  1799. .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
  1800. "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
  1801. "\xde\xbd\x71\xf8\x86\x72\x89\x86"
  1802. "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
  1803. "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
  1804. "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
  1805. "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
  1806. "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
  1807. },
  1808. };
  1809. /*
  1810. * DES test vectors.
  1811. */
  1812. #define DES_ENC_TEST_VECTORS 10
  1813. #define DES_DEC_TEST_VECTORS 4
  1814. #define DES_CBC_ENC_TEST_VECTORS 5
  1815. #define DES_CBC_DEC_TEST_VECTORS 4
  1816. #define DES3_EDE_ENC_TEST_VECTORS 3
  1817. #define DES3_EDE_DEC_TEST_VECTORS 3
  1818. #define DES3_EDE_CBC_ENC_TEST_VECTORS 1
  1819. #define DES3_EDE_CBC_DEC_TEST_VECTORS 1
  1820. static struct cipher_testvec des_enc_tv_template[] = {
  1821. { /* From Applied Cryptography */
  1822. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1823. .klen = 8,
  1824. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1825. .ilen = 8,
  1826. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1827. .rlen = 8,
  1828. }, { /* Same key, different plaintext block */
  1829. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1830. .klen = 8,
  1831. .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
  1832. .ilen = 8,
  1833. .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1834. .rlen = 8,
  1835. }, { /* Sbox test from NBS */
  1836. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1837. .klen = 8,
  1838. .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1839. .ilen = 8,
  1840. .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1841. .rlen = 8,
  1842. }, { /* Three blocks */
  1843. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1844. .klen = 8,
  1845. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1846. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1847. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1848. .ilen = 24,
  1849. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1850. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1851. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1852. .rlen = 24,
  1853. }, { /* Weak key */
  1854. .fail = 1,
  1855. .wk = 1,
  1856. .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
  1857. .klen = 8,
  1858. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1859. .ilen = 8,
  1860. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1861. .rlen = 8,
  1862. }, { /* Two blocks -- for testing encryption across pages */
  1863. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1864. .klen = 8,
  1865. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1866. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1867. .ilen = 16,
  1868. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1869. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1870. .rlen = 16,
  1871. .np = 2,
  1872. .tap = { 8, 8 }
  1873. }, { /* Four blocks -- for testing encryption with chunking */
  1874. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1875. .klen = 8,
  1876. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1877. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1878. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
  1879. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1880. .ilen = 32,
  1881. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1882. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1883. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
  1884. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1885. .rlen = 32,
  1886. .np = 3,
  1887. .tap = { 14, 10, 8 }
  1888. }, {
  1889. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1890. .klen = 8,
  1891. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1892. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1893. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1894. .ilen = 24,
  1895. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1896. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1897. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1898. .rlen = 24,
  1899. .np = 4,
  1900. .tap = { 2, 1, 3, 18 }
  1901. }, {
  1902. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1903. .klen = 8,
  1904. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1905. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1906. .ilen = 16,
  1907. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1908. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1909. .rlen = 16,
  1910. .np = 5,
  1911. .tap = { 2, 2, 2, 2, 8 }
  1912. }, {
  1913. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1914. .klen = 8,
  1915. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1916. .ilen = 8,
  1917. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1918. .rlen = 8,
  1919. .np = 8,
  1920. .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
  1921. },
  1922. };
  1923. static struct cipher_testvec des_dec_tv_template[] = {
  1924. { /* From Applied Cryptography */
  1925. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1926. .klen = 8,
  1927. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1928. .ilen = 8,
  1929. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1930. .rlen = 8,
  1931. }, { /* Sbox test from NBS */
  1932. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1933. .klen = 8,
  1934. .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1935. .ilen = 8,
  1936. .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1937. .rlen = 8,
  1938. }, { /* Two blocks, for chunking test */
  1939. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1940. .klen = 8,
  1941. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1942. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1943. .ilen = 16,
  1944. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1945. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  1946. .rlen = 16,
  1947. .np = 2,
  1948. .tap = { 8, 8 }
  1949. }, {
  1950. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1951. .klen = 8,
  1952. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1953. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1954. .ilen = 16,
  1955. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1956. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  1957. .rlen = 16,
  1958. .np = 3,
  1959. .tap = { 3, 12, 1 }
  1960. },
  1961. };
  1962. static struct cipher_testvec des_cbc_enc_tv_template[] = {
  1963. { /* From OpenSSL */
  1964. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1965. .klen = 8,
  1966. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  1967. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  1968. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  1969. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  1970. .ilen = 24,
  1971. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  1972. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  1973. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  1974. .rlen = 24,
  1975. }, { /* FIPS Pub 81 */
  1976. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1977. .klen = 8,
  1978. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  1979. .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  1980. .ilen = 8,
  1981. .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1982. .rlen = 8,
  1983. }, {
  1984. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1985. .klen = 8,
  1986. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1987. .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  1988. .ilen = 8,
  1989. .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  1990. .rlen = 8,
  1991. }, {
  1992. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1993. .klen = 8,
  1994. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  1995. .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  1996. .ilen = 8,
  1997. .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  1998. .rlen = 8,
  1999. }, { /* Copy of openssl vector for chunk testing */
  2000. /* From OpenSSL */
  2001. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2002. .klen = 8,
  2003. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2004. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2005. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2006. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2007. .ilen = 24,
  2008. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  2009. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  2010. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  2011. .rlen = 24,
  2012. .np = 2,
  2013. .tap = { 13, 11 }
  2014. },
  2015. };
  2016. static struct cipher_testvec des_cbc_dec_tv_template[] = {
  2017. { /* FIPS Pub 81 */
  2018. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2019. .klen = 8,
  2020. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  2021. .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2022. .ilen = 8,
  2023. .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  2024. .rlen = 8,
  2025. }, {
  2026. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2027. .klen = 8,
  2028. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2029. .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2030. .ilen = 8,
  2031. .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2032. .rlen = 8,
  2033. }, {
  2034. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2035. .klen = 8,
  2036. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2037. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2038. .ilen = 8,
  2039. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2040. .rlen = 8,
  2041. }, { /* Copy of above, for chunk testing */
  2042. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2043. .klen = 8,
  2044. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2045. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2046. .ilen = 8,
  2047. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2048. .rlen = 8,
  2049. .np = 2,
  2050. .tap = { 4, 4 }
  2051. },
  2052. };
  2053. static struct cipher_testvec des3_ede_enc_tv_template[] = {
  2054. { /* These are from openssl */
  2055. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2056. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2057. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2058. .klen = 24,
  2059. .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2060. .ilen = 8,
  2061. .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2062. .rlen = 8,
  2063. }, {
  2064. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2065. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2066. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2067. .klen = 24,
  2068. .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2069. .ilen = 8,
  2070. .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2071. .rlen = 8,
  2072. }, {
  2073. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2074. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2075. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2076. .klen = 24,
  2077. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2078. .ilen = 8,
  2079. .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2080. .rlen = 8,
  2081. },
  2082. };
  2083. static struct cipher_testvec des3_ede_dec_tv_template[] = {
  2084. { /* These are from openssl */
  2085. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2086. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2087. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2088. .klen = 24,
  2089. .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2090. .ilen = 8,
  2091. .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2092. .rlen = 8,
  2093. }, {
  2094. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2095. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2096. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2097. .klen = 24,
  2098. .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2099. .ilen = 8,
  2100. .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2101. .rlen = 8,
  2102. }, {
  2103. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2104. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2105. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2106. .klen = 24,
  2107. .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2108. .ilen = 8,
  2109. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2110. .rlen = 8,
  2111. },
  2112. };
  2113. static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
  2114. { /* Generated from openssl */
  2115. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2116. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2117. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2118. .klen = 24,
  2119. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2120. .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2121. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2122. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2123. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2124. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2125. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2126. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2127. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2128. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2129. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2130. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2131. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2132. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2133. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2134. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2135. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2136. .ilen = 128,
  2137. .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2138. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2139. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2140. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2141. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2142. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2143. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2144. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2145. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2146. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2147. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2148. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2149. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2150. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2151. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2152. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2153. .rlen = 128,
  2154. },
  2155. };
  2156. static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
  2157. { /* Generated from openssl */
  2158. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2159. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2160. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2161. .klen = 24,
  2162. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2163. .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2164. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2165. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2166. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2167. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2168. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2169. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2170. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2171. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2172. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2173. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2174. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2175. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2176. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2177. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2178. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2179. .ilen = 128,
  2180. .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2181. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2182. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2183. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2184. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2185. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2186. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2187. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2188. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2189. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2190. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2191. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2192. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2193. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2194. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2195. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2196. .rlen = 128,
  2197. },
  2198. };
  2199. /*
  2200. * Blowfish test vectors.
  2201. */
  2202. #define BF_ENC_TEST_VECTORS 6
  2203. #define BF_DEC_TEST_VECTORS 6
  2204. #define BF_CBC_ENC_TEST_VECTORS 1
  2205. #define BF_CBC_DEC_TEST_VECTORS 1
  2206. static struct cipher_testvec bf_enc_tv_template[] = {
  2207. { /* DES test vectors from OpenSSL */
  2208. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2209. .klen = 8,
  2210. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2211. .ilen = 8,
  2212. .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2213. .rlen = 8,
  2214. }, {
  2215. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2216. .klen = 8,
  2217. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2218. .ilen = 8,
  2219. .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2220. .rlen = 8,
  2221. }, {
  2222. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2223. .klen = 8,
  2224. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2225. .ilen = 8,
  2226. .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2227. .rlen = 8,
  2228. }, { /* Vary the keylength... */
  2229. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2230. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2231. .klen = 16,
  2232. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2233. .ilen = 8,
  2234. .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2235. .rlen = 8,
  2236. }, {
  2237. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2238. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2239. "\x00\x11\x22\x33\x44",
  2240. .klen = 21,
  2241. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2242. .ilen = 8,
  2243. .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2244. .rlen = 8,
  2245. }, { /* Generated with bf488 */
  2246. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2247. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2248. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2249. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2250. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2251. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2252. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2253. .klen = 56,
  2254. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2255. .ilen = 8,
  2256. .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2257. .rlen = 8,
  2258. },
  2259. };
  2260. static struct cipher_testvec bf_dec_tv_template[] = {
  2261. { /* DES test vectors from OpenSSL */
  2262. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2263. .klen = 8,
  2264. .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2265. .ilen = 8,
  2266. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2267. .rlen = 8,
  2268. }, {
  2269. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2270. .klen = 8,
  2271. .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2272. .ilen = 8,
  2273. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2274. .rlen = 8,
  2275. }, {
  2276. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2277. .klen = 8,
  2278. .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2279. .ilen = 8,
  2280. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2281. .rlen = 8,
  2282. }, { /* Vary the keylength... */
  2283. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2284. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2285. .klen = 16,
  2286. .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2287. .ilen = 8,
  2288. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2289. .rlen = 8,
  2290. }, {
  2291. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2292. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2293. "\x00\x11\x22\x33\x44",
  2294. .klen = 21,
  2295. .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2296. .ilen = 8,
  2297. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2298. .rlen = 8,
  2299. }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
  2300. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2301. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2302. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2303. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2304. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2305. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2306. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2307. .klen = 56,
  2308. .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2309. .ilen = 8,
  2310. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2311. .rlen = 8,
  2312. },
  2313. };
  2314. static struct cipher_testvec bf_cbc_enc_tv_template[] = {
  2315. { /* From OpenSSL */
  2316. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2317. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2318. .klen = 16,
  2319. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2320. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2321. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2322. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2323. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2324. .ilen = 32,
  2325. .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2326. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2327. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2328. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2329. .rlen = 32,
  2330. },
  2331. };
  2332. static struct cipher_testvec bf_cbc_dec_tv_template[] = {
  2333. { /* From OpenSSL */
  2334. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2335. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2336. .klen = 16,
  2337. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2338. .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2339. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2340. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2341. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2342. .ilen = 32,
  2343. .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2344. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2345. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2346. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2347. .rlen = 32,
  2348. },
  2349. };
  2350. /*
  2351. * Twofish test vectors.
  2352. */
  2353. #define TF_ENC_TEST_VECTORS 3
  2354. #define TF_DEC_TEST_VECTORS 3
  2355. #define TF_CBC_ENC_TEST_VECTORS 4
  2356. #define TF_CBC_DEC_TEST_VECTORS 4
  2357. static struct cipher_testvec tf_enc_tv_template[] = {
  2358. {
  2359. .key = zeroed_string,
  2360. .klen = 16,
  2361. .input = zeroed_string,
  2362. .ilen = 16,
  2363. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2364. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2365. .rlen = 16,
  2366. }, {
  2367. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2368. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2369. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2370. .klen = 24,
  2371. .input = zeroed_string,
  2372. .ilen = 16,
  2373. .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2374. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2375. .rlen = 16,
  2376. }, {
  2377. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2378. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2379. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2380. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2381. .klen = 32,
  2382. .input = zeroed_string,
  2383. .ilen = 16,
  2384. .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2385. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2386. .rlen = 16,
  2387. },
  2388. };
  2389. static struct cipher_testvec tf_dec_tv_template[] = {
  2390. {
  2391. .key = zeroed_string,
  2392. .klen = 16,
  2393. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2394. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2395. .ilen = 16,
  2396. .result = zeroed_string,
  2397. .rlen = 16,
  2398. }, {
  2399. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2400. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2401. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2402. .klen = 24,
  2403. .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2404. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2405. .ilen = 16,
  2406. .result = zeroed_string,
  2407. .rlen = 16,
  2408. }, {
  2409. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2410. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2411. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2412. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2413. .klen = 32,
  2414. .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2415. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2416. .ilen = 16,
  2417. .result = zeroed_string,
  2418. .rlen = 16,
  2419. },
  2420. };
  2421. static struct cipher_testvec tf_cbc_enc_tv_template[] = {
  2422. { /* Generated with Nettle */
  2423. .key = zeroed_string,
  2424. .klen = 16,
  2425. .iv = zeroed_string,
  2426. .input = zeroed_string,
  2427. .ilen = 16,
  2428. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2429. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2430. .rlen = 16,
  2431. }, {
  2432. .key = zeroed_string,
  2433. .klen = 16,
  2434. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2435. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2436. .input = zeroed_string,
  2437. .ilen = 16,
  2438. .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2439. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2440. .rlen = 16,
  2441. }, {
  2442. .key = zeroed_string,
  2443. .klen = 16,
  2444. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2445. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2446. .input = zeroed_string,
  2447. .ilen = 16,
  2448. .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2449. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2450. .rlen = 16,
  2451. }, {
  2452. .key = zeroed_string,
  2453. .klen = 16,
  2454. .iv = zeroed_string,
  2455. .input = zeroed_string,
  2456. .ilen = 48,
  2457. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2458. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2459. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2460. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2461. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2462. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2463. .rlen = 48,
  2464. },
  2465. };
  2466. static struct cipher_testvec tf_cbc_dec_tv_template[] = {
  2467. { /* Reverse of the first four above */
  2468. .key = zeroed_string,
  2469. .klen = 16,
  2470. .iv = zeroed_string,
  2471. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2472. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2473. .ilen = 16,
  2474. .result = zeroed_string,
  2475. .rlen = 16,
  2476. }, {
  2477. .key = zeroed_string,
  2478. .klen = 16,
  2479. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2480. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2481. .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2482. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2483. .ilen = 16,
  2484. .result = zeroed_string,
  2485. .rlen = 16,
  2486. }, {
  2487. .key = zeroed_string,
  2488. .klen = 16,
  2489. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2490. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2491. .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2492. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2493. .ilen = 16,
  2494. .result = zeroed_string,
  2495. .rlen = 16,
  2496. }, {
  2497. .key = zeroed_string,
  2498. .klen = 16,
  2499. .iv = zeroed_string,
  2500. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2501. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2502. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2503. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2504. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2505. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2506. .ilen = 48,
  2507. .result = zeroed_string,
  2508. .rlen = 48,
  2509. },
  2510. };
  2511. /*
  2512. * Serpent test vectors. These are backwards because Serpent writes
  2513. * octet sequences in right-to-left mode.
  2514. */
  2515. #define SERPENT_ENC_TEST_VECTORS 4
  2516. #define SERPENT_DEC_TEST_VECTORS 4
  2517. #define TNEPRES_ENC_TEST_VECTORS 4
  2518. #define TNEPRES_DEC_TEST_VECTORS 4
  2519. static struct cipher_testvec serpent_enc_tv_template[] = {
  2520. {
  2521. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2522. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2523. .ilen = 16,
  2524. .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  2525. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  2526. .rlen = 16,
  2527. }, {
  2528. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2529. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2530. .klen = 16,
  2531. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2532. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2533. .ilen = 16,
  2534. .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  2535. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  2536. .rlen = 16,
  2537. }, {
  2538. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2539. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2540. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2541. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2542. .klen = 32,
  2543. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2544. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2545. .ilen = 16,
  2546. .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  2547. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  2548. .rlen = 16,
  2549. }, {
  2550. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2551. .klen = 16,
  2552. .input = zeroed_string,
  2553. .ilen = 16,
  2554. .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  2555. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  2556. .rlen = 16,
  2557. },
  2558. };
  2559. static struct cipher_testvec tnepres_enc_tv_template[] = {
  2560. { /* KeySize=128, PT=0, I=1 */
  2561. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2562. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2563. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2564. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2565. .klen = 16,
  2566. .ilen = 16,
  2567. .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
  2568. "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
  2569. .rlen = 16,
  2570. }, { /* KeySize=192, PT=0, I=1 */
  2571. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2572. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2573. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2574. .klen = 24,
  2575. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2576. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2577. .ilen = 16,
  2578. .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
  2579. "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
  2580. .rlen = 16,
  2581. }, { /* KeySize=256, PT=0, I=1 */
  2582. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2583. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2584. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2585. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2586. .klen = 32,
  2587. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2588. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2589. .ilen = 16,
  2590. .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
  2591. "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
  2592. .rlen = 16,
  2593. }, { /* KeySize=256, I=257 */
  2594. .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
  2595. "\x17\x16\x15\x14\x13\x12\x11\x10"
  2596. "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  2597. "\x07\x06\x05\x04\x03\x02\x01\x00",
  2598. .klen = 32,
  2599. .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  2600. "\x07\x06\x05\x04\x03\x02\x01\x00",
  2601. .ilen = 16,
  2602. .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
  2603. "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
  2604. .rlen = 16,
  2605. },
  2606. };
  2607. static struct cipher_testvec serpent_dec_tv_template[] = {
  2608. {
  2609. .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  2610. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  2611. .ilen = 16,
  2612. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2613. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2614. .rlen = 16,
  2615. }, {
  2616. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2617. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2618. .klen = 16,
  2619. .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  2620. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  2621. .ilen = 16,
  2622. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2623. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2624. .rlen = 16,
  2625. }, {
  2626. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2627. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2628. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2629. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2630. .klen = 32,
  2631. .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  2632. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  2633. .ilen = 16,
  2634. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2635. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2636. .rlen = 16,
  2637. }, {
  2638. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2639. .klen = 16,
  2640. .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  2641. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  2642. .ilen = 16,
  2643. .result = zeroed_string,
  2644. .rlen = 16,
  2645. },
  2646. };
  2647. static struct cipher_testvec tnepres_dec_tv_template[] = {
  2648. {
  2649. .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
  2650. "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
  2651. .ilen = 16,
  2652. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2653. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2654. .rlen = 16,
  2655. }, {
  2656. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2657. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2658. .klen = 16,
  2659. .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
  2660. "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
  2661. .ilen = 16,
  2662. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2663. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2664. .rlen = 16,
  2665. }, {
  2666. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2667. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2668. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2669. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2670. .klen = 32,
  2671. .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
  2672. "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
  2673. .ilen = 16,
  2674. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2675. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2676. .rlen = 16,
  2677. }, { /* KeySize=128, I=121 */
  2678. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2679. .klen = 16,
  2680. .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
  2681. "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
  2682. .ilen = 16,
  2683. .result = zeroed_string,
  2684. .rlen = 16,
  2685. },
  2686. };
  2687. /* Cast6 test vectors from RFC 2612 */
  2688. #define CAST6_ENC_TEST_VECTORS 3
  2689. #define CAST6_DEC_TEST_VECTORS 3
  2690. static struct cipher_testvec cast6_enc_tv_template[] = {
  2691. {
  2692. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2693. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  2694. .klen = 16,
  2695. .input = zeroed_string,
  2696. .ilen = 16,
  2697. .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  2698. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  2699. .rlen = 16,
  2700. }, {
  2701. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2702. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2703. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  2704. .klen = 24,
  2705. .input = zeroed_string,
  2706. .ilen = 16,
  2707. .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  2708. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  2709. .rlen = 16,
  2710. }, {
  2711. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2712. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2713. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  2714. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  2715. .klen = 32,
  2716. .input = zeroed_string,
  2717. .ilen = 16,
  2718. .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  2719. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  2720. .rlen = 16,
  2721. },
  2722. };
  2723. static struct cipher_testvec cast6_dec_tv_template[] = {
  2724. {
  2725. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2726. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  2727. .klen = 16,
  2728. .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  2729. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  2730. .ilen = 16,
  2731. .result = zeroed_string,
  2732. .rlen = 16,
  2733. }, {
  2734. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2735. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2736. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  2737. .klen = 24,
  2738. .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  2739. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  2740. .ilen = 16,
  2741. .result = zeroed_string,
  2742. .rlen = 16,
  2743. }, {
  2744. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2745. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2746. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  2747. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  2748. .klen = 32,
  2749. .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  2750. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  2751. .ilen = 16,
  2752. .result = zeroed_string,
  2753. .rlen = 16,
  2754. },
  2755. };
  2756. /*
  2757. * AES test vectors.
  2758. */
  2759. #define AES_ENC_TEST_VECTORS 3
  2760. #define AES_DEC_TEST_VECTORS 3
  2761. #define AES_CBC_ENC_TEST_VECTORS 4
  2762. #define AES_CBC_DEC_TEST_VECTORS 4
  2763. #define AES_LRW_ENC_TEST_VECTORS 8
  2764. #define AES_LRW_DEC_TEST_VECTORS 8
  2765. #define AES_XTS_ENC_TEST_VECTORS 4
  2766. #define AES_XTS_DEC_TEST_VECTORS 4
  2767. #define AES_CTR_ENC_TEST_VECTORS 3
  2768. #define AES_CTR_DEC_TEST_VECTORS 3
  2769. #define AES_CTR_3686_ENC_TEST_VECTORS 7
  2770. #define AES_CTR_3686_DEC_TEST_VECTORS 6
  2771. #define AES_GCM_ENC_TEST_VECTORS 9
  2772. #define AES_GCM_DEC_TEST_VECTORS 8
  2773. #define AES_CCM_ENC_TEST_VECTORS 7
  2774. #define AES_CCM_DEC_TEST_VECTORS 7
  2775. #define AES_CCM_4309_ENC_TEST_VECTORS 7
  2776. #define AES_CCM_4309_DEC_TEST_VECTORS 10
  2777. static struct cipher_testvec aes_enc_tv_template[] = {
  2778. { /* From FIPS-197 */
  2779. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2780. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2781. .klen = 16,
  2782. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2783. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2784. .ilen = 16,
  2785. .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  2786. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  2787. .rlen = 16,
  2788. }, {
  2789. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2790. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2791. "\x10\x11\x12\x13\x14\x15\x16\x17",
  2792. .klen = 24,
  2793. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2794. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2795. .ilen = 16,
  2796. .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  2797. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  2798. .rlen = 16,
  2799. }, {
  2800. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2801. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2802. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2803. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2804. .klen = 32,
  2805. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2806. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2807. .ilen = 16,
  2808. .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  2809. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  2810. .rlen = 16,
  2811. },
  2812. };
  2813. static struct cipher_testvec aes_dec_tv_template[] = {
  2814. { /* From FIPS-197 */
  2815. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2816. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2817. .klen = 16,
  2818. .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  2819. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  2820. .ilen = 16,
  2821. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2822. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2823. .rlen = 16,
  2824. }, {
  2825. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2826. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2827. "\x10\x11\x12\x13\x14\x15\x16\x17",
  2828. .klen = 24,
  2829. .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  2830. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  2831. .ilen = 16,
  2832. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2833. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2834. .rlen = 16,
  2835. }, {
  2836. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2837. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2838. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2839. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2840. .klen = 32,
  2841. .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  2842. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  2843. .ilen = 16,
  2844. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2845. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2846. .rlen = 16,
  2847. },
  2848. };
  2849. static struct cipher_testvec aes_cbc_enc_tv_template[] = {
  2850. { /* From RFC 3602 */
  2851. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  2852. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  2853. .klen = 16,
  2854. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  2855. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  2856. .input = "Single block msg",
  2857. .ilen = 16,
  2858. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  2859. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  2860. .rlen = 16,
  2861. }, {
  2862. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  2863. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  2864. .klen = 16,
  2865. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  2866. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  2867. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2868. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2869. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2870. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2871. .ilen = 32,
  2872. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  2873. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  2874. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  2875. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  2876. .rlen = 32,
  2877. }, { /* From NIST SP800-38A */
  2878. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  2879. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  2880. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  2881. .klen = 24,
  2882. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2883. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2884. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2885. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2886. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2887. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2888. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2889. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2890. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2891. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2892. .ilen = 64,
  2893. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  2894. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  2895. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  2896. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  2897. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  2898. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  2899. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  2900. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  2901. .rlen = 64,
  2902. }, {
  2903. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  2904. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  2905. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  2906. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  2907. .klen = 32,
  2908. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2909. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2910. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2911. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2912. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2913. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2914. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2915. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2916. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2917. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2918. .ilen = 64,
  2919. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  2920. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  2921. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  2922. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  2923. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  2924. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  2925. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  2926. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  2927. .rlen = 64,
  2928. },
  2929. };
  2930. static struct cipher_testvec aes_cbc_dec_tv_template[] = {
  2931. { /* From RFC 3602 */
  2932. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  2933. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  2934. .klen = 16,
  2935. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  2936. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  2937. .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  2938. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  2939. .ilen = 16,
  2940. .result = "Single block msg",
  2941. .rlen = 16,
  2942. }, {
  2943. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  2944. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  2945. .klen = 16,
  2946. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  2947. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  2948. .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  2949. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  2950. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  2951. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  2952. .ilen = 32,
  2953. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2954. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2955. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2956. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2957. .rlen = 32,
  2958. }, { /* From NIST SP800-38A */
  2959. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  2960. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  2961. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  2962. .klen = 24,
  2963. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2964. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2965. .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  2966. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  2967. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  2968. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  2969. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  2970. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  2971. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  2972. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  2973. .ilen = 64,
  2974. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2975. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2976. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2977. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2978. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2979. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2980. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2981. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2982. .rlen = 64,
  2983. }, {
  2984. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  2985. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  2986. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  2987. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  2988. .klen = 32,
  2989. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2990. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2991. .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  2992. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  2993. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  2994. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  2995. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  2996. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  2997. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  2998. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  2999. .ilen = 64,
  3000. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3001. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3002. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3003. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3004. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3005. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3006. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3007. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3008. .rlen = 64,
  3009. },
  3010. };
  3011. static struct cipher_testvec aes_lrw_enc_tv_template[] = {
  3012. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  3013. { /* LRW-32-AES 1 */
  3014. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3015. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3016. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3017. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3018. .klen = 32,
  3019. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3020. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3021. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3022. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3023. .ilen = 16,
  3024. .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  3025. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  3026. .rlen = 16,
  3027. }, { /* LRW-32-AES 2 */
  3028. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3029. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3030. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3031. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3032. .klen = 32,
  3033. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3034. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3035. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3036. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3037. .ilen = 16,
  3038. .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  3039. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  3040. .rlen = 16,
  3041. }, { /* LRW-32-AES 3 */
  3042. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3043. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3044. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3045. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3046. .klen = 32,
  3047. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3048. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3049. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3050. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3051. .ilen = 16,
  3052. .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  3053. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  3054. .rlen = 16,
  3055. }, { /* LRW-32-AES 4 */
  3056. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3057. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3058. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3059. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3060. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3061. .klen = 40,
  3062. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3063. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3064. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3065. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3066. .ilen = 16,
  3067. .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  3068. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  3069. .rlen = 16,
  3070. }, { /* LRW-32-AES 5 */
  3071. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3072. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3073. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3074. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3075. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3076. .klen = 40,
  3077. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3078. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3079. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3080. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3081. .ilen = 16,
  3082. .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  3083. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  3084. .rlen = 16,
  3085. }, { /* LRW-32-AES 6 */
  3086. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3087. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3088. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3089. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3090. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3091. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3092. .klen = 48,
  3093. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3094. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3095. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3096. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3097. .ilen = 16,
  3098. .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  3099. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  3100. .rlen = 16,
  3101. }, { /* LRW-32-AES 7 */
  3102. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3103. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3104. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3105. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3106. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3107. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3108. .klen = 48,
  3109. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3110. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3111. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3112. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3113. .ilen = 16,
  3114. .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  3115. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  3116. .rlen = 16,
  3117. }, {
  3118. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  3119. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3120. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3121. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3122. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3123. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3124. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3125. .klen = 48,
  3126. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3127. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3128. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3129. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3130. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3131. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3132. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3133. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3134. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3135. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3136. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3137. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3138. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3139. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3140. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3141. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3142. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3143. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3144. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3145. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3146. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3147. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3148. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3149. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3150. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3151. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3152. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3153. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3154. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3155. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3156. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3157. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3158. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3159. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3160. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3161. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3162. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3163. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3164. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3165. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3166. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3167. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3168. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3169. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3170. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3171. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3172. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3173. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3174. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3175. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3176. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3177. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3178. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3179. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3180. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3181. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3182. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3183. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3184. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3185. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3186. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3187. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3188. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3189. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3190. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3191. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3192. .ilen = 512,
  3193. .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  3194. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  3195. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  3196. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  3197. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  3198. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  3199. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  3200. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  3201. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  3202. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  3203. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  3204. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  3205. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  3206. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  3207. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  3208. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  3209. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  3210. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  3211. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  3212. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  3213. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  3214. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  3215. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  3216. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  3217. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  3218. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  3219. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  3220. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  3221. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  3222. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  3223. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  3224. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  3225. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  3226. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  3227. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  3228. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  3229. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  3230. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  3231. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  3232. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  3233. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  3234. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  3235. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  3236. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  3237. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  3238. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  3239. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  3240. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  3241. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  3242. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  3243. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  3244. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  3245. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  3246. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  3247. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  3248. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  3249. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  3250. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  3251. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  3252. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  3253. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  3254. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  3255. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  3256. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  3257. .rlen = 512,
  3258. }
  3259. };
  3260. static struct cipher_testvec aes_lrw_dec_tv_template[] = {
  3261. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  3262. /* same as enc vectors with input and result reversed */
  3263. { /* LRW-32-AES 1 */
  3264. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3265. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3266. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3267. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3268. .klen = 32,
  3269. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3270. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3271. .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  3272. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  3273. .ilen = 16,
  3274. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3275. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3276. .rlen = 16,
  3277. }, { /* LRW-32-AES 2 */
  3278. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3279. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3280. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3281. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3282. .klen = 32,
  3283. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3284. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3285. .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  3286. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  3287. .ilen = 16,
  3288. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3289. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3290. .rlen = 16,
  3291. }, { /* LRW-32-AES 3 */
  3292. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3293. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3294. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3295. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3296. .klen = 32,
  3297. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3298. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3299. .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  3300. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  3301. .ilen = 16,
  3302. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3303. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3304. .rlen = 16,
  3305. }, { /* LRW-32-AES 4 */
  3306. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3307. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3308. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3309. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3310. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3311. .klen = 40,
  3312. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3313. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3314. .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  3315. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  3316. .ilen = 16,
  3317. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3318. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3319. .rlen = 16,
  3320. }, { /* LRW-32-AES 5 */
  3321. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3322. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3323. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3324. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3325. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3326. .klen = 40,
  3327. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3328. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3329. .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  3330. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  3331. .ilen = 16,
  3332. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3333. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3334. .rlen = 16,
  3335. }, { /* LRW-32-AES 6 */
  3336. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3337. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3338. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3339. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3340. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3341. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3342. .klen = 48,
  3343. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3344. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3345. .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  3346. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  3347. .ilen = 16,
  3348. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3349. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3350. .rlen = 16,
  3351. }, { /* LRW-32-AES 7 */
  3352. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3353. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3354. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3355. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3356. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3357. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3358. .klen = 48,
  3359. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3360. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3361. .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  3362. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  3363. .ilen = 16,
  3364. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3365. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3366. .rlen = 16,
  3367. }, {
  3368. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  3369. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3370. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3371. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3372. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3373. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3374. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3375. .klen = 48,
  3376. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3377. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3378. .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  3379. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  3380. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  3381. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  3382. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  3383. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  3384. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  3385. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  3386. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  3387. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  3388. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  3389. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  3390. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  3391. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  3392. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  3393. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  3394. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  3395. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  3396. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  3397. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  3398. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  3399. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  3400. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  3401. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  3402. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  3403. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  3404. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  3405. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  3406. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  3407. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  3408. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  3409. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  3410. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  3411. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  3412. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  3413. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  3414. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  3415. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  3416. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  3417. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  3418. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  3419. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  3420. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  3421. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  3422. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  3423. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  3424. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  3425. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  3426. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  3427. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  3428. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  3429. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  3430. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  3431. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  3432. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  3433. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  3434. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  3435. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  3436. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  3437. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  3438. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  3439. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  3440. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  3441. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  3442. .ilen = 512,
  3443. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3444. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3445. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3446. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3447. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3448. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3449. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3450. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3451. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3452. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3453. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3454. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3455. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3456. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3457. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3458. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3459. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3460. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3461. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3462. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3463. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3464. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3465. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3466. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3467. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3468. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3469. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3470. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3471. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3472. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3473. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3474. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3475. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3476. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3477. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3478. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3479. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3480. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3481. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3482. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3483. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3484. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3485. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3486. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3487. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3488. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3489. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3490. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3491. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3492. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3493. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3494. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3495. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3496. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3497. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3498. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3499. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3500. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3501. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3502. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3503. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3504. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3505. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3506. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3507. .rlen = 512,
  3508. }
  3509. };
  3510. static struct cipher_testvec aes_xts_enc_tv_template[] = {
  3511. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  3512. { /* XTS-AES 1 */
  3513. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3514. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3515. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3516. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3517. .klen = 32,
  3518. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3519. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3520. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3521. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3522. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3523. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3524. .ilen = 32,
  3525. .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  3526. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  3527. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  3528. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  3529. .rlen = 32,
  3530. }, { /* XTS-AES 2 */
  3531. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3532. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3533. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3534. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3535. .klen = 32,
  3536. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3537. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3538. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3539. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3540. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3541. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3542. .ilen = 32,
  3543. .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  3544. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  3545. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  3546. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  3547. .rlen = 32,
  3548. }, { /* XTS-AES 3 */
  3549. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3550. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3551. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3552. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3553. .klen = 32,
  3554. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3555. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3556. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3557. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3558. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3559. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3560. .ilen = 32,
  3561. .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  3562. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  3563. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  3564. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  3565. .rlen = 32,
  3566. }, { /* XTS-AES 4 */
  3567. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3568. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3569. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3570. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3571. .klen = 32,
  3572. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3573. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3574. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3575. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3576. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3577. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3578. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3579. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3580. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3581. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3582. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3583. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3584. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3585. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3586. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3587. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3588. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3589. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3590. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3591. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3592. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3593. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3594. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3595. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3596. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3597. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3598. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3599. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3600. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3601. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3602. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3603. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3604. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3605. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3606. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3607. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3608. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3609. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3610. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3611. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3612. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3613. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3614. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3615. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3616. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3617. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3618. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3619. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3620. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3621. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3622. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3623. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3624. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3625. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3626. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3627. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3628. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3629. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3630. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3631. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3632. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3633. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3634. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3635. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3636. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3637. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3638. .ilen = 512,
  3639. .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  3640. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  3641. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  3642. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  3643. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  3644. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  3645. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  3646. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  3647. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  3648. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  3649. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  3650. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  3651. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  3652. "\x22\x97\x61\x46\xae\x20\xce\x84"
  3653. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  3654. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  3655. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  3656. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  3657. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  3658. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  3659. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  3660. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  3661. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  3662. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  3663. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  3664. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  3665. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  3666. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  3667. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  3668. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  3669. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  3670. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  3671. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  3672. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  3673. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  3674. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  3675. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  3676. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  3677. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  3678. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  3679. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  3680. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  3681. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  3682. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  3683. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  3684. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  3685. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  3686. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  3687. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  3688. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  3689. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  3690. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  3691. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  3692. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  3693. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  3694. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  3695. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  3696. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  3697. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  3698. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  3699. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  3700. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  3701. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  3702. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  3703. .rlen = 512,
  3704. }
  3705. };
  3706. static struct cipher_testvec aes_xts_dec_tv_template[] = {
  3707. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  3708. { /* XTS-AES 1 */
  3709. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3710. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3711. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3712. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3713. .klen = 32,
  3714. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3715. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3716. .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  3717. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  3718. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  3719. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  3720. .ilen = 32,
  3721. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3722. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3723. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3724. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3725. .rlen = 32,
  3726. }, { /* XTS-AES 2 */
  3727. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3728. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3729. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3730. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3731. .klen = 32,
  3732. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3733. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3734. .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  3735. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  3736. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  3737. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  3738. .ilen = 32,
  3739. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3740. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3741. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3742. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3743. .rlen = 32,
  3744. }, { /* XTS-AES 3 */
  3745. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3746. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3747. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3748. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3749. .klen = 32,
  3750. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3751. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3752. .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  3753. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  3754. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  3755. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  3756. .ilen = 32,
  3757. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3758. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3759. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3760. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3761. .rlen = 32,
  3762. }, { /* XTS-AES 4 */
  3763. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3764. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3765. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3766. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3767. .klen = 32,
  3768. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3769. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3770. .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  3771. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  3772. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  3773. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  3774. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  3775. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  3776. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  3777. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  3778. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  3779. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  3780. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  3781. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  3782. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  3783. "\x22\x97\x61\x46\xae\x20\xce\x84"
  3784. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  3785. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  3786. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  3787. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  3788. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  3789. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  3790. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  3791. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  3792. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  3793. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  3794. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  3795. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  3796. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  3797. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  3798. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  3799. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  3800. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  3801. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  3802. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  3803. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  3804. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  3805. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  3806. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  3807. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  3808. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  3809. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  3810. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  3811. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  3812. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  3813. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  3814. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  3815. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  3816. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  3817. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  3818. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  3819. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  3820. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  3821. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  3822. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  3823. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  3824. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  3825. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  3826. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  3827. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  3828. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  3829. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  3830. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  3831. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  3832. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  3833. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  3834. .ilen = 512,
  3835. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3836. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3837. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3838. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3839. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3840. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3841. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3842. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3843. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3844. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3845. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3846. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3847. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3848. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3849. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3850. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3851. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3852. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3853. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3854. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3855. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3856. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3857. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3858. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3859. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3860. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3861. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3862. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3863. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3864. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3865. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3866. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3867. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3868. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3869. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3870. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3871. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3872. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3873. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3874. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3875. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3876. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3877. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3878. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3879. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3880. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3881. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3882. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3883. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3884. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3885. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3886. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3887. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3888. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3889. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3890. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3891. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3892. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3893. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3894. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3895. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3896. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3897. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3898. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3899. .rlen = 512,
  3900. }
  3901. };
  3902. static struct cipher_testvec aes_ctr_enc_tv_template[] = {
  3903. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  3904. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  3905. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  3906. .klen = 16,
  3907. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3908. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3909. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3910. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3911. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3912. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3913. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3914. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3915. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3916. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3917. .ilen = 64,
  3918. .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  3919. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  3920. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  3921. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  3922. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  3923. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  3924. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  3925. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  3926. .rlen = 64,
  3927. }, {
  3928. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  3929. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  3930. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  3931. .klen = 24,
  3932. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3933. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3934. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3935. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3936. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3937. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3938. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3939. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3940. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3941. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3942. .ilen = 64,
  3943. .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  3944. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  3945. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  3946. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  3947. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  3948. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  3949. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  3950. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  3951. .rlen = 64,
  3952. }, {
  3953. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  3954. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  3955. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  3956. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  3957. .klen = 32,
  3958. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3959. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3960. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3961. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3962. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3963. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3964. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3965. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3966. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3967. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3968. .ilen = 64,
  3969. .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  3970. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  3971. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  3972. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  3973. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  3974. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  3975. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  3976. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  3977. .rlen = 64,
  3978. }
  3979. };
  3980. static struct cipher_testvec aes_ctr_dec_tv_template[] = {
  3981. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  3982. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  3983. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  3984. .klen = 16,
  3985. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3986. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3987. .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  3988. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  3989. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  3990. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  3991. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  3992. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  3993. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  3994. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  3995. .ilen = 64,
  3996. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3997. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3998. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3999. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4000. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4001. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4002. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4003. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4004. .rlen = 64,
  4005. }, {
  4006. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  4007. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  4008. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  4009. .klen = 24,
  4010. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4011. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4012. .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  4013. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  4014. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  4015. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  4016. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  4017. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  4018. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  4019. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  4020. .ilen = 64,
  4021. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4022. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4023. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4024. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4025. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4026. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4027. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4028. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4029. .rlen = 64,
  4030. }, {
  4031. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  4032. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  4033. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  4034. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  4035. .klen = 32,
  4036. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4037. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4038. .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  4039. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  4040. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  4041. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  4042. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  4043. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  4044. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  4045. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  4046. .ilen = 64,
  4047. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4048. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4049. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4050. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4051. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4052. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4053. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4054. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4055. .rlen = 64,
  4056. }
  4057. };
  4058. static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
  4059. { /* From RFC 3686 */
  4060. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  4061. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  4062. "\x00\x00\x00\x30",
  4063. .klen = 20,
  4064. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  4065. .input = "Single block msg",
  4066. .ilen = 16,
  4067. .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  4068. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  4069. .rlen = 16,
  4070. }, {
  4071. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  4072. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  4073. "\x00\x6c\xb6\xdb",
  4074. .klen = 20,
  4075. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  4076. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4077. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4078. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4079. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4080. .ilen = 32,
  4081. .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  4082. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  4083. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  4084. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  4085. .rlen = 32,
  4086. }, {
  4087. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  4088. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  4089. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  4090. "\x00\x00\x00\x48",
  4091. .klen = 28,
  4092. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  4093. .input = "Single block msg",
  4094. .ilen = 16,
  4095. .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  4096. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  4097. .rlen = 16,
  4098. }, {
  4099. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  4100. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  4101. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  4102. "\x00\x96\xb0\x3b",
  4103. .klen = 28,
  4104. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  4105. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4106. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4107. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4108. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4109. .ilen = 32,
  4110. .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  4111. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  4112. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  4113. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  4114. .rlen = 32,
  4115. }, {
  4116. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  4117. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  4118. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  4119. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  4120. "\x00\x00\x00\x60",
  4121. .klen = 36,
  4122. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  4123. .input = "Single block msg",
  4124. .ilen = 16,
  4125. .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  4126. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  4127. .rlen = 16,
  4128. }, {
  4129. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  4130. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  4131. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  4132. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  4133. "\x00\xfa\xac\x24",
  4134. .klen = 36,
  4135. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  4136. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4137. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4138. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4139. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4140. .ilen = 32,
  4141. .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  4142. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  4143. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  4144. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  4145. .rlen = 32,
  4146. }, {
  4147. // generated using Crypto++
  4148. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4149. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4150. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4151. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4152. "\x00\x00\x00\x00",
  4153. .klen = 32 + 4,
  4154. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  4155. .input =
  4156. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4157. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4158. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4159. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4160. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4161. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4162. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4163. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4164. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4165. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4166. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4167. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4168. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4169. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4170. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4171. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4172. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4173. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4174. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4175. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4176. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4177. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4178. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4179. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4180. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4181. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4182. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4183. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4184. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4185. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4186. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4187. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4188. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  4189. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  4190. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  4191. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  4192. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  4193. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  4194. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  4195. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  4196. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  4197. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  4198. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  4199. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  4200. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  4201. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  4202. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  4203. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  4204. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  4205. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  4206. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  4207. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  4208. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  4209. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  4210. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  4211. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  4212. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  4213. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  4214. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  4215. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  4216. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  4217. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  4218. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  4219. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  4220. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  4221. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  4222. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  4223. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  4224. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  4225. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  4226. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  4227. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  4228. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  4229. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  4230. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  4231. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  4232. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  4233. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  4234. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  4235. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  4236. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  4237. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  4238. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  4239. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  4240. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  4241. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  4242. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  4243. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  4244. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  4245. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  4246. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  4247. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  4248. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  4249. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  4250. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  4251. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  4252. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  4253. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  4254. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  4255. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  4256. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  4257. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  4258. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  4259. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  4260. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  4261. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  4262. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  4263. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  4264. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  4265. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  4266. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  4267. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  4268. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  4269. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  4270. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  4271. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  4272. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  4273. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  4274. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  4275. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  4276. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  4277. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  4278. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  4279. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  4280. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  4281. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  4282. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  4283. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  4284. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  4285. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  4286. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  4287. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  4288. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  4289. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  4290. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  4291. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  4292. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  4293. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  4294. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  4295. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  4296. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  4297. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  4298. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  4299. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  4300. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  4301. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  4302. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  4303. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  4304. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  4305. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  4306. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  4307. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  4308. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  4309. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  4310. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  4311. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  4312. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  4313. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  4314. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  4315. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  4316. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  4317. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  4318. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  4319. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  4320. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  4321. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  4322. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  4323. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  4324. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  4325. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  4326. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  4327. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  4328. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  4329. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  4330. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  4331. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  4332. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  4333. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  4334. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  4335. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  4336. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  4337. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  4338. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  4339. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  4340. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  4341. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  4342. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  4343. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  4344. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  4345. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  4346. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  4347. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  4348. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  4349. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  4350. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  4351. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  4352. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  4353. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  4354. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  4355. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  4356. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  4357. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  4358. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  4359. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  4360. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  4361. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  4362. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  4363. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  4364. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  4365. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  4366. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  4367. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  4368. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  4369. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  4370. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  4371. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  4372. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  4373. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  4374. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  4375. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  4376. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  4377. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  4378. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  4379. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  4380. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  4381. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  4382. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  4383. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  4384. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  4385. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  4386. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  4387. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  4388. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  4389. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  4390. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  4391. "\x28\x37\x46\x55\x64\x73\x82\x91"
  4392. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  4393. "\x18\x27\x36\x45\x54\x63\x72\x81"
  4394. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  4395. "\x08\x17\x26\x35\x44\x53\x62\x71"
  4396. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  4397. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  4398. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  4399. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  4400. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  4401. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  4402. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  4403. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  4404. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  4405. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  4406. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  4407. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  4408. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  4409. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  4410. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  4411. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  4412. "\x00\x11\x22\x33\x44\x55\x66\x77"
  4413. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  4414. "\x10\x21\x32\x43\x54\x65\x76\x87"
  4415. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  4416. "\x20\x31\x42\x53\x64\x75\x86\x97"
  4417. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  4418. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  4419. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  4420. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  4421. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  4422. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  4423. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  4424. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  4425. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  4426. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  4427. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  4428. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  4429. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  4430. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  4431. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  4432. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  4433. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  4434. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  4435. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  4436. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  4437. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  4438. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  4439. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  4440. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  4441. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  4442. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  4443. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  4444. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  4445. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  4446. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  4447. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  4448. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  4449. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  4450. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  4451. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  4452. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  4453. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  4454. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  4455. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  4456. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  4457. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  4458. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  4459. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  4460. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  4461. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  4462. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  4463. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  4464. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  4465. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  4466. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  4467. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  4468. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  4469. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  4470. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  4471. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  4472. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  4473. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  4474. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  4475. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  4476. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  4477. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  4478. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  4479. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  4480. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  4481. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  4482. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  4483. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  4484. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  4485. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  4486. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  4487. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  4488. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  4489. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  4490. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  4491. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  4492. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  4493. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  4494. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  4495. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  4496. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  4497. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  4498. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  4499. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  4500. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  4501. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  4502. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  4503. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  4504. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  4505. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  4506. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  4507. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  4508. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  4509. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  4510. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  4511. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  4512. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  4513. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  4514. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  4515. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  4516. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  4517. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  4518. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  4519. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  4520. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  4521. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  4522. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  4523. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  4524. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  4525. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  4526. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  4527. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  4528. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  4529. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  4530. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  4531. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  4532. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  4533. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  4534. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  4535. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  4536. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  4537. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  4538. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  4539. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  4540. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  4541. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  4542. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  4543. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  4544. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  4545. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  4546. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  4547. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  4548. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  4549. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  4550. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  4551. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  4552. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  4553. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  4554. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  4555. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  4556. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  4557. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  4558. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  4559. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  4560. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  4561. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  4562. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  4563. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  4564. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  4565. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  4566. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  4567. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  4568. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  4569. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  4570. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  4571. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  4572. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  4573. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  4574. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  4575. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  4576. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  4577. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  4578. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  4579. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  4580. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  4581. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  4582. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  4583. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  4584. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  4585. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  4586. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  4587. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  4588. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  4589. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  4590. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  4591. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  4592. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  4593. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  4594. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  4595. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  4596. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  4597. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  4598. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  4599. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  4600. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  4601. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  4602. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  4603. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  4604. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  4605. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  4606. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  4607. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  4608. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  4609. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  4610. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  4611. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  4612. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  4613. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  4614. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  4615. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  4616. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  4617. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  4618. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  4619. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  4620. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  4621. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  4622. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  4623. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  4624. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  4625. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  4626. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  4627. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  4628. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  4629. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  4630. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  4631. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  4632. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  4633. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  4634. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  4635. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  4636. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  4637. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  4638. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  4639. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  4640. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  4641. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  4642. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  4643. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  4644. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  4645. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  4646. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  4647. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  4648. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  4649. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  4650. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  4651. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  4652. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  4653. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  4654. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  4655. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  4656. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  4657. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  4658. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  4659. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  4660. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  4661. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  4662. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  4663. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  4664. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  4665. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  4666. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  4667. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  4668. "\x00\x21\x42\x63",
  4669. .ilen = 4100,
  4670. .result =
  4671. "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
  4672. "\xae\xff\x91\x3a\x44\xcf\x38\x32"
  4673. "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
  4674. "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
  4675. "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
  4676. "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
  4677. "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
  4678. "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
  4679. "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
  4680. "\x18\xff\x75\x6d\x06\x2d\x00\xab"
  4681. "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
  4682. "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
  4683. "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
  4684. "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
  4685. "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
  4686. "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
  4687. "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
  4688. "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
  4689. "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
  4690. "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
  4691. "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
  4692. "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
  4693. "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
  4694. "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
  4695. "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
  4696. "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
  4697. "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
  4698. "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
  4699. "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
  4700. "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
  4701. "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
  4702. "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
  4703. "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
  4704. "\x6a\x25\x15\x33\x4e\x45\x08\xec"
  4705. "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
  4706. "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
  4707. "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
  4708. "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
  4709. "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
  4710. "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
  4711. "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
  4712. "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
  4713. "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
  4714. "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
  4715. "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
  4716. "\x04\x02\xef\xd3\x44\xde\x76\x31"
  4717. "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
  4718. "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
  4719. "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
  4720. "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
  4721. "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
  4722. "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
  4723. "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
  4724. "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
  4725. "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
  4726. "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
  4727. "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
  4728. "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
  4729. "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
  4730. "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
  4731. "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
  4732. "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
  4733. "\x32\x03\xed\xf0\x50\x1c\x56\x39"
  4734. "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
  4735. "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
  4736. "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
  4737. "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
  4738. "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
  4739. "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
  4740. "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
  4741. "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
  4742. "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
  4743. "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
  4744. "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
  4745. "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
  4746. "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
  4747. "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
  4748. "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
  4749. "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
  4750. "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
  4751. "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
  4752. "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
  4753. "\x69\x3a\x29\x23\xac\x86\x32\xa5"
  4754. "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
  4755. "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
  4756. "\x59\x6a\xd3\x50\x59\x43\x59\xde"
  4757. "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
  4758. "\x18\x34\x0d\x1a\x63\x33\xed\x10"
  4759. "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
  4760. "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
  4761. "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
  4762. "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
  4763. "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
  4764. "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
  4765. "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
  4766. "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
  4767. "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
  4768. "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
  4769. "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
  4770. "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
  4771. "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
  4772. "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
  4773. "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
  4774. "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
  4775. "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
  4776. "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
  4777. "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
  4778. "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
  4779. "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
  4780. "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
  4781. "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
  4782. "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
  4783. "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
  4784. "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
  4785. "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
  4786. "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
  4787. "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
  4788. "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
  4789. "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
  4790. "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
  4791. "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
  4792. "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
  4793. "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
  4794. "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
  4795. "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
  4796. "\x26\x39\x83\x94\xef\x27\xd8\x53"
  4797. "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
  4798. "\x43\x7c\x95\x0a\x53\xef\x66\xda"
  4799. "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
  4800. "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
  4801. "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
  4802. "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
  4803. "\x88\xee\x73\xcf\x66\x2f\x52\x56"
  4804. "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
  4805. "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
  4806. "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
  4807. "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
  4808. "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
  4809. "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
  4810. "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
  4811. "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
  4812. "\xba\x61\x34\x38\x7c\xda\x48\x3e"
  4813. "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
  4814. "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
  4815. "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
  4816. "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
  4817. "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
  4818. "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
  4819. "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
  4820. "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
  4821. "\x35\x12\xe3\x36\x28\x27\x36\x58"
  4822. "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
  4823. "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
  4824. "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
  4825. "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
  4826. "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
  4827. "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
  4828. "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
  4829. "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
  4830. "\x89\xf3\x78\x35\x44\x62\x78\x72"
  4831. "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
  4832. "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
  4833. "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
  4834. "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
  4835. "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
  4836. "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
  4837. "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
  4838. "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
  4839. "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
  4840. "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
  4841. "\xd2\x49\x77\x81\x6d\x90\x70\xae"
  4842. "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
  4843. "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
  4844. "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
  4845. "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
  4846. "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
  4847. "\x45\x42\x27\x75\x50\xe5\xee\xb8"
  4848. "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
  4849. "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
  4850. "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
  4851. "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
  4852. "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
  4853. "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
  4854. "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
  4855. "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
  4856. "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
  4857. "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
  4858. "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
  4859. "\xa9\x21\x2b\x92\x94\x87\x62\x57"
  4860. "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
  4861. "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
  4862. "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
  4863. "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
  4864. "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
  4865. "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
  4866. "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
  4867. "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
  4868. "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
  4869. "\x69\x34\x78\x61\x24\x21\x9c\x8a"
  4870. "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
  4871. "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
  4872. "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
  4873. "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
  4874. "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
  4875. "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
  4876. "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
  4877. "\xb1\x95\x28\x86\x20\xe9\x17\x49"
  4878. "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
  4879. "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
  4880. "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
  4881. "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
  4882. "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
  4883. "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
  4884. "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
  4885. "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
  4886. "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
  4887. "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
  4888. "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
  4889. "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
  4890. "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
  4891. "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
  4892. "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
  4893. "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
  4894. "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
  4895. "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
  4896. "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
  4897. "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
  4898. "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
  4899. "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
  4900. "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
  4901. "\x29\x90\x46\x30\x92\x69\x7d\x13"
  4902. "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
  4903. "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
  4904. "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
  4905. "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
  4906. "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
  4907. "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
  4908. "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
  4909. "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
  4910. "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
  4911. "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
  4912. "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
  4913. "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
  4914. "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
  4915. "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
  4916. "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
  4917. "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
  4918. "\x77\x65\x08\x60\x11\x76\x4c\x8d"
  4919. "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
  4920. "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
  4921. "\x03\xd1\x24\x95\xec\x6d\xab\x38"
  4922. "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
  4923. "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
  4924. "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
  4925. "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
  4926. "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
  4927. "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
  4928. "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
  4929. "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
  4930. "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
  4931. "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
  4932. "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
  4933. "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
  4934. "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
  4935. "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
  4936. "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
  4937. "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
  4938. "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
  4939. "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
  4940. "\xe5\x79\x81\x73\xcd\x43\x59\x68"
  4941. "\x73\x02\x3b\x78\x21\x72\x43\x00"
  4942. "\x49\x17\xf7\x00\xaf\x68\x24\x53"
  4943. "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
  4944. "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
  4945. "\x11\x94\x13\x69\x51\x09\x28\xde"
  4946. "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
  4947. "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
  4948. "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
  4949. "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
  4950. "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
  4951. "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
  4952. "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
  4953. "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
  4954. "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
  4955. "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
  4956. "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
  4957. "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
  4958. "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
  4959. "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
  4960. "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
  4961. "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
  4962. "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
  4963. "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
  4964. "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
  4965. "\x69\xdc\xab\x24\x57\x60\x47\xc1"
  4966. "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
  4967. "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
  4968. "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
  4969. "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
  4970. "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
  4971. "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
  4972. "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
  4973. "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
  4974. "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
  4975. "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
  4976. "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
  4977. "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
  4978. "\x85\x62\x82\x70\x18\xe2\x9a\x78"
  4979. "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
  4980. "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
  4981. "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
  4982. "\x35\xf3\x61\x06\x72\x84\xc4\x32"
  4983. "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
  4984. "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
  4985. "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
  4986. "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
  4987. "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
  4988. "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
  4989. "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
  4990. "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
  4991. "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
  4992. "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
  4993. "\x4f\x73\x38\x09\x75\x64\x48\xe0"
  4994. "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
  4995. "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
  4996. "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
  4997. "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
  4998. "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
  4999. "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
  5000. "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
  5001. "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
  5002. "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
  5003. "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
  5004. "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
  5005. "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
  5006. "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
  5007. "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
  5008. "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
  5009. "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
  5010. "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
  5011. "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
  5012. "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
  5013. "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
  5014. "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
  5015. "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
  5016. "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
  5017. "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
  5018. "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
  5019. "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
  5020. "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
  5021. "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
  5022. "\xce\x4d\x5f\x18\x60\xce\x87\x22"
  5023. "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
  5024. "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
  5025. "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
  5026. "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
  5027. "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
  5028. "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
  5029. "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
  5030. "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
  5031. "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
  5032. "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
  5033. "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
  5034. "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
  5035. "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
  5036. "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
  5037. "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
  5038. "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
  5039. "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
  5040. "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
  5041. "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
  5042. "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
  5043. "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
  5044. "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
  5045. "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
  5046. "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
  5047. "\xce\x54\xf9\x18\x58\xb5\xff\x44"
  5048. "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
  5049. "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
  5050. "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
  5051. "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
  5052. "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
  5053. "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
  5054. "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
  5055. "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
  5056. "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
  5057. "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
  5058. "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
  5059. "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
  5060. "\x0c\xd6\x04\x14\xde\x51\x74\x75"
  5061. "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
  5062. "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
  5063. "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
  5064. "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
  5065. "\x75\x46\x65\x4e\x07\x34\x37\xa3"
  5066. "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
  5067. "\x69\x24\x0e\x38\x67\x43\x8c\xde"
  5068. "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
  5069. "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
  5070. "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
  5071. "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
  5072. "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
  5073. "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
  5074. "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
  5075. "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
  5076. "\x91\x7d\x62\x64\x96\x72\xde\xfc"
  5077. "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
  5078. "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
  5079. "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
  5080. "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
  5081. "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
  5082. "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
  5083. "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
  5084. "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
  5085. "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
  5086. "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
  5087. "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
  5088. "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
  5089. "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
  5090. "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
  5091. "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
  5092. "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
  5093. "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
  5094. "\xae\xed\x39\x88\x42\x11\x3c\xed"
  5095. "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
  5096. "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
  5097. "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
  5098. "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
  5099. "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
  5100. "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
  5101. "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
  5102. "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
  5103. "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
  5104. "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
  5105. "\x34\x17\xde\xba\x47\xf1\x06\x18"
  5106. "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
  5107. "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
  5108. "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
  5109. "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
  5110. "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
  5111. "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
  5112. "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
  5113. "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
  5114. "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
  5115. "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
  5116. "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
  5117. "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
  5118. "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
  5119. "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
  5120. "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
  5121. "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
  5122. "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
  5123. "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
  5124. "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
  5125. "\x2c\x56\x39\x79\x0f\x69\x44\x75"
  5126. "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
  5127. "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
  5128. "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
  5129. "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
  5130. "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
  5131. "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
  5132. "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
  5133. "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
  5134. "\x63\x9b\xce\x61\x24\x79\xc0\x70"
  5135. "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
  5136. "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
  5137. "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
  5138. "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
  5139. "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
  5140. "\x74\x56\x58\x40\x02\x37\x52\x2c"
  5141. "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
  5142. "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
  5143. "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
  5144. "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
  5145. "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
  5146. "\xed\x38\x80\x36\x72\x43\x27\x49"
  5147. "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
  5148. "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
  5149. "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
  5150. "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
  5151. "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
  5152. "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
  5153. "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
  5154. "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
  5155. "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
  5156. "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
  5157. "\x12\xee\x30\xfe\xd8\x30\xef\x34"
  5158. "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
  5159. "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
  5160. "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
  5161. "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
  5162. "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
  5163. "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
  5164. "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
  5165. "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
  5166. "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
  5167. "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
  5168. "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
  5169. "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
  5170. "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
  5171. "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
  5172. "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
  5173. "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
  5174. "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
  5175. "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
  5176. "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
  5177. "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
  5178. "\x44\x12\xfb\x73\x77\xd4\x13\x39"
  5179. "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
  5180. "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
  5181. "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
  5182. "\x4b\xef\x31\x18\xea\xac\xb1\x84"
  5183. "\x21\xed\xda\x86",
  5184. .rlen = 4100,
  5185. .np = 2,
  5186. .tap = { 4064, 36 },
  5187. },
  5188. };
  5189. static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
  5190. { /* From RFC 3686 */
  5191. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  5192. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  5193. "\x00\x00\x00\x30",
  5194. .klen = 20,
  5195. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5196. .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  5197. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  5198. .ilen = 16,
  5199. .result = "Single block msg",
  5200. .rlen = 16,
  5201. }, {
  5202. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  5203. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  5204. "\x00\x6c\xb6\xdb",
  5205. .klen = 20,
  5206. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  5207. .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  5208. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  5209. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  5210. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  5211. .ilen = 32,
  5212. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5213. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5214. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5215. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5216. .rlen = 32,
  5217. }, {
  5218. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  5219. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  5220. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  5221. "\x00\x00\x00\x48",
  5222. .klen = 28,
  5223. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  5224. .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  5225. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  5226. .ilen = 16,
  5227. .result = "Single block msg",
  5228. .rlen = 16,
  5229. }, {
  5230. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  5231. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  5232. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  5233. "\x00\x96\xb0\x3b",
  5234. .klen = 28,
  5235. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  5236. .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  5237. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  5238. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  5239. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  5240. .ilen = 32,
  5241. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5242. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5243. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5244. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5245. .rlen = 32,
  5246. }, {
  5247. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  5248. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  5249. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  5250. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  5251. "\x00\x00\x00\x60",
  5252. .klen = 36,
  5253. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  5254. .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  5255. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  5256. .ilen = 16,
  5257. .result = "Single block msg",
  5258. .rlen = 16,
  5259. }, {
  5260. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  5261. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  5262. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  5263. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  5264. "\x00\xfa\xac\x24",
  5265. .klen = 36,
  5266. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  5267. .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  5268. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  5269. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  5270. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  5271. .ilen = 32,
  5272. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5273. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5274. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5275. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5276. .rlen = 32,
  5277. },
  5278. };
  5279. static struct aead_testvec aes_gcm_enc_tv_template[] = {
  5280. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  5281. .key = zeroed_string,
  5282. .klen = 16,
  5283. .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
  5284. "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
  5285. .rlen = 16,
  5286. }, {
  5287. .key = zeroed_string,
  5288. .klen = 16,
  5289. .input = zeroed_string,
  5290. .ilen = 16,
  5291. .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
  5292. "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
  5293. "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
  5294. "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
  5295. .rlen = 32,
  5296. }, {
  5297. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5298. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5299. .klen = 16,
  5300. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5301. "\xde\xca\xf8\x88",
  5302. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5303. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5304. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5305. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5306. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5307. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5308. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5309. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5310. .ilen = 64,
  5311. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5312. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5313. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5314. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5315. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5316. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5317. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5318. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  5319. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  5320. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  5321. .rlen = 80,
  5322. }, {
  5323. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5324. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5325. .klen = 16,
  5326. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5327. "\xde\xca\xf8\x88",
  5328. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5329. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5330. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5331. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5332. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5333. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5334. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5335. "\xba\x63\x7b\x39",
  5336. .ilen = 60,
  5337. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5338. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5339. "\xab\xad\xda\xd2",
  5340. .alen = 20,
  5341. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5342. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5343. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5344. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5345. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5346. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5347. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5348. "\x3d\x58\xe0\x91"
  5349. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  5350. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  5351. .rlen = 76,
  5352. }, {
  5353. .key = zeroed_string,
  5354. .klen = 24,
  5355. .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
  5356. "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
  5357. .rlen = 16,
  5358. }, {
  5359. .key = zeroed_string,
  5360. .klen = 24,
  5361. .input = zeroed_string,
  5362. .ilen = 16,
  5363. .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  5364. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  5365. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  5366. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  5367. .rlen = 32,
  5368. }, {
  5369. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5370. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5371. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5372. .klen = 24,
  5373. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5374. "\xde\xca\xf8\x88",
  5375. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5376. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5377. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5378. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5379. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5380. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5381. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5382. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5383. .ilen = 64,
  5384. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5385. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5386. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5387. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5388. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5389. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5390. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5391. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  5392. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  5393. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  5394. .rlen = 80,
  5395. }, {
  5396. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5397. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5398. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5399. .klen = 24,
  5400. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5401. "\xde\xca\xf8\x88",
  5402. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5403. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5404. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5405. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5406. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5407. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5408. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5409. "\xba\x63\x7b\x39",
  5410. .ilen = 60,
  5411. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5412. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5413. "\xab\xad\xda\xd2",
  5414. .alen = 20,
  5415. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5416. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5417. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5418. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5419. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5420. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5421. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5422. "\xcc\xda\x27\x10"
  5423. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  5424. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  5425. .rlen = 76,
  5426. .np = 2,
  5427. .tap = { 32, 28 },
  5428. .anp = 2,
  5429. .atap = { 8, 12 }
  5430. }, {
  5431. .key = zeroed_string,
  5432. .klen = 32,
  5433. .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
  5434. "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
  5435. .rlen = 16,
  5436. }
  5437. };
  5438. static struct aead_testvec aes_gcm_dec_tv_template[] = {
  5439. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  5440. .key = zeroed_string,
  5441. .klen = 32,
  5442. .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
  5443. "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
  5444. "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
  5445. "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
  5446. .ilen = 32,
  5447. .result = zeroed_string,
  5448. .rlen = 16,
  5449. }, {
  5450. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5451. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5452. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5453. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5454. .klen = 32,
  5455. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5456. "\xde\xca\xf8\x88",
  5457. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  5458. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  5459. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  5460. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  5461. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  5462. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  5463. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  5464. "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
  5465. "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
  5466. "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
  5467. .ilen = 80,
  5468. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5469. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5470. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5471. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5472. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5473. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5474. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5475. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5476. .rlen = 64,
  5477. }, {
  5478. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5479. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5480. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5481. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5482. .klen = 32,
  5483. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5484. "\xde\xca\xf8\x88",
  5485. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  5486. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  5487. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  5488. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  5489. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  5490. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  5491. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  5492. "\xbc\xc9\xf6\x62"
  5493. "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
  5494. "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
  5495. .ilen = 76,
  5496. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5497. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5498. "\xab\xad\xda\xd2",
  5499. .alen = 20,
  5500. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5501. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5502. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5503. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5504. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5505. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5506. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5507. "\xba\x63\x7b\x39",
  5508. .rlen = 60,
  5509. .np = 2,
  5510. .tap = { 48, 28 },
  5511. .anp = 3,
  5512. .atap = { 8, 8, 4 }
  5513. }, {
  5514. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5515. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5516. .klen = 16,
  5517. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5518. "\xde\xca\xf8\x88",
  5519. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5520. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5521. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5522. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5523. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5524. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5525. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5526. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  5527. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  5528. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  5529. .ilen = 80,
  5530. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5531. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5532. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5533. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5534. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5535. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5536. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5537. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5538. .rlen = 64,
  5539. }, {
  5540. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5541. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5542. .klen = 16,
  5543. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5544. "\xde\xca\xf8\x88",
  5545. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5546. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5547. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5548. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5549. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5550. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5551. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5552. "\x3d\x58\xe0\x91"
  5553. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  5554. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  5555. .ilen = 76,
  5556. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5557. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5558. "\xab\xad\xda\xd2",
  5559. .alen = 20,
  5560. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5561. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5562. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5563. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5564. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5565. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5566. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5567. "\xba\x63\x7b\x39",
  5568. .rlen = 60,
  5569. }, {
  5570. .key = zeroed_string,
  5571. .klen = 24,
  5572. .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  5573. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  5574. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  5575. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  5576. .ilen = 32,
  5577. .result = zeroed_string,
  5578. .rlen = 16,
  5579. }, {
  5580. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5581. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5582. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5583. .klen = 24,
  5584. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5585. "\xde\xca\xf8\x88",
  5586. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5587. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5588. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5589. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5590. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5591. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5592. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5593. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  5594. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  5595. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  5596. .ilen = 80,
  5597. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5598. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5599. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5600. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5601. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5602. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5603. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5604. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5605. .rlen = 64,
  5606. }, {
  5607. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5608. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5609. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5610. .klen = 24,
  5611. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5612. "\xde\xca\xf8\x88",
  5613. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5614. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5615. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5616. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5617. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5618. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5619. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5620. "\xcc\xda\x27\x10"
  5621. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  5622. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  5623. .ilen = 76,
  5624. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5625. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5626. "\xab\xad\xda\xd2",
  5627. .alen = 20,
  5628. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5629. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5630. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5631. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5632. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5633. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5634. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5635. "\xba\x63\x7b\x39",
  5636. .rlen = 60,
  5637. }
  5638. };
  5639. static struct aead_testvec aes_ccm_enc_tv_template[] = {
  5640. { /* From RFC 3610 */
  5641. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5642. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5643. .klen = 16,
  5644. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  5645. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5646. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5647. .alen = 8,
  5648. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5649. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5650. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  5651. .ilen = 23,
  5652. .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  5653. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  5654. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  5655. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  5656. .rlen = 31,
  5657. }, {
  5658. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5659. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5660. .klen = 16,
  5661. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  5662. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5663. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5664. "\x08\x09\x0a\x0b",
  5665. .alen = 12,
  5666. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5667. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5668. "\x1c\x1d\x1e\x1f",
  5669. .ilen = 20,
  5670. .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  5671. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  5672. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  5673. "\x7d\x9c\x2d\x93",
  5674. .rlen = 28,
  5675. }, {
  5676. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5677. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5678. .klen = 16,
  5679. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  5680. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5681. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5682. .alen = 8,
  5683. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5684. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5685. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5686. "\x20",
  5687. .ilen = 25,
  5688. .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  5689. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  5690. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  5691. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  5692. "\x7e\x5f\x4e",
  5693. .rlen = 35,
  5694. }, {
  5695. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5696. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5697. .klen = 16,
  5698. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  5699. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5700. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5701. "\x08\x09\x0a\x0b",
  5702. .alen = 12,
  5703. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5704. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5705. "\x1c\x1d\x1e",
  5706. .ilen = 19,
  5707. .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
  5708. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  5709. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  5710. "\x4d\x99\x99\x88\xdd",
  5711. .rlen = 29,
  5712. }, {
  5713. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5714. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5715. .klen = 16,
  5716. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  5717. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5718. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  5719. .alen = 8,
  5720. .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  5721. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  5722. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  5723. .ilen = 24,
  5724. .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  5725. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  5726. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  5727. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  5728. .rlen = 32,
  5729. }, {
  5730. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5731. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5732. .klen = 16,
  5733. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  5734. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5735. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  5736. "\x20\xea\x60\xc0",
  5737. .alen = 12,
  5738. .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  5739. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  5740. "\x3a\x80\x3b\xa8\x7f",
  5741. .ilen = 21,
  5742. .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  5743. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  5744. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  5745. "\x5a\xe0\x70\x45\x51",
  5746. .rlen = 29,
  5747. }, {
  5748. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5749. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5750. .klen = 16,
  5751. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  5752. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5753. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  5754. .alen = 8,
  5755. .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  5756. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  5757. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  5758. .ilen = 23,
  5759. .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  5760. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  5761. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  5762. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  5763. "\xba",
  5764. .rlen = 33,
  5765. },
  5766. };
  5767. static struct aead_testvec aes_ccm_dec_tv_template[] = {
  5768. { /* From RFC 3610 */
  5769. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5770. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5771. .klen = 16,
  5772. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  5773. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5774. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5775. .alen = 8,
  5776. .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  5777. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  5778. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  5779. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  5780. .ilen = 31,
  5781. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5782. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5783. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  5784. .rlen = 23,
  5785. }, {
  5786. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5787. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5788. .klen = 16,
  5789. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  5790. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5791. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5792. "\x08\x09\x0a\x0b",
  5793. .alen = 12,
  5794. .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  5795. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  5796. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  5797. "\x7d\x9c\x2d\x93",
  5798. .ilen = 28,
  5799. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5800. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5801. "\x1c\x1d\x1e\x1f",
  5802. .rlen = 20,
  5803. }, {
  5804. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5805. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5806. .klen = 16,
  5807. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  5808. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5809. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5810. .alen = 8,
  5811. .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  5812. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  5813. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  5814. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  5815. "\x7e\x5f\x4e",
  5816. .ilen = 35,
  5817. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5818. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5819. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5820. "\x20",
  5821. .rlen = 25,
  5822. }, {
  5823. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5824. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5825. .klen = 16,
  5826. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  5827. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5828. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5829. "\x08\x09\x0a\x0b",
  5830. .alen = 12,
  5831. .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
  5832. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  5833. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  5834. "\x4d\x99\x99\x88\xdd",
  5835. .ilen = 29,
  5836. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5837. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5838. "\x1c\x1d\x1e",
  5839. .rlen = 19,
  5840. }, {
  5841. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5842. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5843. .klen = 16,
  5844. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  5845. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5846. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  5847. .alen = 8,
  5848. .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  5849. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  5850. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  5851. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  5852. .ilen = 32,
  5853. .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  5854. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  5855. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  5856. .rlen = 24,
  5857. }, {
  5858. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5859. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5860. .klen = 16,
  5861. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  5862. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5863. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  5864. "\x20\xea\x60\xc0",
  5865. .alen = 12,
  5866. .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  5867. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  5868. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  5869. "\x5a\xe0\x70\x45\x51",
  5870. .ilen = 29,
  5871. .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  5872. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  5873. "\x3a\x80\x3b\xa8\x7f",
  5874. .rlen = 21,
  5875. }, {
  5876. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5877. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5878. .klen = 16,
  5879. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  5880. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5881. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  5882. .alen = 8,
  5883. .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  5884. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  5885. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  5886. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  5887. "\xba",
  5888. .ilen = 33,
  5889. .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  5890. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  5891. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  5892. .rlen = 23,
  5893. },
  5894. };
  5895. /*
  5896. * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
  5897. * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
  5898. * Special Publication 800-38C's test vectors also use nonce lengths our
  5899. * implementation doesn't support. The following are taken from fips cavs
  5900. * fax files on hand at Red Hat.
  5901. *
  5902. * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
  5903. * part of the nonce which combine w/the iv, but need to be input this way.
  5904. */
  5905. static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
  5906. {
  5907. .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
  5908. "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
  5909. "\x96\xac\x59",
  5910. .klen = 19,
  5911. .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
  5912. .alen = 0,
  5913. .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
  5914. "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
  5915. "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
  5916. "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
  5917. .ilen = 32,
  5918. .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
  5919. "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
  5920. "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
  5921. "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
  5922. "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
  5923. "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
  5924. .rlen = 48,
  5925. }, {
  5926. .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
  5927. "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
  5928. "\x4f\xa3\x19",
  5929. .klen = 19,
  5930. .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
  5931. .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
  5932. "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
  5933. "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
  5934. "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
  5935. .alen = 32,
  5936. .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
  5937. "\xa9\x28\x63\xba\x12\xa3\x14\x85"
  5938. "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
  5939. "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
  5940. .ilen = 32,
  5941. .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
  5942. "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
  5943. "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
  5944. "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
  5945. "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
  5946. "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
  5947. .rlen = 48,
  5948. }, {
  5949. .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
  5950. "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
  5951. "\x53\x14\x73\x66\x8d\x88\xf6\x80"
  5952. "\xa0\x20\x35",
  5953. .klen = 27,
  5954. .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
  5955. .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
  5956. "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
  5957. "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
  5958. "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
  5959. .alen = 32,
  5960. .ilen = 0,
  5961. .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
  5962. "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
  5963. .rlen = 16,
  5964. }, {
  5965. .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
  5966. "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
  5967. "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
  5968. "\xd6\x3c\x8c",
  5969. .klen = 27,
  5970. .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
  5971. .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
  5972. "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
  5973. "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
  5974. "\xe3\x00\x73\x69\x84\x69\x87\x79",
  5975. .alen = 32,
  5976. .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
  5977. "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
  5978. "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
  5979. "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
  5980. .ilen = 32,
  5981. .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
  5982. "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
  5983. "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
  5984. "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
  5985. "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
  5986. "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
  5987. .rlen = 48,
  5988. }, {
  5989. .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
  5990. "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
  5991. "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
  5992. "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
  5993. "\x1e\x29\x91",
  5994. .klen = 35,
  5995. .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
  5996. .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
  5997. "\x78\x2b\x94\x02\x29\x0f\x42\x27"
  5998. "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
  5999. "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
  6000. .alen = 32,
  6001. .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
  6002. "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
  6003. "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
  6004. "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
  6005. .ilen = 32,
  6006. .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
  6007. "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
  6008. "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
  6009. "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
  6010. "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
  6011. .rlen = 40,
  6012. }, {
  6013. .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
  6014. "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
  6015. "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
  6016. "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
  6017. "\xf9\xd9\x4e",
  6018. .klen = 35,
  6019. .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
  6020. .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
  6021. "\x13\x02\x01\x0c\x83\x4c\x96\x35"
  6022. "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
  6023. "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
  6024. .alen = 32,
  6025. .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
  6026. "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
  6027. "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
  6028. "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
  6029. .ilen = 32,
  6030. .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
  6031. "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
  6032. "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
  6033. "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
  6034. "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
  6035. "\x7b\x72\x8a\xf7",
  6036. .rlen = 44,
  6037. }, {
  6038. .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
  6039. "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
  6040. "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
  6041. "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
  6042. "\x24\xa7\x8b",
  6043. .klen = 35,
  6044. .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
  6045. .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
  6046. "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
  6047. "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
  6048. "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
  6049. .alen = 32,
  6050. .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
  6051. "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
  6052. "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
  6053. "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
  6054. .ilen = 32,
  6055. .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
  6056. "\xef\xbb\x80\x21\x04\x6c\x58\x09"
  6057. "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
  6058. "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
  6059. "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
  6060. "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
  6061. .rlen = 48,
  6062. },
  6063. };
  6064. static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
  6065. {
  6066. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  6067. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  6068. "\xc6\xfb\x7d",
  6069. .klen = 19,
  6070. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  6071. .alen = 0,
  6072. .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
  6073. .ilen = 8,
  6074. .result = "\x00",
  6075. .rlen = 0,
  6076. .novrfy = 1,
  6077. }, {
  6078. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  6079. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  6080. "\xaf\x94\x87",
  6081. .klen = 19,
  6082. .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
  6083. .alen = 0,
  6084. .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
  6085. .ilen = 8,
  6086. .result = "\x00",
  6087. .rlen = 0,
  6088. }, {
  6089. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  6090. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  6091. "\xc6\xfb\x7d",
  6092. .klen = 19,
  6093. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  6094. .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
  6095. "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
  6096. "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
  6097. "\xd8\x94\x99\x91\x81\x54\x62\x57",
  6098. .alen = 32,
  6099. .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
  6100. "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
  6101. "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
  6102. "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
  6103. "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
  6104. "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
  6105. .ilen = 48,
  6106. .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
  6107. "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
  6108. "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
  6109. "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
  6110. .rlen = 32,
  6111. .novrfy = 1,
  6112. }, {
  6113. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  6114. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  6115. "\x05\xe0\xc9",
  6116. .klen = 19,
  6117. .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
  6118. .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
  6119. "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
  6120. "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
  6121. "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
  6122. .alen = 32,
  6123. .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
  6124. "\xad\x83\x52\x6d\x71\x03\x25\x1c"
  6125. "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
  6126. "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
  6127. "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
  6128. "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
  6129. .ilen = 48,
  6130. .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
  6131. "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
  6132. "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
  6133. "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
  6134. .rlen = 32,
  6135. }, {
  6136. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  6137. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  6138. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  6139. "\xee\x49\x83",
  6140. .klen = 27,
  6141. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  6142. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  6143. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  6144. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  6145. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  6146. .alen = 32,
  6147. .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
  6148. .ilen = 8,
  6149. .result = "\x00",
  6150. .rlen = 0,
  6151. }, {
  6152. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  6153. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  6154. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  6155. "\xee\x49\x83",
  6156. .klen = 27,
  6157. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  6158. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  6159. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  6160. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  6161. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  6162. .alen = 32,
  6163. .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
  6164. "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
  6165. "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
  6166. "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
  6167. "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
  6168. .ilen = 40,
  6169. .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
  6170. "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
  6171. "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
  6172. "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
  6173. .rlen = 32,
  6174. }, {
  6175. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  6176. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  6177. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  6178. "\xd1\xfc\x57",
  6179. .klen = 27,
  6180. .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
  6181. .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
  6182. "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
  6183. "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
  6184. "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
  6185. .alen = 32,
  6186. .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
  6187. "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
  6188. "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
  6189. "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
  6190. "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
  6191. "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
  6192. .ilen = 48,
  6193. .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
  6194. "\x99\x2a\xa8\xca\x04\x25\x45\x90"
  6195. "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
  6196. "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
  6197. .rlen = 32,
  6198. .novrfy = 1,
  6199. }, {
  6200. .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
  6201. "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
  6202. "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
  6203. "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
  6204. "\xee\x49\x83",
  6205. .klen = 35,
  6206. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  6207. .alen = 0,
  6208. .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
  6209. .ilen = 8,
  6210. .result = "\x00",
  6211. .rlen = 0,
  6212. }, {
  6213. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  6214. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  6215. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  6216. "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
  6217. "\x85\x34\x66",
  6218. .klen = 35,
  6219. .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
  6220. .alen = 0,
  6221. .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
  6222. "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
  6223. "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
  6224. "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
  6225. "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
  6226. "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
  6227. .ilen = 48,
  6228. .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
  6229. "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
  6230. "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
  6231. "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
  6232. .rlen = 32,
  6233. .novrfy = 1,
  6234. }, {
  6235. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  6236. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  6237. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  6238. "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
  6239. "\xcf\x76\x3f",
  6240. .klen = 35,
  6241. .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
  6242. .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
  6243. "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
  6244. "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
  6245. "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
  6246. .alen = 32,
  6247. .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
  6248. "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
  6249. "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
  6250. "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
  6251. "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
  6252. "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
  6253. .ilen = 48,
  6254. .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
  6255. "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
  6256. "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
  6257. "\x04\x49\x3b\x19\x93\x57\x25\x5d",
  6258. .rlen = 32,
  6259. },
  6260. };
  6261. /*
  6262. * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
  6263. * test vectors, taken from Appendix B.2.9 and B.2.10:
  6264. * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
  6265. * Only AES-128 is supported at this time.
  6266. */
  6267. #define ANSI_CPRNG_AES_TEST_VECTORS 6
  6268. static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
  6269. {
  6270. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  6271. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  6272. .klen = 16,
  6273. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  6274. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
  6275. .dtlen = 16,
  6276. .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
  6277. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6278. .vlen = 16,
  6279. .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
  6280. "\x84\x79\x66\x85\xc1\x2f\x76\x41",
  6281. .rlen = 16,
  6282. .loops = 1,
  6283. }, {
  6284. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  6285. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  6286. .klen = 16,
  6287. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  6288. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
  6289. .dtlen = 16,
  6290. .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
  6291. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6292. .vlen = 16,
  6293. .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
  6294. "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
  6295. .rlen = 16,
  6296. .loops = 1,
  6297. }, {
  6298. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  6299. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  6300. .klen = 16,
  6301. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  6302. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
  6303. .dtlen = 16,
  6304. .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
  6305. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6306. .vlen = 16,
  6307. .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
  6308. "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
  6309. .rlen = 16,
  6310. .loops = 1,
  6311. }, {
  6312. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  6313. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  6314. .klen = 16,
  6315. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  6316. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
  6317. .dtlen = 16,
  6318. .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
  6319. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6320. .vlen = 16,
  6321. .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
  6322. "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
  6323. .rlen = 16,
  6324. .loops = 1,
  6325. }, {
  6326. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  6327. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  6328. .klen = 16,
  6329. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  6330. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
  6331. .dtlen = 16,
  6332. .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
  6333. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6334. .vlen = 16,
  6335. .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
  6336. "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
  6337. .rlen = 16,
  6338. .loops = 1,
  6339. }, { /* Monte Carlo Test */
  6340. .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
  6341. "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
  6342. .klen = 16,
  6343. .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
  6344. "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
  6345. .dtlen = 16,
  6346. .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
  6347. "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
  6348. .vlen = 16,
  6349. .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
  6350. "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
  6351. .rlen = 16,
  6352. .loops = 10000,
  6353. },
  6354. };
  6355. /* Cast5 test vectors from RFC 2144 */
  6356. #define CAST5_ENC_TEST_VECTORS 3
  6357. #define CAST5_DEC_TEST_VECTORS 3
  6358. static struct cipher_testvec cast5_enc_tv_template[] = {
  6359. {
  6360. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6361. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  6362. .klen = 16,
  6363. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6364. .ilen = 8,
  6365. .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  6366. .rlen = 8,
  6367. }, {
  6368. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6369. "\x23\x45",
  6370. .klen = 10,
  6371. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6372. .ilen = 8,
  6373. .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  6374. .rlen = 8,
  6375. }, {
  6376. .key = "\x01\x23\x45\x67\x12",
  6377. .klen = 5,
  6378. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6379. .ilen = 8,
  6380. .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  6381. .rlen = 8,
  6382. },
  6383. };
  6384. static struct cipher_testvec cast5_dec_tv_template[] = {
  6385. {
  6386. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6387. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  6388. .klen = 16,
  6389. .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  6390. .ilen = 8,
  6391. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6392. .rlen = 8,
  6393. }, {
  6394. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6395. "\x23\x45",
  6396. .klen = 10,
  6397. .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  6398. .ilen = 8,
  6399. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6400. .rlen = 8,
  6401. }, {
  6402. .key = "\x01\x23\x45\x67\x12",
  6403. .klen = 5,
  6404. .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  6405. .ilen = 8,
  6406. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6407. .rlen = 8,
  6408. },
  6409. };
  6410. /*
  6411. * ARC4 test vectors from OpenSSL
  6412. */
  6413. #define ARC4_ENC_TEST_VECTORS 7
  6414. #define ARC4_DEC_TEST_VECTORS 7
  6415. static struct cipher_testvec arc4_enc_tv_template[] = {
  6416. {
  6417. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6418. .klen = 8,
  6419. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6420. .ilen = 8,
  6421. .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  6422. .rlen = 8,
  6423. }, {
  6424. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6425. .klen = 8,
  6426. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6427. .ilen = 8,
  6428. .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  6429. .rlen = 8,
  6430. }, {
  6431. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6432. .klen = 8,
  6433. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6434. .ilen = 8,
  6435. .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  6436. .rlen = 8,
  6437. }, {
  6438. .key = "\xef\x01\x23\x45",
  6439. .klen = 4,
  6440. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6441. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6442. "\x00\x00\x00\x00",
  6443. .ilen = 20,
  6444. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6445. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  6446. "\x36\xb6\x78\x58",
  6447. .rlen = 20,
  6448. }, {
  6449. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6450. .klen = 8,
  6451. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6452. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6453. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6454. "\x12\x34\x56\x78",
  6455. .ilen = 28,
  6456. .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  6457. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  6458. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  6459. "\x40\x01\x1e\xcf",
  6460. .rlen = 28,
  6461. }, {
  6462. .key = "\xef\x01\x23\x45",
  6463. .klen = 4,
  6464. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6465. "\x00\x00",
  6466. .ilen = 10,
  6467. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6468. "\xbd\x61",
  6469. .rlen = 10,
  6470. }, {
  6471. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  6472. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6473. .klen = 16,
  6474. .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  6475. .ilen = 8,
  6476. .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  6477. .rlen = 8,
  6478. },
  6479. };
  6480. static struct cipher_testvec arc4_dec_tv_template[] = {
  6481. {
  6482. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6483. .klen = 8,
  6484. .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  6485. .ilen = 8,
  6486. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6487. .rlen = 8,
  6488. }, {
  6489. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6490. .klen = 8,
  6491. .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  6492. .ilen = 8,
  6493. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6494. .rlen = 8,
  6495. }, {
  6496. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6497. .klen = 8,
  6498. .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  6499. .ilen = 8,
  6500. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6501. .rlen = 8,
  6502. }, {
  6503. .key = "\xef\x01\x23\x45",
  6504. .klen = 4,
  6505. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6506. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  6507. "\x36\xb6\x78\x58",
  6508. .ilen = 20,
  6509. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6510. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6511. "\x00\x00\x00\x00",
  6512. .rlen = 20,
  6513. }, {
  6514. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6515. .klen = 8,
  6516. .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  6517. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  6518. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  6519. "\x40\x01\x1e\xcf",
  6520. .ilen = 28,
  6521. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6522. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6523. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6524. "\x12\x34\x56\x78",
  6525. .rlen = 28,
  6526. }, {
  6527. .key = "\xef\x01\x23\x45",
  6528. .klen = 4,
  6529. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6530. "\xbd\x61",
  6531. .ilen = 10,
  6532. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6533. "\x00\x00",
  6534. .rlen = 10,
  6535. }, {
  6536. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  6537. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6538. .klen = 16,
  6539. .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  6540. .ilen = 8,
  6541. .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  6542. .rlen = 8,
  6543. },
  6544. };
  6545. /*
  6546. * TEA test vectors
  6547. */
  6548. #define TEA_ENC_TEST_VECTORS 4
  6549. #define TEA_DEC_TEST_VECTORS 4
  6550. static struct cipher_testvec tea_enc_tv_template[] = {
  6551. {
  6552. .key = zeroed_string,
  6553. .klen = 16,
  6554. .input = zeroed_string,
  6555. .ilen = 8,
  6556. .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  6557. .rlen = 8,
  6558. }, {
  6559. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6560. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6561. .klen = 16,
  6562. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6563. .ilen = 8,
  6564. .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  6565. .rlen = 8,
  6566. }, {
  6567. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6568. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6569. .klen = 16,
  6570. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6571. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6572. .ilen = 16,
  6573. .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  6574. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  6575. .rlen = 16,
  6576. }, {
  6577. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6578. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6579. .klen = 16,
  6580. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6581. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6582. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6583. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6584. .ilen = 32,
  6585. .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  6586. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  6587. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  6588. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  6589. .rlen = 32,
  6590. }
  6591. };
  6592. static struct cipher_testvec tea_dec_tv_template[] = {
  6593. {
  6594. .key = zeroed_string,
  6595. .klen = 16,
  6596. .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  6597. .ilen = 8,
  6598. .result = zeroed_string,
  6599. .rlen = 8,
  6600. }, {
  6601. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6602. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6603. .klen = 16,
  6604. .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  6605. .ilen = 8,
  6606. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6607. .rlen = 8,
  6608. }, {
  6609. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6610. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6611. .klen = 16,
  6612. .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  6613. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  6614. .ilen = 16,
  6615. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6616. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6617. .rlen = 16,
  6618. }, {
  6619. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6620. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6621. .klen = 16,
  6622. .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  6623. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  6624. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  6625. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  6626. .ilen = 32,
  6627. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6628. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6629. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6630. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6631. .rlen = 32,
  6632. }
  6633. };
  6634. /*
  6635. * XTEA test vectors
  6636. */
  6637. #define XTEA_ENC_TEST_VECTORS 4
  6638. #define XTEA_DEC_TEST_VECTORS 4
  6639. static struct cipher_testvec xtea_enc_tv_template[] = {
  6640. {
  6641. .key = zeroed_string,
  6642. .klen = 16,
  6643. .input = zeroed_string,
  6644. .ilen = 8,
  6645. .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  6646. .rlen = 8,
  6647. }, {
  6648. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6649. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6650. .klen = 16,
  6651. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6652. .ilen = 8,
  6653. .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  6654. .rlen = 8,
  6655. }, {
  6656. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6657. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6658. .klen = 16,
  6659. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6660. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6661. .ilen = 16,
  6662. .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  6663. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  6664. .rlen = 16,
  6665. }, {
  6666. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6667. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6668. .klen = 16,
  6669. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6670. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6671. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6672. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6673. .ilen = 32,
  6674. .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  6675. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  6676. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  6677. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  6678. .rlen = 32,
  6679. }
  6680. };
  6681. static struct cipher_testvec xtea_dec_tv_template[] = {
  6682. {
  6683. .key = zeroed_string,
  6684. .klen = 16,
  6685. .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  6686. .ilen = 8,
  6687. .result = zeroed_string,
  6688. .rlen = 8,
  6689. }, {
  6690. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6691. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6692. .klen = 16,
  6693. .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  6694. .ilen = 8,
  6695. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6696. .rlen = 8,
  6697. }, {
  6698. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6699. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6700. .klen = 16,
  6701. .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  6702. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  6703. .ilen = 16,
  6704. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6705. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6706. .rlen = 16,
  6707. }, {
  6708. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6709. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6710. .klen = 16,
  6711. .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  6712. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  6713. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  6714. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  6715. .ilen = 32,
  6716. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6717. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6718. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6719. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6720. .rlen = 32,
  6721. }
  6722. };
  6723. /*
  6724. * KHAZAD test vectors.
  6725. */
  6726. #define KHAZAD_ENC_TEST_VECTORS 5
  6727. #define KHAZAD_DEC_TEST_VECTORS 5
  6728. static struct cipher_testvec khazad_enc_tv_template[] = {
  6729. {
  6730. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  6731. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6732. .klen = 16,
  6733. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6734. .ilen = 8,
  6735. .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  6736. .rlen = 8,
  6737. }, {
  6738. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  6739. "\x38\x38\x38\x38\x38\x38\x38\x38",
  6740. .klen = 16,
  6741. .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
  6742. .ilen = 8,
  6743. .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  6744. .rlen = 8,
  6745. }, {
  6746. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  6747. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6748. .klen = 16,
  6749. .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6750. .ilen = 8,
  6751. .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  6752. .rlen = 8,
  6753. }, {
  6754. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6755. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6756. .klen = 16,
  6757. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6758. .ilen = 8,
  6759. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6760. .rlen = 8,
  6761. }, {
  6762. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6763. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6764. .klen = 16,
  6765. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6766. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6767. .ilen = 16,
  6768. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  6769. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6770. .rlen = 16,
  6771. },
  6772. };
  6773. static struct cipher_testvec khazad_dec_tv_template[] = {
  6774. {
  6775. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  6776. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6777. .klen = 16,
  6778. .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  6779. .ilen = 8,
  6780. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6781. .rlen = 8,
  6782. }, {
  6783. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  6784. "\x38\x38\x38\x38\x38\x38\x38\x38",
  6785. .klen = 16,
  6786. .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  6787. .ilen = 8,
  6788. .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
  6789. .rlen = 8,
  6790. }, {
  6791. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  6792. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6793. .klen = 16,
  6794. .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  6795. .ilen = 8,
  6796. .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6797. .rlen = 8,
  6798. }, {
  6799. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6800. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6801. .klen = 16,
  6802. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6803. .ilen = 8,
  6804. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6805. .rlen = 8,
  6806. }, {
  6807. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6808. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6809. .klen = 16,
  6810. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  6811. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6812. .ilen = 16,
  6813. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6814. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6815. .rlen = 16,
  6816. },
  6817. };
  6818. /*
  6819. * Anubis test vectors.
  6820. */
  6821. #define ANUBIS_ENC_TEST_VECTORS 5
  6822. #define ANUBIS_DEC_TEST_VECTORS 5
  6823. #define ANUBIS_CBC_ENC_TEST_VECTORS 2
  6824. #define ANUBIS_CBC_DEC_TEST_VECTORS 2
  6825. static struct cipher_testvec anubis_enc_tv_template[] = {
  6826. {
  6827. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6828. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6829. .klen = 16,
  6830. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6831. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6832. .ilen = 16,
  6833. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6834. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  6835. .rlen = 16,
  6836. }, {
  6837. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6838. "\x03\x03\x03\x03\x03\x03\x03\x03"
  6839. "\x03\x03\x03\x03",
  6840. .klen = 20,
  6841. .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6842. "\x03\x03\x03\x03\x03\x03\x03\x03",
  6843. .ilen = 16,
  6844. .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  6845. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  6846. .rlen = 16,
  6847. }, {
  6848. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6849. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6850. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6851. "\x24\x24\x24\x24",
  6852. .klen = 28,
  6853. .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6854. "\x24\x24\x24\x24\x24\x24\x24\x24",
  6855. .ilen = 16,
  6856. .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  6857. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  6858. .rlen = 16,
  6859. }, {
  6860. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6861. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6862. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6863. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6864. .klen = 32,
  6865. .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6866. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6867. .ilen = 16,
  6868. .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  6869. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  6870. .rlen = 16,
  6871. }, {
  6872. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6873. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6874. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6875. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6876. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6877. .klen = 40,
  6878. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6879. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6880. .ilen = 16,
  6881. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6882. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  6883. .rlen = 16,
  6884. },
  6885. };
  6886. static struct cipher_testvec anubis_dec_tv_template[] = {
  6887. {
  6888. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6889. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6890. .klen = 16,
  6891. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6892. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  6893. .ilen = 16,
  6894. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6895. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6896. .rlen = 16,
  6897. }, {
  6898. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6899. "\x03\x03\x03\x03\x03\x03\x03\x03"
  6900. "\x03\x03\x03\x03",
  6901. .klen = 20,
  6902. .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  6903. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  6904. .ilen = 16,
  6905. .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6906. "\x03\x03\x03\x03\x03\x03\x03\x03",
  6907. .rlen = 16,
  6908. }, {
  6909. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6910. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6911. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6912. "\x24\x24\x24\x24",
  6913. .klen = 28,
  6914. .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  6915. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  6916. .ilen = 16,
  6917. .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6918. "\x24\x24\x24\x24\x24\x24\x24\x24",
  6919. .rlen = 16,
  6920. }, {
  6921. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6922. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6923. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6924. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6925. .klen = 32,
  6926. .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  6927. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  6928. .ilen = 16,
  6929. .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6930. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6931. .rlen = 16,
  6932. }, {
  6933. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6934. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6935. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6936. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6937. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6938. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6939. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  6940. .klen = 40,
  6941. .ilen = 16,
  6942. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6943. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6944. .rlen = 16,
  6945. },
  6946. };
  6947. static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
  6948. {
  6949. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6950. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6951. .klen = 16,
  6952. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6953. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6954. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6955. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6956. .ilen = 32,
  6957. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6958. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  6959. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  6960. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  6961. .rlen = 32,
  6962. }, {
  6963. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6964. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6965. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6966. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6967. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6968. .klen = 40,
  6969. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6970. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6971. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6972. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6973. .ilen = 32,
  6974. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6975. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  6976. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  6977. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  6978. .rlen = 32,
  6979. },
  6980. };
  6981. static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
  6982. {
  6983. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6984. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6985. .klen = 16,
  6986. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6987. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  6988. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  6989. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  6990. .ilen = 32,
  6991. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6992. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6993. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6994. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6995. .rlen = 32,
  6996. }, {
  6997. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6998. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6999. "\x35\x35\x35\x35\x35\x35\x35\x35"
  7000. "\x35\x35\x35\x35\x35\x35\x35\x35"
  7001. "\x35\x35\x35\x35\x35\x35\x35\x35",
  7002. .klen = 40,
  7003. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  7004. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  7005. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  7006. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  7007. .ilen = 32,
  7008. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  7009. "\x35\x35\x35\x35\x35\x35\x35\x35"
  7010. "\x35\x35\x35\x35\x35\x35\x35\x35"
  7011. "\x35\x35\x35\x35\x35\x35\x35\x35",
  7012. .rlen = 32,
  7013. },
  7014. };
  7015. /*
  7016. * XETA test vectors
  7017. */
  7018. #define XETA_ENC_TEST_VECTORS 4
  7019. #define XETA_DEC_TEST_VECTORS 4
  7020. static struct cipher_testvec xeta_enc_tv_template[] = {
  7021. {
  7022. .key = zeroed_string,
  7023. .klen = 16,
  7024. .input = zeroed_string,
  7025. .ilen = 8,
  7026. .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  7027. .rlen = 8,
  7028. }, {
  7029. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  7030. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  7031. .klen = 16,
  7032. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  7033. .ilen = 8,
  7034. .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  7035. .rlen = 8,
  7036. }, {
  7037. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  7038. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  7039. .klen = 16,
  7040. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  7041. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  7042. .ilen = 16,
  7043. .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  7044. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  7045. .rlen = 16,
  7046. }, {
  7047. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  7048. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  7049. .klen = 16,
  7050. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  7051. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  7052. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  7053. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  7054. .ilen = 32,
  7055. .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  7056. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  7057. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  7058. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  7059. .rlen = 32,
  7060. }
  7061. };
  7062. static struct cipher_testvec xeta_dec_tv_template[] = {
  7063. {
  7064. .key = zeroed_string,
  7065. .klen = 16,
  7066. .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  7067. .ilen = 8,
  7068. .result = zeroed_string,
  7069. .rlen = 8,
  7070. }, {
  7071. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  7072. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  7073. .klen = 16,
  7074. .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  7075. .ilen = 8,
  7076. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  7077. .rlen = 8,
  7078. }, {
  7079. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  7080. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  7081. .klen = 16,
  7082. .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  7083. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  7084. .ilen = 16,
  7085. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  7086. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  7087. .rlen = 16,
  7088. }, {
  7089. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  7090. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  7091. .klen = 16,
  7092. .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  7093. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  7094. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  7095. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  7096. .ilen = 32,
  7097. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  7098. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  7099. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  7100. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  7101. .rlen = 32,
  7102. }
  7103. };
  7104. /*
  7105. * FCrypt test vectors
  7106. */
  7107. #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
  7108. #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
  7109. static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
  7110. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  7111. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7112. .klen = 8,
  7113. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7114. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7115. .ilen = 8,
  7116. .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  7117. .rlen = 8,
  7118. }, {
  7119. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  7120. .klen = 8,
  7121. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7122. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  7123. .ilen = 8,
  7124. .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  7125. .rlen = 8,
  7126. }, { /* From Arla */
  7127. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7128. .klen = 8,
  7129. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7130. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  7131. .ilen = 48,
  7132. .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  7133. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  7134. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  7135. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  7136. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  7137. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  7138. .rlen = 48,
  7139. }, {
  7140. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7141. .klen = 8,
  7142. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7143. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  7144. .ilen = 48,
  7145. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  7146. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  7147. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  7148. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  7149. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  7150. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  7151. .rlen = 48,
  7152. }, { /* split-page version */
  7153. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7154. .klen = 8,
  7155. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7156. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  7157. .ilen = 48,
  7158. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  7159. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  7160. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  7161. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  7162. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  7163. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  7164. .rlen = 48,
  7165. .np = 2,
  7166. .tap = { 20, 28 },
  7167. }
  7168. };
  7169. static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
  7170. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  7171. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7172. .klen = 8,
  7173. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7174. .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  7175. .ilen = 8,
  7176. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7177. .rlen = 8,
  7178. }, {
  7179. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  7180. .klen = 8,
  7181. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7182. .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  7183. .ilen = 8,
  7184. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  7185. .rlen = 8,
  7186. }, { /* From Arla */
  7187. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7188. .klen = 8,
  7189. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7190. .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  7191. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  7192. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  7193. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  7194. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  7195. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  7196. .ilen = 48,
  7197. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  7198. .rlen = 48,
  7199. }, {
  7200. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7201. .klen = 8,
  7202. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7203. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  7204. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  7205. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  7206. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  7207. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  7208. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  7209. .ilen = 48,
  7210. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  7211. .rlen = 48,
  7212. }, { /* split-page version */
  7213. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7214. .klen = 8,
  7215. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7216. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  7217. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  7218. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  7219. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  7220. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  7221. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  7222. .ilen = 48,
  7223. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  7224. .rlen = 48,
  7225. .np = 2,
  7226. .tap = { 20, 28 },
  7227. }
  7228. };
  7229. /*
  7230. * CAMELLIA test vectors.
  7231. */
  7232. #define CAMELLIA_ENC_TEST_VECTORS 3
  7233. #define CAMELLIA_DEC_TEST_VECTORS 3
  7234. #define CAMELLIA_CBC_ENC_TEST_VECTORS 2
  7235. #define CAMELLIA_CBC_DEC_TEST_VECTORS 2
  7236. static struct cipher_testvec camellia_enc_tv_template[] = {
  7237. {
  7238. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7239. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7240. .klen = 16,
  7241. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7242. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7243. .ilen = 16,
  7244. .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
  7245. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  7246. .rlen = 16,
  7247. }, {
  7248. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7249. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  7250. "\x00\x11\x22\x33\x44\x55\x66\x77",
  7251. .klen = 24,
  7252. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7253. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7254. .ilen = 16,
  7255. .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  7256. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  7257. .rlen = 16,
  7258. }, {
  7259. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7260. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  7261. "\x00\x11\x22\x33\x44\x55\x66\x77"
  7262. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  7263. .klen = 32,
  7264. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7265. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7266. .ilen = 16,
  7267. .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  7268. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  7269. .rlen = 16,
  7270. },
  7271. };
  7272. static struct cipher_testvec camellia_dec_tv_template[] = {
  7273. {
  7274. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7275. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7276. .klen = 16,
  7277. .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
  7278. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  7279. .ilen = 16,
  7280. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7281. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7282. .rlen = 16,
  7283. }, {
  7284. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7285. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  7286. "\x00\x11\x22\x33\x44\x55\x66\x77",
  7287. .klen = 24,
  7288. .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  7289. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  7290. .ilen = 16,
  7291. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7292. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7293. .rlen = 16,
  7294. }, {
  7295. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7296. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  7297. "\x00\x11\x22\x33\x44\x55\x66\x77"
  7298. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  7299. .klen = 32,
  7300. .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  7301. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  7302. .ilen = 16,
  7303. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7304. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7305. .rlen = 16,
  7306. },
  7307. };
  7308. static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
  7309. {
  7310. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  7311. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  7312. .klen = 16,
  7313. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  7314. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  7315. .input = "Single block msg",
  7316. .ilen = 16,
  7317. .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  7318. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  7319. .rlen = 16,
  7320. }, {
  7321. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  7322. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  7323. .klen = 16,
  7324. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  7325. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  7326. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7327. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7328. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7329. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7330. .ilen = 32,
  7331. .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  7332. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  7333. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  7334. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  7335. .rlen = 32,
  7336. },
  7337. };
  7338. static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
  7339. {
  7340. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  7341. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  7342. .klen = 16,
  7343. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  7344. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  7345. .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  7346. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  7347. .ilen = 16,
  7348. .result = "Single block msg",
  7349. .rlen = 16,
  7350. }, {
  7351. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  7352. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  7353. .klen = 16,
  7354. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  7355. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  7356. .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  7357. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  7358. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  7359. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  7360. .ilen = 32,
  7361. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7362. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7363. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7364. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7365. .rlen = 32,
  7366. },
  7367. };
  7368. /*
  7369. * SEED test vectors
  7370. */
  7371. #define SEED_ENC_TEST_VECTORS 4
  7372. #define SEED_DEC_TEST_VECTORS 4
  7373. static struct cipher_testvec seed_enc_tv_template[] = {
  7374. {
  7375. .key = zeroed_string,
  7376. .klen = 16,
  7377. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7378. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7379. .ilen = 16,
  7380. .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  7381. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  7382. .rlen = 16,
  7383. }, {
  7384. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7385. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7386. .klen = 16,
  7387. .input = zeroed_string,
  7388. .ilen = 16,
  7389. .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  7390. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  7391. .rlen = 16,
  7392. }, {
  7393. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  7394. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  7395. .klen = 16,
  7396. .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  7397. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  7398. .ilen = 16,
  7399. .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  7400. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  7401. .rlen = 16,
  7402. }, {
  7403. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  7404. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  7405. .klen = 16,
  7406. .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  7407. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  7408. .ilen = 16,
  7409. .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  7410. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  7411. .rlen = 16,
  7412. }
  7413. };
  7414. static struct cipher_testvec seed_dec_tv_template[] = {
  7415. {
  7416. .key = zeroed_string,
  7417. .klen = 16,
  7418. .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  7419. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  7420. .ilen = 16,
  7421. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7422. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7423. .rlen = 16,
  7424. }, {
  7425. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7426. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7427. .klen = 16,
  7428. .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  7429. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  7430. .ilen = 16,
  7431. .result = zeroed_string,
  7432. .rlen = 16,
  7433. }, {
  7434. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  7435. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  7436. .klen = 16,
  7437. .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  7438. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  7439. .ilen = 16,
  7440. .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  7441. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  7442. .rlen = 16,
  7443. }, {
  7444. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  7445. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  7446. .klen = 16,
  7447. .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  7448. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  7449. .ilen = 16,
  7450. .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  7451. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  7452. .rlen = 16,
  7453. }
  7454. };
  7455. #define SALSA20_STREAM_ENC_TEST_VECTORS 5
  7456. static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
  7457. /*
  7458. * Testvectors from verified.test-vectors submitted to ECRYPT.
  7459. * They are truncated to size 39, 64, 111, 129 to test a variety
  7460. * of input length.
  7461. */
  7462. { /* Set 3, vector 0 */
  7463. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7464. "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
  7465. .klen = 16,
  7466. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7467. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7468. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7469. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7470. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7471. "\x00\x00\x00\x00\x00\x00\x00",
  7472. .ilen = 39,
  7473. .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
  7474. "\x68\x02\x41\x0C\x68\x86\x88\x89"
  7475. "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
  7476. "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
  7477. "\x58\x3F\x52\x79\x70\xEB\xC1",
  7478. .rlen = 39,
  7479. }, { /* Set 5, vector 0 */
  7480. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7481. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7482. .klen = 16,
  7483. .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
  7484. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7485. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7486. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7487. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7488. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7489. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7490. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7491. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7492. .ilen = 64,
  7493. .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
  7494. "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
  7495. "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
  7496. "\x46\x26\xBF\x44\x3F\x21\x97\x76"
  7497. "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
  7498. "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
  7499. "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
  7500. "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
  7501. .rlen = 64,
  7502. }, { /* Set 3, vector 27 */
  7503. .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
  7504. "\x23\x24\x25\x26\x27\x28\x29\x2A"
  7505. "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
  7506. "\x33\x34\x35\x36\x37\x38\x39\x3A",
  7507. .klen = 32,
  7508. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7509. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7510. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7511. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7512. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7513. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7514. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7515. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7516. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7517. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7518. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7519. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7520. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7521. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7522. "\x00\x00\x00\x00\x00\x00\x00",
  7523. .ilen = 111,
  7524. .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
  7525. "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
  7526. "\x87\xD9\x47\xF8\x28\x91\x35\x98"
  7527. "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
  7528. "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
  7529. "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
  7530. "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
  7531. "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
  7532. "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
  7533. "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
  7534. "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
  7535. "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
  7536. "\x95\x46\x45\x54\xE9\x75\x03\x08"
  7537. "\x44\xAF\xE5\x8A\x81\x12\x09",
  7538. .rlen = 111,
  7539. }, { /* Set 5, vector 27 */
  7540. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7541. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7542. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7543. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7544. .klen = 32,
  7545. .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
  7546. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7547. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7548. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7549. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7550. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7551. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7552. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7553. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7554. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7555. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7556. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7557. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7558. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7559. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7560. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7561. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7562. "\x00",
  7563. .ilen = 129,
  7564. .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
  7565. "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
  7566. "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
  7567. "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
  7568. "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
  7569. "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
  7570. "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
  7571. "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
  7572. "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
  7573. "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
  7574. "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
  7575. "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
  7576. "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
  7577. "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
  7578. "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
  7579. "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
  7580. "\x5A",
  7581. .rlen = 129,
  7582. }, { /* large test vector generated using Crypto++ */
  7583. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7584. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7585. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7586. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7587. .klen = 32,
  7588. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7589. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7590. .input =
  7591. "\x00\x01\x02\x03\x04\x05\x06\x07"
  7592. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7593. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7594. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7595. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7596. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7597. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7598. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7599. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7600. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7601. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7602. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7603. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7604. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7605. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7606. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7607. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7608. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7609. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7610. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7611. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7612. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7613. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7614. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7615. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7616. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7617. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7618. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7619. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7620. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7621. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7622. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  7623. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  7624. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  7625. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  7626. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  7627. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  7628. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  7629. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  7630. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  7631. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  7632. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  7633. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  7634. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  7635. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  7636. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  7637. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  7638. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  7639. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  7640. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  7641. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  7642. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  7643. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  7644. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  7645. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  7646. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  7647. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  7648. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  7649. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  7650. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  7651. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  7652. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  7653. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  7654. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  7655. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  7656. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  7657. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  7658. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  7659. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  7660. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  7661. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  7662. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  7663. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  7664. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  7665. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  7666. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  7667. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  7668. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  7669. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  7670. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  7671. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  7672. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  7673. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  7674. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  7675. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  7676. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  7677. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  7678. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  7679. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  7680. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  7681. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  7682. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  7683. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  7684. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  7685. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  7686. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  7687. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  7688. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  7689. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  7690. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  7691. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  7692. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  7693. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  7694. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  7695. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  7696. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  7697. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  7698. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  7699. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  7700. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  7701. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  7702. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  7703. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  7704. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  7705. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  7706. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  7707. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  7708. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  7709. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  7710. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  7711. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  7712. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  7713. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  7714. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  7715. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  7716. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  7717. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  7718. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  7719. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  7720. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  7721. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  7722. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  7723. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  7724. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  7725. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  7726. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  7727. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  7728. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  7729. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  7730. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  7731. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  7732. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  7733. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  7734. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  7735. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  7736. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  7737. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  7738. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  7739. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  7740. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  7741. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  7742. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  7743. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  7744. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  7745. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  7746. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  7747. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  7748. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  7749. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  7750. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  7751. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  7752. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  7753. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  7754. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  7755. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  7756. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  7757. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  7758. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  7759. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  7760. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  7761. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  7762. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  7763. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  7764. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  7765. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  7766. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  7767. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  7768. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  7769. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  7770. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  7771. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  7772. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  7773. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  7774. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  7775. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  7776. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  7777. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  7778. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  7779. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  7780. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  7781. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  7782. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  7783. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  7784. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  7785. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  7786. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  7787. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  7788. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  7789. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  7790. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  7791. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  7792. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  7793. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  7794. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  7795. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  7796. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  7797. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  7798. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  7799. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  7800. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  7801. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  7802. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  7803. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  7804. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  7805. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  7806. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  7807. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  7808. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  7809. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  7810. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  7811. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  7812. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  7813. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  7814. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  7815. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  7816. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  7817. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  7818. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  7819. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  7820. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  7821. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  7822. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  7823. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  7824. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  7825. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  7826. "\x28\x37\x46\x55\x64\x73\x82\x91"
  7827. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  7828. "\x18\x27\x36\x45\x54\x63\x72\x81"
  7829. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  7830. "\x08\x17\x26\x35\x44\x53\x62\x71"
  7831. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  7832. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  7833. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  7834. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  7835. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  7836. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  7837. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  7838. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  7839. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  7840. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  7841. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  7842. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  7843. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  7844. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  7845. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  7846. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  7847. "\x00\x11\x22\x33\x44\x55\x66\x77"
  7848. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  7849. "\x10\x21\x32\x43\x54\x65\x76\x87"
  7850. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  7851. "\x20\x31\x42\x53\x64\x75\x86\x97"
  7852. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  7853. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  7854. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  7855. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  7856. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  7857. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  7858. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  7859. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  7860. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  7861. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  7862. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  7863. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  7864. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  7865. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  7866. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  7867. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  7868. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  7869. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  7870. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  7871. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  7872. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  7873. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  7874. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  7875. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  7876. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  7877. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  7878. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  7879. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  7880. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  7881. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  7882. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  7883. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  7884. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  7885. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  7886. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  7887. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  7888. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  7889. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  7890. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  7891. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  7892. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  7893. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  7894. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  7895. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  7896. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  7897. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  7898. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  7899. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  7900. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  7901. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  7902. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  7903. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  7904. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  7905. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  7906. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  7907. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  7908. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  7909. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  7910. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  7911. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  7912. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  7913. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  7914. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  7915. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  7916. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  7917. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  7918. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  7919. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  7920. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  7921. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  7922. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  7923. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  7924. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  7925. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  7926. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  7927. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  7928. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  7929. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  7930. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  7931. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  7932. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  7933. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  7934. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  7935. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  7936. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  7937. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  7938. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  7939. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  7940. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  7941. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  7942. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  7943. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  7944. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  7945. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  7946. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  7947. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  7948. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  7949. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  7950. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  7951. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  7952. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  7953. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  7954. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  7955. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  7956. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  7957. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  7958. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  7959. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  7960. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  7961. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  7962. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  7963. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  7964. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  7965. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  7966. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  7967. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  7968. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  7969. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  7970. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  7971. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  7972. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  7973. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  7974. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  7975. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  7976. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  7977. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  7978. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  7979. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  7980. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  7981. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  7982. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  7983. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  7984. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  7985. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  7986. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  7987. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  7988. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  7989. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  7990. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  7991. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  7992. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  7993. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  7994. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  7995. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  7996. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  7997. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  7998. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  7999. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  8000. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  8001. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  8002. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  8003. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  8004. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  8005. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  8006. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  8007. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  8008. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  8009. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  8010. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  8011. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  8012. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  8013. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  8014. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  8015. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  8016. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  8017. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  8018. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  8019. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  8020. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  8021. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  8022. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  8023. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  8024. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  8025. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  8026. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  8027. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  8028. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  8029. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  8030. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  8031. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  8032. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  8033. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  8034. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  8035. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  8036. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  8037. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  8038. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  8039. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  8040. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  8041. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  8042. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  8043. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  8044. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  8045. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  8046. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  8047. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  8048. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  8049. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  8050. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  8051. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  8052. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  8053. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  8054. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  8055. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  8056. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  8057. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  8058. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  8059. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  8060. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  8061. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  8062. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  8063. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  8064. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  8065. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  8066. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  8067. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  8068. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  8069. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  8070. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  8071. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  8072. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  8073. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  8074. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  8075. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  8076. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  8077. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  8078. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  8079. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  8080. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  8081. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  8082. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  8083. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  8084. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  8085. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  8086. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  8087. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  8088. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  8089. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  8090. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  8091. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  8092. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  8093. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  8094. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  8095. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  8096. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  8097. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  8098. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  8099. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  8100. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  8101. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  8102. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  8103. "\x00\x21\x42\x63",
  8104. .ilen = 4100,
  8105. .result =
  8106. "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
  8107. "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
  8108. "\x29\x01\xce\x98\x55\x53\xf9\x0c"
  8109. "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
  8110. "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
  8111. "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
  8112. "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
  8113. "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
  8114. "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
  8115. "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
  8116. "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
  8117. "\xbb\xde\x56\x86\xab\x65\x21\x30"
  8118. "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
  8119. "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
  8120. "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
  8121. "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
  8122. "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
  8123. "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
  8124. "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
  8125. "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
  8126. "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
  8127. "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
  8128. "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
  8129. "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
  8130. "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
  8131. "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
  8132. "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
  8133. "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
  8134. "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
  8135. "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
  8136. "\x45\xff\x3f\xce\x55\xf6\x95\x10"
  8137. "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
  8138. "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
  8139. "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
  8140. "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
  8141. "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
  8142. "\x62\x08\x18\x7a\x25\x49\x28\xac"
  8143. "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
  8144. "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
  8145. "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
  8146. "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
  8147. "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
  8148. "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
  8149. "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
  8150. "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
  8151. "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
  8152. "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
  8153. "\x33\xee\x14\x19\x22\x52\x89\xa7"
  8154. "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
  8155. "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
  8156. "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
  8157. "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
  8158. "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
  8159. "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
  8160. "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
  8161. "\x04\x07\x08\x52\xe6\xc0\xda\x93"
  8162. "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
  8163. "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
  8164. "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
  8165. "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
  8166. "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
  8167. "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
  8168. "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
  8169. "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
  8170. "\x5a\x90\xae\x75\x0a\x74\x18\x89"
  8171. "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
  8172. "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
  8173. "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
  8174. "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
  8175. "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
  8176. "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
  8177. "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
  8178. "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
  8179. "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
  8180. "\x49\x97\x33\xab\x36\x14\x0a\x70"
  8181. "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
  8182. "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
  8183. "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
  8184. "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
  8185. "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
  8186. "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
  8187. "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
  8188. "\x47\x13\x28\x73\x3c\xbb\x00\x90"
  8189. "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
  8190. "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
  8191. "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
  8192. "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
  8193. "\xad\x04\x07\xae\x22\x90\x4a\x93"
  8194. "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
  8195. "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
  8196. "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
  8197. "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
  8198. "\x53\xf9\x80\x10\xde\x80\xa2\x41"
  8199. "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
  8200. "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
  8201. "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
  8202. "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
  8203. "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
  8204. "\xde\xff\x07\x44\xdd\x56\x1b\xad"
  8205. "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
  8206. "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
  8207. "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
  8208. "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
  8209. "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
  8210. "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
  8211. "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
  8212. "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
  8213. "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
  8214. "\x23\xf8\x66\x18\x14\x28\x34\x0f"
  8215. "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
  8216. "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
  8217. "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
  8218. "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
  8219. "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
  8220. "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
  8221. "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
  8222. "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
  8223. "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
  8224. "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
  8225. "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
  8226. "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
  8227. "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
  8228. "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
  8229. "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
  8230. "\xca\x8e\x61\x87\xde\xad\x80\xd2"
  8231. "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
  8232. "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
  8233. "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
  8234. "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
  8235. "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
  8236. "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
  8237. "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
  8238. "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
  8239. "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
  8240. "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
  8241. "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
  8242. "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
  8243. "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
  8244. "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
  8245. "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
  8246. "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
  8247. "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
  8248. "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
  8249. "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
  8250. "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
  8251. "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
  8252. "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
  8253. "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
  8254. "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
  8255. "\x54\xda\x24\x6a\xc4\x41\x65\x46"
  8256. "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
  8257. "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
  8258. "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
  8259. "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
  8260. "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
  8261. "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
  8262. "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
  8263. "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
  8264. "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
  8265. "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
  8266. "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
  8267. "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
  8268. "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
  8269. "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
  8270. "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
  8271. "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
  8272. "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
  8273. "\xef\xcc\xa7\xec\xab\x43\x09\x18"
  8274. "\xd3\xab\x68\xd1\x07\x99\x44\x47"
  8275. "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
  8276. "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
  8277. "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
  8278. "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
  8279. "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
  8280. "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
  8281. "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
  8282. "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
  8283. "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
  8284. "\x71\x6e\x9f\x58\x15\x67\x72\x87"
  8285. "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
  8286. "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
  8287. "\xba\x41\x54\xac\xf0\xfc\x59\x12"
  8288. "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
  8289. "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
  8290. "\x2e\x53\x49\x97\x94\x33\xae\x40"
  8291. "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
  8292. "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
  8293. "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
  8294. "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
  8295. "\xce\x87\xad\xcc\x72\x05\x00\x29"
  8296. "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
  8297. "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
  8298. "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
  8299. "\xac\xc0\x79\x50\x69\xca\x59\x32"
  8300. "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
  8301. "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
  8302. "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
  8303. "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
  8304. "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
  8305. "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
  8306. "\x05\x68\x6b\xab\xe3\x41\x49\xed"
  8307. "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
  8308. "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
  8309. "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
  8310. "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
  8311. "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
  8312. "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
  8313. "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
  8314. "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
  8315. "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
  8316. "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
  8317. "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
  8318. "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
  8319. "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
  8320. "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
  8321. "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
  8322. "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
  8323. "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
  8324. "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
  8325. "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
  8326. "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
  8327. "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
  8328. "\x85\x75\xe6\x43\xf6\x87\x08\x68"
  8329. "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
  8330. "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
  8331. "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
  8332. "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
  8333. "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
  8334. "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
  8335. "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
  8336. "\xaf\x55\xeb\x22\xac\x93\x68\x32"
  8337. "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
  8338. "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
  8339. "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
  8340. "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
  8341. "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
  8342. "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
  8343. "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
  8344. "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
  8345. "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
  8346. "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
  8347. "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
  8348. "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
  8349. "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
  8350. "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
  8351. "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
  8352. "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
  8353. "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
  8354. "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
  8355. "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
  8356. "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
  8357. "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
  8358. "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
  8359. "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
  8360. "\x38\x55\xab\x33\x26\xef\x9f\x43"
  8361. "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
  8362. "\x58\x09\x09\x1b\xc3\x65\x46\x46"
  8363. "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
  8364. "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
  8365. "\x63\x86\xf2\x03\x67\x45\xd2\x72"
  8366. "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
  8367. "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
  8368. "\x2b\x82\x39\xbd\x69\x54\xed\x62"
  8369. "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
  8370. "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
  8371. "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
  8372. "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
  8373. "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
  8374. "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
  8375. "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
  8376. "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
  8377. "\x55\xad\xa4\xd1\x22\x54\x70\x94"
  8378. "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
  8379. "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
  8380. "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
  8381. "\x62\x36\x43\xb2\x82\x15\x75\x50"
  8382. "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
  8383. "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
  8384. "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
  8385. "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
  8386. "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
  8387. "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
  8388. "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
  8389. "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
  8390. "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
  8391. "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
  8392. "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
  8393. "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
  8394. "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
  8395. "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
  8396. "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
  8397. "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
  8398. "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
  8399. "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
  8400. "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
  8401. "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
  8402. "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
  8403. "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
  8404. "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
  8405. "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
  8406. "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
  8407. "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
  8408. "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
  8409. "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
  8410. "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
  8411. "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
  8412. "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
  8413. "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
  8414. "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
  8415. "\x42\x19\x23\x7d\xc8\x73\xee\x25"
  8416. "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
  8417. "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
  8418. "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
  8419. "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
  8420. "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
  8421. "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
  8422. "\xdb\x87\xee\xef\x55\x89\x2a\x59"
  8423. "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
  8424. "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
  8425. "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
  8426. "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
  8427. "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
  8428. "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
  8429. "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
  8430. "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
  8431. "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
  8432. "\xae\xab\x86\x09\x89\xc9\xc2\x40"
  8433. "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
  8434. "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
  8435. "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
  8436. "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
  8437. "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
  8438. "\x95\xd9\x34\x34\x86\xc6\x41\x94"
  8439. "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
  8440. "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
  8441. "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
  8442. "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
  8443. "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
  8444. "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
  8445. "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
  8446. "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
  8447. "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
  8448. "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
  8449. "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
  8450. "\xa7\x33\x34\x86\xca\xe4\x96\x23"
  8451. "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
  8452. "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
  8453. "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
  8454. "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
  8455. "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
  8456. "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
  8457. "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
  8458. "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
  8459. "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
  8460. "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
  8461. "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
  8462. "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
  8463. "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
  8464. "\x68\xc8\x7f\x51\x22\x42\xef\x49"
  8465. "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
  8466. "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
  8467. "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
  8468. "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
  8469. "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
  8470. "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
  8471. "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
  8472. "\x73\x2e\x71\x79\x16\x06\x63\x28"
  8473. "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
  8474. "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
  8475. "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
  8476. "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
  8477. "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
  8478. "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
  8479. "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
  8480. "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
  8481. "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
  8482. "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
  8483. "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
  8484. "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
  8485. "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
  8486. "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
  8487. "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
  8488. "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
  8489. "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
  8490. "\x19\x07\xaf\x90\x62\x5c\x68\x98"
  8491. "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
  8492. "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
  8493. "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
  8494. "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
  8495. "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
  8496. "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
  8497. "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
  8498. "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
  8499. "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
  8500. "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
  8501. "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
  8502. "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
  8503. "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
  8504. "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
  8505. "\x21\x33\x44\xfe\x7f\x35\x32\x93"
  8506. "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
  8507. "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
  8508. "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
  8509. "\x64\xf0\x48\xe5\x57\x99\xee\x75"
  8510. "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
  8511. "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
  8512. "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
  8513. "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
  8514. "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
  8515. "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
  8516. "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
  8517. "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
  8518. "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
  8519. "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
  8520. "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
  8521. "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
  8522. "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
  8523. "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
  8524. "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
  8525. "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
  8526. "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
  8527. "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
  8528. "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
  8529. "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
  8530. "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
  8531. "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
  8532. "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
  8533. "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
  8534. "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
  8535. "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
  8536. "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
  8537. "\x56\xf5\x4e\x01\x35\x27\x45\x77"
  8538. "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
  8539. "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
  8540. "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
  8541. "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
  8542. "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
  8543. "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
  8544. "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
  8545. "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
  8546. "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
  8547. "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
  8548. "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
  8549. "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
  8550. "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
  8551. "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
  8552. "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
  8553. "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
  8554. "\x87\x8f\x03\x21\x28\x95\x0c\x89"
  8555. "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
  8556. "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
  8557. "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
  8558. "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
  8559. "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
  8560. "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
  8561. "\x85\x73\x78\x45\x20\x7f\xae\x13"
  8562. "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
  8563. "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
  8564. "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
  8565. "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
  8566. "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
  8567. "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
  8568. "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
  8569. "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
  8570. "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
  8571. "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
  8572. "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
  8573. "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
  8574. "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
  8575. "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
  8576. "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
  8577. "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
  8578. "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
  8579. "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
  8580. "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
  8581. "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
  8582. "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
  8583. "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
  8584. "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
  8585. "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
  8586. "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
  8587. "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
  8588. "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
  8589. "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
  8590. "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
  8591. "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
  8592. "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
  8593. "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
  8594. "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
  8595. "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
  8596. "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
  8597. "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
  8598. "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
  8599. "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
  8600. "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
  8601. "\x6e\x12\x17\x72\x63\x57\xc7\xba"
  8602. "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
  8603. "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
  8604. "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
  8605. "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
  8606. "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
  8607. "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
  8608. "\x0c\x24\x43\x31\x40\x57\xf1\x72"
  8609. "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
  8610. "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
  8611. "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
  8612. "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
  8613. "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
  8614. "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
  8615. "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
  8616. "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
  8617. "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
  8618. "\xaf\xdf\x11\x95",
  8619. .rlen = 4100,
  8620. .np = 2,
  8621. .tap = { 4064, 36 },
  8622. },
  8623. };
  8624. /*
  8625. * CTS (Cipher Text Stealing) mode tests
  8626. */
  8627. #define CTS_MODE_ENC_TEST_VECTORS 6
  8628. #define CTS_MODE_DEC_TEST_VECTORS 6
  8629. static struct cipher_testvec cts_mode_enc_tv_template[] = {
  8630. { /* from rfc3962 */
  8631. .klen = 16,
  8632. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8633. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8634. .ilen = 17,
  8635. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8636. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8637. "\x20",
  8638. .rlen = 17,
  8639. .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  8640. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  8641. "\x97",
  8642. }, {
  8643. .klen = 16,
  8644. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8645. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8646. .ilen = 31,
  8647. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8648. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8649. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8650. "\x20\x47\x61\x75\x27\x73\x20",
  8651. .rlen = 31,
  8652. .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  8653. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  8654. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8655. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  8656. }, {
  8657. .klen = 16,
  8658. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8659. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8660. .ilen = 32,
  8661. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8662. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8663. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8664. "\x20\x47\x61\x75\x27\x73\x20\x43",
  8665. .rlen = 32,
  8666. .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8667. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8668. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8669. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  8670. }, {
  8671. .klen = 16,
  8672. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8673. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8674. .ilen = 47,
  8675. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8676. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8677. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8678. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8679. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8680. "\x70\x6c\x65\x61\x73\x65\x2c",
  8681. .rlen = 47,
  8682. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8683. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8684. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  8685. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  8686. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8687. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  8688. }, {
  8689. .klen = 16,
  8690. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8691. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8692. .ilen = 48,
  8693. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8694. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8695. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8696. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8697. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8698. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  8699. .rlen = 48,
  8700. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8701. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8702. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8703. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  8704. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8705. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  8706. }, {
  8707. .klen = 16,
  8708. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8709. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8710. .ilen = 64,
  8711. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8712. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8713. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8714. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8715. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8716. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  8717. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  8718. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  8719. .rlen = 64,
  8720. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8721. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8722. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8723. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8724. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  8725. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  8726. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8727. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  8728. }
  8729. };
  8730. static struct cipher_testvec cts_mode_dec_tv_template[] = {
  8731. { /* from rfc3962 */
  8732. .klen = 16,
  8733. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8734. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8735. .rlen = 17,
  8736. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8737. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8738. "\x20",
  8739. .ilen = 17,
  8740. .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  8741. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  8742. "\x97",
  8743. }, {
  8744. .klen = 16,
  8745. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8746. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8747. .rlen = 31,
  8748. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8749. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8750. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8751. "\x20\x47\x61\x75\x27\x73\x20",
  8752. .ilen = 31,
  8753. .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  8754. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  8755. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8756. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  8757. }, {
  8758. .klen = 16,
  8759. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8760. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8761. .rlen = 32,
  8762. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8763. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8764. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8765. "\x20\x47\x61\x75\x27\x73\x20\x43",
  8766. .ilen = 32,
  8767. .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8768. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8769. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8770. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  8771. }, {
  8772. .klen = 16,
  8773. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8774. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8775. .rlen = 47,
  8776. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8777. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8778. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8779. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8780. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8781. "\x70\x6c\x65\x61\x73\x65\x2c",
  8782. .ilen = 47,
  8783. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8784. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8785. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  8786. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  8787. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8788. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  8789. }, {
  8790. .klen = 16,
  8791. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8792. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8793. .rlen = 48,
  8794. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8795. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8796. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8797. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8798. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8799. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  8800. .ilen = 48,
  8801. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8802. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8803. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8804. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  8805. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8806. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  8807. }, {
  8808. .klen = 16,
  8809. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8810. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8811. .rlen = 64,
  8812. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8813. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8814. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8815. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8816. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8817. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  8818. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  8819. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  8820. .ilen = 64,
  8821. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8822. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8823. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8824. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8825. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  8826. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  8827. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8828. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  8829. }
  8830. };
  8831. /*
  8832. * Compression stuff.
  8833. */
  8834. #define COMP_BUF_SIZE 512
  8835. struct comp_testvec {
  8836. int inlen, outlen;
  8837. char input[COMP_BUF_SIZE];
  8838. char output[COMP_BUF_SIZE];
  8839. };
  8840. struct pcomp_testvec {
  8841. void *params;
  8842. unsigned int paramsize;
  8843. int inlen, outlen;
  8844. char input[COMP_BUF_SIZE];
  8845. char output[COMP_BUF_SIZE];
  8846. };
  8847. /*
  8848. * Deflate test vectors (null-terminated strings).
  8849. * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
  8850. */
  8851. #define DEFLATE_COMP_TEST_VECTORS 2
  8852. #define DEFLATE_DECOMP_TEST_VECTORS 2
  8853. static struct comp_testvec deflate_comp_tv_template[] = {
  8854. {
  8855. .inlen = 70,
  8856. .outlen = 38,
  8857. .input = "Join us now and share the software "
  8858. "Join us now and share the software ",
  8859. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8860. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8861. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8862. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8863. "\x71\xbc\x08\x2b\x01\x00",
  8864. }, {
  8865. .inlen = 191,
  8866. .outlen = 122,
  8867. .input = "This document describes a compression method based on the DEFLATE"
  8868. "compression algorithm. This document defines the application of "
  8869. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8870. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8871. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8872. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8873. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8874. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8875. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  8876. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  8877. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  8878. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  8879. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  8880. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  8881. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  8882. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  8883. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  8884. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  8885. "\xfa\x02",
  8886. },
  8887. };
  8888. static struct comp_testvec deflate_decomp_tv_template[] = {
  8889. {
  8890. .inlen = 122,
  8891. .outlen = 191,
  8892. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8893. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8894. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8895. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8896. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8897. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  8898. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  8899. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  8900. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  8901. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  8902. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  8903. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  8904. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  8905. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  8906. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  8907. "\xfa\x02",
  8908. .output = "This document describes a compression method based on the DEFLATE"
  8909. "compression algorithm. This document defines the application of "
  8910. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8911. }, {
  8912. .inlen = 38,
  8913. .outlen = 70,
  8914. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8915. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8916. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8917. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8918. "\x71\xbc\x08\x2b\x01\x00",
  8919. .output = "Join us now and share the software "
  8920. "Join us now and share the software ",
  8921. },
  8922. };
  8923. #define ZLIB_COMP_TEST_VECTORS 2
  8924. #define ZLIB_DECOMP_TEST_VECTORS 2
  8925. static const struct {
  8926. struct nlattr nla;
  8927. int val;
  8928. } deflate_comp_params[] = {
  8929. {
  8930. .nla = {
  8931. .nla_len = NLA_HDRLEN + sizeof(int),
  8932. .nla_type = ZLIB_COMP_LEVEL,
  8933. },
  8934. .val = Z_DEFAULT_COMPRESSION,
  8935. }, {
  8936. .nla = {
  8937. .nla_len = NLA_HDRLEN + sizeof(int),
  8938. .nla_type = ZLIB_COMP_METHOD,
  8939. },
  8940. .val = Z_DEFLATED,
  8941. }, {
  8942. .nla = {
  8943. .nla_len = NLA_HDRLEN + sizeof(int),
  8944. .nla_type = ZLIB_COMP_WINDOWBITS,
  8945. },
  8946. .val = -11,
  8947. }, {
  8948. .nla = {
  8949. .nla_len = NLA_HDRLEN + sizeof(int),
  8950. .nla_type = ZLIB_COMP_MEMLEVEL,
  8951. },
  8952. .val = MAX_MEM_LEVEL,
  8953. }, {
  8954. .nla = {
  8955. .nla_len = NLA_HDRLEN + sizeof(int),
  8956. .nla_type = ZLIB_COMP_STRATEGY,
  8957. },
  8958. .val = Z_DEFAULT_STRATEGY,
  8959. }
  8960. };
  8961. static const struct {
  8962. struct nlattr nla;
  8963. int val;
  8964. } deflate_decomp_params[] = {
  8965. {
  8966. .nla = {
  8967. .nla_len = NLA_HDRLEN + sizeof(int),
  8968. .nla_type = ZLIB_DECOMP_WINDOWBITS,
  8969. },
  8970. .val = -11,
  8971. }
  8972. };
  8973. static struct pcomp_testvec zlib_comp_tv_template[] = {
  8974. {
  8975. .params = &deflate_comp_params,
  8976. .paramsize = sizeof(deflate_comp_params),
  8977. .inlen = 70,
  8978. .outlen = 38,
  8979. .input = "Join us now and share the software "
  8980. "Join us now and share the software ",
  8981. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8982. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8983. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8984. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8985. "\x71\xbc\x08\x2b\x01\x00",
  8986. }, {
  8987. .params = &deflate_comp_params,
  8988. .paramsize = sizeof(deflate_comp_params),
  8989. .inlen = 191,
  8990. .outlen = 122,
  8991. .input = "This document describes a compression method based on the DEFLATE"
  8992. "compression algorithm. This document defines the application of "
  8993. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8994. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8995. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8996. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8997. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8998. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8999. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  9000. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  9001. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  9002. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  9003. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  9004. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  9005. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  9006. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  9007. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  9008. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  9009. "\xfa\x02",
  9010. },
  9011. };
  9012. static struct pcomp_testvec zlib_decomp_tv_template[] = {
  9013. {
  9014. .params = &deflate_decomp_params,
  9015. .paramsize = sizeof(deflate_decomp_params),
  9016. .inlen = 122,
  9017. .outlen = 191,
  9018. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  9019. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  9020. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  9021. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  9022. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  9023. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  9024. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  9025. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  9026. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  9027. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  9028. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  9029. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  9030. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  9031. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  9032. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  9033. "\xfa\x02",
  9034. .output = "This document describes a compression method based on the DEFLATE"
  9035. "compression algorithm. This document defines the application of "
  9036. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  9037. }, {
  9038. .params = &deflate_decomp_params,
  9039. .paramsize = sizeof(deflate_decomp_params),
  9040. .inlen = 38,
  9041. .outlen = 70,
  9042. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  9043. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  9044. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  9045. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  9046. "\x71\xbc\x08\x2b\x01\x00",
  9047. .output = "Join us now and share the software "
  9048. "Join us now and share the software ",
  9049. },
  9050. };
  9051. /*
  9052. * LZO test vectors (null-terminated strings).
  9053. */
  9054. #define LZO_COMP_TEST_VECTORS 2
  9055. #define LZO_DECOMP_TEST_VECTORS 2
  9056. static struct comp_testvec lzo_comp_tv_template[] = {
  9057. {
  9058. .inlen = 70,
  9059. .outlen = 46,
  9060. .input = "Join us now and share the software "
  9061. "Join us now and share the software ",
  9062. .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  9063. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  9064. "\x64\x20\x73\x68\x61\x72\x65\x20"
  9065. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  9066. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  9067. "\x3d\x88\x00\x11\x00\x00",
  9068. }, {
  9069. .inlen = 159,
  9070. .outlen = 133,
  9071. .input = "This document describes a compression method based on the LZO "
  9072. "compression algorithm. This document defines the application of "
  9073. "the LZO algorithm used in UBIFS.",
  9074. .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  9075. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  9076. "\x64\x65\x73\x63\x72\x69\x62\x65"
  9077. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  9078. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  9079. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  9080. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  9081. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  9082. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  9083. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  9084. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  9085. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  9086. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  9087. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  9088. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  9089. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  9090. "\x53\x2e\x11\x00\x00",
  9091. },
  9092. };
  9093. static struct comp_testvec lzo_decomp_tv_template[] = {
  9094. {
  9095. .inlen = 133,
  9096. .outlen = 159,
  9097. .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  9098. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  9099. "\x64\x65\x73\x63\x72\x69\x62\x65"
  9100. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  9101. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  9102. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  9103. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  9104. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  9105. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  9106. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  9107. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  9108. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  9109. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  9110. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  9111. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  9112. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  9113. "\x53\x2e\x11\x00\x00",
  9114. .output = "This document describes a compression method based on the LZO "
  9115. "compression algorithm. This document defines the application of "
  9116. "the LZO algorithm used in UBIFS.",
  9117. }, {
  9118. .inlen = 46,
  9119. .outlen = 70,
  9120. .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  9121. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  9122. "\x64\x20\x73\x68\x61\x72\x65\x20"
  9123. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  9124. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  9125. "\x3d\x88\x00\x11\x00\x00",
  9126. .output = "Join us now and share the software "
  9127. "Join us now and share the software ",
  9128. },
  9129. };
  9130. /*
  9131. * Michael MIC test vectors from IEEE 802.11i
  9132. */
  9133. #define MICHAEL_MIC_TEST_VECTORS 6
  9134. static struct hash_testvec michael_mic_tv_template[] = {
  9135. {
  9136. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  9137. .ksize = 8,
  9138. .plaintext = zeroed_string,
  9139. .psize = 0,
  9140. .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  9141. },
  9142. {
  9143. .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  9144. .ksize = 8,
  9145. .plaintext = "M",
  9146. .psize = 1,
  9147. .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  9148. },
  9149. {
  9150. .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  9151. .ksize = 8,
  9152. .plaintext = "Mi",
  9153. .psize = 2,
  9154. .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  9155. },
  9156. {
  9157. .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  9158. .ksize = 8,
  9159. .plaintext = "Mic",
  9160. .psize = 3,
  9161. .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  9162. },
  9163. {
  9164. .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  9165. .ksize = 8,
  9166. .plaintext = "Mich",
  9167. .psize = 4,
  9168. .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  9169. },
  9170. {
  9171. .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  9172. .ksize = 8,
  9173. .plaintext = "Michael",
  9174. .psize = 7,
  9175. .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
  9176. }
  9177. };
  9178. /*
  9179. * CRC32C test vectors
  9180. */
  9181. #define CRC32C_TEST_VECTORS 14
  9182. static struct hash_testvec crc32c_tv_template[] = {
  9183. {
  9184. .psize = 0,
  9185. .digest = "\x00\x00\x00\x00",
  9186. },
  9187. {
  9188. .key = "\x87\xa9\xcb\xed",
  9189. .ksize = 4,
  9190. .psize = 0,
  9191. .digest = "\x78\x56\x34\x12",
  9192. },
  9193. {
  9194. .key = "\xff\xff\xff\xff",
  9195. .ksize = 4,
  9196. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  9197. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  9198. "\x11\x12\x13\x14\x15\x16\x17\x18"
  9199. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  9200. "\x21\x22\x23\x24\x25\x26\x27\x28",
  9201. .psize = 40,
  9202. .digest = "\x7f\x15\x2c\x0e",
  9203. },
  9204. {
  9205. .key = "\xff\xff\xff\xff",
  9206. .ksize = 4,
  9207. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  9208. "\x31\x32\x33\x34\x35\x36\x37\x38"
  9209. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  9210. "\x41\x42\x43\x44\x45\x46\x47\x48"
  9211. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  9212. .psize = 40,
  9213. .digest = "\xf6\xeb\x80\xe9",
  9214. },
  9215. {
  9216. .key = "\xff\xff\xff\xff",
  9217. .ksize = 4,
  9218. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  9219. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  9220. "\x61\x62\x63\x64\x65\x66\x67\x68"
  9221. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  9222. "\x71\x72\x73\x74\x75\x76\x77\x78",
  9223. .psize = 40,
  9224. .digest = "\xed\xbd\x74\xde",
  9225. },
  9226. {
  9227. .key = "\xff\xff\xff\xff",
  9228. .ksize = 4,
  9229. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  9230. "\x81\x82\x83\x84\x85\x86\x87\x88"
  9231. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  9232. "\x91\x92\x93\x94\x95\x96\x97\x98"
  9233. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  9234. .psize = 40,
  9235. .digest = "\x62\xc8\x79\xd5",
  9236. },
  9237. {
  9238. .key = "\xff\xff\xff\xff",
  9239. .ksize = 4,
  9240. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  9241. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  9242. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  9243. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  9244. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  9245. .psize = 40,
  9246. .digest = "\xd0\x9a\x97\xba",
  9247. },
  9248. {
  9249. .key = "\xff\xff\xff\xff",
  9250. .ksize = 4,
  9251. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  9252. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  9253. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  9254. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  9255. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  9256. .psize = 40,
  9257. .digest = "\x13\xd9\x29\x2b",
  9258. },
  9259. {
  9260. .key = "\x80\xea\xd3\xf1",
  9261. .ksize = 4,
  9262. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  9263. "\x31\x32\x33\x34\x35\x36\x37\x38"
  9264. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  9265. "\x41\x42\x43\x44\x45\x46\x47\x48"
  9266. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  9267. .psize = 40,
  9268. .digest = "\x0c\xb5\xe2\xa2",
  9269. },
  9270. {
  9271. .key = "\xf3\x4a\x1d\x5d",
  9272. .ksize = 4,
  9273. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  9274. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  9275. "\x61\x62\x63\x64\x65\x66\x67\x68"
  9276. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  9277. "\x71\x72\x73\x74\x75\x76\x77\x78",
  9278. .psize = 40,
  9279. .digest = "\xd1\x7f\xfb\xa6",
  9280. },
  9281. {
  9282. .key = "\x2e\x80\x04\x59",
  9283. .ksize = 4,
  9284. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  9285. "\x81\x82\x83\x84\x85\x86\x87\x88"
  9286. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  9287. "\x91\x92\x93\x94\x95\x96\x97\x98"
  9288. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  9289. .psize = 40,
  9290. .digest = "\x59\x33\xe6\x7a",
  9291. },
  9292. {
  9293. .key = "\xa6\xcc\x19\x85",
  9294. .ksize = 4,
  9295. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  9296. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  9297. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  9298. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  9299. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  9300. .psize = 40,
  9301. .digest = "\xbe\x03\x01\xd2",
  9302. },
  9303. {
  9304. .key = "\x41\xfc\xfe\x2d",
  9305. .ksize = 4,
  9306. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  9307. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  9308. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  9309. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  9310. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  9311. .psize = 40,
  9312. .digest = "\x75\xd3\xc5\x24",
  9313. },
  9314. {
  9315. .key = "\xff\xff\xff\xff",
  9316. .ksize = 4,
  9317. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  9318. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  9319. "\x11\x12\x13\x14\x15\x16\x17\x18"
  9320. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  9321. "\x21\x22\x23\x24\x25\x26\x27\x28"
  9322. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  9323. "\x31\x32\x33\x34\x35\x36\x37\x38"
  9324. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  9325. "\x41\x42\x43\x44\x45\x46\x47\x48"
  9326. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  9327. "\x51\x52\x53\x54\x55\x56\x57\x58"
  9328. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  9329. "\x61\x62\x63\x64\x65\x66\x67\x68"
  9330. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  9331. "\x71\x72\x73\x74\x75\x76\x77\x78"
  9332. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  9333. "\x81\x82\x83\x84\x85\x86\x87\x88"
  9334. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  9335. "\x91\x92\x93\x94\x95\x96\x97\x98"
  9336. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  9337. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  9338. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  9339. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  9340. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  9341. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  9342. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  9343. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  9344. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  9345. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  9346. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  9347. .psize = 240,
  9348. .digest = "\x75\xd3\xc5\x24",
  9349. .np = 2,
  9350. .tap = { 31, 209 }
  9351. },
  9352. };
  9353. #endif /* _CRYPTO_TESTMGR_H */