tcrypt.h 279 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567
  1. /*
  2. * Quick & dirty crypto testing module.
  3. *
  4. * This will only exist until we have a better testing mechanism
  5. * (e.g. a char device).
  6. *
  7. * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
  8. * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
  9. * Copyright (c) 2007 Nokia Siemens Networks
  10. *
  11. * This program is free software; you can redistribute it and/or modify it
  12. * under the terms of the GNU General Public License as published by the Free
  13. * Software Foundation; either version 2 of the License, or (at your option)
  14. * any later version.
  15. *
  16. * 2008-04-27 Added RIPEMD tests
  17. * 2007-11-13 Added GCM tests
  18. * 2007-11-13 Added AEAD support
  19. * 2006-12-07 Added SHA384 HMAC and SHA512 HMAC tests
  20. * 2004-08-09 Cipher speed tests by Reyk Floeter <reyk@vantronix.net>
  21. * 2003-09-14 Changes by Kartikey Mahendra Bhatt
  22. *
  23. */
  24. #ifndef _CRYPTO_TCRYPT_H
  25. #define _CRYPTO_TCRYPT_H
  26. #define MAX_DIGEST_SIZE 64
  27. #define MAX_TAP 8
  28. #define MAX_KEYLEN 56
  29. #define MAX_IVLEN 32
  30. struct hash_testvec {
  31. /* only used with keyed hash algorithms */
  32. char *key;
  33. char *plaintext;
  34. char *digest;
  35. unsigned char tap[MAX_TAP];
  36. unsigned char psize;
  37. unsigned char np;
  38. unsigned char ksize;
  39. };
  40. struct cipher_testvec {
  41. char *key;
  42. char *iv;
  43. char *input;
  44. char *result;
  45. unsigned char tap[MAX_TAP];
  46. int np;
  47. unsigned char fail;
  48. unsigned char wk; /* weak key flag */
  49. unsigned char klen;
  50. unsigned short ilen;
  51. unsigned short rlen;
  52. };
  53. struct aead_testvec {
  54. char *key;
  55. char *iv;
  56. char *input;
  57. char *assoc;
  58. char *result;
  59. unsigned char tap[MAX_TAP];
  60. unsigned char atap[MAX_TAP];
  61. int np;
  62. int anp;
  63. unsigned char fail;
  64. unsigned char wk; /* weak key flag */
  65. unsigned char klen;
  66. unsigned short ilen;
  67. unsigned short alen;
  68. unsigned short rlen;
  69. };
  70. struct hash_speed {
  71. unsigned int blen; /* buffer length */
  72. unsigned int plen; /* per-update length */
  73. };
  74. static char zeroed_string[48];
  75. /*
  76. * MD4 test vectors from RFC1320
  77. */
  78. #define MD4_TEST_VECTORS 7
  79. static struct hash_testvec md4_tv_template [] = {
  80. {
  81. .plaintext = "",
  82. .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
  83. "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
  84. }, {
  85. .plaintext = "a",
  86. .psize = 1,
  87. .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
  88. "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
  89. }, {
  90. .plaintext = "abc",
  91. .psize = 3,
  92. .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
  93. "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
  94. }, {
  95. .plaintext = "message digest",
  96. .psize = 14,
  97. .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
  98. "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
  99. }, {
  100. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  101. .psize = 26,
  102. .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
  103. "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
  104. .np = 2,
  105. .tap = { 13, 13 },
  106. }, {
  107. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  108. .psize = 62,
  109. .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
  110. "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
  111. }, {
  112. .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
  113. "45678901234567890",
  114. .psize = 80,
  115. .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
  116. "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
  117. },
  118. };
  119. /*
  120. * MD5 test vectors from RFC1321
  121. */
  122. #define MD5_TEST_VECTORS 7
  123. static struct hash_testvec md5_tv_template[] = {
  124. {
  125. .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
  126. "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
  127. }, {
  128. .plaintext = "a",
  129. .psize = 1,
  130. .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
  131. "\x31\xc3\x99\xe2\x69\x77\x26\x61",
  132. }, {
  133. .plaintext = "abc",
  134. .psize = 3,
  135. .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
  136. "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
  137. }, {
  138. .plaintext = "message digest",
  139. .psize = 14,
  140. .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
  141. "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
  142. }, {
  143. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  144. .psize = 26,
  145. .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
  146. "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
  147. .np = 2,
  148. .tap = {13, 13}
  149. }, {
  150. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  151. .psize = 62,
  152. .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
  153. "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
  154. }, {
  155. .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
  156. "345678901234567890",
  157. .psize = 80,
  158. .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
  159. "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
  160. }
  161. };
  162. /*
  163. * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
  164. */
  165. #define RMD128_TEST_VECTORS 10
  166. static struct hash_testvec rmd128_tv_template[] = {
  167. {
  168. .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
  169. "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
  170. }, {
  171. .plaintext = "a",
  172. .psize = 1,
  173. .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
  174. "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
  175. }, {
  176. .plaintext = "abc",
  177. .psize = 3,
  178. .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
  179. "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
  180. }, {
  181. .plaintext = "message digest",
  182. .psize = 14,
  183. .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
  184. "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
  185. }, {
  186. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  187. .psize = 26,
  188. .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
  189. "\x10\x71\x49\x22\xb3\x71\x83\x4e",
  190. }, {
  191. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  192. "fghijklmnopqrstuvwxyz0123456789",
  193. .psize = 62,
  194. .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
  195. "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
  196. }, {
  197. .plaintext = "1234567890123456789012345678901234567890"
  198. "1234567890123456789012345678901234567890",
  199. .psize = 80,
  200. .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
  201. "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
  202. }, {
  203. .plaintext = "abcdbcdecdefdefgefghfghighij"
  204. "hijkijkljklmklmnlmnomnopnopq",
  205. .psize = 56,
  206. .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
  207. "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
  208. .np = 2,
  209. .tap = { 28, 28 },
  210. }, {
  211. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  212. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  213. "lmnopqrsmnopqrstnopqrstu",
  214. .psize = 112,
  215. .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
  216. "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
  217. }, {
  218. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  219. .psize = 32,
  220. .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
  221. "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
  222. }
  223. };
  224. /*
  225. * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
  226. */
  227. #define RMD160_TEST_VECTORS 10
  228. static struct hash_testvec rmd160_tv_template[] = {
  229. {
  230. .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
  231. "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
  232. }, {
  233. .plaintext = "a",
  234. .psize = 1,
  235. .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
  236. "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
  237. }, {
  238. .plaintext = "abc",
  239. .psize = 3,
  240. .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
  241. "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
  242. }, {
  243. .plaintext = "message digest",
  244. .psize = 14,
  245. .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
  246. "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
  247. }, {
  248. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  249. .psize = 26,
  250. .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
  251. "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
  252. }, {
  253. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  254. "fghijklmnopqrstuvwxyz0123456789",
  255. .psize = 62,
  256. .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
  257. "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
  258. }, {
  259. .plaintext = "1234567890123456789012345678901234567890"
  260. "1234567890123456789012345678901234567890",
  261. .psize = 80,
  262. .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
  263. "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
  264. }, {
  265. .plaintext = "abcdbcdecdefdefgefghfghighij"
  266. "hijkijkljklmklmnlmnomnopnopq",
  267. .psize = 56,
  268. .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
  269. "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
  270. .np = 2,
  271. .tap = { 28, 28 },
  272. }, {
  273. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  274. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  275. "lmnopqrsmnopqrstnopqrstu",
  276. .psize = 112,
  277. .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
  278. "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
  279. }, {
  280. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  281. .psize = 32,
  282. .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
  283. "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
  284. }
  285. };
  286. /*
  287. * SHA1 test vectors from from FIPS PUB 180-1
  288. */
  289. #define SHA1_TEST_VECTORS 2
  290. static struct hash_testvec sha1_tv_template[] = {
  291. {
  292. .plaintext = "abc",
  293. .psize = 3,
  294. .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
  295. "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
  296. }, {
  297. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  298. .psize = 56,
  299. .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
  300. "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
  301. .np = 2,
  302. .tap = { 28, 28 }
  303. }
  304. };
  305. /*
  306. * SHA224 test vectors from from FIPS PUB 180-2
  307. */
  308. #define SHA224_TEST_VECTORS 2
  309. static struct hash_testvec sha224_tv_template[] = {
  310. {
  311. .plaintext = "abc",
  312. .psize = 3,
  313. .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
  314. "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
  315. "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
  316. "\xE3\x6C\x9D\xA7",
  317. }, {
  318. .plaintext =
  319. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  320. .psize = 56,
  321. .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
  322. "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
  323. "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
  324. "\x52\x52\x25\x25",
  325. .np = 2,
  326. .tap = { 28, 28 }
  327. }
  328. };
  329. /*
  330. * SHA256 test vectors from from NIST
  331. */
  332. #define SHA256_TEST_VECTORS 2
  333. static struct hash_testvec sha256_tv_template[] = {
  334. {
  335. .plaintext = "abc",
  336. .psize = 3,
  337. .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
  338. "\x41\x41\x40\xde\x5d\xae\x22\x23"
  339. "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
  340. "\xb4\x10\xff\x61\xf2\x00\x15\xad",
  341. }, {
  342. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  343. .psize = 56,
  344. .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
  345. "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
  346. "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
  347. "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
  348. .np = 2,
  349. .tap = { 28, 28 }
  350. },
  351. };
  352. /*
  353. * SHA384 test vectors from from NIST and kerneli
  354. */
  355. #define SHA384_TEST_VECTORS 4
  356. static struct hash_testvec sha384_tv_template[] = {
  357. {
  358. .plaintext= "abc",
  359. .psize = 3,
  360. .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
  361. "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
  362. "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
  363. "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
  364. "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
  365. "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
  366. }, {
  367. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  368. .psize = 56,
  369. .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
  370. "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
  371. "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
  372. "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
  373. "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
  374. "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
  375. }, {
  376. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  377. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  378. .psize = 112,
  379. .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
  380. "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
  381. "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
  382. "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
  383. "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
  384. "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
  385. }, {
  386. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  387. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  388. .psize = 104,
  389. .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
  390. "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
  391. "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
  392. "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
  393. "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
  394. "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
  395. .np = 4,
  396. .tap = { 26, 26, 26, 26 }
  397. },
  398. };
  399. /*
  400. * SHA512 test vectors from from NIST and kerneli
  401. */
  402. #define SHA512_TEST_VECTORS 4
  403. static struct hash_testvec sha512_tv_template[] = {
  404. {
  405. .plaintext = "abc",
  406. .psize = 3,
  407. .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
  408. "\xcc\x41\x73\x49\xae\x20\x41\x31"
  409. "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
  410. "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
  411. "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
  412. "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
  413. "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
  414. "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
  415. }, {
  416. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  417. .psize = 56,
  418. .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
  419. "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
  420. "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
  421. "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
  422. "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
  423. "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
  424. "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
  425. "\x54\xec\x63\x12\x38\xca\x34\x45",
  426. }, {
  427. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  428. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  429. .psize = 112,
  430. .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
  431. "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
  432. "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
  433. "\x72\x99\xae\xad\xb6\x88\x90\x18"
  434. "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
  435. "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
  436. "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
  437. "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
  438. }, {
  439. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  440. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  441. .psize = 104,
  442. .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
  443. "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
  444. "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
  445. "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
  446. "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
  447. "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
  448. "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
  449. "\xed\xb4\x19\x87\x23\x28\x50\xc9",
  450. .np = 4,
  451. .tap = { 26, 26, 26, 26 }
  452. },
  453. };
  454. /*
  455. * WHIRLPOOL test vectors from Whirlpool package
  456. * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
  457. * submission
  458. */
  459. #define WP512_TEST_VECTORS 8
  460. static struct hash_testvec wp512_tv_template[] = {
  461. {
  462. .plaintext = "",
  463. .psize = 0,
  464. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  465. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  466. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  467. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  468. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  469. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
  470. "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
  471. "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
  472. }, {
  473. .plaintext = "a",
  474. .psize = 1,
  475. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  476. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  477. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  478. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  479. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  480. "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
  481. "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
  482. "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
  483. }, {
  484. .plaintext = "abc",
  485. .psize = 3,
  486. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  487. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  488. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  489. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  490. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  491. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
  492. "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
  493. "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
  494. }, {
  495. .plaintext = "message digest",
  496. .psize = 14,
  497. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  498. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  499. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  500. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  501. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  502. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
  503. "\x92\xED\x92\x00\x52\x83\x8F\x33"
  504. "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
  505. }, {
  506. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  507. .psize = 26,
  508. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  509. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  510. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  511. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  512. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  513. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
  514. "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
  515. "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
  516. }, {
  517. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  518. "abcdefghijklmnopqrstuvwxyz0123456789",
  519. .psize = 62,
  520. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  521. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  522. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  523. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  524. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  525. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
  526. "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
  527. "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
  528. }, {
  529. .plaintext = "1234567890123456789012345678901234567890"
  530. "1234567890123456789012345678901234567890",
  531. .psize = 80,
  532. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  533. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  534. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  535. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  536. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  537. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
  538. "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
  539. "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
  540. }, {
  541. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  542. .psize = 32,
  543. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  544. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  545. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  546. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  547. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  548. "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
  549. "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
  550. "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
  551. },
  552. };
  553. #define WP384_TEST_VECTORS 8
  554. static struct hash_testvec wp384_tv_template[] = {
  555. {
  556. .plaintext = "",
  557. .psize = 0,
  558. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  559. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  560. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  561. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  562. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  563. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
  564. }, {
  565. .plaintext = "a",
  566. .psize = 1,
  567. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  568. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  569. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  570. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  571. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  572. "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
  573. }, {
  574. .plaintext = "abc",
  575. .psize = 3,
  576. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  577. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  578. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  579. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  580. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  581. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
  582. }, {
  583. .plaintext = "message digest",
  584. .psize = 14,
  585. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  586. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  587. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  588. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  589. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  590. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
  591. }, {
  592. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  593. .psize = 26,
  594. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  595. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  596. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  597. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  598. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  599. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
  600. }, {
  601. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  602. "abcdefghijklmnopqrstuvwxyz0123456789",
  603. .psize = 62,
  604. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  605. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  606. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  607. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  608. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  609. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
  610. }, {
  611. .plaintext = "1234567890123456789012345678901234567890"
  612. "1234567890123456789012345678901234567890",
  613. .psize = 80,
  614. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  615. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  616. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  617. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  618. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  619. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
  620. }, {
  621. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  622. .psize = 32,
  623. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  624. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  625. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  626. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  627. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  628. "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
  629. },
  630. };
  631. #define WP256_TEST_VECTORS 8
  632. static struct hash_testvec wp256_tv_template[] = {
  633. {
  634. .plaintext = "",
  635. .psize = 0,
  636. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  637. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  638. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  639. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
  640. }, {
  641. .plaintext = "a",
  642. .psize = 1,
  643. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  644. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  645. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  646. "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
  647. }, {
  648. .plaintext = "abc",
  649. .psize = 3,
  650. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  651. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  652. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  653. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
  654. }, {
  655. .plaintext = "message digest",
  656. .psize = 14,
  657. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  658. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  659. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  660. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
  661. }, {
  662. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  663. .psize = 26,
  664. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  665. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  666. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  667. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
  668. }, {
  669. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  670. "abcdefghijklmnopqrstuvwxyz0123456789",
  671. .psize = 62,
  672. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  673. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  674. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  675. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
  676. }, {
  677. .plaintext = "1234567890123456789012345678901234567890"
  678. "1234567890123456789012345678901234567890",
  679. .psize = 80,
  680. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  681. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  682. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  683. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
  684. }, {
  685. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  686. .psize = 32,
  687. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  688. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  689. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  690. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
  691. },
  692. };
  693. /*
  694. * TIGER test vectors from Tiger website
  695. */
  696. #define TGR192_TEST_VECTORS 6
  697. static struct hash_testvec tgr192_tv_template[] = {
  698. {
  699. .plaintext = "",
  700. .psize = 0,
  701. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  702. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  703. "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
  704. }, {
  705. .plaintext = "abc",
  706. .psize = 3,
  707. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  708. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  709. "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
  710. }, {
  711. .plaintext = "Tiger",
  712. .psize = 5,
  713. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  714. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  715. "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
  716. }, {
  717. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  718. .psize = 64,
  719. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  720. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  721. "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
  722. }, {
  723. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  724. .psize = 64,
  725. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  726. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  727. "\x57\x89\x65\x65\x97\x5f\x91\x97",
  728. }, {
  729. .plaintext = "Tiger - A Fast New Hash Function, "
  730. "by Ross Anderson and Eli Biham, "
  731. "proceedings of Fast Software Encryption 3, "
  732. "Cambridge, 1996.",
  733. .psize = 125,
  734. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  735. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  736. "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
  737. },
  738. };
  739. #define TGR160_TEST_VECTORS 6
  740. static struct hash_testvec tgr160_tv_template[] = {
  741. {
  742. .plaintext = "",
  743. .psize = 0,
  744. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  745. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  746. "\xf3\x73\xde\x2d",
  747. }, {
  748. .plaintext = "abc",
  749. .psize = 3,
  750. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  751. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  752. "\x93\x5f\x7b\x95",
  753. }, {
  754. .plaintext = "Tiger",
  755. .psize = 5,
  756. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  757. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  758. "\x37\x79\x0c\x11",
  759. }, {
  760. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  761. .psize = 64,
  762. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  763. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  764. "\xb5\x86\x44\x50",
  765. }, {
  766. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  767. .psize = 64,
  768. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  769. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  770. "\x57\x89\x65\x65",
  771. }, {
  772. .plaintext = "Tiger - A Fast New Hash Function, "
  773. "by Ross Anderson and Eli Biham, "
  774. "proceedings of Fast Software Encryption 3, "
  775. "Cambridge, 1996.",
  776. .psize = 125,
  777. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  778. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  779. "\xdd\x68\x15\x1d",
  780. },
  781. };
  782. #define TGR128_TEST_VECTORS 6
  783. static struct hash_testvec tgr128_tv_template[] = {
  784. {
  785. .plaintext = "",
  786. .psize = 0,
  787. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  788. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
  789. }, {
  790. .plaintext = "abc",
  791. .psize = 3,
  792. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  793. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
  794. }, {
  795. .plaintext = "Tiger",
  796. .psize = 5,
  797. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  798. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
  799. }, {
  800. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  801. .psize = 64,
  802. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  803. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
  804. }, {
  805. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  806. .psize = 64,
  807. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  808. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
  809. }, {
  810. .plaintext = "Tiger - A Fast New Hash Function, "
  811. "by Ross Anderson and Eli Biham, "
  812. "proceedings of Fast Software Encryption 3, "
  813. "Cambridge, 1996.",
  814. .psize = 125,
  815. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  816. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
  817. },
  818. };
  819. /*
  820. * HMAC-MD5 test vectors from RFC2202
  821. * (These need to be fixed to not use strlen).
  822. */
  823. #define HMAC_MD5_TEST_VECTORS 7
  824. static struct hash_testvec hmac_md5_tv_template[] =
  825. {
  826. {
  827. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  828. .ksize = 16,
  829. .plaintext = "Hi There",
  830. .psize = 8,
  831. .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
  832. "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
  833. }, {
  834. .key = "Jefe",
  835. .ksize = 4,
  836. .plaintext = "what do ya want for nothing?",
  837. .psize = 28,
  838. .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
  839. "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
  840. .np = 2,
  841. .tap = {14, 14}
  842. }, {
  843. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  844. .ksize = 16,
  845. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  846. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  847. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  848. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  849. .psize = 50,
  850. .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
  851. "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
  852. }, {
  853. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  854. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  855. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  856. .ksize = 25,
  857. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  858. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  859. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  860. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  861. .psize = 50,
  862. .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
  863. "\x3a\x75\x16\x47\x46\xff\xaa\x79",
  864. }, {
  865. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  866. .ksize = 16,
  867. .plaintext = "Test With Truncation",
  868. .psize = 20,
  869. .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
  870. "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
  871. }, {
  872. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  873. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  874. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  875. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  876. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  877. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  878. "\xaa\xaa",
  879. .ksize = 80,
  880. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  881. .psize = 54,
  882. .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
  883. "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
  884. }, {
  885. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  886. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  887. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  888. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  889. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  890. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  891. "\xaa\xaa",
  892. .ksize = 80,
  893. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  894. "Block-Size Data",
  895. .psize = 73,
  896. .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
  897. "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
  898. },
  899. };
  900. /*
  901. * HMAC-RIPEMD128 test vectors from RFC2286
  902. */
  903. #define HMAC_RMD128_TEST_VECTORS 7
  904. static struct hash_testvec hmac_rmd128_tv_template[] = {
  905. {
  906. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  907. .ksize = 16,
  908. .plaintext = "Hi There",
  909. .psize = 8,
  910. .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
  911. "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
  912. }, {
  913. .key = "Jefe",
  914. .ksize = 4,
  915. .plaintext = "what do ya want for nothing?",
  916. .psize = 28,
  917. .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
  918. "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
  919. .np = 2,
  920. .tap = { 14, 14 },
  921. }, {
  922. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  923. .ksize = 16,
  924. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  925. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  926. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  927. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  928. .psize = 50,
  929. .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
  930. "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
  931. }, {
  932. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  933. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  934. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  935. .ksize = 25,
  936. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  937. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  938. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  939. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  940. .psize = 50,
  941. .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
  942. "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
  943. }, {
  944. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  945. .ksize = 16,
  946. .plaintext = "Test With Truncation",
  947. .psize = 20,
  948. .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
  949. "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
  950. }, {
  951. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  952. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  953. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  954. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  955. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  956. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  957. "\xaa\xaa",
  958. .ksize = 80,
  959. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  960. .psize = 54,
  961. .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
  962. "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
  963. }, {
  964. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  965. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  966. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  967. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  968. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  969. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  970. "\xaa\xaa",
  971. .ksize = 80,
  972. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  973. "Block-Size Data",
  974. .psize = 73,
  975. .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
  976. "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
  977. },
  978. };
  979. /*
  980. * HMAC-RIPEMD160 test vectors from RFC2286
  981. */
  982. #define HMAC_RMD160_TEST_VECTORS 7
  983. static struct hash_testvec hmac_rmd160_tv_template[] = {
  984. {
  985. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  986. .ksize = 20,
  987. .plaintext = "Hi There",
  988. .psize = 8,
  989. .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
  990. "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
  991. }, {
  992. .key = "Jefe",
  993. .ksize = 4,
  994. .plaintext = "what do ya want for nothing?",
  995. .psize = 28,
  996. .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
  997. "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
  998. .np = 2,
  999. .tap = { 14, 14 },
  1000. }, {
  1001. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1002. .ksize = 20,
  1003. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1004. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1005. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1006. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1007. .psize = 50,
  1008. .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
  1009. "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
  1010. }, {
  1011. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1012. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1013. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1014. .ksize = 25,
  1015. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1016. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1017. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1018. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1019. .psize = 50,
  1020. .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
  1021. "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
  1022. }, {
  1023. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1024. .ksize = 20,
  1025. .plaintext = "Test With Truncation",
  1026. .psize = 20,
  1027. .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
  1028. "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
  1029. }, {
  1030. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1031. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1032. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1033. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1034. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1035. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1036. "\xaa\xaa",
  1037. .ksize = 80,
  1038. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1039. .psize = 54,
  1040. .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
  1041. "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
  1042. }, {
  1043. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1044. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1045. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1046. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1047. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1048. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1049. "\xaa\xaa",
  1050. .ksize = 80,
  1051. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1052. "Block-Size Data",
  1053. .psize = 73,
  1054. .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
  1055. "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
  1056. },
  1057. };
  1058. /*
  1059. * HMAC-SHA1 test vectors from RFC2202
  1060. */
  1061. #define HMAC_SHA1_TEST_VECTORS 7
  1062. static struct hash_testvec hmac_sha1_tv_template[] = {
  1063. {
  1064. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1065. .ksize = 20,
  1066. .plaintext = "Hi There",
  1067. .psize = 8,
  1068. .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
  1069. "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
  1070. "\x46\xbe",
  1071. }, {
  1072. .key = "Jefe",
  1073. .ksize = 4,
  1074. .plaintext = "what do ya want for nothing?",
  1075. .psize = 28,
  1076. .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
  1077. "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
  1078. .np = 2,
  1079. .tap = { 14, 14 }
  1080. }, {
  1081. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1082. .ksize = 20,
  1083. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1084. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1085. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1086. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1087. .psize = 50,
  1088. .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
  1089. "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
  1090. }, {
  1091. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1092. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1093. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1094. .ksize = 25,
  1095. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1096. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1097. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1098. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1099. .psize = 50,
  1100. .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
  1101. "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
  1102. }, {
  1103. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1104. .ksize = 20,
  1105. .plaintext = "Test With Truncation",
  1106. .psize = 20,
  1107. .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
  1108. "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
  1109. }, {
  1110. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1111. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1112. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1113. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1114. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1115. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1116. "\xaa\xaa",
  1117. .ksize = 80,
  1118. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1119. .psize = 54,
  1120. .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
  1121. "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
  1122. }, {
  1123. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1124. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1125. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1126. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1127. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1128. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1129. "\xaa\xaa",
  1130. .ksize = 80,
  1131. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1132. "Block-Size Data",
  1133. .psize = 73,
  1134. .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
  1135. "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
  1136. },
  1137. };
  1138. /*
  1139. * SHA224 HMAC test vectors from RFC4231
  1140. */
  1141. #define HMAC_SHA224_TEST_VECTORS 4
  1142. static struct hash_testvec hmac_sha224_tv_template[] = {
  1143. {
  1144. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1145. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1146. "\x0b\x0b\x0b\x0b",
  1147. .ksize = 20,
  1148. /* ("Hi There") */
  1149. .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
  1150. .psize = 8,
  1151. .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
  1152. "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
  1153. "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
  1154. "\x53\x68\x4b\x22",
  1155. }, {
  1156. .key = "Jefe",
  1157. .ksize = 4,
  1158. /* ("what do ya want for nothing?") */
  1159. .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
  1160. "\x79\x61\x20\x77\x61\x6e\x74\x20"
  1161. "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
  1162. "\x69\x6e\x67\x3f",
  1163. .psize = 28,
  1164. .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
  1165. "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
  1166. "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
  1167. "\x8f\xd0\x5e\x44",
  1168. .np = 4,
  1169. .tap = { 7, 7, 7, 7 }
  1170. }, {
  1171. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1172. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1173. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1174. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1175. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1176. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1177. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1178. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1179. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1180. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1181. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1182. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1183. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1184. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1185. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1186. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1187. "\xaa\xaa\xaa",
  1188. .ksize = 131,
  1189. /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
  1190. .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
  1191. "\x6e\x67\x20\x4c\x61\x72\x67\x65"
  1192. "\x72\x20\x54\x68\x61\x6e\x20\x42"
  1193. "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
  1194. "\x65\x20\x4b\x65\x79\x20\x2d\x20"
  1195. "\x48\x61\x73\x68\x20\x4b\x65\x79"
  1196. "\x20\x46\x69\x72\x73\x74",
  1197. .psize = 54,
  1198. .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
  1199. "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
  1200. "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
  1201. "\x3f\xa6\x87\x0e",
  1202. }, {
  1203. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1204. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1205. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1206. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1207. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1208. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1209. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1210. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1211. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1212. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1213. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1214. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1215. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1216. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1217. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1218. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1219. "\xaa\xaa\xaa",
  1220. .ksize = 131,
  1221. /* ("This is a test using a larger than block-size key and a")
  1222. (" larger than block-size data. The key needs to be")
  1223. (" hashed before being used by the HMAC algorithm.") */
  1224. .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
  1225. "\x61\x20\x74\x65\x73\x74\x20\x75"
  1226. "\x73\x69\x6e\x67\x20\x61\x20\x6c"
  1227. "\x61\x72\x67\x65\x72\x20\x74\x68"
  1228. "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
  1229. "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
  1230. "\x79\x20\x61\x6e\x64\x20\x61\x20"
  1231. "\x6c\x61\x72\x67\x65\x72\x20\x74"
  1232. "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
  1233. "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
  1234. "\x61\x74\x61\x2e\x20\x54\x68\x65"
  1235. "\x20\x6b\x65\x79\x20\x6e\x65\x65"
  1236. "\x64\x73\x20\x74\x6f\x20\x62\x65"
  1237. "\x20\x68\x61\x73\x68\x65\x64\x20"
  1238. "\x62\x65\x66\x6f\x72\x65\x20\x62"
  1239. "\x65\x69\x6e\x67\x20\x75\x73\x65"
  1240. "\x64\x20\x62\x79\x20\x74\x68\x65"
  1241. "\x20\x48\x4d\x41\x43\x20\x61\x6c"
  1242. "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
  1243. .psize = 152,
  1244. .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
  1245. "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
  1246. "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
  1247. "\xf6\xf5\x65\xd1",
  1248. },
  1249. };
  1250. /*
  1251. * HMAC-SHA256 test vectors from
  1252. * draft-ietf-ipsec-ciph-sha-256-01.txt
  1253. */
  1254. #define HMAC_SHA256_TEST_VECTORS 10
  1255. static struct hash_testvec hmac_sha256_tv_template[] = {
  1256. {
  1257. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1258. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1259. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1260. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1261. .ksize = 32,
  1262. .plaintext = "abc",
  1263. .psize = 3,
  1264. .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
  1265. "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
  1266. "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
  1267. "\x92\x75\x90\x21\xcf\xab\x81\x81",
  1268. }, {
  1269. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1270. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1271. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1272. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1273. .ksize = 32,
  1274. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1275. .psize = 56,
  1276. .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
  1277. "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
  1278. "\xe6\x98\xe3\x61\x19\x42\x11\x49"
  1279. "\xea\x8c\x71\x24\x56\x69\x7d\x30",
  1280. }, {
  1281. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1282. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1283. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1284. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1285. .ksize = 32,
  1286. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
  1287. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1288. .psize = 112,
  1289. .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
  1290. "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
  1291. "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
  1292. "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
  1293. }, {
  1294. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1295. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1296. "\x0b\x0b\x0b\x0b\x0b\x0b",
  1297. .ksize = 32,
  1298. .plaintext = "Hi There",
  1299. .psize = 8,
  1300. .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
  1301. "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
  1302. "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
  1303. "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
  1304. }, {
  1305. .key = "Jefe",
  1306. .ksize = 4,
  1307. .plaintext = "what do ya want for nothing?",
  1308. .psize = 28,
  1309. .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
  1310. "\x6a\x04\x24\x26\x08\x95\x75\xc7"
  1311. "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
  1312. "\x9d\xec\x58\xb9\x64\xec\x38\x43",
  1313. .np = 2,
  1314. .tap = { 14, 14 }
  1315. }, {
  1316. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1317. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1318. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1319. .ksize = 32,
  1320. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1321. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1322. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1323. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1324. .psize = 50,
  1325. .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
  1326. "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
  1327. "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
  1328. "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
  1329. }, {
  1330. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1331. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1332. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1333. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  1334. "\x21\x22\x23\x24\x25",
  1335. .ksize = 37,
  1336. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1337. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1338. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1339. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1340. .psize = 50,
  1341. .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
  1342. "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
  1343. "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
  1344. "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
  1345. }, {
  1346. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1347. "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1348. "\x0c\x0c\x0c\x0c\x0c\x0c",
  1349. .ksize = 32,
  1350. .plaintext = "Test With Truncation",
  1351. .psize = 20,
  1352. .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
  1353. "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
  1354. "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
  1355. "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
  1356. }, {
  1357. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1358. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1359. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1360. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1361. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1362. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1363. "\xaa\xaa",
  1364. .ksize = 80,
  1365. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1366. .psize = 54,
  1367. .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
  1368. "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
  1369. "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
  1370. "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
  1371. }, {
  1372. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1373. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1374. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1375. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1376. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1377. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1378. "\xaa\xaa",
  1379. .ksize = 80,
  1380. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
  1381. "One Block-Size Data",
  1382. .psize = 73,
  1383. .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
  1384. "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
  1385. "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
  1386. "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
  1387. },
  1388. };
  1389. #define XCBC_AES_TEST_VECTORS 6
  1390. static struct hash_testvec aes_xcbc128_tv_template[] = {
  1391. {
  1392. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1393. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1394. .plaintext = zeroed_string,
  1395. .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
  1396. "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
  1397. .psize = 0,
  1398. .ksize = 16,
  1399. }, {
  1400. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1401. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1402. .plaintext = "\x00\x01\x02",
  1403. .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
  1404. "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
  1405. .psize = 3,
  1406. .ksize = 16,
  1407. } , {
  1408. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1409. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1410. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1411. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1412. .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
  1413. "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
  1414. .psize = 16,
  1415. .ksize = 16,
  1416. }, {
  1417. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1418. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1419. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1420. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1421. "\x10\x11\x12\x13",
  1422. .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
  1423. "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
  1424. .tap = { 10, 10 },
  1425. .psize = 20,
  1426. .np = 2,
  1427. .ksize = 16,
  1428. }, {
  1429. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1430. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1431. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1432. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1433. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1434. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  1435. .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
  1436. "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
  1437. .psize = 32,
  1438. .ksize = 16,
  1439. }, {
  1440. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1441. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1442. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1443. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1444. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1445. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  1446. "\x20\x21",
  1447. .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
  1448. "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
  1449. .tap = { 17, 17 },
  1450. .psize = 34,
  1451. .np = 2,
  1452. .ksize = 16,
  1453. }
  1454. };
  1455. /*
  1456. * SHA384 HMAC test vectors from RFC4231
  1457. */
  1458. #define HMAC_SHA384_TEST_VECTORS 4
  1459. static struct hash_testvec hmac_sha384_tv_template[] = {
  1460. {
  1461. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1462. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1463. "\x0b\x0b\x0b\x0b",
  1464. .ksize = 20,
  1465. .plaintext = "Hi There",
  1466. .psize = 8,
  1467. .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
  1468. "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
  1469. "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
  1470. "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
  1471. "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
  1472. "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
  1473. }, {
  1474. .key = "Jefe",
  1475. .ksize = 4,
  1476. .plaintext = "what do ya want for nothing?",
  1477. .psize = 28,
  1478. .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
  1479. "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
  1480. "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
  1481. "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
  1482. "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
  1483. "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
  1484. .np = 4,
  1485. .tap = { 7, 7, 7, 7 }
  1486. }, {
  1487. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1488. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1489. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1490. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1491. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1492. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1493. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1494. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1495. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1496. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1497. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1498. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1499. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1500. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1501. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1502. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1503. "\xaa\xaa\xaa",
  1504. .ksize = 131,
  1505. .plaintext = "Test Using Larger Than Block-Siz"
  1506. "e Key - Hash Key First",
  1507. .psize = 54,
  1508. .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
  1509. "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
  1510. "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
  1511. "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
  1512. "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
  1513. "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
  1514. }, {
  1515. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1516. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1517. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1518. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1519. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1520. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1521. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1522. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1523. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1524. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1525. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1526. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1527. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1528. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1529. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1530. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1531. "\xaa\xaa\xaa",
  1532. .ksize = 131,
  1533. .plaintext = "This is a test u"
  1534. "sing a larger th"
  1535. "an block-size ke"
  1536. "y and a larger t"
  1537. "han block-size d"
  1538. "ata. The key nee"
  1539. "ds to be hashed "
  1540. "before being use"
  1541. "d by the HMAC al"
  1542. "gorithm.",
  1543. .psize = 152,
  1544. .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
  1545. "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
  1546. "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
  1547. "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
  1548. "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
  1549. "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
  1550. },
  1551. };
  1552. /*
  1553. * SHA512 HMAC test vectors from RFC4231
  1554. */
  1555. #define HMAC_SHA512_TEST_VECTORS 4
  1556. static struct hash_testvec hmac_sha512_tv_template[] = {
  1557. {
  1558. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1559. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1560. "\x0b\x0b\x0b\x0b",
  1561. .ksize = 20,
  1562. .plaintext = "Hi There",
  1563. .psize = 8,
  1564. .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
  1565. "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
  1566. "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
  1567. "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
  1568. "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
  1569. "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
  1570. "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
  1571. "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
  1572. }, {
  1573. .key = "Jefe",
  1574. .ksize = 4,
  1575. .plaintext = "what do ya want for nothing?",
  1576. .psize = 28,
  1577. .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
  1578. "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
  1579. "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
  1580. "\x10\x27\x0c\xd7\xea\x25\x05\x54"
  1581. "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
  1582. "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
  1583. "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
  1584. "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
  1585. .np = 4,
  1586. .tap = { 7, 7, 7, 7 }
  1587. }, {
  1588. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1589. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1590. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1591. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1592. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1593. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1594. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1595. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1596. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1597. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1598. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1599. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1600. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1601. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1602. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1603. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1604. "\xaa\xaa\xaa",
  1605. .ksize = 131,
  1606. .plaintext = "Test Using Large"
  1607. "r Than Block-Siz"
  1608. "e Key - Hash Key"
  1609. " First",
  1610. .psize = 54,
  1611. .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
  1612. "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
  1613. "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
  1614. "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
  1615. "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
  1616. "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
  1617. "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
  1618. "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
  1619. }, {
  1620. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1621. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1622. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1623. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1624. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1625. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1626. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1627. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1628. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1629. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1630. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1631. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1632. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1633. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1634. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1635. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1636. "\xaa\xaa\xaa",
  1637. .ksize = 131,
  1638. .plaintext =
  1639. "This is a test u"
  1640. "sing a larger th"
  1641. "an block-size ke"
  1642. "y and a larger t"
  1643. "han block-size d"
  1644. "ata. The key nee"
  1645. "ds to be hashed "
  1646. "before being use"
  1647. "d by the HMAC al"
  1648. "gorithm.",
  1649. .psize = 152,
  1650. .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
  1651. "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
  1652. "\xde\xbd\x71\xf8\x86\x72\x89\x86"
  1653. "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
  1654. "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
  1655. "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
  1656. "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
  1657. "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
  1658. },
  1659. };
  1660. /*
  1661. * DES test vectors.
  1662. */
  1663. #define DES_ENC_TEST_VECTORS 10
  1664. #define DES_DEC_TEST_VECTORS 4
  1665. #define DES_CBC_ENC_TEST_VECTORS 5
  1666. #define DES_CBC_DEC_TEST_VECTORS 4
  1667. #define DES3_EDE_ENC_TEST_VECTORS 3
  1668. #define DES3_EDE_DEC_TEST_VECTORS 3
  1669. static struct cipher_testvec des_enc_tv_template[] = {
  1670. { /* From Applied Cryptography */
  1671. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1672. .klen = 8,
  1673. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1674. .ilen = 8,
  1675. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1676. .rlen = 8,
  1677. }, { /* Same key, different plaintext block */
  1678. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1679. .klen = 8,
  1680. .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
  1681. .ilen = 8,
  1682. .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1683. .rlen = 8,
  1684. }, { /* Sbox test from NBS */
  1685. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1686. .klen = 8,
  1687. .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1688. .ilen = 8,
  1689. .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1690. .rlen = 8,
  1691. }, { /* Three blocks */
  1692. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1693. .klen = 8,
  1694. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1695. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1696. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1697. .ilen = 24,
  1698. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1699. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1700. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1701. .rlen = 24,
  1702. }, { /* Weak key */
  1703. .fail = 1,
  1704. .wk = 1,
  1705. .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
  1706. .klen = 8,
  1707. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1708. .ilen = 8,
  1709. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1710. .rlen = 8,
  1711. }, { /* Two blocks -- for testing encryption across pages */
  1712. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1713. .klen = 8,
  1714. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1715. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1716. .ilen = 16,
  1717. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1718. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1719. .rlen = 16,
  1720. .np = 2,
  1721. .tap = { 8, 8 }
  1722. }, { /* Four blocks -- for testing encryption with chunking */
  1723. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1724. .klen = 8,
  1725. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1726. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1727. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
  1728. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1729. .ilen = 32,
  1730. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1731. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1732. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
  1733. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1734. .rlen = 32,
  1735. .np = 3,
  1736. .tap = { 14, 10, 8 }
  1737. }, {
  1738. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1739. .klen = 8,
  1740. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1741. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1742. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1743. .ilen = 24,
  1744. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1745. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1746. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1747. .rlen = 24,
  1748. .np = 4,
  1749. .tap = { 2, 1, 3, 18 }
  1750. }, {
  1751. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1752. .klen = 8,
  1753. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1754. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1755. .ilen = 16,
  1756. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1757. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1758. .rlen = 16,
  1759. .np = 5,
  1760. .tap = { 2, 2, 2, 2, 8 }
  1761. }, {
  1762. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1763. .klen = 8,
  1764. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1765. .ilen = 8,
  1766. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1767. .rlen = 8,
  1768. .np = 8,
  1769. .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
  1770. },
  1771. };
  1772. static struct cipher_testvec des_dec_tv_template[] = {
  1773. { /* From Applied Cryptography */
  1774. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1775. .klen = 8,
  1776. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1777. .ilen = 8,
  1778. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1779. .rlen = 8,
  1780. }, { /* Sbox test from NBS */
  1781. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1782. .klen = 8,
  1783. .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1784. .ilen = 8,
  1785. .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1786. .rlen = 8,
  1787. }, { /* Two blocks, for chunking test */
  1788. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1789. .klen = 8,
  1790. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1791. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1792. .ilen = 16,
  1793. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1794. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  1795. .rlen = 16,
  1796. .np = 2,
  1797. .tap = { 8, 8 }
  1798. }, {
  1799. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1800. .klen = 8,
  1801. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1802. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1803. .ilen = 16,
  1804. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1805. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  1806. .rlen = 16,
  1807. .np = 3,
  1808. .tap = { 3, 12, 1 }
  1809. },
  1810. };
  1811. static struct cipher_testvec des_cbc_enc_tv_template[] = {
  1812. { /* From OpenSSL */
  1813. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1814. .klen = 8,
  1815. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  1816. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  1817. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  1818. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  1819. .ilen = 24,
  1820. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  1821. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  1822. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  1823. .rlen = 24,
  1824. }, { /* FIPS Pub 81 */
  1825. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1826. .klen = 8,
  1827. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  1828. .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  1829. .ilen = 8,
  1830. .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1831. .rlen = 8,
  1832. }, {
  1833. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1834. .klen = 8,
  1835. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1836. .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  1837. .ilen = 8,
  1838. .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  1839. .rlen = 8,
  1840. }, {
  1841. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1842. .klen = 8,
  1843. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  1844. .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  1845. .ilen = 8,
  1846. .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  1847. .rlen = 8,
  1848. }, { /* Copy of openssl vector for chunk testing */
  1849. /* From OpenSSL */
  1850. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1851. .klen = 8,
  1852. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  1853. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  1854. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  1855. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  1856. .ilen = 24,
  1857. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  1858. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  1859. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  1860. .rlen = 24,
  1861. .np = 2,
  1862. .tap = { 13, 11 }
  1863. },
  1864. };
  1865. static struct cipher_testvec des_cbc_dec_tv_template[] = {
  1866. { /* FIPS Pub 81 */
  1867. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1868. .klen = 8,
  1869. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  1870. .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1871. .ilen = 8,
  1872. .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  1873. .rlen = 8,
  1874. }, {
  1875. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1876. .klen = 8,
  1877. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1878. .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  1879. .ilen = 8,
  1880. .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  1881. .rlen = 8,
  1882. }, {
  1883. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1884. .klen = 8,
  1885. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  1886. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  1887. .ilen = 8,
  1888. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  1889. .rlen = 8,
  1890. }, { /* Copy of above, for chunk testing */
  1891. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1892. .klen = 8,
  1893. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  1894. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  1895. .ilen = 8,
  1896. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  1897. .rlen = 8,
  1898. .np = 2,
  1899. .tap = { 4, 4 }
  1900. },
  1901. };
  1902. /*
  1903. * We really need some more test vectors, especially for DES3 CBC.
  1904. */
  1905. static struct cipher_testvec des3_ede_enc_tv_template[] = {
  1906. { /* These are from openssl */
  1907. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  1908. "\x55\x55\x55\x55\x55\x55\x55\x55"
  1909. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  1910. .klen = 24,
  1911. .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  1912. .ilen = 8,
  1913. .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  1914. .rlen = 8,
  1915. }, {
  1916. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  1917. "\x86\x02\x87\x66\x59\x08\x21\x98"
  1918. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  1919. .klen = 24,
  1920. .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  1921. .ilen = 8,
  1922. .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  1923. .rlen = 8,
  1924. }, {
  1925. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  1926. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  1927. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  1928. .klen = 24,
  1929. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  1930. .ilen = 8,
  1931. .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  1932. .rlen = 8,
  1933. },
  1934. };
  1935. static struct cipher_testvec des3_ede_dec_tv_template[] = {
  1936. { /* These are from openssl */
  1937. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  1938. "\x55\x55\x55\x55\x55\x55\x55\x55"
  1939. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  1940. .klen = 24,
  1941. .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  1942. .ilen = 8,
  1943. .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  1944. .rlen = 8,
  1945. }, {
  1946. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  1947. "\x86\x02\x87\x66\x59\x08\x21\x98"
  1948. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  1949. .klen = 24,
  1950. .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  1951. .ilen = 8,
  1952. .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  1953. .rlen = 8,
  1954. }, {
  1955. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  1956. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  1957. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  1958. .klen = 24,
  1959. .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  1960. .ilen = 8,
  1961. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  1962. .rlen = 8,
  1963. },
  1964. };
  1965. /*
  1966. * Blowfish test vectors.
  1967. */
  1968. #define BF_ENC_TEST_VECTORS 6
  1969. #define BF_DEC_TEST_VECTORS 6
  1970. #define BF_CBC_ENC_TEST_VECTORS 1
  1971. #define BF_CBC_DEC_TEST_VECTORS 1
  1972. static struct cipher_testvec bf_enc_tv_template[] = {
  1973. { /* DES test vectors from OpenSSL */
  1974. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  1975. .klen = 8,
  1976. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  1977. .ilen = 8,
  1978. .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  1979. .rlen = 8,
  1980. }, {
  1981. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  1982. .klen = 8,
  1983. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1984. .ilen = 8,
  1985. .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  1986. .rlen = 8,
  1987. }, {
  1988. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  1989. .klen = 8,
  1990. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  1991. .ilen = 8,
  1992. .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  1993. .rlen = 8,
  1994. }, { /* Vary the keylength... */
  1995. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  1996. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  1997. .klen = 16,
  1998. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  1999. .ilen = 8,
  2000. .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2001. .rlen = 8,
  2002. }, {
  2003. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2004. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2005. "\x00\x11\x22\x33\x44",
  2006. .klen = 21,
  2007. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2008. .ilen = 8,
  2009. .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2010. .rlen = 8,
  2011. }, { /* Generated with bf488 */
  2012. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2013. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2014. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2015. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2016. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2017. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2018. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2019. .klen = 56,
  2020. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2021. .ilen = 8,
  2022. .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2023. .rlen = 8,
  2024. },
  2025. };
  2026. static struct cipher_testvec bf_dec_tv_template[] = {
  2027. { /* DES test vectors from OpenSSL */
  2028. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2029. .klen = 8,
  2030. .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2031. .ilen = 8,
  2032. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2033. .rlen = 8,
  2034. }, {
  2035. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2036. .klen = 8,
  2037. .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2038. .ilen = 8,
  2039. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2040. .rlen = 8,
  2041. }, {
  2042. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2043. .klen = 8,
  2044. .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2045. .ilen = 8,
  2046. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2047. .rlen = 8,
  2048. }, { /* Vary the keylength... */
  2049. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2050. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2051. .klen = 16,
  2052. .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2053. .ilen = 8,
  2054. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2055. .rlen = 8,
  2056. }, {
  2057. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2058. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2059. "\x00\x11\x22\x33\x44",
  2060. .klen = 21,
  2061. .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2062. .ilen = 8,
  2063. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2064. .rlen = 8,
  2065. }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
  2066. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2067. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2068. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2069. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2070. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2071. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2072. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2073. .klen = 56,
  2074. .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2075. .ilen = 8,
  2076. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2077. .rlen = 8,
  2078. },
  2079. };
  2080. static struct cipher_testvec bf_cbc_enc_tv_template[] = {
  2081. { /* From OpenSSL */
  2082. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2083. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2084. .klen = 16,
  2085. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2086. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2087. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2088. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2089. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2090. .ilen = 32,
  2091. .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2092. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2093. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2094. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2095. .rlen = 32,
  2096. },
  2097. };
  2098. static struct cipher_testvec bf_cbc_dec_tv_template[] = {
  2099. { /* From OpenSSL */
  2100. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2101. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2102. .klen = 16,
  2103. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2104. .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2105. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2106. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2107. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2108. .ilen = 32,
  2109. .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2110. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2111. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2112. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2113. .rlen = 32,
  2114. },
  2115. };
  2116. /*
  2117. * Twofish test vectors.
  2118. */
  2119. #define TF_ENC_TEST_VECTORS 3
  2120. #define TF_DEC_TEST_VECTORS 3
  2121. #define TF_CBC_ENC_TEST_VECTORS 4
  2122. #define TF_CBC_DEC_TEST_VECTORS 4
  2123. static struct cipher_testvec tf_enc_tv_template[] = {
  2124. {
  2125. .key = zeroed_string,
  2126. .klen = 16,
  2127. .input = zeroed_string,
  2128. .ilen = 16,
  2129. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2130. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2131. .rlen = 16,
  2132. }, {
  2133. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2134. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2135. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2136. .klen = 24,
  2137. .input = zeroed_string,
  2138. .ilen = 16,
  2139. .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2140. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2141. .rlen = 16,
  2142. }, {
  2143. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2144. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2145. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2146. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2147. .klen = 32,
  2148. .input = zeroed_string,
  2149. .ilen = 16,
  2150. .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2151. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2152. .rlen = 16,
  2153. },
  2154. };
  2155. static struct cipher_testvec tf_dec_tv_template[] = {
  2156. {
  2157. .key = zeroed_string,
  2158. .klen = 16,
  2159. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2160. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2161. .ilen = 16,
  2162. .result = zeroed_string,
  2163. .rlen = 16,
  2164. }, {
  2165. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2166. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2167. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2168. .klen = 24,
  2169. .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2170. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2171. .ilen = 16,
  2172. .result = zeroed_string,
  2173. .rlen = 16,
  2174. }, {
  2175. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2176. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2177. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2178. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2179. .klen = 32,
  2180. .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2181. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2182. .ilen = 16,
  2183. .result = zeroed_string,
  2184. .rlen = 16,
  2185. },
  2186. };
  2187. static struct cipher_testvec tf_cbc_enc_tv_template[] = {
  2188. { /* Generated with Nettle */
  2189. .key = zeroed_string,
  2190. .klen = 16,
  2191. .iv = zeroed_string,
  2192. .input = zeroed_string,
  2193. .ilen = 16,
  2194. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2195. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2196. .rlen = 16,
  2197. }, {
  2198. .key = zeroed_string,
  2199. .klen = 16,
  2200. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2201. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2202. .input = zeroed_string,
  2203. .ilen = 16,
  2204. .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2205. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2206. .rlen = 16,
  2207. }, {
  2208. .key = zeroed_string,
  2209. .klen = 16,
  2210. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2211. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2212. .input = zeroed_string,
  2213. .ilen = 16,
  2214. .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2215. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2216. .rlen = 16,
  2217. }, {
  2218. .key = zeroed_string,
  2219. .klen = 16,
  2220. .iv = zeroed_string,
  2221. .input = zeroed_string,
  2222. .ilen = 48,
  2223. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2224. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2225. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2226. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2227. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2228. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2229. .rlen = 48,
  2230. },
  2231. };
  2232. static struct cipher_testvec tf_cbc_dec_tv_template[] = {
  2233. { /* Reverse of the first four above */
  2234. .key = zeroed_string,
  2235. .klen = 16,
  2236. .iv = zeroed_string,
  2237. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2238. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2239. .ilen = 16,
  2240. .result = zeroed_string,
  2241. .rlen = 16,
  2242. }, {
  2243. .key = zeroed_string,
  2244. .klen = 16,
  2245. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2246. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2247. .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2248. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2249. .ilen = 16,
  2250. .result = zeroed_string,
  2251. .rlen = 16,
  2252. }, {
  2253. .key = zeroed_string,
  2254. .klen = 16,
  2255. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2256. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2257. .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2258. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2259. .ilen = 16,
  2260. .result = zeroed_string,
  2261. .rlen = 16,
  2262. }, {
  2263. .key = zeroed_string,
  2264. .klen = 16,
  2265. .iv = zeroed_string,
  2266. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2267. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2268. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2269. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2270. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2271. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2272. .ilen = 48,
  2273. .result = zeroed_string,
  2274. .rlen = 48,
  2275. },
  2276. };
  2277. /*
  2278. * Serpent test vectors. These are backwards because Serpent writes
  2279. * octet sequences in right-to-left mode.
  2280. */
  2281. #define SERPENT_ENC_TEST_VECTORS 4
  2282. #define SERPENT_DEC_TEST_VECTORS 4
  2283. #define TNEPRES_ENC_TEST_VECTORS 4
  2284. #define TNEPRES_DEC_TEST_VECTORS 4
  2285. static struct cipher_testvec serpent_enc_tv_template[] = {
  2286. {
  2287. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2288. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2289. .ilen = 16,
  2290. .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  2291. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  2292. .rlen = 16,
  2293. }, {
  2294. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2295. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2296. .klen = 16,
  2297. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2298. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2299. .ilen = 16,
  2300. .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  2301. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  2302. .rlen = 16,
  2303. }, {
  2304. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2305. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2306. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2307. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2308. .klen = 32,
  2309. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2310. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2311. .ilen = 16,
  2312. .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  2313. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  2314. .rlen = 16,
  2315. }, {
  2316. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2317. .klen = 16,
  2318. .input = zeroed_string,
  2319. .ilen = 16,
  2320. .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  2321. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  2322. .rlen = 16,
  2323. },
  2324. };
  2325. static struct cipher_testvec tnepres_enc_tv_template[] = {
  2326. { /* KeySize=128, PT=0, I=1 */
  2327. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2328. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2329. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2330. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2331. .klen = 16,
  2332. .ilen = 16,
  2333. .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
  2334. "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
  2335. .rlen = 16,
  2336. }, { /* KeySize=192, PT=0, I=1 */
  2337. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2338. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2339. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2340. .klen = 24,
  2341. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2342. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2343. .ilen = 16,
  2344. .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
  2345. "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
  2346. .rlen = 16,
  2347. }, { /* KeySize=256, PT=0, I=1 */
  2348. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2349. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2350. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2351. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2352. .klen = 32,
  2353. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2354. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2355. .ilen = 16,
  2356. .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
  2357. "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
  2358. .rlen = 16,
  2359. }, { /* KeySize=256, I=257 */
  2360. .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
  2361. "\x17\x16\x15\x14\x13\x12\x11\x10"
  2362. "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  2363. "\x07\x06\x05\x04\x03\x02\x01\x00",
  2364. .klen = 32,
  2365. .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  2366. "\x07\x06\x05\x04\x03\x02\x01\x00",
  2367. .ilen = 16,
  2368. .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
  2369. "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
  2370. .rlen = 16,
  2371. },
  2372. };
  2373. static struct cipher_testvec serpent_dec_tv_template[] = {
  2374. {
  2375. .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  2376. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  2377. .ilen = 16,
  2378. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2379. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2380. .rlen = 16,
  2381. }, {
  2382. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2383. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2384. .klen = 16,
  2385. .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  2386. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  2387. .ilen = 16,
  2388. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2389. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2390. .rlen = 16,
  2391. }, {
  2392. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2393. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2394. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2395. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2396. .klen = 32,
  2397. .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  2398. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  2399. .ilen = 16,
  2400. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2401. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2402. .rlen = 16,
  2403. }, {
  2404. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2405. .klen = 16,
  2406. .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  2407. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  2408. .ilen = 16,
  2409. .result = zeroed_string,
  2410. .rlen = 16,
  2411. },
  2412. };
  2413. static struct cipher_testvec tnepres_dec_tv_template[] = {
  2414. {
  2415. .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
  2416. "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
  2417. .ilen = 16,
  2418. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2419. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2420. .rlen = 16,
  2421. }, {
  2422. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2423. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2424. .klen = 16,
  2425. .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
  2426. "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
  2427. .ilen = 16,
  2428. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2429. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2430. .rlen = 16,
  2431. }, {
  2432. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2433. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2434. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2435. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2436. .klen = 32,
  2437. .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
  2438. "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
  2439. .ilen = 16,
  2440. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2441. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2442. .rlen = 16,
  2443. }, { /* KeySize=128, I=121 */
  2444. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2445. .klen = 16,
  2446. .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
  2447. "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
  2448. .ilen = 16,
  2449. .result = zeroed_string,
  2450. .rlen = 16,
  2451. },
  2452. };
  2453. /* Cast6 test vectors from RFC 2612 */
  2454. #define CAST6_ENC_TEST_VECTORS 3
  2455. #define CAST6_DEC_TEST_VECTORS 3
  2456. static struct cipher_testvec cast6_enc_tv_template[] = {
  2457. {
  2458. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2459. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  2460. .klen = 16,
  2461. .input = zeroed_string,
  2462. .ilen = 16,
  2463. .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  2464. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  2465. .rlen = 16,
  2466. }, {
  2467. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2468. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2469. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  2470. .klen = 24,
  2471. .input = zeroed_string,
  2472. .ilen = 16,
  2473. .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  2474. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  2475. .rlen = 16,
  2476. }, {
  2477. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2478. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2479. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  2480. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  2481. .klen = 32,
  2482. .input = zeroed_string,
  2483. .ilen = 16,
  2484. .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  2485. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  2486. .rlen = 16,
  2487. },
  2488. };
  2489. static struct cipher_testvec cast6_dec_tv_template[] = {
  2490. {
  2491. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2492. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  2493. .klen = 16,
  2494. .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  2495. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  2496. .ilen = 16,
  2497. .result = zeroed_string,
  2498. .rlen = 16,
  2499. }, {
  2500. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2501. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2502. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  2503. .klen = 24,
  2504. .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  2505. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  2506. .ilen = 16,
  2507. .result = zeroed_string,
  2508. .rlen = 16,
  2509. }, {
  2510. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2511. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2512. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  2513. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  2514. .klen = 32,
  2515. .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  2516. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  2517. .ilen = 16,
  2518. .result = zeroed_string,
  2519. .rlen = 16,
  2520. },
  2521. };
  2522. /*
  2523. * AES test vectors.
  2524. */
  2525. #define AES_ENC_TEST_VECTORS 3
  2526. #define AES_DEC_TEST_VECTORS 3
  2527. #define AES_CBC_ENC_TEST_VECTORS 4
  2528. #define AES_CBC_DEC_TEST_VECTORS 4
  2529. #define AES_LRW_ENC_TEST_VECTORS 8
  2530. #define AES_LRW_DEC_TEST_VECTORS 8
  2531. #define AES_XTS_ENC_TEST_VECTORS 4
  2532. #define AES_XTS_DEC_TEST_VECTORS 4
  2533. #define AES_CTR_ENC_TEST_VECTORS 7
  2534. #define AES_CTR_DEC_TEST_VECTORS 6
  2535. #define AES_GCM_ENC_TEST_VECTORS 9
  2536. #define AES_GCM_DEC_TEST_VECTORS 8
  2537. #define AES_CCM_ENC_TEST_VECTORS 7
  2538. #define AES_CCM_DEC_TEST_VECTORS 7
  2539. static struct cipher_testvec aes_enc_tv_template[] = {
  2540. { /* From FIPS-197 */
  2541. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2542. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2543. .klen = 16,
  2544. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2545. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2546. .ilen = 16,
  2547. .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  2548. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  2549. .rlen = 16,
  2550. }, {
  2551. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2552. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2553. "\x10\x11\x12\x13\x14\x15\x16\x17",
  2554. .klen = 24,
  2555. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2556. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2557. .ilen = 16,
  2558. .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  2559. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  2560. .rlen = 16,
  2561. }, {
  2562. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2563. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2564. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2565. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2566. .klen = 32,
  2567. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2568. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2569. .ilen = 16,
  2570. .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  2571. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  2572. .rlen = 16,
  2573. },
  2574. };
  2575. static struct cipher_testvec aes_dec_tv_template[] = {
  2576. { /* From FIPS-197 */
  2577. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2578. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2579. .klen = 16,
  2580. .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  2581. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  2582. .ilen = 16,
  2583. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2584. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2585. .rlen = 16,
  2586. }, {
  2587. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2588. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2589. "\x10\x11\x12\x13\x14\x15\x16\x17",
  2590. .klen = 24,
  2591. .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  2592. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  2593. .ilen = 16,
  2594. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2595. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2596. .rlen = 16,
  2597. }, {
  2598. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2599. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2600. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2601. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2602. .klen = 32,
  2603. .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  2604. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  2605. .ilen = 16,
  2606. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2607. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2608. .rlen = 16,
  2609. },
  2610. };
  2611. static struct cipher_testvec aes_cbc_enc_tv_template[] = {
  2612. { /* From RFC 3602 */
  2613. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  2614. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  2615. .klen = 16,
  2616. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  2617. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  2618. .input = "Single block msg",
  2619. .ilen = 16,
  2620. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  2621. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  2622. .rlen = 16,
  2623. }, {
  2624. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  2625. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  2626. .klen = 16,
  2627. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  2628. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  2629. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2630. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2631. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2632. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2633. .ilen = 32,
  2634. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  2635. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  2636. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  2637. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  2638. .rlen = 32,
  2639. }, { /* From NIST SP800-38A */
  2640. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  2641. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  2642. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  2643. .klen = 24,
  2644. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2645. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2646. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2647. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2648. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2649. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2650. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2651. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2652. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2653. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2654. .ilen = 64,
  2655. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  2656. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  2657. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  2658. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  2659. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  2660. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  2661. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  2662. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  2663. .rlen = 64,
  2664. }, {
  2665. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  2666. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  2667. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  2668. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  2669. .klen = 32,
  2670. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2671. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2672. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2673. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2674. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2675. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2676. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2677. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2678. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2679. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2680. .ilen = 64,
  2681. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  2682. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  2683. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  2684. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  2685. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  2686. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  2687. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  2688. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  2689. .rlen = 64,
  2690. },
  2691. };
  2692. static struct cipher_testvec aes_cbc_dec_tv_template[] = {
  2693. { /* From RFC 3602 */
  2694. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  2695. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  2696. .klen = 16,
  2697. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  2698. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  2699. .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  2700. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  2701. .ilen = 16,
  2702. .result = "Single block msg",
  2703. .rlen = 16,
  2704. }, {
  2705. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  2706. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  2707. .klen = 16,
  2708. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  2709. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  2710. .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  2711. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  2712. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  2713. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  2714. .ilen = 32,
  2715. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2716. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2717. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2718. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2719. .rlen = 32,
  2720. }, { /* From NIST SP800-38A */
  2721. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  2722. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  2723. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  2724. .klen = 24,
  2725. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2726. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2727. .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  2728. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  2729. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  2730. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  2731. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  2732. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  2733. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  2734. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  2735. .ilen = 64,
  2736. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2737. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2738. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2739. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2740. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2741. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2742. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2743. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2744. .rlen = 64,
  2745. }, {
  2746. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  2747. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  2748. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  2749. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  2750. .klen = 32,
  2751. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2752. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2753. .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  2754. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  2755. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  2756. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  2757. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  2758. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  2759. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  2760. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  2761. .ilen = 64,
  2762. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2763. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2764. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2765. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2766. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2767. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2768. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2769. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2770. .rlen = 64,
  2771. },
  2772. };
  2773. static struct cipher_testvec aes_lrw_enc_tv_template[] = {
  2774. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  2775. { /* LRW-32-AES 1 */
  2776. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  2777. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  2778. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  2779. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  2780. .klen = 32,
  2781. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2782. "\x00\x00\x00\x00\x00\x00\x00\x01",
  2783. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  2784. "\x38\x39\x41\x42\x43\x44\x45\x46",
  2785. .ilen = 16,
  2786. .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  2787. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  2788. .rlen = 16,
  2789. }, { /* LRW-32-AES 2 */
  2790. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  2791. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  2792. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  2793. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  2794. .klen = 32,
  2795. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2796. "\x00\x00\x00\x00\x00\x00\x00\x02",
  2797. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  2798. "\x38\x39\x41\x42\x43\x44\x45\x46",
  2799. .ilen = 16,
  2800. .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  2801. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  2802. .rlen = 16,
  2803. }, { /* LRW-32-AES 3 */
  2804. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  2805. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  2806. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  2807. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  2808. .klen = 32,
  2809. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2810. "\x00\x00\x00\x02\x00\x00\x00\x00",
  2811. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  2812. "\x38\x39\x41\x42\x43\x44\x45\x46",
  2813. .ilen = 16,
  2814. .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  2815. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  2816. .rlen = 16,
  2817. }, { /* LRW-32-AES 4 */
  2818. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  2819. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  2820. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  2821. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  2822. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  2823. .klen = 40,
  2824. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2825. "\x00\x00\x00\x00\x00\x00\x00\x01",
  2826. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  2827. "\x38\x39\x41\x42\x43\x44\x45\x46",
  2828. .ilen = 16,
  2829. .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  2830. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  2831. .rlen = 16,
  2832. }, { /* LRW-32-AES 5 */
  2833. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  2834. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  2835. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  2836. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  2837. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  2838. .klen = 40,
  2839. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2840. "\x00\x00\x00\x02\x00\x00\x00\x00",
  2841. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  2842. "\x38\x39\x41\x42\x43\x44\x45\x46",
  2843. .ilen = 16,
  2844. .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  2845. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  2846. .rlen = 16,
  2847. }, { /* LRW-32-AES 6 */
  2848. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  2849. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  2850. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  2851. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  2852. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  2853. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  2854. .klen = 48,
  2855. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2856. "\x00\x00\x00\x00\x00\x00\x00\x01",
  2857. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  2858. "\x38\x39\x41\x42\x43\x44\x45\x46",
  2859. .ilen = 16,
  2860. .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  2861. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  2862. .rlen = 16,
  2863. }, { /* LRW-32-AES 7 */
  2864. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  2865. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  2866. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  2867. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  2868. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  2869. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  2870. .klen = 48,
  2871. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2872. "\x00\x00\x00\x02\x00\x00\x00\x00",
  2873. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  2874. "\x38\x39\x41\x42\x43\x44\x45\x46",
  2875. .ilen = 16,
  2876. .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  2877. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  2878. .rlen = 16,
  2879. }, {
  2880. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  2881. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  2882. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  2883. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  2884. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  2885. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  2886. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  2887. .klen = 48,
  2888. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2889. "\x00\x00\x00\x00\x00\x00\x00\x01",
  2890. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  2891. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  2892. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  2893. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  2894. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  2895. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  2896. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  2897. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  2898. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  2899. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  2900. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  2901. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  2902. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  2903. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  2904. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  2905. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  2906. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  2907. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  2908. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  2909. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  2910. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  2911. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  2912. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  2913. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  2914. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  2915. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  2916. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  2917. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  2918. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  2919. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  2920. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  2921. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  2922. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  2923. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  2924. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  2925. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  2926. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  2927. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  2928. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  2929. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  2930. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  2931. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  2932. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  2933. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  2934. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  2935. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  2936. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  2937. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  2938. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  2939. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  2940. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  2941. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  2942. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  2943. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  2944. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  2945. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  2946. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  2947. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  2948. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  2949. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  2950. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  2951. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  2952. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  2953. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  2954. .ilen = 512,
  2955. .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  2956. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  2957. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  2958. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  2959. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  2960. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  2961. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  2962. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  2963. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  2964. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  2965. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  2966. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  2967. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  2968. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  2969. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  2970. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  2971. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  2972. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  2973. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  2974. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  2975. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  2976. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  2977. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  2978. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  2979. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  2980. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  2981. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  2982. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  2983. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  2984. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  2985. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  2986. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  2987. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  2988. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  2989. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  2990. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  2991. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  2992. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  2993. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  2994. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  2995. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  2996. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  2997. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  2998. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  2999. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  3000. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  3001. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  3002. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  3003. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  3004. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  3005. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  3006. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  3007. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  3008. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  3009. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  3010. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  3011. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  3012. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  3013. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  3014. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  3015. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  3016. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  3017. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  3018. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  3019. .rlen = 512,
  3020. }
  3021. };
  3022. static struct cipher_testvec aes_lrw_dec_tv_template[] = {
  3023. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  3024. /* same as enc vectors with input and result reversed */
  3025. { /* LRW-32-AES 1 */
  3026. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3027. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3028. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3029. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3030. .klen = 32,
  3031. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3032. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3033. .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  3034. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  3035. .ilen = 16,
  3036. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3037. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3038. .rlen = 16,
  3039. }, { /* LRW-32-AES 2 */
  3040. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3041. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3042. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3043. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3044. .klen = 32,
  3045. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3046. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3047. .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  3048. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  3049. .ilen = 16,
  3050. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3051. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3052. .rlen = 16,
  3053. }, { /* LRW-32-AES 3 */
  3054. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3055. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3056. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3057. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3058. .klen = 32,
  3059. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3060. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3061. .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  3062. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  3063. .ilen = 16,
  3064. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3065. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3066. .rlen = 16,
  3067. }, { /* LRW-32-AES 4 */
  3068. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3069. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3070. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3071. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3072. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3073. .klen = 40,
  3074. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3075. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3076. .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  3077. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  3078. .ilen = 16,
  3079. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3080. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3081. .rlen = 16,
  3082. }, { /* LRW-32-AES 5 */
  3083. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3084. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3085. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3086. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3087. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3088. .klen = 40,
  3089. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3090. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3091. .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  3092. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  3093. .ilen = 16,
  3094. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3095. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3096. .rlen = 16,
  3097. }, { /* LRW-32-AES 6 */
  3098. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3099. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3100. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3101. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3102. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3103. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3104. .klen = 48,
  3105. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3106. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3107. .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  3108. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  3109. .ilen = 16,
  3110. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3111. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3112. .rlen = 16,
  3113. }, { /* LRW-32-AES 7 */
  3114. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3115. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3116. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3117. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3118. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3119. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3120. .klen = 48,
  3121. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3122. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3123. .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  3124. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  3125. .ilen = 16,
  3126. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3127. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3128. .rlen = 16,
  3129. }, {
  3130. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  3131. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3132. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3133. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3134. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3135. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3136. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3137. .klen = 48,
  3138. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3139. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3140. .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  3141. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  3142. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  3143. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  3144. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  3145. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  3146. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  3147. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  3148. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  3149. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  3150. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  3151. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  3152. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  3153. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  3154. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  3155. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  3156. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  3157. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  3158. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  3159. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  3160. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  3161. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  3162. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  3163. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  3164. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  3165. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  3166. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  3167. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  3168. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  3169. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  3170. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  3171. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  3172. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  3173. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  3174. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  3175. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  3176. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  3177. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  3178. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  3179. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  3180. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  3181. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  3182. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  3183. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  3184. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  3185. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  3186. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  3187. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  3188. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  3189. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  3190. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  3191. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  3192. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  3193. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  3194. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  3195. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  3196. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  3197. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  3198. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  3199. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  3200. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  3201. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  3202. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  3203. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  3204. .ilen = 512,
  3205. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3206. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3207. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3208. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3209. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3210. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3211. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3212. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3213. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3214. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3215. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3216. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3217. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3218. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3219. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3220. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3221. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3222. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3223. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3224. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3225. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3226. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3227. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3228. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3229. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3230. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3231. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3232. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3233. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3234. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3235. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3236. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3237. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3238. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3239. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3240. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3241. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3242. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3243. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3244. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3245. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3246. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3247. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3248. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3249. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3250. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3251. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3252. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3253. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3254. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3255. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3256. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3257. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3258. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3259. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3260. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3261. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3262. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3263. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3264. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3265. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3266. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3267. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3268. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3269. .rlen = 512,
  3270. }
  3271. };
  3272. static struct cipher_testvec aes_xts_enc_tv_template[] = {
  3273. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  3274. { /* XTS-AES 1 */
  3275. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3276. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3277. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3278. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3279. .klen = 32,
  3280. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3281. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3282. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3283. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3284. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3285. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3286. .ilen = 32,
  3287. .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  3288. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  3289. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  3290. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  3291. .rlen = 32,
  3292. }, { /* XTS-AES 2 */
  3293. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3294. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3295. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3296. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3297. .klen = 32,
  3298. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3299. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3300. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3301. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3302. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3303. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3304. .ilen = 32,
  3305. .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  3306. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  3307. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  3308. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  3309. .rlen = 32,
  3310. }, { /* XTS-AES 3 */
  3311. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3312. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3313. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3314. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3315. .klen = 32,
  3316. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3317. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3318. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3319. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3320. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3321. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3322. .ilen = 32,
  3323. .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  3324. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  3325. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  3326. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  3327. .rlen = 32,
  3328. }, { /* XTS-AES 4 */
  3329. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3330. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3331. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3332. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3333. .klen = 32,
  3334. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3335. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3336. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3337. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3338. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3339. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3340. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3341. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3342. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3343. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3344. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3345. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3346. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3347. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3348. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3349. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3350. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3351. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3352. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3353. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3354. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3355. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3356. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3357. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3358. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3359. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3360. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3361. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3362. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3363. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3364. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3365. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3366. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3367. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3368. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3369. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3370. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3371. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3372. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3373. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3374. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3375. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3376. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3377. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3378. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3379. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3380. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3381. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3382. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3383. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3384. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3385. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3386. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3387. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3388. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3389. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3390. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3391. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3392. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3393. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3394. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3395. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3396. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3397. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3398. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3399. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3400. .ilen = 512,
  3401. .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  3402. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  3403. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  3404. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  3405. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  3406. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  3407. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  3408. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  3409. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  3410. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  3411. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  3412. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  3413. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  3414. "\x22\x97\x61\x46\xae\x20\xce\x84"
  3415. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  3416. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  3417. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  3418. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  3419. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  3420. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  3421. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  3422. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  3423. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  3424. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  3425. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  3426. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  3427. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  3428. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  3429. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  3430. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  3431. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  3432. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  3433. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  3434. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  3435. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  3436. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  3437. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  3438. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  3439. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  3440. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  3441. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  3442. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  3443. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  3444. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  3445. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  3446. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  3447. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  3448. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  3449. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  3450. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  3451. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  3452. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  3453. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  3454. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  3455. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  3456. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  3457. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  3458. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  3459. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  3460. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  3461. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  3462. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  3463. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  3464. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  3465. .rlen = 512,
  3466. }
  3467. };
  3468. static struct cipher_testvec aes_xts_dec_tv_template[] = {
  3469. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  3470. { /* XTS-AES 1 */
  3471. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3472. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3473. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3474. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3475. .klen = 32,
  3476. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3477. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3478. .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  3479. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  3480. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  3481. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  3482. .ilen = 32,
  3483. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3484. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3485. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3486. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3487. .rlen = 32,
  3488. }, { /* XTS-AES 2 */
  3489. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3490. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3491. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3492. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3493. .klen = 32,
  3494. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3495. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3496. .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  3497. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  3498. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  3499. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  3500. .ilen = 32,
  3501. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3502. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3503. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3504. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3505. .rlen = 32,
  3506. }, { /* XTS-AES 3 */
  3507. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3508. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3509. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3510. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3511. .klen = 32,
  3512. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3513. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3514. .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  3515. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  3516. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  3517. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  3518. .ilen = 32,
  3519. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3520. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3521. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3522. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3523. .rlen = 32,
  3524. }, { /* XTS-AES 4 */
  3525. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3526. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3527. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3528. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3529. .klen = 32,
  3530. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3531. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3532. .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  3533. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  3534. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  3535. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  3536. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  3537. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  3538. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  3539. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  3540. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  3541. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  3542. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  3543. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  3544. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  3545. "\x22\x97\x61\x46\xae\x20\xce\x84"
  3546. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  3547. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  3548. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  3549. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  3550. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  3551. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  3552. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  3553. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  3554. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  3555. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  3556. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  3557. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  3558. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  3559. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  3560. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  3561. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  3562. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  3563. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  3564. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  3565. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  3566. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  3567. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  3568. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  3569. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  3570. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  3571. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  3572. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  3573. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  3574. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  3575. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  3576. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  3577. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  3578. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  3579. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  3580. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  3581. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  3582. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  3583. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  3584. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  3585. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  3586. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  3587. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  3588. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  3589. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  3590. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  3591. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  3592. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  3593. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  3594. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  3595. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  3596. .ilen = 512,
  3597. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3598. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3599. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3600. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3601. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3602. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3603. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3604. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3605. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3606. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3607. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3608. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3609. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3610. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3611. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3612. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3613. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3614. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3615. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3616. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3617. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3618. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3619. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3620. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3621. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3622. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3623. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3624. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3625. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3626. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3627. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3628. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3629. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3630. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3631. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3632. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3633. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3634. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3635. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3636. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3637. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3638. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3639. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3640. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3641. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3642. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3643. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3644. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3645. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3646. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3647. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3648. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3649. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3650. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3651. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3652. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3653. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3654. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3655. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3656. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3657. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3658. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3659. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3660. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3661. .rlen = 512,
  3662. }
  3663. };
  3664. static struct cipher_testvec aes_ctr_enc_tv_template[] = {
  3665. { /* From RFC 3686 */
  3666. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  3667. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  3668. "\x00\x00\x00\x30",
  3669. .klen = 20,
  3670. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  3671. .input = "Single block msg",
  3672. .ilen = 16,
  3673. .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  3674. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  3675. .rlen = 16,
  3676. }, {
  3677. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  3678. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  3679. "\x00\x6c\xb6\xdb",
  3680. .klen = 20,
  3681. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  3682. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3683. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3684. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3685. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3686. .ilen = 32,
  3687. .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  3688. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  3689. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  3690. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  3691. .rlen = 32,
  3692. }, {
  3693. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  3694. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  3695. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  3696. "\x00\x00\x00\x48",
  3697. .klen = 28,
  3698. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  3699. .input = "Single block msg",
  3700. .ilen = 16,
  3701. .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  3702. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  3703. .rlen = 16,
  3704. }, {
  3705. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  3706. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  3707. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  3708. "\x00\x96\xb0\x3b",
  3709. .klen = 28,
  3710. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  3711. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3712. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3713. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3714. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3715. .ilen = 32,
  3716. .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  3717. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  3718. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  3719. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  3720. .rlen = 32,
  3721. }, {
  3722. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  3723. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  3724. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  3725. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  3726. "\x00\x00\x00\x60",
  3727. .klen = 36,
  3728. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  3729. .input = "Single block msg",
  3730. .ilen = 16,
  3731. .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  3732. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  3733. .rlen = 16,
  3734. }, {
  3735. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  3736. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  3737. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  3738. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  3739. "\x00\xfa\xac\x24",
  3740. .klen = 36,
  3741. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  3742. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3743. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3744. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3745. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3746. .ilen = 32,
  3747. .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  3748. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  3749. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  3750. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  3751. .rlen = 32,
  3752. }, {
  3753. // generated using Crypto++
  3754. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3755. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3756. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3757. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3758. "\x00\x00\x00\x00",
  3759. .klen = 32 + 4,
  3760. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  3761. .input =
  3762. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3763. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3764. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3765. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3766. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3767. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3768. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3769. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3770. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3771. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3772. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3773. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3774. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3775. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3776. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3777. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3778. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3779. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3780. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3781. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3782. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3783. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3784. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3785. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3786. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3787. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3788. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3789. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3790. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3791. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3792. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3793. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3794. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  3795. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  3796. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  3797. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  3798. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  3799. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  3800. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  3801. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  3802. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  3803. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  3804. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  3805. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  3806. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  3807. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  3808. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  3809. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  3810. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  3811. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  3812. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  3813. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  3814. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  3815. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  3816. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  3817. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  3818. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  3819. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  3820. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  3821. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  3822. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  3823. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  3824. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  3825. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  3826. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  3827. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  3828. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  3829. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  3830. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  3831. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  3832. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  3833. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  3834. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  3835. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  3836. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  3837. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  3838. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  3839. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  3840. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  3841. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  3842. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  3843. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  3844. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  3845. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  3846. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  3847. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  3848. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  3849. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  3850. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  3851. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  3852. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  3853. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  3854. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  3855. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  3856. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  3857. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  3858. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  3859. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  3860. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  3861. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  3862. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  3863. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  3864. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  3865. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  3866. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  3867. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  3868. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  3869. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  3870. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  3871. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  3872. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  3873. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  3874. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  3875. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  3876. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  3877. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  3878. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  3879. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  3880. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  3881. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  3882. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  3883. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  3884. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  3885. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  3886. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  3887. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  3888. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  3889. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  3890. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  3891. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  3892. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  3893. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  3894. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  3895. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  3896. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  3897. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  3898. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  3899. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  3900. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  3901. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  3902. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  3903. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  3904. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  3905. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  3906. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  3907. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  3908. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  3909. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  3910. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  3911. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  3912. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  3913. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  3914. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  3915. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  3916. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  3917. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  3918. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  3919. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  3920. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  3921. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  3922. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  3923. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  3924. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  3925. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  3926. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  3927. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  3928. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  3929. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  3930. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  3931. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  3932. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  3933. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  3934. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  3935. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  3936. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  3937. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  3938. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  3939. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  3940. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  3941. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  3942. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  3943. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  3944. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  3945. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  3946. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  3947. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  3948. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  3949. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  3950. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  3951. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  3952. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  3953. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  3954. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  3955. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  3956. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  3957. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  3958. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  3959. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  3960. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  3961. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  3962. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  3963. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  3964. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  3965. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  3966. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  3967. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  3968. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  3969. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  3970. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  3971. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  3972. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  3973. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  3974. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  3975. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  3976. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  3977. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  3978. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  3979. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  3980. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  3981. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  3982. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  3983. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  3984. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  3985. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  3986. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  3987. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  3988. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  3989. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  3990. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  3991. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  3992. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  3993. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  3994. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  3995. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  3996. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  3997. "\x28\x37\x46\x55\x64\x73\x82\x91"
  3998. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  3999. "\x18\x27\x36\x45\x54\x63\x72\x81"
  4000. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  4001. "\x08\x17\x26\x35\x44\x53\x62\x71"
  4002. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  4003. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  4004. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  4005. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  4006. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  4007. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  4008. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  4009. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  4010. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  4011. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  4012. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  4013. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  4014. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  4015. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  4016. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  4017. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  4018. "\x00\x11\x22\x33\x44\x55\x66\x77"
  4019. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  4020. "\x10\x21\x32\x43\x54\x65\x76\x87"
  4021. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  4022. "\x20\x31\x42\x53\x64\x75\x86\x97"
  4023. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  4024. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  4025. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  4026. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  4027. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  4028. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  4029. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  4030. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  4031. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  4032. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  4033. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  4034. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  4035. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  4036. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  4037. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  4038. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  4039. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  4040. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  4041. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  4042. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  4043. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  4044. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  4045. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  4046. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  4047. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  4048. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  4049. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  4050. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  4051. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  4052. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  4053. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  4054. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  4055. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  4056. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  4057. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  4058. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  4059. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  4060. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  4061. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  4062. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  4063. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  4064. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  4065. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  4066. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  4067. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  4068. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  4069. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  4070. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  4071. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  4072. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  4073. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  4074. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  4075. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  4076. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  4077. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  4078. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  4079. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  4080. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  4081. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  4082. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  4083. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  4084. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  4085. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  4086. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  4087. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  4088. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  4089. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  4090. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  4091. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  4092. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  4093. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  4094. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  4095. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  4096. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  4097. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  4098. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  4099. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  4100. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  4101. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  4102. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  4103. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  4104. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  4105. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  4106. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  4107. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  4108. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  4109. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  4110. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  4111. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  4112. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  4113. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  4114. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  4115. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  4116. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  4117. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  4118. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  4119. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  4120. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  4121. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  4122. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  4123. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  4124. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  4125. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  4126. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  4127. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  4128. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  4129. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  4130. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  4131. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  4132. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  4133. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  4134. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  4135. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  4136. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  4137. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  4138. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  4139. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  4140. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  4141. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  4142. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  4143. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  4144. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  4145. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  4146. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  4147. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  4148. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  4149. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  4150. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  4151. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  4152. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  4153. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  4154. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  4155. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  4156. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  4157. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  4158. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  4159. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  4160. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  4161. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  4162. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  4163. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  4164. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  4165. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  4166. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  4167. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  4168. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  4169. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  4170. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  4171. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  4172. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  4173. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  4174. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  4175. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  4176. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  4177. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  4178. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  4179. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  4180. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  4181. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  4182. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  4183. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  4184. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  4185. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  4186. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  4187. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  4188. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  4189. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  4190. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  4191. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  4192. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  4193. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  4194. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  4195. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  4196. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  4197. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  4198. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  4199. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  4200. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  4201. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  4202. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  4203. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  4204. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  4205. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  4206. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  4207. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  4208. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  4209. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  4210. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  4211. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  4212. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  4213. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  4214. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  4215. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  4216. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  4217. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  4218. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  4219. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  4220. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  4221. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  4222. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  4223. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  4224. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  4225. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  4226. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  4227. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  4228. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  4229. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  4230. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  4231. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  4232. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  4233. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  4234. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  4235. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  4236. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  4237. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  4238. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  4239. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  4240. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  4241. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  4242. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  4243. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  4244. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  4245. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  4246. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  4247. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  4248. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  4249. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  4250. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  4251. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  4252. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  4253. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  4254. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  4255. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  4256. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  4257. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  4258. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  4259. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  4260. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  4261. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  4262. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  4263. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  4264. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  4265. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  4266. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  4267. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  4268. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  4269. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  4270. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  4271. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  4272. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  4273. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  4274. "\x00\x21\x42\x63",
  4275. .ilen = 4100,
  4276. .result =
  4277. "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
  4278. "\xae\xff\x91\x3a\x44\xcf\x38\x32"
  4279. "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
  4280. "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
  4281. "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
  4282. "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
  4283. "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
  4284. "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
  4285. "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
  4286. "\x18\xff\x75\x6d\x06\x2d\x00\xab"
  4287. "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
  4288. "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
  4289. "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
  4290. "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
  4291. "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
  4292. "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
  4293. "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
  4294. "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
  4295. "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
  4296. "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
  4297. "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
  4298. "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
  4299. "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
  4300. "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
  4301. "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
  4302. "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
  4303. "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
  4304. "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
  4305. "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
  4306. "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
  4307. "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
  4308. "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
  4309. "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
  4310. "\x6a\x25\x15\x33\x4e\x45\x08\xec"
  4311. "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
  4312. "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
  4313. "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
  4314. "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
  4315. "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
  4316. "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
  4317. "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
  4318. "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
  4319. "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
  4320. "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
  4321. "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
  4322. "\x04\x02\xef\xd3\x44\xde\x76\x31"
  4323. "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
  4324. "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
  4325. "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
  4326. "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
  4327. "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
  4328. "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
  4329. "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
  4330. "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
  4331. "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
  4332. "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
  4333. "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
  4334. "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
  4335. "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
  4336. "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
  4337. "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
  4338. "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
  4339. "\x32\x03\xed\xf0\x50\x1c\x56\x39"
  4340. "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
  4341. "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
  4342. "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
  4343. "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
  4344. "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
  4345. "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
  4346. "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
  4347. "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
  4348. "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
  4349. "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
  4350. "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
  4351. "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
  4352. "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
  4353. "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
  4354. "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
  4355. "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
  4356. "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
  4357. "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
  4358. "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
  4359. "\x69\x3a\x29\x23\xac\x86\x32\xa5"
  4360. "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
  4361. "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
  4362. "\x59\x6a\xd3\x50\x59\x43\x59\xde"
  4363. "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
  4364. "\x18\x34\x0d\x1a\x63\x33\xed\x10"
  4365. "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
  4366. "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
  4367. "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
  4368. "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
  4369. "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
  4370. "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
  4371. "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
  4372. "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
  4373. "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
  4374. "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
  4375. "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
  4376. "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
  4377. "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
  4378. "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
  4379. "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
  4380. "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
  4381. "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
  4382. "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
  4383. "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
  4384. "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
  4385. "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
  4386. "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
  4387. "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
  4388. "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
  4389. "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
  4390. "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
  4391. "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
  4392. "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
  4393. "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
  4394. "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
  4395. "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
  4396. "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
  4397. "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
  4398. "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
  4399. "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
  4400. "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
  4401. "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
  4402. "\x26\x39\x83\x94\xef\x27\xd8\x53"
  4403. "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
  4404. "\x43\x7c\x95\x0a\x53\xef\x66\xda"
  4405. "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
  4406. "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
  4407. "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
  4408. "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
  4409. "\x88\xee\x73\xcf\x66\x2f\x52\x56"
  4410. "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
  4411. "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
  4412. "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
  4413. "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
  4414. "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
  4415. "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
  4416. "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
  4417. "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
  4418. "\xba\x61\x34\x38\x7c\xda\x48\x3e"
  4419. "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
  4420. "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
  4421. "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
  4422. "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
  4423. "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
  4424. "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
  4425. "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
  4426. "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
  4427. "\x35\x12\xe3\x36\x28\x27\x36\x58"
  4428. "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
  4429. "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
  4430. "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
  4431. "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
  4432. "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
  4433. "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
  4434. "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
  4435. "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
  4436. "\x89\xf3\x78\x35\x44\x62\x78\x72"
  4437. "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
  4438. "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
  4439. "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
  4440. "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
  4441. "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
  4442. "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
  4443. "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
  4444. "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
  4445. "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
  4446. "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
  4447. "\xd2\x49\x77\x81\x6d\x90\x70\xae"
  4448. "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
  4449. "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
  4450. "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
  4451. "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
  4452. "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
  4453. "\x45\x42\x27\x75\x50\xe5\xee\xb8"
  4454. "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
  4455. "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
  4456. "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
  4457. "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
  4458. "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
  4459. "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
  4460. "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
  4461. "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
  4462. "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
  4463. "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
  4464. "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
  4465. "\xa9\x21\x2b\x92\x94\x87\x62\x57"
  4466. "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
  4467. "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
  4468. "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
  4469. "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
  4470. "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
  4471. "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
  4472. "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
  4473. "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
  4474. "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
  4475. "\x69\x34\x78\x61\x24\x21\x9c\x8a"
  4476. "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
  4477. "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
  4478. "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
  4479. "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
  4480. "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
  4481. "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
  4482. "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
  4483. "\xb1\x95\x28\x86\x20\xe9\x17\x49"
  4484. "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
  4485. "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
  4486. "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
  4487. "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
  4488. "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
  4489. "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
  4490. "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
  4491. "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
  4492. "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
  4493. "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
  4494. "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
  4495. "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
  4496. "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
  4497. "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
  4498. "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
  4499. "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
  4500. "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
  4501. "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
  4502. "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
  4503. "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
  4504. "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
  4505. "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
  4506. "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
  4507. "\x29\x90\x46\x30\x92\x69\x7d\x13"
  4508. "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
  4509. "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
  4510. "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
  4511. "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
  4512. "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
  4513. "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
  4514. "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
  4515. "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
  4516. "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
  4517. "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
  4518. "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
  4519. "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
  4520. "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
  4521. "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
  4522. "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
  4523. "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
  4524. "\x77\x65\x08\x60\x11\x76\x4c\x8d"
  4525. "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
  4526. "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
  4527. "\x03\xd1\x24\x95\xec\x6d\xab\x38"
  4528. "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
  4529. "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
  4530. "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
  4531. "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
  4532. "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
  4533. "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
  4534. "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
  4535. "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
  4536. "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
  4537. "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
  4538. "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
  4539. "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
  4540. "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
  4541. "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
  4542. "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
  4543. "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
  4544. "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
  4545. "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
  4546. "\xe5\x79\x81\x73\xcd\x43\x59\x68"
  4547. "\x73\x02\x3b\x78\x21\x72\x43\x00"
  4548. "\x49\x17\xf7\x00\xaf\x68\x24\x53"
  4549. "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
  4550. "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
  4551. "\x11\x94\x13\x69\x51\x09\x28\xde"
  4552. "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
  4553. "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
  4554. "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
  4555. "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
  4556. "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
  4557. "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
  4558. "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
  4559. "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
  4560. "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
  4561. "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
  4562. "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
  4563. "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
  4564. "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
  4565. "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
  4566. "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
  4567. "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
  4568. "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
  4569. "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
  4570. "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
  4571. "\x69\xdc\xab\x24\x57\x60\x47\xc1"
  4572. "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
  4573. "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
  4574. "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
  4575. "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
  4576. "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
  4577. "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
  4578. "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
  4579. "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
  4580. "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
  4581. "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
  4582. "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
  4583. "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
  4584. "\x85\x62\x82\x70\x18\xe2\x9a\x78"
  4585. "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
  4586. "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
  4587. "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
  4588. "\x35\xf3\x61\x06\x72\x84\xc4\x32"
  4589. "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
  4590. "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
  4591. "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
  4592. "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
  4593. "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
  4594. "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
  4595. "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
  4596. "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
  4597. "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
  4598. "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
  4599. "\x4f\x73\x38\x09\x75\x64\x48\xe0"
  4600. "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
  4601. "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
  4602. "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
  4603. "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
  4604. "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
  4605. "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
  4606. "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
  4607. "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
  4608. "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
  4609. "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
  4610. "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
  4611. "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
  4612. "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
  4613. "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
  4614. "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
  4615. "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
  4616. "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
  4617. "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
  4618. "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
  4619. "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
  4620. "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
  4621. "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
  4622. "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
  4623. "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
  4624. "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
  4625. "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
  4626. "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
  4627. "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
  4628. "\xce\x4d\x5f\x18\x60\xce\x87\x22"
  4629. "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
  4630. "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
  4631. "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
  4632. "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
  4633. "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
  4634. "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
  4635. "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
  4636. "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
  4637. "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
  4638. "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
  4639. "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
  4640. "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
  4641. "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
  4642. "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
  4643. "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
  4644. "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
  4645. "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
  4646. "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
  4647. "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
  4648. "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
  4649. "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
  4650. "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
  4651. "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
  4652. "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
  4653. "\xce\x54\xf9\x18\x58\xb5\xff\x44"
  4654. "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
  4655. "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
  4656. "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
  4657. "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
  4658. "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
  4659. "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
  4660. "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
  4661. "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
  4662. "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
  4663. "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
  4664. "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
  4665. "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
  4666. "\x0c\xd6\x04\x14\xde\x51\x74\x75"
  4667. "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
  4668. "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
  4669. "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
  4670. "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
  4671. "\x75\x46\x65\x4e\x07\x34\x37\xa3"
  4672. "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
  4673. "\x69\x24\x0e\x38\x67\x43\x8c\xde"
  4674. "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
  4675. "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
  4676. "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
  4677. "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
  4678. "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
  4679. "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
  4680. "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
  4681. "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
  4682. "\x91\x7d\x62\x64\x96\x72\xde\xfc"
  4683. "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
  4684. "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
  4685. "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
  4686. "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
  4687. "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
  4688. "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
  4689. "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
  4690. "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
  4691. "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
  4692. "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
  4693. "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
  4694. "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
  4695. "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
  4696. "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
  4697. "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
  4698. "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
  4699. "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
  4700. "\xae\xed\x39\x88\x42\x11\x3c\xed"
  4701. "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
  4702. "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
  4703. "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
  4704. "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
  4705. "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
  4706. "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
  4707. "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
  4708. "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
  4709. "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
  4710. "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
  4711. "\x34\x17\xde\xba\x47\xf1\x06\x18"
  4712. "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
  4713. "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
  4714. "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
  4715. "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
  4716. "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
  4717. "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
  4718. "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
  4719. "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
  4720. "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
  4721. "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
  4722. "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
  4723. "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
  4724. "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
  4725. "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
  4726. "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
  4727. "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
  4728. "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
  4729. "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
  4730. "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
  4731. "\x2c\x56\x39\x79\x0f\x69\x44\x75"
  4732. "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
  4733. "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
  4734. "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
  4735. "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
  4736. "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
  4737. "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
  4738. "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
  4739. "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
  4740. "\x63\x9b\xce\x61\x24\x79\xc0\x70"
  4741. "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
  4742. "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
  4743. "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
  4744. "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
  4745. "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
  4746. "\x74\x56\x58\x40\x02\x37\x52\x2c"
  4747. "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
  4748. "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
  4749. "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
  4750. "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
  4751. "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
  4752. "\xed\x38\x80\x36\x72\x43\x27\x49"
  4753. "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
  4754. "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
  4755. "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
  4756. "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
  4757. "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
  4758. "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
  4759. "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
  4760. "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
  4761. "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
  4762. "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
  4763. "\x12\xee\x30\xfe\xd8\x30\xef\x34"
  4764. "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
  4765. "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
  4766. "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
  4767. "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
  4768. "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
  4769. "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
  4770. "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
  4771. "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
  4772. "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
  4773. "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
  4774. "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
  4775. "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
  4776. "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
  4777. "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
  4778. "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
  4779. "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
  4780. "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
  4781. "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
  4782. "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
  4783. "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
  4784. "\x44\x12\xfb\x73\x77\xd4\x13\x39"
  4785. "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
  4786. "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
  4787. "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
  4788. "\x4b\xef\x31\x18\xea\xac\xb1\x84"
  4789. "\x21\xed\xda\x86",
  4790. .rlen = 4100,
  4791. },
  4792. };
  4793. static struct cipher_testvec aes_ctr_dec_tv_template[] = {
  4794. { /* From RFC 3686 */
  4795. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  4796. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  4797. "\x00\x00\x00\x30",
  4798. .klen = 20,
  4799. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  4800. .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  4801. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  4802. .ilen = 16,
  4803. .result = "Single block msg",
  4804. .rlen = 16,
  4805. }, {
  4806. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  4807. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  4808. "\x00\x6c\xb6\xdb",
  4809. .klen = 20,
  4810. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  4811. .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  4812. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  4813. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  4814. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  4815. .ilen = 32,
  4816. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4817. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4818. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4819. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4820. .rlen = 32,
  4821. }, {
  4822. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  4823. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  4824. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  4825. "\x00\x00\x00\x48",
  4826. .klen = 28,
  4827. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  4828. .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  4829. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  4830. .ilen = 16,
  4831. .result = "Single block msg",
  4832. .rlen = 16,
  4833. }, {
  4834. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  4835. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  4836. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  4837. "\x00\x96\xb0\x3b",
  4838. .klen = 28,
  4839. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  4840. .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  4841. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  4842. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  4843. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  4844. .ilen = 32,
  4845. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4846. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4847. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4848. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4849. .rlen = 32,
  4850. }, {
  4851. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  4852. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  4853. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  4854. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  4855. "\x00\x00\x00\x60",
  4856. .klen = 36,
  4857. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  4858. .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  4859. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  4860. .ilen = 16,
  4861. .result = "Single block msg",
  4862. .rlen = 16,
  4863. }, {
  4864. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  4865. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  4866. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  4867. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  4868. "\x00\xfa\xac\x24",
  4869. .klen = 36,
  4870. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  4871. .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  4872. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  4873. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  4874. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  4875. .ilen = 32,
  4876. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4877. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4878. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4879. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4880. .rlen = 32,
  4881. },
  4882. };
  4883. static struct aead_testvec aes_gcm_enc_tv_template[] = {
  4884. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  4885. .key = zeroed_string,
  4886. .klen = 16,
  4887. .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
  4888. "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
  4889. .rlen = 16,
  4890. }, {
  4891. .key = zeroed_string,
  4892. .klen = 16,
  4893. .input = zeroed_string,
  4894. .ilen = 16,
  4895. .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
  4896. "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
  4897. "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
  4898. "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
  4899. .rlen = 32,
  4900. }, {
  4901. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  4902. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  4903. .klen = 16,
  4904. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  4905. "\xde\xca\xf8\x88",
  4906. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  4907. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  4908. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  4909. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  4910. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  4911. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  4912. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  4913. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  4914. .ilen = 64,
  4915. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  4916. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  4917. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  4918. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  4919. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  4920. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  4921. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  4922. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  4923. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  4924. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  4925. .rlen = 80,
  4926. }, {
  4927. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  4928. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  4929. .klen = 16,
  4930. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  4931. "\xde\xca\xf8\x88",
  4932. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  4933. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  4934. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  4935. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  4936. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  4937. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  4938. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  4939. "\xba\x63\x7b\x39",
  4940. .ilen = 60,
  4941. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  4942. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  4943. "\xab\xad\xda\xd2",
  4944. .alen = 20,
  4945. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  4946. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  4947. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  4948. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  4949. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  4950. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  4951. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  4952. "\x3d\x58\xe0\x91"
  4953. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  4954. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  4955. .rlen = 76,
  4956. }, {
  4957. .key = zeroed_string,
  4958. .klen = 24,
  4959. .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
  4960. "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
  4961. .rlen = 16,
  4962. }, {
  4963. .key = zeroed_string,
  4964. .klen = 24,
  4965. .input = zeroed_string,
  4966. .ilen = 16,
  4967. .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  4968. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  4969. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  4970. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  4971. .rlen = 32,
  4972. }, {
  4973. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  4974. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  4975. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  4976. .klen = 24,
  4977. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  4978. "\xde\xca\xf8\x88",
  4979. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  4980. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  4981. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  4982. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  4983. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  4984. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  4985. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  4986. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  4987. .ilen = 64,
  4988. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  4989. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  4990. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  4991. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  4992. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  4993. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  4994. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  4995. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  4996. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  4997. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  4998. .rlen = 80,
  4999. }, {
  5000. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5001. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5002. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5003. .klen = 24,
  5004. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5005. "\xde\xca\xf8\x88",
  5006. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5007. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5008. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5009. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5010. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5011. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5012. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5013. "\xba\x63\x7b\x39",
  5014. .ilen = 60,
  5015. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5016. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5017. "\xab\xad\xda\xd2",
  5018. .alen = 20,
  5019. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5020. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5021. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5022. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5023. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5024. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5025. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5026. "\xcc\xda\x27\x10"
  5027. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  5028. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  5029. .rlen = 76,
  5030. .np = 2,
  5031. .tap = { 32, 28 },
  5032. .anp = 2,
  5033. .atap = { 8, 12 }
  5034. }, {
  5035. .key = zeroed_string,
  5036. .klen = 32,
  5037. .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
  5038. "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
  5039. .rlen = 16,
  5040. }
  5041. };
  5042. static struct aead_testvec aes_gcm_dec_tv_template[] = {
  5043. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  5044. .key = zeroed_string,
  5045. .klen = 32,
  5046. .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
  5047. "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
  5048. "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
  5049. "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
  5050. .ilen = 32,
  5051. .result = zeroed_string,
  5052. .rlen = 16,
  5053. }, {
  5054. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5055. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5056. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5057. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5058. .klen = 32,
  5059. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5060. "\xde\xca\xf8\x88",
  5061. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  5062. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  5063. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  5064. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  5065. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  5066. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  5067. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  5068. "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
  5069. "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
  5070. "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
  5071. .ilen = 80,
  5072. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5073. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5074. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5075. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5076. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5077. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5078. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5079. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5080. .rlen = 64,
  5081. }, {
  5082. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5083. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5084. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5085. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5086. .klen = 32,
  5087. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5088. "\xde\xca\xf8\x88",
  5089. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  5090. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  5091. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  5092. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  5093. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  5094. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  5095. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  5096. "\xbc\xc9\xf6\x62"
  5097. "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
  5098. "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
  5099. .ilen = 76,
  5100. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5101. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5102. "\xab\xad\xda\xd2",
  5103. .alen = 20,
  5104. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5105. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5106. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5107. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5108. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5109. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5110. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5111. "\xba\x63\x7b\x39",
  5112. .rlen = 60,
  5113. .np = 2,
  5114. .tap = { 48, 28 },
  5115. .anp = 3,
  5116. .atap = { 8, 8, 4 }
  5117. }, {
  5118. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5119. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5120. .klen = 16,
  5121. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5122. "\xde\xca\xf8\x88",
  5123. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5124. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5125. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5126. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5127. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5128. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5129. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5130. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  5131. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  5132. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  5133. .ilen = 80,
  5134. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5135. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5136. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5137. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5138. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5139. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5140. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5141. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5142. .rlen = 64,
  5143. }, {
  5144. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5145. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5146. .klen = 16,
  5147. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5148. "\xde\xca\xf8\x88",
  5149. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5150. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5151. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5152. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5153. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5154. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5155. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5156. "\x3d\x58\xe0\x91"
  5157. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  5158. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  5159. .ilen = 76,
  5160. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5161. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5162. "\xab\xad\xda\xd2",
  5163. .alen = 20,
  5164. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5165. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5166. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5167. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5168. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5169. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5170. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5171. "\xba\x63\x7b\x39",
  5172. .rlen = 60,
  5173. }, {
  5174. .key = zeroed_string,
  5175. .klen = 24,
  5176. .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  5177. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  5178. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  5179. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  5180. .ilen = 32,
  5181. .result = zeroed_string,
  5182. .rlen = 16,
  5183. }, {
  5184. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5185. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5186. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5187. .klen = 24,
  5188. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5189. "\xde\xca\xf8\x88",
  5190. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5191. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5192. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5193. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5194. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5195. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5196. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5197. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  5198. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  5199. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  5200. .ilen = 80,
  5201. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5202. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5203. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5204. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5205. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5206. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5207. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5208. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5209. .rlen = 64,
  5210. }, {
  5211. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5212. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5213. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5214. .klen = 24,
  5215. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5216. "\xde\xca\xf8\x88",
  5217. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5218. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5219. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5220. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5221. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5222. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5223. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5224. "\xcc\xda\x27\x10"
  5225. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  5226. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  5227. .ilen = 76,
  5228. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5229. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5230. "\xab\xad\xda\xd2",
  5231. .alen = 20,
  5232. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5233. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5234. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5235. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5236. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5237. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5238. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5239. "\xba\x63\x7b\x39",
  5240. .rlen = 60,
  5241. }
  5242. };
  5243. static struct aead_testvec aes_ccm_enc_tv_template[] = {
  5244. { /* From RFC 3610 */
  5245. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5246. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5247. .klen = 16,
  5248. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  5249. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5250. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5251. .alen = 8,
  5252. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5253. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5254. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  5255. .ilen = 23,
  5256. .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  5257. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  5258. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  5259. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  5260. .rlen = 31,
  5261. }, {
  5262. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5263. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5264. .klen = 16,
  5265. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  5266. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5267. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5268. "\x08\x09\x0a\x0b",
  5269. .alen = 12,
  5270. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5271. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5272. "\x1c\x1d\x1e\x1f",
  5273. .ilen = 20,
  5274. .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  5275. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  5276. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  5277. "\x7d\x9c\x2d\x93",
  5278. .rlen = 28,
  5279. }, {
  5280. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5281. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5282. .klen = 16,
  5283. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  5284. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5285. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5286. .alen = 8,
  5287. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5288. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5289. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5290. "\x20",
  5291. .ilen = 25,
  5292. .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  5293. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  5294. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  5295. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  5296. "\x7e\x5f\x4e",
  5297. .rlen = 35,
  5298. }, {
  5299. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5300. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5301. .klen = 16,
  5302. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  5303. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5304. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5305. "\x08\x09\x0a\x0b",
  5306. .alen = 12,
  5307. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5308. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5309. "\x1c\x1d\x1e",
  5310. .ilen = 19,
  5311. .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
  5312. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  5313. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  5314. "\x4d\x99\x99\x88\xdd",
  5315. .rlen = 29,
  5316. }, {
  5317. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5318. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5319. .klen = 16,
  5320. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  5321. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5322. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  5323. .alen = 8,
  5324. .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  5325. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  5326. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  5327. .ilen = 24,
  5328. .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  5329. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  5330. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  5331. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  5332. .rlen = 32,
  5333. }, {
  5334. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5335. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5336. .klen = 16,
  5337. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  5338. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5339. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  5340. "\x20\xea\x60\xc0",
  5341. .alen = 12,
  5342. .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  5343. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  5344. "\x3a\x80\x3b\xa8\x7f",
  5345. .ilen = 21,
  5346. .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  5347. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  5348. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  5349. "\x5a\xe0\x70\x45\x51",
  5350. .rlen = 29,
  5351. }, {
  5352. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5353. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5354. .klen = 16,
  5355. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  5356. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5357. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  5358. .alen = 8,
  5359. .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  5360. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  5361. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  5362. .ilen = 23,
  5363. .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  5364. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  5365. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  5366. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  5367. "\xba",
  5368. .rlen = 33,
  5369. },
  5370. };
  5371. static struct aead_testvec aes_ccm_dec_tv_template[] = {
  5372. { /* From RFC 3610 */
  5373. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5374. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5375. .klen = 16,
  5376. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  5377. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5378. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5379. .alen = 8,
  5380. .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  5381. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  5382. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  5383. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  5384. .ilen = 31,
  5385. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5386. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5387. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  5388. .rlen = 23,
  5389. }, {
  5390. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5391. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5392. .klen = 16,
  5393. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  5394. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5395. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5396. "\x08\x09\x0a\x0b",
  5397. .alen = 12,
  5398. .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  5399. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  5400. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  5401. "\x7d\x9c\x2d\x93",
  5402. .ilen = 28,
  5403. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5404. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5405. "\x1c\x1d\x1e\x1f",
  5406. .rlen = 20,
  5407. }, {
  5408. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5409. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5410. .klen = 16,
  5411. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  5412. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5413. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5414. .alen = 8,
  5415. .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  5416. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  5417. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  5418. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  5419. "\x7e\x5f\x4e",
  5420. .ilen = 35,
  5421. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5422. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5423. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5424. "\x20",
  5425. .rlen = 25,
  5426. }, {
  5427. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5428. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5429. .klen = 16,
  5430. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  5431. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5432. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5433. "\x08\x09\x0a\x0b",
  5434. .alen = 12,
  5435. .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
  5436. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  5437. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  5438. "\x4d\x99\x99\x88\xdd",
  5439. .ilen = 29,
  5440. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5441. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5442. "\x1c\x1d\x1e",
  5443. .rlen = 19,
  5444. }, {
  5445. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5446. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5447. .klen = 16,
  5448. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  5449. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5450. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  5451. .alen = 8,
  5452. .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  5453. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  5454. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  5455. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  5456. .ilen = 32,
  5457. .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  5458. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  5459. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  5460. .rlen = 24,
  5461. }, {
  5462. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5463. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5464. .klen = 16,
  5465. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  5466. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5467. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  5468. "\x20\xea\x60\xc0",
  5469. .alen = 12,
  5470. .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  5471. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  5472. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  5473. "\x5a\xe0\x70\x45\x51",
  5474. .ilen = 29,
  5475. .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  5476. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  5477. "\x3a\x80\x3b\xa8\x7f",
  5478. .rlen = 21,
  5479. }, {
  5480. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5481. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5482. .klen = 16,
  5483. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  5484. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5485. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  5486. .alen = 8,
  5487. .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  5488. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  5489. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  5490. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  5491. "\xba",
  5492. .ilen = 33,
  5493. .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  5494. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  5495. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  5496. .rlen = 23,
  5497. },
  5498. };
  5499. /* Cast5 test vectors from RFC 2144 */
  5500. #define CAST5_ENC_TEST_VECTORS 3
  5501. #define CAST5_DEC_TEST_VECTORS 3
  5502. static struct cipher_testvec cast5_enc_tv_template[] = {
  5503. {
  5504. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  5505. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  5506. .klen = 16,
  5507. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5508. .ilen = 8,
  5509. .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  5510. .rlen = 8,
  5511. }, {
  5512. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  5513. "\x23\x45",
  5514. .klen = 10,
  5515. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5516. .ilen = 8,
  5517. .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  5518. .rlen = 8,
  5519. }, {
  5520. .key = "\x01\x23\x45\x67\x12",
  5521. .klen = 5,
  5522. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5523. .ilen = 8,
  5524. .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  5525. .rlen = 8,
  5526. },
  5527. };
  5528. static struct cipher_testvec cast5_dec_tv_template[] = {
  5529. {
  5530. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  5531. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  5532. .klen = 16,
  5533. .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  5534. .ilen = 8,
  5535. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5536. .rlen = 8,
  5537. }, {
  5538. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  5539. "\x23\x45",
  5540. .klen = 10,
  5541. .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  5542. .ilen = 8,
  5543. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5544. .rlen = 8,
  5545. }, {
  5546. .key = "\x01\x23\x45\x67\x12",
  5547. .klen = 5,
  5548. .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  5549. .ilen = 8,
  5550. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5551. .rlen = 8,
  5552. },
  5553. };
  5554. /*
  5555. * ARC4 test vectors from OpenSSL
  5556. */
  5557. #define ARC4_ENC_TEST_VECTORS 7
  5558. #define ARC4_DEC_TEST_VECTORS 7
  5559. static struct cipher_testvec arc4_enc_tv_template[] = {
  5560. {
  5561. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5562. .klen = 8,
  5563. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5564. .ilen = 8,
  5565. .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  5566. .rlen = 8,
  5567. }, {
  5568. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5569. .klen = 8,
  5570. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5571. .ilen = 8,
  5572. .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  5573. .rlen = 8,
  5574. }, {
  5575. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5576. .klen = 8,
  5577. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5578. .ilen = 8,
  5579. .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  5580. .rlen = 8,
  5581. }, {
  5582. .key = "\xef\x01\x23\x45",
  5583. .klen = 4,
  5584. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5585. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5586. "\x00\x00\x00\x00",
  5587. .ilen = 20,
  5588. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  5589. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  5590. "\x36\xb6\x78\x58",
  5591. .rlen = 20,
  5592. }, {
  5593. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5594. .klen = 8,
  5595. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  5596. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  5597. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  5598. "\x12\x34\x56\x78",
  5599. .ilen = 28,
  5600. .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  5601. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  5602. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  5603. "\x40\x01\x1e\xcf",
  5604. .rlen = 28,
  5605. }, {
  5606. .key = "\xef\x01\x23\x45",
  5607. .klen = 4,
  5608. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5609. "\x00\x00",
  5610. .ilen = 10,
  5611. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  5612. "\xbd\x61",
  5613. .rlen = 10,
  5614. }, {
  5615. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  5616. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5617. .klen = 16,
  5618. .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  5619. .ilen = 8,
  5620. .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  5621. .rlen = 8,
  5622. },
  5623. };
  5624. static struct cipher_testvec arc4_dec_tv_template[] = {
  5625. {
  5626. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5627. .klen = 8,
  5628. .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  5629. .ilen = 8,
  5630. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5631. .rlen = 8,
  5632. }, {
  5633. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5634. .klen = 8,
  5635. .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  5636. .ilen = 8,
  5637. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5638. .rlen = 8,
  5639. }, {
  5640. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5641. .klen = 8,
  5642. .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  5643. .ilen = 8,
  5644. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5645. .rlen = 8,
  5646. }, {
  5647. .key = "\xef\x01\x23\x45",
  5648. .klen = 4,
  5649. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  5650. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  5651. "\x36\xb6\x78\x58",
  5652. .ilen = 20,
  5653. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5654. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5655. "\x00\x00\x00\x00",
  5656. .rlen = 20,
  5657. }, {
  5658. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  5659. .klen = 8,
  5660. .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  5661. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  5662. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  5663. "\x40\x01\x1e\xcf",
  5664. .ilen = 28,
  5665. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  5666. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  5667. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  5668. "\x12\x34\x56\x78",
  5669. .rlen = 28,
  5670. }, {
  5671. .key = "\xef\x01\x23\x45",
  5672. .klen = 4,
  5673. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  5674. "\xbd\x61",
  5675. .ilen = 10,
  5676. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5677. "\x00\x00",
  5678. .rlen = 10,
  5679. }, {
  5680. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  5681. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5682. .klen = 16,
  5683. .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  5684. .ilen = 8,
  5685. .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  5686. .rlen = 8,
  5687. },
  5688. };
  5689. /*
  5690. * TEA test vectors
  5691. */
  5692. #define TEA_ENC_TEST_VECTORS 4
  5693. #define TEA_DEC_TEST_VECTORS 4
  5694. static struct cipher_testvec tea_enc_tv_template[] = {
  5695. {
  5696. .key = zeroed_string,
  5697. .klen = 16,
  5698. .input = zeroed_string,
  5699. .ilen = 8,
  5700. .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  5701. .rlen = 8,
  5702. }, {
  5703. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  5704. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  5705. .klen = 16,
  5706. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  5707. .ilen = 8,
  5708. .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  5709. .rlen = 8,
  5710. }, {
  5711. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  5712. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  5713. .klen = 16,
  5714. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  5715. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  5716. .ilen = 16,
  5717. .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  5718. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  5719. .rlen = 16,
  5720. }, {
  5721. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  5722. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  5723. .klen = 16,
  5724. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  5725. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  5726. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  5727. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  5728. .ilen = 32,
  5729. .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  5730. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  5731. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  5732. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  5733. .rlen = 32,
  5734. }
  5735. };
  5736. static struct cipher_testvec tea_dec_tv_template[] = {
  5737. {
  5738. .key = zeroed_string,
  5739. .klen = 16,
  5740. .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  5741. .ilen = 8,
  5742. .result = zeroed_string,
  5743. .rlen = 8,
  5744. }, {
  5745. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  5746. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  5747. .klen = 16,
  5748. .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  5749. .ilen = 8,
  5750. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  5751. .rlen = 8,
  5752. }, {
  5753. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  5754. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  5755. .klen = 16,
  5756. .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  5757. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  5758. .ilen = 16,
  5759. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  5760. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  5761. .rlen = 16,
  5762. }, {
  5763. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  5764. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  5765. .klen = 16,
  5766. .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  5767. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  5768. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  5769. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  5770. .ilen = 32,
  5771. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  5772. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  5773. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  5774. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  5775. .rlen = 32,
  5776. }
  5777. };
  5778. /*
  5779. * XTEA test vectors
  5780. */
  5781. #define XTEA_ENC_TEST_VECTORS 4
  5782. #define XTEA_DEC_TEST_VECTORS 4
  5783. static struct cipher_testvec xtea_enc_tv_template[] = {
  5784. {
  5785. .key = zeroed_string,
  5786. .klen = 16,
  5787. .input = zeroed_string,
  5788. .ilen = 8,
  5789. .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  5790. .rlen = 8,
  5791. }, {
  5792. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  5793. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  5794. .klen = 16,
  5795. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  5796. .ilen = 8,
  5797. .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  5798. .rlen = 8,
  5799. }, {
  5800. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  5801. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  5802. .klen = 16,
  5803. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  5804. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  5805. .ilen = 16,
  5806. .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  5807. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  5808. .rlen = 16,
  5809. }, {
  5810. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  5811. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  5812. .klen = 16,
  5813. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  5814. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  5815. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  5816. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  5817. .ilen = 32,
  5818. .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  5819. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  5820. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  5821. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  5822. .rlen = 32,
  5823. }
  5824. };
  5825. static struct cipher_testvec xtea_dec_tv_template[] = {
  5826. {
  5827. .key = zeroed_string,
  5828. .klen = 16,
  5829. .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  5830. .ilen = 8,
  5831. .result = zeroed_string,
  5832. .rlen = 8,
  5833. }, {
  5834. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  5835. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  5836. .klen = 16,
  5837. .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  5838. .ilen = 8,
  5839. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  5840. .rlen = 8,
  5841. }, {
  5842. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  5843. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  5844. .klen = 16,
  5845. .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  5846. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  5847. .ilen = 16,
  5848. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  5849. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  5850. .rlen = 16,
  5851. }, {
  5852. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  5853. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  5854. .klen = 16,
  5855. .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  5856. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  5857. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  5858. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  5859. .ilen = 32,
  5860. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  5861. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  5862. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  5863. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  5864. .rlen = 32,
  5865. }
  5866. };
  5867. /*
  5868. * KHAZAD test vectors.
  5869. */
  5870. #define KHAZAD_ENC_TEST_VECTORS 5
  5871. #define KHAZAD_DEC_TEST_VECTORS 5
  5872. static struct cipher_testvec khazad_enc_tv_template[] = {
  5873. {
  5874. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  5875. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5876. .klen = 16,
  5877. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5878. .ilen = 8,
  5879. .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  5880. .rlen = 8,
  5881. }, {
  5882. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  5883. "\x38\x38\x38\x38\x38\x38\x38\x38",
  5884. .klen = 16,
  5885. .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
  5886. .ilen = 8,
  5887. .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  5888. .rlen = 8,
  5889. }, {
  5890. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  5891. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  5892. .klen = 16,
  5893. .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  5894. .ilen = 8,
  5895. .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  5896. .rlen = 8,
  5897. }, {
  5898. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  5899. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  5900. .klen = 16,
  5901. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  5902. .ilen = 8,
  5903. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  5904. .rlen = 8,
  5905. }, {
  5906. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  5907. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  5908. .klen = 16,
  5909. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  5910. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  5911. .ilen = 16,
  5912. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  5913. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  5914. .rlen = 16,
  5915. },
  5916. };
  5917. static struct cipher_testvec khazad_dec_tv_template[] = {
  5918. {
  5919. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  5920. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5921. .klen = 16,
  5922. .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  5923. .ilen = 8,
  5924. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5925. .rlen = 8,
  5926. }, {
  5927. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  5928. "\x38\x38\x38\x38\x38\x38\x38\x38",
  5929. .klen = 16,
  5930. .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  5931. .ilen = 8,
  5932. .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
  5933. .rlen = 8,
  5934. }, {
  5935. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  5936. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  5937. .klen = 16,
  5938. .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  5939. .ilen = 8,
  5940. .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  5941. .rlen = 8,
  5942. }, {
  5943. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  5944. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  5945. .klen = 16,
  5946. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  5947. .ilen = 8,
  5948. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  5949. .rlen = 8,
  5950. }, {
  5951. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  5952. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  5953. .klen = 16,
  5954. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  5955. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  5956. .ilen = 16,
  5957. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  5958. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  5959. .rlen = 16,
  5960. },
  5961. };
  5962. /*
  5963. * Anubis test vectors.
  5964. */
  5965. #define ANUBIS_ENC_TEST_VECTORS 5
  5966. #define ANUBIS_DEC_TEST_VECTORS 5
  5967. #define ANUBIS_CBC_ENC_TEST_VECTORS 2
  5968. #define ANUBIS_CBC_DEC_TEST_VECTORS 2
  5969. static struct cipher_testvec anubis_enc_tv_template[] = {
  5970. {
  5971. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  5972. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  5973. .klen = 16,
  5974. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  5975. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  5976. .ilen = 16,
  5977. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  5978. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  5979. .rlen = 16,
  5980. }, {
  5981. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  5982. "\x03\x03\x03\x03\x03\x03\x03\x03"
  5983. "\x03\x03\x03\x03",
  5984. .klen = 20,
  5985. .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
  5986. "\x03\x03\x03\x03\x03\x03\x03\x03",
  5987. .ilen = 16,
  5988. .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  5989. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  5990. .rlen = 16,
  5991. }, {
  5992. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  5993. "\x24\x24\x24\x24\x24\x24\x24\x24"
  5994. "\x24\x24\x24\x24\x24\x24\x24\x24"
  5995. "\x24\x24\x24\x24",
  5996. .klen = 28,
  5997. .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
  5998. "\x24\x24\x24\x24\x24\x24\x24\x24",
  5999. .ilen = 16,
  6000. .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  6001. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  6002. .rlen = 16,
  6003. }, {
  6004. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6005. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6006. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6007. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6008. .klen = 32,
  6009. .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6010. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6011. .ilen = 16,
  6012. .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  6013. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  6014. .rlen = 16,
  6015. }, {
  6016. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6017. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6018. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6019. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6020. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6021. .klen = 40,
  6022. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6023. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6024. .ilen = 16,
  6025. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6026. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  6027. .rlen = 16,
  6028. },
  6029. };
  6030. static struct cipher_testvec anubis_dec_tv_template[] = {
  6031. {
  6032. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6033. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6034. .klen = 16,
  6035. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6036. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  6037. .ilen = 16,
  6038. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6039. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6040. .rlen = 16,
  6041. }, {
  6042. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6043. "\x03\x03\x03\x03\x03\x03\x03\x03"
  6044. "\x03\x03\x03\x03",
  6045. .klen = 20,
  6046. .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  6047. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  6048. .ilen = 16,
  6049. .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6050. "\x03\x03\x03\x03\x03\x03\x03\x03",
  6051. .rlen = 16,
  6052. }, {
  6053. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6054. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6055. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6056. "\x24\x24\x24\x24",
  6057. .klen = 28,
  6058. .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  6059. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  6060. .ilen = 16,
  6061. .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6062. "\x24\x24\x24\x24\x24\x24\x24\x24",
  6063. .rlen = 16,
  6064. }, {
  6065. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6066. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6067. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6068. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6069. .klen = 32,
  6070. .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  6071. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  6072. .ilen = 16,
  6073. .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6074. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6075. .rlen = 16,
  6076. }, {
  6077. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6078. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6079. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6080. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6081. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6082. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6083. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  6084. .klen = 40,
  6085. .ilen = 16,
  6086. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6087. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6088. .rlen = 16,
  6089. },
  6090. };
  6091. static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
  6092. {
  6093. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6094. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6095. .klen = 16,
  6096. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6097. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6098. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6099. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6100. .ilen = 32,
  6101. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6102. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  6103. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  6104. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  6105. .rlen = 32,
  6106. }, {
  6107. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6108. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6109. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6110. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6111. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6112. .klen = 40,
  6113. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6114. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6115. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6116. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6117. .ilen = 32,
  6118. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6119. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  6120. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  6121. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  6122. .rlen = 32,
  6123. },
  6124. };
  6125. static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
  6126. {
  6127. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6128. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6129. .klen = 16,
  6130. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6131. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  6132. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  6133. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  6134. .ilen = 32,
  6135. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6136. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6137. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6138. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6139. .rlen = 32,
  6140. }, {
  6141. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6142. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6143. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6144. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6145. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6146. .klen = 40,
  6147. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6148. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  6149. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  6150. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  6151. .ilen = 32,
  6152. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6153. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6154. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6155. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6156. .rlen = 32,
  6157. },
  6158. };
  6159. /*
  6160. * XETA test vectors
  6161. */
  6162. #define XETA_ENC_TEST_VECTORS 4
  6163. #define XETA_DEC_TEST_VECTORS 4
  6164. static struct cipher_testvec xeta_enc_tv_template[] = {
  6165. {
  6166. .key = zeroed_string,
  6167. .klen = 16,
  6168. .input = zeroed_string,
  6169. .ilen = 8,
  6170. .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  6171. .rlen = 8,
  6172. }, {
  6173. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6174. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6175. .klen = 16,
  6176. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6177. .ilen = 8,
  6178. .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  6179. .rlen = 8,
  6180. }, {
  6181. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6182. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6183. .klen = 16,
  6184. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6185. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6186. .ilen = 16,
  6187. .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  6188. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  6189. .rlen = 16,
  6190. }, {
  6191. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6192. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6193. .klen = 16,
  6194. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6195. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6196. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6197. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6198. .ilen = 32,
  6199. .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  6200. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  6201. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  6202. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  6203. .rlen = 32,
  6204. }
  6205. };
  6206. static struct cipher_testvec xeta_dec_tv_template[] = {
  6207. {
  6208. .key = zeroed_string,
  6209. .klen = 16,
  6210. .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  6211. .ilen = 8,
  6212. .result = zeroed_string,
  6213. .rlen = 8,
  6214. }, {
  6215. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6216. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6217. .klen = 16,
  6218. .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  6219. .ilen = 8,
  6220. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6221. .rlen = 8,
  6222. }, {
  6223. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6224. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6225. .klen = 16,
  6226. .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  6227. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  6228. .ilen = 16,
  6229. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6230. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6231. .rlen = 16,
  6232. }, {
  6233. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6234. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6235. .klen = 16,
  6236. .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  6237. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  6238. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  6239. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  6240. .ilen = 32,
  6241. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6242. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6243. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6244. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6245. .rlen = 32,
  6246. }
  6247. };
  6248. /*
  6249. * FCrypt test vectors
  6250. */
  6251. #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
  6252. #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
  6253. static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
  6254. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  6255. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6256. .klen = 8,
  6257. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6258. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6259. .ilen = 8,
  6260. .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  6261. .rlen = 8,
  6262. }, {
  6263. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  6264. .klen = 8,
  6265. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6266. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  6267. .ilen = 8,
  6268. .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  6269. .rlen = 8,
  6270. }, { /* From Arla */
  6271. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6272. .klen = 8,
  6273. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6274. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  6275. .ilen = 48,
  6276. .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  6277. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  6278. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  6279. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  6280. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  6281. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  6282. .rlen = 48,
  6283. }, {
  6284. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6285. .klen = 8,
  6286. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6287. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  6288. .ilen = 48,
  6289. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  6290. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  6291. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  6292. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  6293. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  6294. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  6295. .rlen = 48,
  6296. }, { /* split-page version */
  6297. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6298. .klen = 8,
  6299. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6300. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  6301. .ilen = 48,
  6302. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  6303. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  6304. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  6305. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  6306. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  6307. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  6308. .rlen = 48,
  6309. .np = 2,
  6310. .tap = { 20, 28 },
  6311. }
  6312. };
  6313. static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
  6314. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  6315. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6316. .klen = 8,
  6317. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6318. .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  6319. .ilen = 8,
  6320. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6321. .rlen = 8,
  6322. }, {
  6323. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  6324. .klen = 8,
  6325. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6326. .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  6327. .ilen = 8,
  6328. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  6329. .rlen = 8,
  6330. }, { /* From Arla */
  6331. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6332. .klen = 8,
  6333. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6334. .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  6335. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  6336. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  6337. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  6338. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  6339. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  6340. .ilen = 48,
  6341. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  6342. .rlen = 48,
  6343. }, {
  6344. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6345. .klen = 8,
  6346. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6347. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  6348. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  6349. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  6350. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  6351. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  6352. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  6353. .ilen = 48,
  6354. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  6355. .rlen = 48,
  6356. }, { /* split-page version */
  6357. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6358. .klen = 8,
  6359. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6360. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  6361. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  6362. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  6363. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  6364. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  6365. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  6366. .ilen = 48,
  6367. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  6368. .rlen = 48,
  6369. .np = 2,
  6370. .tap = { 20, 28 },
  6371. }
  6372. };
  6373. /*
  6374. * CAMELLIA test vectors.
  6375. */
  6376. #define CAMELLIA_ENC_TEST_VECTORS 3
  6377. #define CAMELLIA_DEC_TEST_VECTORS 3
  6378. #define CAMELLIA_CBC_ENC_TEST_VECTORS 2
  6379. #define CAMELLIA_CBC_DEC_TEST_VECTORS 2
  6380. static struct cipher_testvec camellia_enc_tv_template[] = {
  6381. {
  6382. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6383. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6384. .klen = 16,
  6385. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6386. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6387. .ilen = 16,
  6388. .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
  6389. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  6390. .rlen = 16,
  6391. }, {
  6392. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6393. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  6394. "\x00\x11\x22\x33\x44\x55\x66\x77",
  6395. .klen = 24,
  6396. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6397. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6398. .ilen = 16,
  6399. .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  6400. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  6401. .rlen = 16,
  6402. }, {
  6403. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6404. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  6405. "\x00\x11\x22\x33\x44\x55\x66\x77"
  6406. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6407. .klen = 32,
  6408. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6409. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6410. .ilen = 16,
  6411. .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  6412. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  6413. .rlen = 16,
  6414. },
  6415. };
  6416. static struct cipher_testvec camellia_dec_tv_template[] = {
  6417. {
  6418. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6419. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6420. .klen = 16,
  6421. .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
  6422. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  6423. .ilen = 16,
  6424. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6425. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6426. .rlen = 16,
  6427. }, {
  6428. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6429. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  6430. "\x00\x11\x22\x33\x44\x55\x66\x77",
  6431. .klen = 24,
  6432. .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  6433. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  6434. .ilen = 16,
  6435. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6436. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6437. .rlen = 16,
  6438. }, {
  6439. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6440. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  6441. "\x00\x11\x22\x33\x44\x55\x66\x77"
  6442. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6443. .klen = 32,
  6444. .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  6445. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  6446. .ilen = 16,
  6447. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6448. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6449. .rlen = 16,
  6450. },
  6451. };
  6452. static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
  6453. {
  6454. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  6455. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  6456. .klen = 16,
  6457. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  6458. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  6459. .input = "Single block msg",
  6460. .ilen = 16,
  6461. .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  6462. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  6463. .rlen = 16,
  6464. }, {
  6465. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  6466. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  6467. .klen = 16,
  6468. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  6469. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  6470. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6471. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6472. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6473. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6474. .ilen = 32,
  6475. .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  6476. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  6477. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  6478. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  6479. .rlen = 32,
  6480. },
  6481. };
  6482. static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
  6483. {
  6484. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  6485. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  6486. .klen = 16,
  6487. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  6488. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  6489. .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  6490. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  6491. .ilen = 16,
  6492. .result = "Single block msg",
  6493. .rlen = 16,
  6494. }, {
  6495. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  6496. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  6497. .klen = 16,
  6498. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  6499. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  6500. .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  6501. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  6502. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  6503. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  6504. .ilen = 32,
  6505. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6506. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6507. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6508. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6509. .rlen = 32,
  6510. },
  6511. };
  6512. /*
  6513. * SEED test vectors
  6514. */
  6515. #define SEED_ENC_TEST_VECTORS 4
  6516. #define SEED_DEC_TEST_VECTORS 4
  6517. static struct cipher_testvec seed_enc_tv_template[] = {
  6518. {
  6519. .key = zeroed_string,
  6520. .klen = 16,
  6521. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6522. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6523. .ilen = 16,
  6524. .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  6525. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  6526. .rlen = 16,
  6527. }, {
  6528. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6529. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6530. .klen = 16,
  6531. .input = zeroed_string,
  6532. .ilen = 16,
  6533. .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  6534. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  6535. .rlen = 16,
  6536. }, {
  6537. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  6538. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  6539. .klen = 16,
  6540. .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  6541. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  6542. .ilen = 16,
  6543. .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  6544. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  6545. .rlen = 16,
  6546. }, {
  6547. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  6548. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  6549. .klen = 16,
  6550. .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  6551. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  6552. .ilen = 16,
  6553. .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  6554. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  6555. .rlen = 16,
  6556. }
  6557. };
  6558. static struct cipher_testvec seed_dec_tv_template[] = {
  6559. {
  6560. .key = zeroed_string,
  6561. .klen = 16,
  6562. .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  6563. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  6564. .ilen = 16,
  6565. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6566. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6567. .rlen = 16,
  6568. }, {
  6569. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6570. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6571. .klen = 16,
  6572. .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  6573. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  6574. .ilen = 16,
  6575. .result = zeroed_string,
  6576. .rlen = 16,
  6577. }, {
  6578. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  6579. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  6580. .klen = 16,
  6581. .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  6582. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  6583. .ilen = 16,
  6584. .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  6585. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  6586. .rlen = 16,
  6587. }, {
  6588. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  6589. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  6590. .klen = 16,
  6591. .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  6592. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  6593. .ilen = 16,
  6594. .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  6595. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  6596. .rlen = 16,
  6597. }
  6598. };
  6599. #define SALSA20_STREAM_ENC_TEST_VECTORS 5
  6600. static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
  6601. /*
  6602. * Testvectors from verified.test-vectors submitted to ECRYPT.
  6603. * They are truncated to size 39, 64, 111, 129 to test a variety
  6604. * of input length.
  6605. */
  6606. { /* Set 3, vector 0 */
  6607. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6608. "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
  6609. .klen = 16,
  6610. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6611. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6612. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6613. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6614. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6615. "\x00\x00\x00\x00\x00\x00\x00",
  6616. .ilen = 39,
  6617. .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
  6618. "\x68\x02\x41\x0C\x68\x86\x88\x89"
  6619. "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
  6620. "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
  6621. "\x58\x3F\x52\x79\x70\xEB\xC1",
  6622. .rlen = 39,
  6623. }, { /* Set 5, vector 0 */
  6624. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6625. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6626. .klen = 16,
  6627. .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
  6628. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6629. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6630. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6631. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6632. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6633. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6634. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6635. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6636. .ilen = 64,
  6637. .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
  6638. "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
  6639. "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
  6640. "\x46\x26\xBF\x44\x3F\x21\x97\x76"
  6641. "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
  6642. "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
  6643. "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
  6644. "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
  6645. .rlen = 64,
  6646. }, { /* Set 3, vector 27 */
  6647. .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
  6648. "\x23\x24\x25\x26\x27\x28\x29\x2A"
  6649. "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
  6650. "\x33\x34\x35\x36\x37\x38\x39\x3A",
  6651. .klen = 32,
  6652. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6653. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6654. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6655. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6656. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6657. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6658. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6659. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6660. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6661. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6662. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6663. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6664. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6665. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6666. "\x00\x00\x00\x00\x00\x00\x00",
  6667. .ilen = 111,
  6668. .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
  6669. "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
  6670. "\x87\xD9\x47\xF8\x28\x91\x35\x98"
  6671. "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
  6672. "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
  6673. "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
  6674. "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
  6675. "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
  6676. "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
  6677. "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
  6678. "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
  6679. "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
  6680. "\x95\x46\x45\x54\xE9\x75\x03\x08"
  6681. "\x44\xAF\xE5\x8A\x81\x12\x09",
  6682. .rlen = 111,
  6683. }, { /* Set 5, vector 27 */
  6684. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6685. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6686. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6687. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6688. .klen = 32,
  6689. .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
  6690. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6691. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6692. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6693. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6694. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6695. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6696. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6697. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6698. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6699. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6700. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6701. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6702. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6703. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6704. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6705. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6706. "\x00",
  6707. .ilen = 129,
  6708. .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
  6709. "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
  6710. "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
  6711. "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
  6712. "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
  6713. "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
  6714. "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
  6715. "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
  6716. "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
  6717. "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
  6718. "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
  6719. "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
  6720. "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
  6721. "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
  6722. "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
  6723. "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
  6724. "\x5A",
  6725. .rlen = 129,
  6726. }, { /* large test vector generated using Crypto++ */
  6727. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6728. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6729. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6730. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6731. .klen = 32,
  6732. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6733. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6734. .input =
  6735. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6736. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6737. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6738. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6739. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6740. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6741. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6742. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6743. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6744. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6745. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6746. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6747. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6748. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6749. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6750. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6751. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6752. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6753. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6754. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6755. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6756. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6757. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6758. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6759. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6760. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6761. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6762. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6763. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6764. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6765. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6766. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6767. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  6768. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  6769. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  6770. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  6771. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  6772. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  6773. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  6774. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  6775. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  6776. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  6777. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  6778. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  6779. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  6780. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  6781. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  6782. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  6783. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  6784. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  6785. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  6786. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  6787. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  6788. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  6789. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  6790. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  6791. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  6792. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  6793. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  6794. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  6795. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  6796. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  6797. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  6798. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  6799. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  6800. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  6801. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  6802. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  6803. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  6804. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  6805. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  6806. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  6807. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  6808. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  6809. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  6810. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  6811. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  6812. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  6813. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  6814. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  6815. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  6816. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  6817. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  6818. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  6819. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  6820. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  6821. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  6822. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  6823. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  6824. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  6825. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  6826. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  6827. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  6828. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  6829. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  6830. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  6831. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  6832. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  6833. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  6834. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  6835. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  6836. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  6837. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  6838. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  6839. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  6840. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  6841. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  6842. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  6843. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  6844. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  6845. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  6846. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  6847. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  6848. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  6849. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  6850. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  6851. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  6852. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  6853. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  6854. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  6855. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  6856. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  6857. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  6858. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  6859. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  6860. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  6861. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  6862. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  6863. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  6864. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  6865. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  6866. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  6867. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  6868. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  6869. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  6870. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  6871. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  6872. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  6873. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  6874. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  6875. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  6876. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  6877. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  6878. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  6879. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  6880. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  6881. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  6882. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  6883. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  6884. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  6885. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  6886. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  6887. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  6888. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  6889. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  6890. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  6891. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  6892. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  6893. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  6894. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  6895. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  6896. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  6897. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  6898. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  6899. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  6900. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  6901. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  6902. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  6903. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  6904. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  6905. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  6906. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  6907. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  6908. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  6909. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  6910. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  6911. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  6912. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  6913. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  6914. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  6915. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  6916. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  6917. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  6918. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  6919. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  6920. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  6921. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  6922. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  6923. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  6924. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  6925. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  6926. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  6927. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  6928. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  6929. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  6930. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  6931. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  6932. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  6933. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  6934. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  6935. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  6936. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  6937. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  6938. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  6939. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  6940. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  6941. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  6942. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  6943. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  6944. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  6945. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  6946. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  6947. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  6948. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  6949. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  6950. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  6951. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  6952. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  6953. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  6954. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  6955. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  6956. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  6957. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  6958. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  6959. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  6960. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  6961. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  6962. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  6963. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  6964. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  6965. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  6966. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  6967. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  6968. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  6969. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  6970. "\x28\x37\x46\x55\x64\x73\x82\x91"
  6971. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  6972. "\x18\x27\x36\x45\x54\x63\x72\x81"
  6973. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  6974. "\x08\x17\x26\x35\x44\x53\x62\x71"
  6975. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  6976. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  6977. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  6978. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  6979. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  6980. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  6981. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  6982. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  6983. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  6984. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  6985. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  6986. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  6987. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  6988. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  6989. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  6990. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  6991. "\x00\x11\x22\x33\x44\x55\x66\x77"
  6992. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  6993. "\x10\x21\x32\x43\x54\x65\x76\x87"
  6994. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  6995. "\x20\x31\x42\x53\x64\x75\x86\x97"
  6996. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  6997. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  6998. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  6999. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  7000. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  7001. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  7002. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  7003. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  7004. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  7005. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  7006. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  7007. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  7008. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  7009. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  7010. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  7011. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  7012. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  7013. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  7014. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  7015. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  7016. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  7017. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  7018. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  7019. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  7020. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  7021. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  7022. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  7023. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  7024. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  7025. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  7026. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  7027. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  7028. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  7029. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  7030. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  7031. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  7032. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  7033. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  7034. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  7035. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  7036. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  7037. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  7038. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  7039. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  7040. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  7041. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  7042. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  7043. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  7044. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  7045. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  7046. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  7047. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  7048. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  7049. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  7050. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  7051. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  7052. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  7053. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  7054. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  7055. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  7056. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  7057. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  7058. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  7059. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  7060. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  7061. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  7062. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  7063. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  7064. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  7065. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  7066. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  7067. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  7068. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  7069. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  7070. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  7071. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  7072. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  7073. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  7074. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  7075. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  7076. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  7077. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  7078. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  7079. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  7080. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  7081. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  7082. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  7083. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  7084. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  7085. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  7086. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  7087. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  7088. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  7089. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  7090. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  7091. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  7092. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  7093. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  7094. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  7095. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  7096. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  7097. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  7098. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  7099. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  7100. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  7101. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  7102. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  7103. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  7104. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  7105. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  7106. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  7107. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  7108. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  7109. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  7110. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  7111. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  7112. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  7113. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  7114. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  7115. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  7116. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  7117. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  7118. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  7119. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  7120. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  7121. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  7122. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  7123. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  7124. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  7125. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  7126. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  7127. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  7128. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  7129. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  7130. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  7131. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  7132. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  7133. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  7134. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  7135. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  7136. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  7137. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  7138. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  7139. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  7140. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  7141. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  7142. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  7143. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  7144. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  7145. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  7146. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  7147. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  7148. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  7149. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  7150. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  7151. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  7152. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  7153. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  7154. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  7155. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  7156. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  7157. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  7158. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  7159. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  7160. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  7161. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  7162. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  7163. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  7164. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  7165. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  7166. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  7167. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  7168. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  7169. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  7170. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  7171. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  7172. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  7173. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  7174. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  7175. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  7176. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  7177. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  7178. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  7179. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  7180. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  7181. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  7182. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  7183. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  7184. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  7185. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  7186. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  7187. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  7188. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  7189. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  7190. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  7191. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  7192. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  7193. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  7194. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  7195. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  7196. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  7197. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  7198. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  7199. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  7200. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  7201. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  7202. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  7203. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  7204. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  7205. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  7206. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  7207. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  7208. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  7209. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  7210. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  7211. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  7212. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  7213. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  7214. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  7215. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  7216. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  7217. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  7218. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  7219. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  7220. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  7221. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  7222. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  7223. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  7224. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  7225. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  7226. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  7227. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  7228. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  7229. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  7230. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  7231. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  7232. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  7233. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  7234. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  7235. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  7236. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  7237. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  7238. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  7239. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  7240. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  7241. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  7242. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  7243. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  7244. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  7245. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  7246. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  7247. "\x00\x21\x42\x63",
  7248. .ilen = 4100,
  7249. .result =
  7250. "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
  7251. "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
  7252. "\x29\x01\xce\x98\x55\x53\xf9\x0c"
  7253. "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
  7254. "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
  7255. "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
  7256. "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
  7257. "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
  7258. "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
  7259. "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
  7260. "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
  7261. "\xbb\xde\x56\x86\xab\x65\x21\x30"
  7262. "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
  7263. "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
  7264. "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
  7265. "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
  7266. "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
  7267. "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
  7268. "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
  7269. "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
  7270. "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
  7271. "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
  7272. "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
  7273. "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
  7274. "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
  7275. "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
  7276. "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
  7277. "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
  7278. "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
  7279. "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
  7280. "\x45\xff\x3f\xce\x55\xf6\x95\x10"
  7281. "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
  7282. "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
  7283. "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
  7284. "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
  7285. "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
  7286. "\x62\x08\x18\x7a\x25\x49\x28\xac"
  7287. "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
  7288. "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
  7289. "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
  7290. "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
  7291. "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
  7292. "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
  7293. "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
  7294. "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
  7295. "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
  7296. "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
  7297. "\x33\xee\x14\x19\x22\x52\x89\xa7"
  7298. "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
  7299. "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
  7300. "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
  7301. "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
  7302. "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
  7303. "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
  7304. "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
  7305. "\x04\x07\x08\x52\xe6\xc0\xda\x93"
  7306. "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
  7307. "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
  7308. "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
  7309. "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
  7310. "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
  7311. "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
  7312. "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
  7313. "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
  7314. "\x5a\x90\xae\x75\x0a\x74\x18\x89"
  7315. "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
  7316. "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
  7317. "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
  7318. "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
  7319. "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
  7320. "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
  7321. "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
  7322. "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
  7323. "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
  7324. "\x49\x97\x33\xab\x36\x14\x0a\x70"
  7325. "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
  7326. "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
  7327. "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
  7328. "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
  7329. "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
  7330. "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
  7331. "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
  7332. "\x47\x13\x28\x73\x3c\xbb\x00\x90"
  7333. "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
  7334. "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
  7335. "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
  7336. "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
  7337. "\xad\x04\x07\xae\x22\x90\x4a\x93"
  7338. "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
  7339. "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
  7340. "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
  7341. "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
  7342. "\x53\xf9\x80\x10\xde\x80\xa2\x41"
  7343. "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
  7344. "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
  7345. "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
  7346. "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
  7347. "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
  7348. "\xde\xff\x07\x44\xdd\x56\x1b\xad"
  7349. "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
  7350. "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
  7351. "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
  7352. "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
  7353. "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
  7354. "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
  7355. "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
  7356. "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
  7357. "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
  7358. "\x23\xf8\x66\x18\x14\x28\x34\x0f"
  7359. "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
  7360. "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
  7361. "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
  7362. "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
  7363. "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
  7364. "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
  7365. "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
  7366. "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
  7367. "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
  7368. "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
  7369. "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
  7370. "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
  7371. "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
  7372. "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
  7373. "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
  7374. "\xca\x8e\x61\x87\xde\xad\x80\xd2"
  7375. "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
  7376. "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
  7377. "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
  7378. "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
  7379. "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
  7380. "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
  7381. "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
  7382. "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
  7383. "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
  7384. "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
  7385. "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
  7386. "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
  7387. "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
  7388. "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
  7389. "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
  7390. "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
  7391. "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
  7392. "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
  7393. "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
  7394. "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
  7395. "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
  7396. "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
  7397. "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
  7398. "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
  7399. "\x54\xda\x24\x6a\xc4\x41\x65\x46"
  7400. "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
  7401. "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
  7402. "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
  7403. "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
  7404. "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
  7405. "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
  7406. "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
  7407. "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
  7408. "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
  7409. "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
  7410. "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
  7411. "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
  7412. "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
  7413. "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
  7414. "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
  7415. "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
  7416. "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
  7417. "\xef\xcc\xa7\xec\xab\x43\x09\x18"
  7418. "\xd3\xab\x68\xd1\x07\x99\x44\x47"
  7419. "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
  7420. "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
  7421. "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
  7422. "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
  7423. "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
  7424. "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
  7425. "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
  7426. "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
  7427. "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
  7428. "\x71\x6e\x9f\x58\x15\x67\x72\x87"
  7429. "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
  7430. "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
  7431. "\xba\x41\x54\xac\xf0\xfc\x59\x12"
  7432. "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
  7433. "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
  7434. "\x2e\x53\x49\x97\x94\x33\xae\x40"
  7435. "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
  7436. "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
  7437. "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
  7438. "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
  7439. "\xce\x87\xad\xcc\x72\x05\x00\x29"
  7440. "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
  7441. "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
  7442. "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
  7443. "\xac\xc0\x79\x50\x69\xca\x59\x32"
  7444. "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
  7445. "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
  7446. "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
  7447. "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
  7448. "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
  7449. "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
  7450. "\x05\x68\x6b\xab\xe3\x41\x49\xed"
  7451. "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
  7452. "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
  7453. "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
  7454. "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
  7455. "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
  7456. "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
  7457. "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
  7458. "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
  7459. "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
  7460. "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
  7461. "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
  7462. "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
  7463. "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
  7464. "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
  7465. "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
  7466. "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
  7467. "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
  7468. "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
  7469. "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
  7470. "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
  7471. "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
  7472. "\x85\x75\xe6\x43\xf6\x87\x08\x68"
  7473. "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
  7474. "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
  7475. "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
  7476. "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
  7477. "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
  7478. "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
  7479. "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
  7480. "\xaf\x55\xeb\x22\xac\x93\x68\x32"
  7481. "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
  7482. "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
  7483. "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
  7484. "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
  7485. "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
  7486. "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
  7487. "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
  7488. "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
  7489. "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
  7490. "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
  7491. "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
  7492. "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
  7493. "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
  7494. "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
  7495. "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
  7496. "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
  7497. "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
  7498. "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
  7499. "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
  7500. "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
  7501. "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
  7502. "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
  7503. "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
  7504. "\x38\x55\xab\x33\x26\xef\x9f\x43"
  7505. "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
  7506. "\x58\x09\x09\x1b\xc3\x65\x46\x46"
  7507. "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
  7508. "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
  7509. "\x63\x86\xf2\x03\x67\x45\xd2\x72"
  7510. "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
  7511. "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
  7512. "\x2b\x82\x39\xbd\x69\x54\xed\x62"
  7513. "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
  7514. "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
  7515. "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
  7516. "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
  7517. "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
  7518. "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
  7519. "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
  7520. "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
  7521. "\x55\xad\xa4\xd1\x22\x54\x70\x94"
  7522. "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
  7523. "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
  7524. "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
  7525. "\x62\x36\x43\xb2\x82\x15\x75\x50"
  7526. "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
  7527. "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
  7528. "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
  7529. "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
  7530. "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
  7531. "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
  7532. "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
  7533. "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
  7534. "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
  7535. "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
  7536. "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
  7537. "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
  7538. "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
  7539. "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
  7540. "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
  7541. "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
  7542. "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
  7543. "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
  7544. "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
  7545. "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
  7546. "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
  7547. "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
  7548. "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
  7549. "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
  7550. "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
  7551. "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
  7552. "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
  7553. "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
  7554. "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
  7555. "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
  7556. "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
  7557. "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
  7558. "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
  7559. "\x42\x19\x23\x7d\xc8\x73\xee\x25"
  7560. "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
  7561. "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
  7562. "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
  7563. "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
  7564. "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
  7565. "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
  7566. "\xdb\x87\xee\xef\x55\x89\x2a\x59"
  7567. "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
  7568. "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
  7569. "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
  7570. "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
  7571. "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
  7572. "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
  7573. "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
  7574. "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
  7575. "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
  7576. "\xae\xab\x86\x09\x89\xc9\xc2\x40"
  7577. "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
  7578. "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
  7579. "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
  7580. "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
  7581. "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
  7582. "\x95\xd9\x34\x34\x86\xc6\x41\x94"
  7583. "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
  7584. "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
  7585. "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
  7586. "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
  7587. "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
  7588. "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
  7589. "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
  7590. "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
  7591. "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
  7592. "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
  7593. "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
  7594. "\xa7\x33\x34\x86\xca\xe4\x96\x23"
  7595. "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
  7596. "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
  7597. "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
  7598. "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
  7599. "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
  7600. "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
  7601. "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
  7602. "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
  7603. "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
  7604. "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
  7605. "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
  7606. "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
  7607. "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
  7608. "\x68\xc8\x7f\x51\x22\x42\xef\x49"
  7609. "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
  7610. "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
  7611. "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
  7612. "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
  7613. "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
  7614. "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
  7615. "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
  7616. "\x73\x2e\x71\x79\x16\x06\x63\x28"
  7617. "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
  7618. "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
  7619. "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
  7620. "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
  7621. "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
  7622. "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
  7623. "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
  7624. "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
  7625. "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
  7626. "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
  7627. "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
  7628. "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
  7629. "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
  7630. "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
  7631. "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
  7632. "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
  7633. "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
  7634. "\x19\x07\xaf\x90\x62\x5c\x68\x98"
  7635. "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
  7636. "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
  7637. "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
  7638. "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
  7639. "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
  7640. "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
  7641. "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
  7642. "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
  7643. "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
  7644. "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
  7645. "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
  7646. "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
  7647. "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
  7648. "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
  7649. "\x21\x33\x44\xfe\x7f\x35\x32\x93"
  7650. "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
  7651. "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
  7652. "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
  7653. "\x64\xf0\x48\xe5\x57\x99\xee\x75"
  7654. "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
  7655. "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
  7656. "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
  7657. "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
  7658. "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
  7659. "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
  7660. "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
  7661. "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
  7662. "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
  7663. "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
  7664. "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
  7665. "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
  7666. "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
  7667. "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
  7668. "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
  7669. "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
  7670. "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
  7671. "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
  7672. "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
  7673. "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
  7674. "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
  7675. "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
  7676. "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
  7677. "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
  7678. "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
  7679. "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
  7680. "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
  7681. "\x56\xf5\x4e\x01\x35\x27\x45\x77"
  7682. "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
  7683. "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
  7684. "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
  7685. "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
  7686. "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
  7687. "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
  7688. "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
  7689. "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
  7690. "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
  7691. "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
  7692. "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
  7693. "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
  7694. "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
  7695. "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
  7696. "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
  7697. "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
  7698. "\x87\x8f\x03\x21\x28\x95\x0c\x89"
  7699. "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
  7700. "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
  7701. "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
  7702. "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
  7703. "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
  7704. "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
  7705. "\x85\x73\x78\x45\x20\x7f\xae\x13"
  7706. "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
  7707. "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
  7708. "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
  7709. "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
  7710. "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
  7711. "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
  7712. "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
  7713. "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
  7714. "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
  7715. "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
  7716. "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
  7717. "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
  7718. "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
  7719. "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
  7720. "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
  7721. "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
  7722. "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
  7723. "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
  7724. "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
  7725. "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
  7726. "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
  7727. "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
  7728. "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
  7729. "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
  7730. "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
  7731. "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
  7732. "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
  7733. "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
  7734. "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
  7735. "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
  7736. "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
  7737. "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
  7738. "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
  7739. "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
  7740. "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
  7741. "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
  7742. "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
  7743. "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
  7744. "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
  7745. "\x6e\x12\x17\x72\x63\x57\xc7\xba"
  7746. "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
  7747. "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
  7748. "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
  7749. "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
  7750. "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
  7751. "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
  7752. "\x0c\x24\x43\x31\x40\x57\xf1\x72"
  7753. "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
  7754. "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
  7755. "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
  7756. "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
  7757. "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
  7758. "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
  7759. "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
  7760. "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
  7761. "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
  7762. "\xaf\xdf\x11\x95",
  7763. .rlen = 4100,
  7764. },
  7765. };
  7766. /*
  7767. * CTS (Cipher Text Stealing) mode tests
  7768. */
  7769. #define CTS_MODE_ENC_TEST_VECTORS 6
  7770. #define CTS_MODE_DEC_TEST_VECTORS 6
  7771. static struct cipher_testvec cts_mode_enc_tv_template[] = {
  7772. { /* from rfc3962 */
  7773. .klen = 16,
  7774. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7775. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7776. .ilen = 17,
  7777. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7778. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7779. "\x20",
  7780. .rlen = 17,
  7781. .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  7782. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  7783. "\x97",
  7784. }, {
  7785. .klen = 16,
  7786. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7787. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7788. .ilen = 31,
  7789. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7790. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7791. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  7792. "\x20\x47\x61\x75\x27\x73\x20",
  7793. .rlen = 31,
  7794. .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  7795. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  7796. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  7797. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  7798. }, {
  7799. .klen = 16,
  7800. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7801. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7802. .ilen = 32,
  7803. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7804. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7805. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  7806. "\x20\x47\x61\x75\x27\x73\x20\x43",
  7807. .rlen = 32,
  7808. .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  7809. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  7810. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  7811. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  7812. }, {
  7813. .klen = 16,
  7814. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7815. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7816. .ilen = 47,
  7817. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7818. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7819. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  7820. "\x20\x47\x61\x75\x27\x73\x20\x43"
  7821. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  7822. "\x70\x6c\x65\x61\x73\x65\x2c",
  7823. .rlen = 47,
  7824. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  7825. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  7826. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  7827. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  7828. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  7829. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  7830. }, {
  7831. .klen = 16,
  7832. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7833. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7834. .ilen = 48,
  7835. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7836. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7837. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  7838. "\x20\x47\x61\x75\x27\x73\x20\x43"
  7839. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  7840. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  7841. .rlen = 48,
  7842. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  7843. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  7844. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  7845. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  7846. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  7847. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  7848. }, {
  7849. .klen = 16,
  7850. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7851. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7852. .ilen = 64,
  7853. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7854. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7855. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  7856. "\x20\x47\x61\x75\x27\x73\x20\x43"
  7857. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  7858. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  7859. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  7860. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  7861. .rlen = 64,
  7862. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  7863. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  7864. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  7865. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  7866. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  7867. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  7868. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  7869. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  7870. }
  7871. };
  7872. static struct cipher_testvec cts_mode_dec_tv_template[] = {
  7873. { /* from rfc3962 */
  7874. .klen = 16,
  7875. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7876. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7877. .rlen = 17,
  7878. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7879. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7880. "\x20",
  7881. .ilen = 17,
  7882. .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  7883. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  7884. "\x97",
  7885. }, {
  7886. .klen = 16,
  7887. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7888. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7889. .rlen = 31,
  7890. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7891. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7892. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  7893. "\x20\x47\x61\x75\x27\x73\x20",
  7894. .ilen = 31,
  7895. .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  7896. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  7897. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  7898. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  7899. }, {
  7900. .klen = 16,
  7901. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7902. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7903. .rlen = 32,
  7904. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7905. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7906. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  7907. "\x20\x47\x61\x75\x27\x73\x20\x43",
  7908. .ilen = 32,
  7909. .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  7910. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  7911. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  7912. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  7913. }, {
  7914. .klen = 16,
  7915. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7916. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7917. .rlen = 47,
  7918. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7919. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7920. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  7921. "\x20\x47\x61\x75\x27\x73\x20\x43"
  7922. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  7923. "\x70\x6c\x65\x61\x73\x65\x2c",
  7924. .ilen = 47,
  7925. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  7926. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  7927. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  7928. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  7929. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  7930. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  7931. }, {
  7932. .klen = 16,
  7933. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7934. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7935. .rlen = 48,
  7936. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7937. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7938. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  7939. "\x20\x47\x61\x75\x27\x73\x20\x43"
  7940. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  7941. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  7942. .ilen = 48,
  7943. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  7944. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  7945. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  7946. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  7947. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  7948. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  7949. }, {
  7950. .klen = 16,
  7951. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  7952. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  7953. .rlen = 64,
  7954. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  7955. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  7956. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  7957. "\x20\x47\x61\x75\x27\x73\x20\x43"
  7958. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  7959. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  7960. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  7961. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  7962. .ilen = 64,
  7963. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  7964. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  7965. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  7966. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  7967. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  7968. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  7969. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  7970. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  7971. }
  7972. };
  7973. /*
  7974. * Compression stuff.
  7975. */
  7976. #define COMP_BUF_SIZE 512
  7977. struct comp_testvec {
  7978. int inlen, outlen;
  7979. char input[COMP_BUF_SIZE];
  7980. char output[COMP_BUF_SIZE];
  7981. };
  7982. /*
  7983. * Deflate test vectors (null-terminated strings).
  7984. * Params: winbits=11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
  7985. */
  7986. #define DEFLATE_COMP_TEST_VECTORS 2
  7987. #define DEFLATE_DECOMP_TEST_VECTORS 2
  7988. static struct comp_testvec deflate_comp_tv_template[] = {
  7989. {
  7990. .inlen = 70,
  7991. .outlen = 38,
  7992. .input = "Join us now and share the software "
  7993. "Join us now and share the software ",
  7994. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  7995. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  7996. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  7997. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  7998. "\x71\xbc\x08\x2b\x01\x00",
  7999. }, {
  8000. .inlen = 191,
  8001. .outlen = 122,
  8002. .input = "This document describes a compression method based on the DEFLATE"
  8003. "compression algorithm. This document defines the application of "
  8004. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8005. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8006. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8007. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8008. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8009. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8010. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  8011. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  8012. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  8013. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  8014. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  8015. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  8016. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  8017. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  8018. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  8019. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  8020. "\xfa\x02",
  8021. },
  8022. };
  8023. static struct comp_testvec deflate_decomp_tv_template[] = {
  8024. {
  8025. .inlen = 122,
  8026. .outlen = 191,
  8027. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8028. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8029. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8030. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8031. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8032. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  8033. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  8034. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  8035. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  8036. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  8037. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  8038. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  8039. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  8040. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  8041. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  8042. "\xfa\x02",
  8043. .output = "This document describes a compression method based on the DEFLATE"
  8044. "compression algorithm. This document defines the application of "
  8045. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8046. }, {
  8047. .inlen = 38,
  8048. .outlen = 70,
  8049. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8050. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8051. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8052. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8053. "\x71\xbc\x08\x2b\x01\x00",
  8054. .output = "Join us now and share the software "
  8055. "Join us now and share the software ",
  8056. },
  8057. };
  8058. /*
  8059. * LZO test vectors (null-terminated strings).
  8060. */
  8061. #define LZO_COMP_TEST_VECTORS 2
  8062. #define LZO_DECOMP_TEST_VECTORS 2
  8063. static struct comp_testvec lzo_comp_tv_template[] = {
  8064. {
  8065. .inlen = 70,
  8066. .outlen = 46,
  8067. .input = "Join us now and share the software "
  8068. "Join us now and share the software ",
  8069. .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  8070. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  8071. "\x64\x20\x73\x68\x61\x72\x65\x20"
  8072. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  8073. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  8074. "\x3d\x88\x00\x11\x00\x00",
  8075. }, {
  8076. .inlen = 159,
  8077. .outlen = 133,
  8078. .input = "This document describes a compression method based on the LZO "
  8079. "compression algorithm. This document defines the application of "
  8080. "the LZO algorithm used in UBIFS.",
  8081. .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  8082. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  8083. "\x64\x65\x73\x63\x72\x69\x62\x65"
  8084. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  8085. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  8086. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  8087. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  8088. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  8089. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  8090. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  8091. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  8092. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  8093. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  8094. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  8095. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  8096. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  8097. "\x53\x2e\x11\x00\x00",
  8098. },
  8099. };
  8100. static struct comp_testvec lzo_decomp_tv_template[] = {
  8101. {
  8102. .inlen = 133,
  8103. .outlen = 159,
  8104. .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  8105. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  8106. "\x64\x65\x73\x63\x72\x69\x62\x65"
  8107. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  8108. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  8109. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  8110. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  8111. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  8112. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  8113. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  8114. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  8115. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  8116. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  8117. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  8118. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  8119. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  8120. "\x53\x2e\x11\x00\x00",
  8121. .output = "This document describes a compression method based on the LZO "
  8122. "compression algorithm. This document defines the application of "
  8123. "the LZO algorithm used in UBIFS.",
  8124. }, {
  8125. .inlen = 46,
  8126. .outlen = 70,
  8127. .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  8128. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  8129. "\x64\x20\x73\x68\x61\x72\x65\x20"
  8130. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  8131. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  8132. "\x3d\x88\x00\x11\x00\x00",
  8133. .output = "Join us now and share the software "
  8134. "Join us now and share the software ",
  8135. },
  8136. };
  8137. /*
  8138. * Michael MIC test vectors from IEEE 802.11i
  8139. */
  8140. #define MICHAEL_MIC_TEST_VECTORS 6
  8141. static struct hash_testvec michael_mic_tv_template[] = {
  8142. {
  8143. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8144. .ksize = 8,
  8145. .plaintext = zeroed_string,
  8146. .psize = 0,
  8147. .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  8148. },
  8149. {
  8150. .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  8151. .ksize = 8,
  8152. .plaintext = "M",
  8153. .psize = 1,
  8154. .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  8155. },
  8156. {
  8157. .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  8158. .ksize = 8,
  8159. .plaintext = "Mi",
  8160. .psize = 2,
  8161. .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  8162. },
  8163. {
  8164. .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  8165. .ksize = 8,
  8166. .plaintext = "Mic",
  8167. .psize = 3,
  8168. .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  8169. },
  8170. {
  8171. .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  8172. .ksize = 8,
  8173. .plaintext = "Mich",
  8174. .psize = 4,
  8175. .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  8176. },
  8177. {
  8178. .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  8179. .ksize = 8,
  8180. .plaintext = "Michael",
  8181. .psize = 7,
  8182. .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
  8183. }
  8184. };
  8185. /*
  8186. * CRC32C test vectors
  8187. */
  8188. #define CRC32C_TEST_VECTORS 14
  8189. static struct hash_testvec crc32c_tv_template[] = {
  8190. {
  8191. .psize = 0,
  8192. .digest = "\x00\x00\x00\x00",
  8193. },
  8194. {
  8195. .key = "\x87\xa9\xcb\xed",
  8196. .ksize = 4,
  8197. .psize = 0,
  8198. .digest = "\x78\x56\x34\x12",
  8199. },
  8200. {
  8201. .key = "\xff\xff\xff\xff",
  8202. .ksize = 4,
  8203. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  8204. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  8205. "\x11\x12\x13\x14\x15\x16\x17\x18"
  8206. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  8207. "\x21\x22\x23\x24\x25\x26\x27\x28",
  8208. .psize = 40,
  8209. .digest = "\x7f\x15\x2c\x0e",
  8210. },
  8211. {
  8212. .key = "\xff\xff\xff\xff",
  8213. .ksize = 4,
  8214. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  8215. "\x31\x32\x33\x34\x35\x36\x37\x38"
  8216. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  8217. "\x41\x42\x43\x44\x45\x46\x47\x48"
  8218. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  8219. .psize = 40,
  8220. .digest = "\xf6\xeb\x80\xe9",
  8221. },
  8222. {
  8223. .key = "\xff\xff\xff\xff",
  8224. .ksize = 4,
  8225. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  8226. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  8227. "\x61\x62\x63\x64\x65\x66\x67\x68"
  8228. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  8229. "\x71\x72\x73\x74\x75\x76\x77\x78",
  8230. .psize = 40,
  8231. .digest = "\xed\xbd\x74\xde",
  8232. },
  8233. {
  8234. .key = "\xff\xff\xff\xff",
  8235. .ksize = 4,
  8236. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  8237. "\x81\x82\x83\x84\x85\x86\x87\x88"
  8238. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  8239. "\x91\x92\x93\x94\x95\x96\x97\x98"
  8240. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  8241. .psize = 40,
  8242. .digest = "\x62\xc8\x79\xd5",
  8243. },
  8244. {
  8245. .key = "\xff\xff\xff\xff",
  8246. .ksize = 4,
  8247. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  8248. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  8249. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  8250. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  8251. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  8252. .psize = 40,
  8253. .digest = "\xd0\x9a\x97\xba",
  8254. },
  8255. {
  8256. .key = "\xff\xff\xff\xff",
  8257. .ksize = 4,
  8258. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  8259. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  8260. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  8261. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  8262. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  8263. .psize = 40,
  8264. .digest = "\x13\xd9\x29\x2b",
  8265. },
  8266. {
  8267. .key = "\x80\xea\xd3\xf1",
  8268. .ksize = 4,
  8269. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  8270. "\x31\x32\x33\x34\x35\x36\x37\x38"
  8271. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  8272. "\x41\x42\x43\x44\x45\x46\x47\x48"
  8273. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  8274. .psize = 40,
  8275. .digest = "\x0c\xb5\xe2\xa2",
  8276. },
  8277. {
  8278. .key = "\xf3\x4a\x1d\x5d",
  8279. .ksize = 4,
  8280. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  8281. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  8282. "\x61\x62\x63\x64\x65\x66\x67\x68"
  8283. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  8284. "\x71\x72\x73\x74\x75\x76\x77\x78",
  8285. .psize = 40,
  8286. .digest = "\xd1\x7f\xfb\xa6",
  8287. },
  8288. {
  8289. .key = "\x2e\x80\x04\x59",
  8290. .ksize = 4,
  8291. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  8292. "\x81\x82\x83\x84\x85\x86\x87\x88"
  8293. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  8294. "\x91\x92\x93\x94\x95\x96\x97\x98"
  8295. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  8296. .psize = 40,
  8297. .digest = "\x59\x33\xe6\x7a",
  8298. },
  8299. {
  8300. .key = "\xa6\xcc\x19\x85",
  8301. .ksize = 4,
  8302. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  8303. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  8304. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  8305. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  8306. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  8307. .psize = 40,
  8308. .digest = "\xbe\x03\x01\xd2",
  8309. },
  8310. {
  8311. .key = "\x41\xfc\xfe\x2d",
  8312. .ksize = 4,
  8313. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  8314. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  8315. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  8316. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  8317. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  8318. .psize = 40,
  8319. .digest = "\x75\xd3\xc5\x24",
  8320. },
  8321. {
  8322. .key = "\xff\xff\xff\xff",
  8323. .ksize = 4,
  8324. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  8325. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  8326. "\x11\x12\x13\x14\x15\x16\x17\x18"
  8327. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  8328. "\x21\x22\x23\x24\x25\x26\x27\x28"
  8329. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  8330. "\x31\x32\x33\x34\x35\x36\x37\x38"
  8331. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  8332. "\x41\x42\x43\x44\x45\x46\x47\x48"
  8333. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  8334. "\x51\x52\x53\x54\x55\x56\x57\x58"
  8335. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  8336. "\x61\x62\x63\x64\x65\x66\x67\x68"
  8337. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  8338. "\x71\x72\x73\x74\x75\x76\x77\x78"
  8339. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  8340. "\x81\x82\x83\x84\x85\x86\x87\x88"
  8341. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  8342. "\x91\x92\x93\x94\x95\x96\x97\x98"
  8343. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  8344. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  8345. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  8346. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  8347. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  8348. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  8349. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  8350. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  8351. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  8352. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  8353. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  8354. .psize = 240,
  8355. .digest = "\x75\xd3\xc5\x24",
  8356. .np = 2,
  8357. .tap = { 31, 209 }
  8358. },
  8359. };
  8360. /*
  8361. * Cipher speed tests
  8362. */
  8363. static u8 speed_template_8[] = {8, 0};
  8364. static u8 speed_template_24[] = {24, 0};
  8365. static u8 speed_template_8_32[] = {8, 32, 0};
  8366. static u8 speed_template_16_32[] = {16, 32, 0};
  8367. static u8 speed_template_16_24_32[] = {16, 24, 32, 0};
  8368. static u8 speed_template_32_40_48[] = {32, 40, 48, 0};
  8369. static u8 speed_template_32_48_64[] = {32, 48, 64, 0};
  8370. /*
  8371. * Digest speed tests
  8372. */
  8373. static struct hash_speed generic_hash_speed_template[] = {
  8374. { .blen = 16, .plen = 16, },
  8375. { .blen = 64, .plen = 16, },
  8376. { .blen = 64, .plen = 64, },
  8377. { .blen = 256, .plen = 16, },
  8378. { .blen = 256, .plen = 64, },
  8379. { .blen = 256, .plen = 256, },
  8380. { .blen = 1024, .plen = 16, },
  8381. { .blen = 1024, .plen = 256, },
  8382. { .blen = 1024, .plen = 1024, },
  8383. { .blen = 2048, .plen = 16, },
  8384. { .blen = 2048, .plen = 256, },
  8385. { .blen = 2048, .plen = 1024, },
  8386. { .blen = 2048, .plen = 2048, },
  8387. { .blen = 4096, .plen = 16, },
  8388. { .blen = 4096, .plen = 256, },
  8389. { .blen = 4096, .plen = 1024, },
  8390. { .blen = 4096, .plen = 4096, },
  8391. { .blen = 8192, .plen = 16, },
  8392. { .blen = 8192, .plen = 256, },
  8393. { .blen = 8192, .plen = 1024, },
  8394. { .blen = 8192, .plen = 4096, },
  8395. { .blen = 8192, .plen = 8192, },
  8396. /* End marker */
  8397. { .blen = 0, .plen = 0, }
  8398. };
  8399. #endif /* _CRYPTO_TCRYPT_H */