testmgr.h 544 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861
  1. /*
  2. * Algorithm testing framework and tests.
  3. *
  4. * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
  5. * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
  6. * Copyright (c) 2007 Nokia Siemens Networks
  7. * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
  8. *
  9. * Updated RFC4106 AES-GCM testing. Some test vectors were taken from
  10. * http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/
  11. * gcm/gcm-test-vectors.tar.gz
  12. * Authors: Aidan O'Mahony (aidan.o.mahony@intel.com)
  13. * Adrian Hoban <adrian.hoban@intel.com>
  14. * Gabriele Paoloni <gabriele.paoloni@intel.com>
  15. * Tadeusz Struk (tadeusz.struk@intel.com)
  16. * Copyright (c) 2010, Intel Corporation.
  17. *
  18. * This program is free software; you can redistribute it and/or modify it
  19. * under the terms of the GNU General Public License as published by the Free
  20. * Software Foundation; either version 2 of the License, or (at your option)
  21. * any later version.
  22. *
  23. */
  24. #ifndef _CRYPTO_TESTMGR_H
  25. #define _CRYPTO_TESTMGR_H
  26. #include <linux/netlink.h>
  27. #include <linux/zlib.h>
  28. #include <crypto/compress.h>
  29. #define MAX_DIGEST_SIZE 64
  30. #define MAX_TAP 8
  31. #ifdef CONFIG_CRYPTO_DRBG
  32. #define MAX_KEYLEN 160
  33. #else
  34. #define MAX_KEYLEN 56
  35. #endif
  36. #define MAX_IVLEN 32
  37. struct hash_testvec {
  38. /* only used with keyed hash algorithms */
  39. char *key;
  40. char *plaintext;
  41. char *digest;
  42. unsigned char tap[MAX_TAP];
  43. unsigned char psize;
  44. unsigned char np;
  45. unsigned char ksize;
  46. };
  47. struct cipher_testvec {
  48. char *key;
  49. char *iv;
  50. char *input;
  51. char *result;
  52. unsigned short tap[MAX_TAP];
  53. int np;
  54. unsigned char fail;
  55. unsigned char wk; /* weak key flag */
  56. unsigned char klen;
  57. unsigned short ilen;
  58. unsigned short rlen;
  59. };
  60. struct aead_testvec {
  61. char *key;
  62. char *iv;
  63. char *input;
  64. char *assoc;
  65. char *result;
  66. unsigned char tap[MAX_TAP];
  67. unsigned char atap[MAX_TAP];
  68. int np;
  69. int anp;
  70. unsigned char fail;
  71. unsigned char novrfy; /* ccm dec verification failure expected */
  72. unsigned char wk; /* weak key flag */
  73. unsigned char klen;
  74. unsigned short ilen;
  75. unsigned short alen;
  76. unsigned short rlen;
  77. };
  78. struct cprng_testvec {
  79. char *key;
  80. char *dt;
  81. char *v;
  82. char *result;
  83. unsigned char klen;
  84. unsigned short dtlen;
  85. unsigned short vlen;
  86. unsigned short rlen;
  87. unsigned short loops;
  88. };
  89. #ifdef CONFIG_CRYPTO_DRBG
  90. struct drbg_testvec {
  91. unsigned char *entropy;
  92. size_t entropylen;
  93. unsigned char *entpra;
  94. unsigned char *entprb;
  95. size_t entprlen;
  96. unsigned char *addtla;
  97. unsigned char *addtlb;
  98. size_t addtllen;
  99. unsigned char *pers;
  100. size_t perslen;
  101. unsigned char *expected;
  102. size_t expectedlen;
  103. };
  104. #endif
  105. static char zeroed_string[48];
  106. /*
  107. * MD4 test vectors from RFC1320
  108. */
  109. #define MD4_TEST_VECTORS 7
  110. static struct hash_testvec md4_tv_template [] = {
  111. {
  112. .plaintext = "",
  113. .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
  114. "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
  115. }, {
  116. .plaintext = "a",
  117. .psize = 1,
  118. .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
  119. "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
  120. }, {
  121. .plaintext = "abc",
  122. .psize = 3,
  123. .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
  124. "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
  125. }, {
  126. .plaintext = "message digest",
  127. .psize = 14,
  128. .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
  129. "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
  130. }, {
  131. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  132. .psize = 26,
  133. .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
  134. "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
  135. .np = 2,
  136. .tap = { 13, 13 },
  137. }, {
  138. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  139. .psize = 62,
  140. .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
  141. "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
  142. }, {
  143. .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
  144. "45678901234567890",
  145. .psize = 80,
  146. .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
  147. "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
  148. },
  149. };
  150. /*
  151. * MD5 test vectors from RFC1321
  152. */
  153. #define MD5_TEST_VECTORS 7
  154. static struct hash_testvec md5_tv_template[] = {
  155. {
  156. .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
  157. "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
  158. }, {
  159. .plaintext = "a",
  160. .psize = 1,
  161. .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
  162. "\x31\xc3\x99\xe2\x69\x77\x26\x61",
  163. }, {
  164. .plaintext = "abc",
  165. .psize = 3,
  166. .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
  167. "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
  168. }, {
  169. .plaintext = "message digest",
  170. .psize = 14,
  171. .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
  172. "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
  173. }, {
  174. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  175. .psize = 26,
  176. .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
  177. "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
  178. .np = 2,
  179. .tap = {13, 13}
  180. }, {
  181. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  182. .psize = 62,
  183. .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
  184. "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
  185. }, {
  186. .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
  187. "345678901234567890",
  188. .psize = 80,
  189. .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
  190. "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
  191. }
  192. };
  193. /*
  194. * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
  195. */
  196. #define RMD128_TEST_VECTORS 10
  197. static struct hash_testvec rmd128_tv_template[] = {
  198. {
  199. .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
  200. "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
  201. }, {
  202. .plaintext = "a",
  203. .psize = 1,
  204. .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
  205. "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
  206. }, {
  207. .plaintext = "abc",
  208. .psize = 3,
  209. .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
  210. "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
  211. }, {
  212. .plaintext = "message digest",
  213. .psize = 14,
  214. .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
  215. "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
  216. }, {
  217. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  218. .psize = 26,
  219. .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
  220. "\x10\x71\x49\x22\xb3\x71\x83\x4e",
  221. }, {
  222. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  223. "fghijklmnopqrstuvwxyz0123456789",
  224. .psize = 62,
  225. .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
  226. "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
  227. }, {
  228. .plaintext = "1234567890123456789012345678901234567890"
  229. "1234567890123456789012345678901234567890",
  230. .psize = 80,
  231. .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
  232. "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
  233. }, {
  234. .plaintext = "abcdbcdecdefdefgefghfghighij"
  235. "hijkijkljklmklmnlmnomnopnopq",
  236. .psize = 56,
  237. .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
  238. "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
  239. .np = 2,
  240. .tap = { 28, 28 },
  241. }, {
  242. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  243. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  244. "lmnopqrsmnopqrstnopqrstu",
  245. .psize = 112,
  246. .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
  247. "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
  248. }, {
  249. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  250. .psize = 32,
  251. .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
  252. "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
  253. }
  254. };
  255. /*
  256. * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
  257. */
  258. #define RMD160_TEST_VECTORS 10
  259. static struct hash_testvec rmd160_tv_template[] = {
  260. {
  261. .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
  262. "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
  263. }, {
  264. .plaintext = "a",
  265. .psize = 1,
  266. .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
  267. "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
  268. }, {
  269. .plaintext = "abc",
  270. .psize = 3,
  271. .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
  272. "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
  273. }, {
  274. .plaintext = "message digest",
  275. .psize = 14,
  276. .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
  277. "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
  278. }, {
  279. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  280. .psize = 26,
  281. .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
  282. "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
  283. }, {
  284. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  285. "fghijklmnopqrstuvwxyz0123456789",
  286. .psize = 62,
  287. .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
  288. "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
  289. }, {
  290. .plaintext = "1234567890123456789012345678901234567890"
  291. "1234567890123456789012345678901234567890",
  292. .psize = 80,
  293. .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
  294. "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
  295. }, {
  296. .plaintext = "abcdbcdecdefdefgefghfghighij"
  297. "hijkijkljklmklmnlmnomnopnopq",
  298. .psize = 56,
  299. .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
  300. "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
  301. .np = 2,
  302. .tap = { 28, 28 },
  303. }, {
  304. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  305. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  306. "lmnopqrsmnopqrstnopqrstu",
  307. .psize = 112,
  308. .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
  309. "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
  310. }, {
  311. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  312. .psize = 32,
  313. .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
  314. "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
  315. }
  316. };
  317. /*
  318. * RIPEMD-256 test vectors
  319. */
  320. #define RMD256_TEST_VECTORS 8
  321. static struct hash_testvec rmd256_tv_template[] = {
  322. {
  323. .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
  324. "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
  325. "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
  326. "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
  327. }, {
  328. .plaintext = "a",
  329. .psize = 1,
  330. .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
  331. "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
  332. "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
  333. "\xcd\x88\x3a\x91\x34\x69\x29\x25",
  334. }, {
  335. .plaintext = "abc",
  336. .psize = 3,
  337. .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
  338. "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
  339. "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
  340. "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
  341. }, {
  342. .plaintext = "message digest",
  343. .psize = 14,
  344. .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
  345. "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
  346. "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
  347. "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
  348. }, {
  349. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  350. .psize = 26,
  351. .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
  352. "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
  353. "\x78\x96\x11\x8a\x51\x97\x96\x87"
  354. "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
  355. }, {
  356. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  357. "fghijklmnopqrstuvwxyz0123456789",
  358. .psize = 62,
  359. .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
  360. "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
  361. "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
  362. "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
  363. }, {
  364. .plaintext = "1234567890123456789012345678901234567890"
  365. "1234567890123456789012345678901234567890",
  366. .psize = 80,
  367. .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
  368. "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
  369. "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
  370. "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
  371. }, {
  372. .plaintext = "abcdbcdecdefdefgefghfghighij"
  373. "hijkijkljklmklmnlmnomnopnopq",
  374. .psize = 56,
  375. .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
  376. "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
  377. "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
  378. "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
  379. .np = 2,
  380. .tap = { 28, 28 },
  381. }
  382. };
  383. /*
  384. * RIPEMD-320 test vectors
  385. */
  386. #define RMD320_TEST_VECTORS 8
  387. static struct hash_testvec rmd320_tv_template[] = {
  388. {
  389. .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
  390. "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
  391. "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
  392. "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
  393. }, {
  394. .plaintext = "a",
  395. .psize = 1,
  396. .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
  397. "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
  398. "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
  399. "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
  400. }, {
  401. .plaintext = "abc",
  402. .psize = 3,
  403. .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
  404. "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
  405. "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
  406. "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
  407. }, {
  408. .plaintext = "message digest",
  409. .psize = 14,
  410. .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
  411. "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
  412. "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
  413. "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
  414. }, {
  415. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  416. .psize = 26,
  417. .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
  418. "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
  419. "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
  420. "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
  421. }, {
  422. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  423. "fghijklmnopqrstuvwxyz0123456789",
  424. .psize = 62,
  425. .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
  426. "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
  427. "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
  428. "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
  429. }, {
  430. .plaintext = "1234567890123456789012345678901234567890"
  431. "1234567890123456789012345678901234567890",
  432. .psize = 80,
  433. .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
  434. "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
  435. "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
  436. "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
  437. }, {
  438. .plaintext = "abcdbcdecdefdefgefghfghighij"
  439. "hijkijkljklmklmnlmnomnopnopq",
  440. .psize = 56,
  441. .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
  442. "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
  443. "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
  444. "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
  445. .np = 2,
  446. .tap = { 28, 28 },
  447. }
  448. };
  449. /*
  450. * SHA1 test vectors from from FIPS PUB 180-1
  451. * Long vector from CAVS 5.0
  452. */
  453. #define SHA1_TEST_VECTORS 3
  454. static struct hash_testvec sha1_tv_template[] = {
  455. {
  456. .plaintext = "abc",
  457. .psize = 3,
  458. .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
  459. #if FIPS_FUNC_TEST == 6
  460. "\x25\x72\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
  461. #else
  462. "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
  463. #endif
  464. }, {
  465. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  466. .psize = 56,
  467. .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
  468. "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
  469. .np = 2,
  470. .tap = { 28, 28 }
  471. }, {
  472. .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
  473. "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
  474. "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
  475. "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
  476. "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
  477. "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
  478. "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
  479. "\x72\x28\x26\xc0\x66\x86\x9e\xda"
  480. "\xcd\x73\xb2\x54\x80\x35\x18\x58"
  481. "\x13\xe2\x26\x34\xa9\xda\x44\x00"
  482. "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
  483. "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
  484. "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
  485. "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
  486. "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
  487. "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
  488. "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
  489. "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
  490. "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
  491. "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
  492. "\x5a\x90\x11",
  493. .psize = 163,
  494. .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
  495. "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
  496. .np = 4,
  497. .tap = { 63, 64, 31, 5 }
  498. }
  499. };
  500. /*
  501. * SHA224 test vectors from from FIPS PUB 180-2
  502. */
  503. #define SHA224_TEST_VECTORS 2
  504. static struct hash_testvec sha224_tv_template[] = {
  505. {
  506. .plaintext = "abc",
  507. .psize = 3,
  508. .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
  509. "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
  510. "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
  511. "\xE3\x6C\x9D\xA7",
  512. }, {
  513. .plaintext =
  514. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  515. .psize = 56,
  516. .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
  517. "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
  518. "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
  519. "\x52\x52\x25\x25",
  520. .np = 2,
  521. .tap = { 28, 28 }
  522. }
  523. };
  524. /*
  525. * SHA256 test vectors from from NIST
  526. */
  527. #define SHA256_TEST_VECTORS 2
  528. static struct hash_testvec sha256_tv_template[] = {
  529. {
  530. .plaintext = "abc",
  531. .psize = 3,
  532. .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
  533. "\x41\x41\x40\xde\x5d\xae\x22\x23"
  534. "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
  535. "\xb4\x10\xff\x61\xf2\x00\x15\xad",
  536. }, {
  537. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  538. .psize = 56,
  539. .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
  540. "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
  541. "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
  542. "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
  543. .np = 2,
  544. .tap = { 28, 28 }
  545. },
  546. };
  547. /*
  548. * SHA384 test vectors from from NIST and kerneli
  549. */
  550. #define SHA384_TEST_VECTORS 4
  551. static struct hash_testvec sha384_tv_template[] = {
  552. {
  553. .plaintext= "abc",
  554. .psize = 3,
  555. .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
  556. "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
  557. "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
  558. "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
  559. "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
  560. "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
  561. }, {
  562. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  563. .psize = 56,
  564. .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
  565. "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
  566. "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
  567. "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
  568. "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
  569. "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
  570. }, {
  571. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  572. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  573. .psize = 112,
  574. .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
  575. "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
  576. "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
  577. "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
  578. "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
  579. "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
  580. }, {
  581. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  582. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  583. .psize = 104,
  584. .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
  585. "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
  586. "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
  587. "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
  588. "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
  589. "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
  590. .np = 4,
  591. .tap = { 26, 26, 26, 26 }
  592. },
  593. };
  594. /*
  595. * SHA512 test vectors from from NIST and kerneli
  596. */
  597. #define SHA512_TEST_VECTORS 4
  598. static struct hash_testvec sha512_tv_template[] = {
  599. {
  600. .plaintext = "abc",
  601. .psize = 3,
  602. .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
  603. "\xcc\x41\x73\x49\xae\x20\x41\x31"
  604. "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
  605. "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
  606. "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
  607. "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
  608. "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
  609. "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
  610. }, {
  611. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  612. .psize = 56,
  613. .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
  614. "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
  615. "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
  616. "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
  617. "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
  618. "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
  619. "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
  620. "\x54\xec\x63\x12\x38\xca\x34\x45",
  621. }, {
  622. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  623. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  624. .psize = 112,
  625. .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
  626. "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
  627. "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
  628. "\x72\x99\xae\xad\xb6\x88\x90\x18"
  629. "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
  630. "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
  631. "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
  632. "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
  633. }, {
  634. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  635. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  636. .psize = 104,
  637. .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
  638. "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
  639. "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
  640. "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
  641. "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
  642. "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
  643. "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
  644. "\xed\xb4\x19\x87\x23\x28\x50\xc9",
  645. .np = 4,
  646. .tap = { 26, 26, 26, 26 }
  647. },
  648. };
  649. /*
  650. * WHIRLPOOL test vectors from Whirlpool package
  651. * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
  652. * submission
  653. */
  654. #define WP512_TEST_VECTORS 8
  655. static struct hash_testvec wp512_tv_template[] = {
  656. {
  657. .plaintext = "",
  658. .psize = 0,
  659. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  660. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  661. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  662. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  663. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  664. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
  665. "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
  666. "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
  667. }, {
  668. .plaintext = "a",
  669. .psize = 1,
  670. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  671. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  672. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  673. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  674. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  675. "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
  676. "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
  677. "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
  678. }, {
  679. .plaintext = "abc",
  680. .psize = 3,
  681. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  682. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  683. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  684. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  685. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  686. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
  687. "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
  688. "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
  689. }, {
  690. .plaintext = "message digest",
  691. .psize = 14,
  692. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  693. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  694. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  695. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  696. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  697. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
  698. "\x92\xED\x92\x00\x52\x83\x8F\x33"
  699. "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
  700. }, {
  701. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  702. .psize = 26,
  703. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  704. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  705. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  706. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  707. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  708. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
  709. "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
  710. "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
  711. }, {
  712. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  713. "abcdefghijklmnopqrstuvwxyz0123456789",
  714. .psize = 62,
  715. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  716. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  717. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  718. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  719. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  720. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
  721. "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
  722. "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
  723. }, {
  724. .plaintext = "1234567890123456789012345678901234567890"
  725. "1234567890123456789012345678901234567890",
  726. .psize = 80,
  727. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  728. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  729. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  730. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  731. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  732. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
  733. "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
  734. "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
  735. }, {
  736. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  737. .psize = 32,
  738. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  739. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  740. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  741. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  742. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  743. "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
  744. "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
  745. "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
  746. },
  747. };
  748. #define WP384_TEST_VECTORS 8
  749. static struct hash_testvec wp384_tv_template[] = {
  750. {
  751. .plaintext = "",
  752. .psize = 0,
  753. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  754. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  755. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  756. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  757. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  758. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
  759. }, {
  760. .plaintext = "a",
  761. .psize = 1,
  762. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  763. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  764. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  765. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  766. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  767. "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
  768. }, {
  769. .plaintext = "abc",
  770. .psize = 3,
  771. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  772. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  773. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  774. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  775. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  776. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
  777. }, {
  778. .plaintext = "message digest",
  779. .psize = 14,
  780. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  781. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  782. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  783. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  784. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  785. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
  786. }, {
  787. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  788. .psize = 26,
  789. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  790. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  791. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  792. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  793. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  794. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
  795. }, {
  796. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  797. "abcdefghijklmnopqrstuvwxyz0123456789",
  798. .psize = 62,
  799. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  800. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  801. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  802. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  803. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  804. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
  805. }, {
  806. .plaintext = "1234567890123456789012345678901234567890"
  807. "1234567890123456789012345678901234567890",
  808. .psize = 80,
  809. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  810. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  811. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  812. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  813. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  814. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
  815. }, {
  816. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  817. .psize = 32,
  818. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  819. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  820. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  821. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  822. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  823. "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
  824. },
  825. };
  826. #define WP256_TEST_VECTORS 8
  827. static struct hash_testvec wp256_tv_template[] = {
  828. {
  829. .plaintext = "",
  830. .psize = 0,
  831. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  832. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  833. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  834. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
  835. }, {
  836. .plaintext = "a",
  837. .psize = 1,
  838. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  839. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  840. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  841. "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
  842. }, {
  843. .plaintext = "abc",
  844. .psize = 3,
  845. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  846. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  847. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  848. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
  849. }, {
  850. .plaintext = "message digest",
  851. .psize = 14,
  852. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  853. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  854. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  855. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
  856. }, {
  857. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  858. .psize = 26,
  859. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  860. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  861. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  862. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
  863. }, {
  864. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  865. "abcdefghijklmnopqrstuvwxyz0123456789",
  866. .psize = 62,
  867. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  868. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  869. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  870. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
  871. }, {
  872. .plaintext = "1234567890123456789012345678901234567890"
  873. "1234567890123456789012345678901234567890",
  874. .psize = 80,
  875. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  876. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  877. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  878. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
  879. }, {
  880. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  881. .psize = 32,
  882. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  883. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  884. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  885. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
  886. },
  887. };
  888. /*
  889. * TIGER test vectors from Tiger website
  890. */
  891. #define TGR192_TEST_VECTORS 6
  892. static struct hash_testvec tgr192_tv_template[] = {
  893. {
  894. .plaintext = "",
  895. .psize = 0,
  896. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  897. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  898. "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
  899. }, {
  900. .plaintext = "abc",
  901. .psize = 3,
  902. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  903. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  904. "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
  905. }, {
  906. .plaintext = "Tiger",
  907. .psize = 5,
  908. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  909. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  910. "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
  911. }, {
  912. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  913. .psize = 64,
  914. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  915. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  916. "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
  917. }, {
  918. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  919. .psize = 64,
  920. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  921. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  922. "\x57\x89\x65\x65\x97\x5f\x91\x97",
  923. }, {
  924. .plaintext = "Tiger - A Fast New Hash Function, "
  925. "by Ross Anderson and Eli Biham, "
  926. "proceedings of Fast Software Encryption 3, "
  927. "Cambridge, 1996.",
  928. .psize = 125,
  929. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  930. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  931. "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
  932. },
  933. };
  934. #define TGR160_TEST_VECTORS 6
  935. static struct hash_testvec tgr160_tv_template[] = {
  936. {
  937. .plaintext = "",
  938. .psize = 0,
  939. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  940. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  941. "\xf3\x73\xde\x2d",
  942. }, {
  943. .plaintext = "abc",
  944. .psize = 3,
  945. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  946. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  947. "\x93\x5f\x7b\x95",
  948. }, {
  949. .plaintext = "Tiger",
  950. .psize = 5,
  951. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  952. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  953. "\x37\x79\x0c\x11",
  954. }, {
  955. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  956. .psize = 64,
  957. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  958. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  959. "\xb5\x86\x44\x50",
  960. }, {
  961. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  962. .psize = 64,
  963. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  964. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  965. "\x57\x89\x65\x65",
  966. }, {
  967. .plaintext = "Tiger - A Fast New Hash Function, "
  968. "by Ross Anderson and Eli Biham, "
  969. "proceedings of Fast Software Encryption 3, "
  970. "Cambridge, 1996.",
  971. .psize = 125,
  972. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  973. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  974. "\xdd\x68\x15\x1d",
  975. },
  976. };
  977. #define TGR128_TEST_VECTORS 6
  978. static struct hash_testvec tgr128_tv_template[] = {
  979. {
  980. .plaintext = "",
  981. .psize = 0,
  982. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  983. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
  984. }, {
  985. .plaintext = "abc",
  986. .psize = 3,
  987. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  988. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
  989. }, {
  990. .plaintext = "Tiger",
  991. .psize = 5,
  992. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  993. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
  994. }, {
  995. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  996. .psize = 64,
  997. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  998. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
  999. }, {
  1000. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  1001. .psize = 64,
  1002. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  1003. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
  1004. }, {
  1005. .plaintext = "Tiger - A Fast New Hash Function, "
  1006. "by Ross Anderson and Eli Biham, "
  1007. "proceedings of Fast Software Encryption 3, "
  1008. "Cambridge, 1996.",
  1009. .psize = 125,
  1010. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  1011. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
  1012. },
  1013. };
  1014. #define GHASH_TEST_VECTORS 1
  1015. static struct hash_testvec ghash_tv_template[] =
  1016. {
  1017. {
  1018. .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
  1019. .ksize = 16,
  1020. .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
  1021. .psize = 16,
  1022. .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
  1023. "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
  1024. },
  1025. };
  1026. /*
  1027. * HMAC-MD5 test vectors from RFC2202
  1028. * (These need to be fixed to not use strlen).
  1029. */
  1030. #define HMAC_MD5_TEST_VECTORS 7
  1031. static struct hash_testvec hmac_md5_tv_template[] =
  1032. {
  1033. {
  1034. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1035. .ksize = 16,
  1036. .plaintext = "Hi There",
  1037. .psize = 8,
  1038. .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
  1039. "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
  1040. }, {
  1041. .key = "Jefe",
  1042. .ksize = 4,
  1043. .plaintext = "what do ya want for nothing?",
  1044. .psize = 28,
  1045. .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
  1046. "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
  1047. .np = 2,
  1048. .tap = {14, 14}
  1049. }, {
  1050. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1051. .ksize = 16,
  1052. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1053. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1054. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1055. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1056. .psize = 50,
  1057. .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
  1058. "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
  1059. }, {
  1060. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1061. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1062. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1063. .ksize = 25,
  1064. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1065. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1066. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1067. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1068. .psize = 50,
  1069. .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
  1070. "\x3a\x75\x16\x47\x46\xff\xaa\x79",
  1071. }, {
  1072. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1073. .ksize = 16,
  1074. .plaintext = "Test With Truncation",
  1075. .psize = 20,
  1076. .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
  1077. "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
  1078. }, {
  1079. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1080. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1081. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1082. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1083. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1084. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1085. "\xaa\xaa",
  1086. .ksize = 80,
  1087. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1088. .psize = 54,
  1089. .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
  1090. "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
  1091. }, {
  1092. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1093. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1094. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1095. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1096. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1097. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1098. "\xaa\xaa",
  1099. .ksize = 80,
  1100. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1101. "Block-Size Data",
  1102. .psize = 73,
  1103. .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
  1104. "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
  1105. },
  1106. };
  1107. /*
  1108. * HMAC-RIPEMD128 test vectors from RFC2286
  1109. */
  1110. #define HMAC_RMD128_TEST_VECTORS 7
  1111. static struct hash_testvec hmac_rmd128_tv_template[] = {
  1112. {
  1113. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1114. .ksize = 16,
  1115. .plaintext = "Hi There",
  1116. .psize = 8,
  1117. .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
  1118. "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
  1119. }, {
  1120. .key = "Jefe",
  1121. .ksize = 4,
  1122. .plaintext = "what do ya want for nothing?",
  1123. .psize = 28,
  1124. .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
  1125. "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
  1126. .np = 2,
  1127. .tap = { 14, 14 },
  1128. }, {
  1129. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1130. .ksize = 16,
  1131. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1132. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1133. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1134. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1135. .psize = 50,
  1136. .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
  1137. "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
  1138. }, {
  1139. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1140. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1141. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1142. .ksize = 25,
  1143. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1144. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1145. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1146. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1147. .psize = 50,
  1148. .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
  1149. "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
  1150. }, {
  1151. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1152. .ksize = 16,
  1153. .plaintext = "Test With Truncation",
  1154. .psize = 20,
  1155. .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
  1156. "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
  1157. }, {
  1158. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1159. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1160. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1161. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1162. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1163. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1164. "\xaa\xaa",
  1165. .ksize = 80,
  1166. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1167. .psize = 54,
  1168. .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
  1169. "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
  1170. }, {
  1171. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1172. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1173. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1174. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1175. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1176. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1177. "\xaa\xaa",
  1178. .ksize = 80,
  1179. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1180. "Block-Size Data",
  1181. .psize = 73,
  1182. .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
  1183. "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
  1184. },
  1185. };
  1186. /*
  1187. * HMAC-RIPEMD160 test vectors from RFC2286
  1188. */
  1189. #define HMAC_RMD160_TEST_VECTORS 7
  1190. static struct hash_testvec hmac_rmd160_tv_template[] = {
  1191. {
  1192. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1193. .ksize = 20,
  1194. .plaintext = "Hi There",
  1195. .psize = 8,
  1196. .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
  1197. "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
  1198. }, {
  1199. .key = "Jefe",
  1200. .ksize = 4,
  1201. .plaintext = "what do ya want for nothing?",
  1202. .psize = 28,
  1203. .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
  1204. "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
  1205. .np = 2,
  1206. .tap = { 14, 14 },
  1207. }, {
  1208. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1209. .ksize = 20,
  1210. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1211. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1212. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1213. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1214. .psize = 50,
  1215. .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
  1216. "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
  1217. }, {
  1218. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1219. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1220. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1221. .ksize = 25,
  1222. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1223. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1224. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1225. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1226. .psize = 50,
  1227. .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
  1228. "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
  1229. }, {
  1230. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1231. .ksize = 20,
  1232. .plaintext = "Test With Truncation",
  1233. .psize = 20,
  1234. .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
  1235. "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
  1236. }, {
  1237. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1238. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1239. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1240. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1241. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1242. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1243. "\xaa\xaa",
  1244. .ksize = 80,
  1245. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1246. .psize = 54,
  1247. .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
  1248. "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
  1249. }, {
  1250. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1251. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1252. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1253. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1254. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1255. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1256. "\xaa\xaa",
  1257. .ksize = 80,
  1258. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1259. "Block-Size Data",
  1260. .psize = 73,
  1261. .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
  1262. "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
  1263. },
  1264. };
  1265. /*
  1266. * HMAC-SHA1 test vectors from RFC2202
  1267. */
  1268. #define HMAC_SHA1_TEST_VECTORS 7
  1269. static struct hash_testvec hmac_sha1_tv_template[] = {
  1270. {
  1271. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1272. .ksize = 20,
  1273. .plaintext = "Hi There",
  1274. .psize = 8,
  1275. .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
  1276. #if FIPS_FUNC_TEST == 12
  1277. "\xe3\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
  1278. #else
  1279. "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
  1280. #endif
  1281. "\x46\xbe",
  1282. }, {
  1283. .key = "Jefe",
  1284. .ksize = 4,
  1285. .plaintext = "what do ya want for nothing?",
  1286. .psize = 28,
  1287. .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
  1288. "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
  1289. .np = 2,
  1290. .tap = { 14, 14 }
  1291. }, {
  1292. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1293. .ksize = 20,
  1294. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1295. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1296. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1297. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1298. .psize = 50,
  1299. .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
  1300. "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
  1301. }, {
  1302. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1303. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1304. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1305. .ksize = 25,
  1306. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1307. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1308. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1309. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1310. .psize = 50,
  1311. .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
  1312. "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
  1313. }, {
  1314. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1315. .ksize = 20,
  1316. .plaintext = "Test With Truncation",
  1317. .psize = 20,
  1318. .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
  1319. "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
  1320. }, {
  1321. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1322. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1323. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1324. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1325. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1326. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1327. "\xaa\xaa",
  1328. .ksize = 80,
  1329. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1330. .psize = 54,
  1331. .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
  1332. "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
  1333. }, {
  1334. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1335. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1336. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1337. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1338. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1339. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1340. "\xaa\xaa",
  1341. .ksize = 80,
  1342. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1343. "Block-Size Data",
  1344. .psize = 73,
  1345. .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
  1346. "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
  1347. },
  1348. };
  1349. /*
  1350. * SHA224 HMAC test vectors from RFC4231
  1351. */
  1352. #define HMAC_SHA224_TEST_VECTORS 4
  1353. static struct hash_testvec hmac_sha224_tv_template[] = {
  1354. {
  1355. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1356. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1357. "\x0b\x0b\x0b\x0b",
  1358. .ksize = 20,
  1359. /* ("Hi There") */
  1360. .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
  1361. .psize = 8,
  1362. .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
  1363. "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
  1364. "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
  1365. "\x53\x68\x4b\x22",
  1366. }, {
  1367. .key = "Jefe",
  1368. .ksize = 4,
  1369. /* ("what do ya want for nothing?") */
  1370. .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
  1371. "\x79\x61\x20\x77\x61\x6e\x74\x20"
  1372. "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
  1373. "\x69\x6e\x67\x3f",
  1374. .psize = 28,
  1375. .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
  1376. "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
  1377. "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
  1378. "\x8f\xd0\x5e\x44",
  1379. .np = 4,
  1380. .tap = { 7, 7, 7, 7 }
  1381. }, {
  1382. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1383. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1384. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1385. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1386. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1387. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1388. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1389. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1390. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1391. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1392. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1393. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1394. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1395. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1396. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1397. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1398. "\xaa\xaa\xaa",
  1399. .ksize = 131,
  1400. /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
  1401. .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
  1402. "\x6e\x67\x20\x4c\x61\x72\x67\x65"
  1403. "\x72\x20\x54\x68\x61\x6e\x20\x42"
  1404. "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
  1405. "\x65\x20\x4b\x65\x79\x20\x2d\x20"
  1406. "\x48\x61\x73\x68\x20\x4b\x65\x79"
  1407. "\x20\x46\x69\x72\x73\x74",
  1408. .psize = 54,
  1409. .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
  1410. "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
  1411. "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
  1412. "\x3f\xa6\x87\x0e",
  1413. }, {
  1414. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1415. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1416. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1417. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1418. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1419. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1420. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1421. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1422. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1423. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1424. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1425. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1426. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1427. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1428. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1429. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1430. "\xaa\xaa\xaa",
  1431. .ksize = 131,
  1432. /* ("This is a test using a larger than block-size key and a")
  1433. (" larger than block-size data. The key needs to be")
  1434. (" hashed before being used by the HMAC algorithm.") */
  1435. .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
  1436. "\x61\x20\x74\x65\x73\x74\x20\x75"
  1437. "\x73\x69\x6e\x67\x20\x61\x20\x6c"
  1438. "\x61\x72\x67\x65\x72\x20\x74\x68"
  1439. "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
  1440. "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
  1441. "\x79\x20\x61\x6e\x64\x20\x61\x20"
  1442. "\x6c\x61\x72\x67\x65\x72\x20\x74"
  1443. "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
  1444. "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
  1445. "\x61\x74\x61\x2e\x20\x54\x68\x65"
  1446. "\x20\x6b\x65\x79\x20\x6e\x65\x65"
  1447. "\x64\x73\x20\x74\x6f\x20\x62\x65"
  1448. "\x20\x68\x61\x73\x68\x65\x64\x20"
  1449. "\x62\x65\x66\x6f\x72\x65\x20\x62"
  1450. "\x65\x69\x6e\x67\x20\x75\x73\x65"
  1451. "\x64\x20\x62\x79\x20\x74\x68\x65"
  1452. "\x20\x48\x4d\x41\x43\x20\x61\x6c"
  1453. "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
  1454. .psize = 152,
  1455. .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
  1456. "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
  1457. "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
  1458. "\xf6\xf5\x65\xd1",
  1459. },
  1460. };
  1461. /*
  1462. * HMAC-SHA256 test vectors from
  1463. * draft-ietf-ipsec-ciph-sha-256-01.txt
  1464. */
  1465. #define HMAC_SHA256_TEST_VECTORS 10
  1466. static struct hash_testvec hmac_sha256_tv_template[] = {
  1467. {
  1468. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1469. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1470. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1471. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1472. .ksize = 32,
  1473. .plaintext = "abc",
  1474. .psize = 3,
  1475. .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
  1476. "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
  1477. "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
  1478. "\x92\x75\x90\x21\xcf\xab\x81\x81",
  1479. }, {
  1480. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1481. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1482. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1483. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1484. .ksize = 32,
  1485. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1486. .psize = 56,
  1487. .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
  1488. "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
  1489. "\xe6\x98\xe3\x61\x19\x42\x11\x49"
  1490. "\xea\x8c\x71\x24\x56\x69\x7d\x30",
  1491. }, {
  1492. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1493. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1494. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1495. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1496. .ksize = 32,
  1497. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
  1498. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1499. .psize = 112,
  1500. .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
  1501. "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
  1502. "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
  1503. "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
  1504. }, {
  1505. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1506. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1507. "\x0b\x0b\x0b\x0b\x0b\x0b",
  1508. .ksize = 32,
  1509. .plaintext = "Hi There",
  1510. .psize = 8,
  1511. .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
  1512. "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
  1513. "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
  1514. "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
  1515. }, {
  1516. .key = "Jefe",
  1517. .ksize = 4,
  1518. .plaintext = "what do ya want for nothing?",
  1519. .psize = 28,
  1520. .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
  1521. "\x6a\x04\x24\x26\x08\x95\x75\xc7"
  1522. "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
  1523. "\x9d\xec\x58\xb9\x64\xec\x38\x43",
  1524. .np = 2,
  1525. .tap = { 14, 14 }
  1526. }, {
  1527. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1528. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1529. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1530. .ksize = 32,
  1531. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1532. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1533. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1534. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1535. .psize = 50,
  1536. .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
  1537. "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
  1538. "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
  1539. "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
  1540. }, {
  1541. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1542. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1543. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1544. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  1545. "\x21\x22\x23\x24\x25",
  1546. .ksize = 37,
  1547. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1548. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1549. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1550. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1551. .psize = 50,
  1552. .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
  1553. "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
  1554. "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
  1555. "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
  1556. }, {
  1557. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1558. "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1559. "\x0c\x0c\x0c\x0c\x0c\x0c",
  1560. .ksize = 32,
  1561. .plaintext = "Test With Truncation",
  1562. .psize = 20,
  1563. .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
  1564. "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
  1565. "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
  1566. "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
  1567. }, {
  1568. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1569. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1570. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1571. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1572. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1573. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1574. "\xaa\xaa",
  1575. .ksize = 80,
  1576. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1577. .psize = 54,
  1578. .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
  1579. "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
  1580. "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
  1581. "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
  1582. }, {
  1583. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1584. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1585. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1586. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1587. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1588. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1589. "\xaa\xaa",
  1590. .ksize = 80,
  1591. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
  1592. "One Block-Size Data",
  1593. .psize = 73,
  1594. .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
  1595. "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
  1596. "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
  1597. "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
  1598. },
  1599. };
  1600. #define XCBC_AES_TEST_VECTORS 6
  1601. static struct hash_testvec aes_xcbc128_tv_template[] = {
  1602. {
  1603. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1604. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1605. .plaintext = zeroed_string,
  1606. .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
  1607. "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
  1608. .psize = 0,
  1609. .ksize = 16,
  1610. }, {
  1611. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1612. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1613. .plaintext = "\x00\x01\x02",
  1614. .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
  1615. "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
  1616. .psize = 3,
  1617. .ksize = 16,
  1618. } , {
  1619. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1620. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1621. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1622. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1623. .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
  1624. "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
  1625. .psize = 16,
  1626. .ksize = 16,
  1627. }, {
  1628. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1629. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1630. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1631. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1632. "\x10\x11\x12\x13",
  1633. .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
  1634. "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
  1635. .tap = { 10, 10 },
  1636. .psize = 20,
  1637. .np = 2,
  1638. .ksize = 16,
  1639. }, {
  1640. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1641. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1642. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1643. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1644. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1645. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  1646. .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
  1647. "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
  1648. .psize = 32,
  1649. .ksize = 16,
  1650. }, {
  1651. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1652. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1653. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1654. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1655. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1656. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  1657. "\x20\x21",
  1658. .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
  1659. "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
  1660. .tap = { 17, 17 },
  1661. .psize = 34,
  1662. .np = 2,
  1663. .ksize = 16,
  1664. }
  1665. };
  1666. #define VMAC_AES_TEST_VECTORS 8
  1667. static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
  1668. '\x02', '\x03', '\x02', '\x02',
  1669. '\x02', '\x04', '\x01', '\x07',
  1670. '\x04', '\x01', '\x04', '\x03',};
  1671. static char vmac_string2[128] = {'a', 'b', 'c',};
  1672. static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
  1673. 'a', 'b', 'c', 'a', 'b', 'c',
  1674. 'a', 'b', 'c', 'a', 'b', 'c',
  1675. 'a', 'b', 'c', 'a', 'b', 'c',
  1676. 'a', 'b', 'c', 'a', 'b', 'c',
  1677. 'a', 'b', 'c', 'a', 'b', 'c',
  1678. 'a', 'b', 'c', 'a', 'b', 'c',
  1679. 'a', 'b', 'c', 'a', 'b', 'c',
  1680. };
  1681. static struct hash_testvec aes_vmac128_tv_template[] = {
  1682. {
  1683. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1684. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1685. .plaintext = NULL,
  1686. .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
  1687. .psize = 0,
  1688. .ksize = 16,
  1689. }, {
  1690. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1691. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1692. .plaintext = vmac_string1,
  1693. .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
  1694. .psize = 128,
  1695. .ksize = 16,
  1696. }, {
  1697. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1698. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1699. .plaintext = vmac_string2,
  1700. .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
  1701. .psize = 128,
  1702. .ksize = 16,
  1703. }, {
  1704. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1705. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1706. .plaintext = vmac_string3,
  1707. .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
  1708. .psize = 128,
  1709. .ksize = 16,
  1710. }, {
  1711. .key = "abcdefghijklmnop",
  1712. .plaintext = NULL,
  1713. .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
  1714. .psize = 0,
  1715. .ksize = 16,
  1716. }, {
  1717. .key = "abcdefghijklmnop",
  1718. .plaintext = vmac_string1,
  1719. .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
  1720. .psize = 128,
  1721. .ksize = 16,
  1722. }, {
  1723. .key = "abcdefghijklmnop",
  1724. .plaintext = vmac_string2,
  1725. .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
  1726. .psize = 128,
  1727. .ksize = 16,
  1728. }, {
  1729. .key = "abcdefghijklmnop",
  1730. .plaintext = vmac_string3,
  1731. .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
  1732. .psize = 128,
  1733. .ksize = 16,
  1734. },
  1735. };
  1736. /*
  1737. * SHA384 HMAC test vectors from RFC4231
  1738. */
  1739. #define HMAC_SHA384_TEST_VECTORS 4
  1740. static struct hash_testvec hmac_sha384_tv_template[] = {
  1741. {
  1742. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1743. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1744. "\x0b\x0b\x0b\x0b",
  1745. .ksize = 20,
  1746. .plaintext = "Hi There",
  1747. .psize = 8,
  1748. .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
  1749. "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
  1750. "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
  1751. "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
  1752. "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
  1753. "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
  1754. }, {
  1755. .key = "Jefe",
  1756. .ksize = 4,
  1757. .plaintext = "what do ya want for nothing?",
  1758. .psize = 28,
  1759. .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
  1760. "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
  1761. "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
  1762. "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
  1763. "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
  1764. "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
  1765. .np = 4,
  1766. .tap = { 7, 7, 7, 7 }
  1767. }, {
  1768. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1769. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1770. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1771. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1772. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1773. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1774. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1775. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1776. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1777. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1778. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1779. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1780. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1781. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1782. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1783. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1784. "\xaa\xaa\xaa",
  1785. .ksize = 131,
  1786. .plaintext = "Test Using Larger Than Block-Siz"
  1787. "e Key - Hash Key First",
  1788. .psize = 54,
  1789. .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
  1790. "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
  1791. "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
  1792. "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
  1793. "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
  1794. "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
  1795. }, {
  1796. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1797. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1798. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1799. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1800. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1801. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1802. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1803. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1804. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1805. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1806. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1807. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1808. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1809. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1810. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1811. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1812. "\xaa\xaa\xaa",
  1813. .ksize = 131,
  1814. .plaintext = "This is a test u"
  1815. "sing a larger th"
  1816. "an block-size ke"
  1817. "y and a larger t"
  1818. "han block-size d"
  1819. "ata. The key nee"
  1820. "ds to be hashed "
  1821. "before being use"
  1822. "d by the HMAC al"
  1823. "gorithm.",
  1824. .psize = 152,
  1825. .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
  1826. "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
  1827. "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
  1828. "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
  1829. "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
  1830. "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
  1831. },
  1832. };
  1833. /*
  1834. * SHA512 HMAC test vectors from RFC4231
  1835. */
  1836. #define HMAC_SHA512_TEST_VECTORS 4
  1837. static struct hash_testvec hmac_sha512_tv_template[] = {
  1838. {
  1839. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1840. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1841. "\x0b\x0b\x0b\x0b",
  1842. .ksize = 20,
  1843. .plaintext = "Hi There",
  1844. .psize = 8,
  1845. .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
  1846. "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
  1847. "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
  1848. "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
  1849. "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
  1850. "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
  1851. "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
  1852. "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
  1853. }, {
  1854. .key = "Jefe",
  1855. .ksize = 4,
  1856. .plaintext = "what do ya want for nothing?",
  1857. .psize = 28,
  1858. .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
  1859. "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
  1860. "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
  1861. "\x10\x27\x0c\xd7\xea\x25\x05\x54"
  1862. "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
  1863. "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
  1864. "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
  1865. "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
  1866. .np = 4,
  1867. .tap = { 7, 7, 7, 7 }
  1868. }, {
  1869. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1870. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1871. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1872. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1873. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1874. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1875. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1876. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1877. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1878. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1879. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1880. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1881. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1882. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1883. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1884. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1885. "\xaa\xaa\xaa",
  1886. .ksize = 131,
  1887. .plaintext = "Test Using Large"
  1888. "r Than Block-Siz"
  1889. "e Key - Hash Key"
  1890. " First",
  1891. .psize = 54,
  1892. .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
  1893. "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
  1894. "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
  1895. "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
  1896. "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
  1897. "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
  1898. "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
  1899. "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
  1900. }, {
  1901. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1902. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1903. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1904. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1905. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1906. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1907. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1908. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1909. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1910. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1911. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1912. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1913. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1914. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1915. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1916. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1917. "\xaa\xaa\xaa",
  1918. .ksize = 131,
  1919. .plaintext =
  1920. "This is a test u"
  1921. "sing a larger th"
  1922. "an block-size ke"
  1923. "y and a larger t"
  1924. "han block-size d"
  1925. "ata. The key nee"
  1926. "ds to be hashed "
  1927. "before being use"
  1928. "d by the HMAC al"
  1929. "gorithm.",
  1930. .psize = 152,
  1931. .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
  1932. "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
  1933. "\xde\xbd\x71\xf8\x86\x72\x89\x86"
  1934. "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
  1935. "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
  1936. "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
  1937. "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
  1938. "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
  1939. },
  1940. };
  1941. /*
  1942. * DES test vectors.
  1943. */
  1944. #define DES_ENC_TEST_VECTORS 10
  1945. #define DES_DEC_TEST_VECTORS 4
  1946. #define DES_CBC_ENC_TEST_VECTORS 5
  1947. #define DES_CBC_DEC_TEST_VECTORS 4
  1948. #define DES3_EDE_ENC_TEST_VECTORS 3
  1949. #define DES3_EDE_DEC_TEST_VECTORS 3
  1950. #define DES3_EDE_CBC_ENC_TEST_VECTORS 1
  1951. #define DES3_EDE_CBC_DEC_TEST_VECTORS 1
  1952. static struct cipher_testvec des_enc_tv_template[] = {
  1953. { /* From Applied Cryptography */
  1954. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1955. .klen = 8,
  1956. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1957. .ilen = 8,
  1958. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1959. .rlen = 8,
  1960. }, { /* Same key, different plaintext block */
  1961. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1962. .klen = 8,
  1963. .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
  1964. .ilen = 8,
  1965. .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1966. .rlen = 8,
  1967. }, { /* Sbox test from NBS */
  1968. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1969. .klen = 8,
  1970. .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1971. .ilen = 8,
  1972. .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1973. .rlen = 8,
  1974. }, { /* Three blocks */
  1975. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1976. .klen = 8,
  1977. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1978. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1979. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1980. .ilen = 24,
  1981. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1982. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1983. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1984. .rlen = 24,
  1985. }, { /* Weak key */
  1986. .fail = 1,
  1987. .wk = 1,
  1988. .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
  1989. .klen = 8,
  1990. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1991. .ilen = 8,
  1992. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1993. .rlen = 8,
  1994. }, { /* Two blocks -- for testing encryption across pages */
  1995. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1996. .klen = 8,
  1997. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1998. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1999. .ilen = 16,
  2000. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2001. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  2002. .rlen = 16,
  2003. .np = 2,
  2004. .tap = { 8, 8 }
  2005. }, { /* Four blocks -- for testing encryption with chunking */
  2006. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2007. .klen = 8,
  2008. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2009. "\x22\x33\x44\x55\x66\x77\x88\x99"
  2010. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
  2011. "\x22\x33\x44\x55\x66\x77\x88\x99",
  2012. .ilen = 32,
  2013. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2014. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  2015. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
  2016. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  2017. .rlen = 32,
  2018. .np = 3,
  2019. .tap = { 14, 10, 8 }
  2020. }, {
  2021. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2022. .klen = 8,
  2023. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2024. "\x22\x33\x44\x55\x66\x77\x88\x99"
  2025. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  2026. .ilen = 24,
  2027. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2028. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  2029. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  2030. .rlen = 24,
  2031. .np = 4,
  2032. .tap = { 2, 1, 3, 18 }
  2033. }, {
  2034. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2035. .klen = 8,
  2036. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2037. "\x22\x33\x44\x55\x66\x77\x88\x99",
  2038. .ilen = 16,
  2039. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2040. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  2041. .rlen = 16,
  2042. .np = 5,
  2043. .tap = { 2, 2, 2, 2, 8 }
  2044. }, {
  2045. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2046. .klen = 8,
  2047. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  2048. .ilen = 8,
  2049. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  2050. .rlen = 8,
  2051. .np = 8,
  2052. .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
  2053. },
  2054. };
  2055. static struct cipher_testvec des_dec_tv_template[] = {
  2056. { /* From Applied Cryptography */
  2057. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2058. .klen = 8,
  2059. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  2060. .ilen = 8,
  2061. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  2062. .rlen = 8,
  2063. }, { /* Sbox test from NBS */
  2064. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  2065. .klen = 8,
  2066. .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2067. .ilen = 8,
  2068. .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  2069. .rlen = 8,
  2070. }, { /* Two blocks, for chunking test */
  2071. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2072. .klen = 8,
  2073. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2074. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2075. .ilen = 16,
  2076. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2077. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  2078. .rlen = 16,
  2079. .np = 2,
  2080. .tap = { 8, 8 }
  2081. }, {
  2082. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2083. .klen = 8,
  2084. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2085. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2086. .ilen = 16,
  2087. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2088. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  2089. .rlen = 16,
  2090. .np = 3,
  2091. .tap = { 3, 12, 1 }
  2092. },
  2093. };
  2094. static struct cipher_testvec des_cbc_enc_tv_template[] = {
  2095. { /* From OpenSSL */
  2096. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2097. .klen = 8,
  2098. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2099. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2100. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2101. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2102. .ilen = 24,
  2103. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  2104. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  2105. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  2106. .rlen = 24,
  2107. }, { /* FIPS Pub 81 */
  2108. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2109. .klen = 8,
  2110. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  2111. .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  2112. .ilen = 8,
  2113. .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2114. .rlen = 8,
  2115. }, {
  2116. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2117. .klen = 8,
  2118. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2119. .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2120. .ilen = 8,
  2121. .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2122. .rlen = 8,
  2123. }, {
  2124. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2125. .klen = 8,
  2126. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2127. .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2128. .ilen = 8,
  2129. .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2130. .rlen = 8,
  2131. }, { /* Copy of openssl vector for chunk testing */
  2132. /* From OpenSSL */
  2133. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2134. .klen = 8,
  2135. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2136. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2137. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2138. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2139. .ilen = 24,
  2140. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  2141. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  2142. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  2143. .rlen = 24,
  2144. .np = 2,
  2145. .tap = { 13, 11 }
  2146. },
  2147. };
  2148. static struct cipher_testvec des_cbc_dec_tv_template[] = {
  2149. { /* FIPS Pub 81 */
  2150. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2151. .klen = 8,
  2152. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  2153. .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2154. .ilen = 8,
  2155. .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  2156. .rlen = 8,
  2157. }, {
  2158. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2159. .klen = 8,
  2160. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2161. .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2162. .ilen = 8,
  2163. .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2164. .rlen = 8,
  2165. }, {
  2166. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2167. .klen = 8,
  2168. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2169. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2170. .ilen = 8,
  2171. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2172. .rlen = 8,
  2173. }, { /* Copy of above, for chunk testing */
  2174. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2175. .klen = 8,
  2176. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2177. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2178. .ilen = 8,
  2179. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2180. .rlen = 8,
  2181. .np = 2,
  2182. .tap = { 4, 4 }
  2183. },
  2184. };
  2185. static struct cipher_testvec des3_ede_enc_tv_template[] = {
  2186. { /* These are from openssl */
  2187. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2188. #if FIPS_FUNC_TEST == 7
  2189. "\x53\x55\x55\x55\x55\x55\x55\x55"
  2190. #else
  2191. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2192. #endif
  2193. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2194. .klen = 24,
  2195. .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2196. .ilen = 8,
  2197. .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2198. .rlen = 8,
  2199. }, {
  2200. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2201. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2202. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2203. .klen = 24,
  2204. .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2205. .ilen = 8,
  2206. .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2207. .rlen = 8,
  2208. }, {
  2209. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2210. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2211. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2212. .klen = 24,
  2213. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2214. .ilen = 8,
  2215. .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2216. .rlen = 8,
  2217. },
  2218. };
  2219. static struct cipher_testvec des3_ede_dec_tv_template[] = {
  2220. { /* These are from openssl */
  2221. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2222. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2223. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2224. .klen = 24,
  2225. .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2226. .ilen = 8,
  2227. .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2228. .rlen = 8,
  2229. }, {
  2230. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2231. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2232. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2233. .klen = 24,
  2234. .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2235. .ilen = 8,
  2236. .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2237. .rlen = 8,
  2238. }, {
  2239. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2240. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2241. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2242. .klen = 24,
  2243. .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2244. .ilen = 8,
  2245. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2246. .rlen = 8,
  2247. },
  2248. };
  2249. static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
  2250. { /* Generated from openssl */
  2251. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2252. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2253. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2254. .klen = 24,
  2255. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2256. .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2257. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2258. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2259. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2260. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2261. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2262. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2263. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2264. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2265. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2266. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2267. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2268. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2269. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2270. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2271. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2272. .ilen = 128,
  2273. .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2274. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2275. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2276. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2277. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2278. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2279. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2280. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2281. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2282. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2283. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2284. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2285. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2286. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2287. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2288. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2289. .rlen = 128,
  2290. },
  2291. };
  2292. static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
  2293. { /* Generated from openssl */
  2294. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2295. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2296. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2297. .klen = 24,
  2298. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2299. .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2300. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2301. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2302. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2303. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2304. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2305. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2306. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2307. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2308. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2309. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2310. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2311. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2312. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2313. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2314. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2315. .ilen = 128,
  2316. .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2317. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2318. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2319. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2320. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2321. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2322. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2323. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2324. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2325. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2326. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2327. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2328. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2329. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2330. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2331. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2332. .rlen = 128,
  2333. },
  2334. };
  2335. /*
  2336. * Blowfish test vectors.
  2337. */
  2338. #define BF_ENC_TEST_VECTORS 7
  2339. #define BF_DEC_TEST_VECTORS 7
  2340. #define BF_CBC_ENC_TEST_VECTORS 2
  2341. #define BF_CBC_DEC_TEST_VECTORS 2
  2342. #define BF_CTR_ENC_TEST_VECTORS 2
  2343. #define BF_CTR_DEC_TEST_VECTORS 2
  2344. static struct cipher_testvec bf_enc_tv_template[] = {
  2345. { /* DES test vectors from OpenSSL */
  2346. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2347. .klen = 8,
  2348. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2349. .ilen = 8,
  2350. .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2351. .rlen = 8,
  2352. }, {
  2353. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2354. .klen = 8,
  2355. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2356. .ilen = 8,
  2357. .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2358. .rlen = 8,
  2359. }, {
  2360. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2361. .klen = 8,
  2362. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2363. .ilen = 8,
  2364. .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2365. .rlen = 8,
  2366. }, { /* Vary the keylength... */
  2367. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2368. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2369. .klen = 16,
  2370. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2371. .ilen = 8,
  2372. .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2373. .rlen = 8,
  2374. }, {
  2375. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2376. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2377. "\x00\x11\x22\x33\x44",
  2378. .klen = 21,
  2379. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2380. .ilen = 8,
  2381. .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2382. .rlen = 8,
  2383. }, { /* Generated with bf488 */
  2384. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2385. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2386. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2387. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2388. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2389. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2390. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2391. .klen = 56,
  2392. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2393. .ilen = 8,
  2394. .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2395. .rlen = 8,
  2396. }, { /* Generated with Crypto++ */
  2397. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2398. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2399. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2400. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2401. .klen = 32,
  2402. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2403. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2404. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2405. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2406. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2407. .ilen = 40,
  2408. .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
  2409. "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
  2410. "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
  2411. "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
  2412. "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
  2413. .rlen = 40,
  2414. },
  2415. };
  2416. static struct cipher_testvec bf_dec_tv_template[] = {
  2417. { /* DES test vectors from OpenSSL */
  2418. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2419. .klen = 8,
  2420. .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2421. .ilen = 8,
  2422. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2423. .rlen = 8,
  2424. }, {
  2425. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2426. .klen = 8,
  2427. .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2428. .ilen = 8,
  2429. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2430. .rlen = 8,
  2431. }, {
  2432. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2433. .klen = 8,
  2434. .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2435. .ilen = 8,
  2436. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2437. .rlen = 8,
  2438. }, { /* Vary the keylength... */
  2439. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2440. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2441. .klen = 16,
  2442. .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2443. .ilen = 8,
  2444. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2445. .rlen = 8,
  2446. }, {
  2447. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2448. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2449. "\x00\x11\x22\x33\x44",
  2450. .klen = 21,
  2451. .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2452. .ilen = 8,
  2453. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2454. .rlen = 8,
  2455. }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
  2456. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2457. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2458. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2459. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2460. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2461. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2462. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2463. .klen = 56,
  2464. .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2465. .ilen = 8,
  2466. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2467. .rlen = 8,
  2468. }, { /* Generated with Crypto++ */
  2469. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2470. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2471. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2472. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2473. .klen = 32,
  2474. .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
  2475. "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
  2476. "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
  2477. "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
  2478. "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
  2479. .ilen = 40,
  2480. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2481. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2482. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2483. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2484. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2485. .rlen = 40,
  2486. },
  2487. };
  2488. static struct cipher_testvec bf_cbc_enc_tv_template[] = {
  2489. { /* From OpenSSL */
  2490. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2491. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2492. .klen = 16,
  2493. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2494. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2495. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2496. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2497. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2498. .ilen = 32,
  2499. .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2500. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2501. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2502. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2503. .rlen = 32,
  2504. }, { /* Generated with Crypto++ */
  2505. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2506. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2507. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2508. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2509. .klen = 32,
  2510. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2511. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2512. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2513. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2514. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2515. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2516. .ilen = 40,
  2517. .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
  2518. "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
  2519. "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
  2520. "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
  2521. "\x01\x9C\x93\x63\x51\x60\x82\xD2",
  2522. .rlen = 40,
  2523. },
  2524. };
  2525. static struct cipher_testvec bf_cbc_dec_tv_template[] = {
  2526. { /* From OpenSSL */
  2527. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2528. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2529. .klen = 16,
  2530. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2531. .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2532. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2533. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2534. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2535. .ilen = 32,
  2536. .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2537. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2538. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2539. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2540. .rlen = 32,
  2541. }, { /* Generated with Crypto++ */
  2542. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2543. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2544. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2545. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2546. .klen = 32,
  2547. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2548. .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
  2549. "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
  2550. "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
  2551. "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
  2552. "\x01\x9C\x93\x63\x51\x60\x82\xD2",
  2553. .ilen = 40,
  2554. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2555. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2556. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2557. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2558. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2559. .rlen = 40,
  2560. },
  2561. };
  2562. static struct cipher_testvec bf_ctr_enc_tv_template[] = {
  2563. { /* Generated with Crypto++ */
  2564. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2565. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2566. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2567. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2568. .klen = 32,
  2569. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2570. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2571. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2572. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2573. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2574. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2575. .ilen = 40,
  2576. .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2577. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2578. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2579. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2580. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
  2581. .rlen = 40,
  2582. }, { /* Generated with Crypto++ */
  2583. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2584. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2585. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2586. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2587. .klen = 32,
  2588. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2589. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2590. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2591. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2592. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2593. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2594. "\x6D\x04\x9B",
  2595. .ilen = 43,
  2596. .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2597. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2598. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2599. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2600. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
  2601. "\x3D\xA7\xE9",
  2602. .rlen = 43,
  2603. },
  2604. };
  2605. static struct cipher_testvec bf_ctr_dec_tv_template[] = {
  2606. { /* Generated with Crypto++ */
  2607. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2608. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2609. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2610. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2611. .klen = 32,
  2612. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2613. .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2614. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2615. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2616. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2617. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
  2618. .ilen = 40,
  2619. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2620. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2621. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2622. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2623. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2624. .rlen = 40,
  2625. }, { /* Generated with Crypto++ */
  2626. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2627. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2628. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2629. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2630. .klen = 32,
  2631. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2632. .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2633. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2634. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2635. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2636. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
  2637. "\x3D\xA7\xE9",
  2638. .ilen = 43,
  2639. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2640. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2641. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2642. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2643. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2644. "\x6D\x04\x9B",
  2645. .rlen = 43,
  2646. },
  2647. };
  2648. /*
  2649. * Twofish test vectors.
  2650. */
  2651. #define TF_ENC_TEST_VECTORS 4
  2652. #define TF_DEC_TEST_VECTORS 4
  2653. #define TF_CBC_ENC_TEST_VECTORS 5
  2654. #define TF_CBC_DEC_TEST_VECTORS 5
  2655. #define TF_CTR_ENC_TEST_VECTORS 2
  2656. #define TF_CTR_DEC_TEST_VECTORS 2
  2657. #define TF_LRW_ENC_TEST_VECTORS 8
  2658. #define TF_LRW_DEC_TEST_VECTORS 8
  2659. #define TF_XTS_ENC_TEST_VECTORS 5
  2660. #define TF_XTS_DEC_TEST_VECTORS 5
  2661. static struct cipher_testvec tf_enc_tv_template[] = {
  2662. {
  2663. .key = zeroed_string,
  2664. .klen = 16,
  2665. .input = zeroed_string,
  2666. .ilen = 16,
  2667. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2668. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2669. .rlen = 16,
  2670. }, {
  2671. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2672. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2673. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2674. .klen = 24,
  2675. .input = zeroed_string,
  2676. .ilen = 16,
  2677. .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2678. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2679. .rlen = 16,
  2680. }, {
  2681. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2682. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2683. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2684. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2685. .klen = 32,
  2686. .input = zeroed_string,
  2687. .ilen = 16,
  2688. .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2689. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2690. .rlen = 16,
  2691. }, { /* Generated with Crypto++ */
  2692. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  2693. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  2694. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  2695. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  2696. .klen = 32,
  2697. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2698. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2699. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2700. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2701. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2702. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2703. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2704. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2705. .ilen = 64,
  2706. .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
  2707. "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
  2708. "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
  2709. "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
  2710. "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
  2711. "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
  2712. "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
  2713. "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
  2714. .rlen = 64,
  2715. },
  2716. };
  2717. static struct cipher_testvec tf_dec_tv_template[] = {
  2718. {
  2719. .key = zeroed_string,
  2720. .klen = 16,
  2721. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2722. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2723. .ilen = 16,
  2724. .result = zeroed_string,
  2725. .rlen = 16,
  2726. }, {
  2727. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2728. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2729. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2730. .klen = 24,
  2731. .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2732. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2733. .ilen = 16,
  2734. .result = zeroed_string,
  2735. .rlen = 16,
  2736. }, {
  2737. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2738. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2739. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2740. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2741. .klen = 32,
  2742. .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2743. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2744. .ilen = 16,
  2745. .result = zeroed_string,
  2746. .rlen = 16,
  2747. }, { /* Generated with Crypto++ */
  2748. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  2749. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  2750. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  2751. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  2752. .klen = 32,
  2753. .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
  2754. "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
  2755. "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
  2756. "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
  2757. "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
  2758. "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
  2759. "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
  2760. "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
  2761. .ilen = 64,
  2762. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2763. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2764. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2765. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2766. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2767. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2768. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2769. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2770. .rlen = 64,
  2771. },
  2772. };
  2773. static struct cipher_testvec tf_cbc_enc_tv_template[] = {
  2774. { /* Generated with Nettle */
  2775. .key = zeroed_string,
  2776. .klen = 16,
  2777. .iv = zeroed_string,
  2778. .input = zeroed_string,
  2779. .ilen = 16,
  2780. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2781. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2782. .rlen = 16,
  2783. }, {
  2784. .key = zeroed_string,
  2785. .klen = 16,
  2786. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2787. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2788. .input = zeroed_string,
  2789. .ilen = 16,
  2790. .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2791. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2792. .rlen = 16,
  2793. }, {
  2794. .key = zeroed_string,
  2795. .klen = 16,
  2796. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2797. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2798. .input = zeroed_string,
  2799. .ilen = 16,
  2800. .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2801. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2802. .rlen = 16,
  2803. }, {
  2804. .key = zeroed_string,
  2805. .klen = 16,
  2806. .iv = zeroed_string,
  2807. .input = zeroed_string,
  2808. .ilen = 48,
  2809. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2810. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2811. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2812. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2813. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2814. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2815. .rlen = 48,
  2816. }, { /* Generated with Crypto++ */
  2817. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2818. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2819. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2820. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2821. .klen = 32,
  2822. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2823. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2824. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2825. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2826. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2827. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2828. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2829. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2830. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2831. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2832. .ilen = 64,
  2833. .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
  2834. "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
  2835. "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
  2836. "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
  2837. "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
  2838. "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
  2839. "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
  2840. "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
  2841. .rlen = 64,
  2842. },
  2843. };
  2844. static struct cipher_testvec tf_cbc_dec_tv_template[] = {
  2845. { /* Reverse of the first four above */
  2846. .key = zeroed_string,
  2847. .klen = 16,
  2848. .iv = zeroed_string,
  2849. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2850. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2851. .ilen = 16,
  2852. .result = zeroed_string,
  2853. .rlen = 16,
  2854. }, {
  2855. .key = zeroed_string,
  2856. .klen = 16,
  2857. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2858. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2859. .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2860. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2861. .ilen = 16,
  2862. .result = zeroed_string,
  2863. .rlen = 16,
  2864. }, {
  2865. .key = zeroed_string,
  2866. .klen = 16,
  2867. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2868. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2869. .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2870. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2871. .ilen = 16,
  2872. .result = zeroed_string,
  2873. .rlen = 16,
  2874. }, {
  2875. .key = zeroed_string,
  2876. .klen = 16,
  2877. .iv = zeroed_string,
  2878. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2879. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2880. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2881. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2882. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2883. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2884. .ilen = 48,
  2885. .result = zeroed_string,
  2886. .rlen = 48,
  2887. }, { /* Generated with Crypto++ */
  2888. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2889. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2890. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2891. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2892. .klen = 32,
  2893. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2894. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2895. .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
  2896. "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
  2897. "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
  2898. "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
  2899. "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
  2900. "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
  2901. "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
  2902. "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
  2903. .ilen = 64,
  2904. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2905. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2906. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2907. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2908. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2909. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2910. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2911. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2912. .rlen = 64,
  2913. },
  2914. };
  2915. static struct cipher_testvec tf_ctr_enc_tv_template[] = {
  2916. { /* Generated with Crypto++ */
  2917. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2918. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2919. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2920. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2921. .klen = 32,
  2922. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2923. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2924. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2925. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2926. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2927. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2928. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2929. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2930. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2931. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2932. .ilen = 64,
  2933. .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2934. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2935. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2936. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2937. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2938. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2939. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2940. "\x01\x41\x21\x12\x38\xAB\x52\x4F",
  2941. .rlen = 64,
  2942. }, { /* Generated with Crypto++ */
  2943. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2944. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2945. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2946. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2947. .klen = 32,
  2948. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2949. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2950. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2951. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2952. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2953. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2954. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2955. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2956. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2957. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  2958. "\xC3\x37\xCE",
  2959. .ilen = 67,
  2960. .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2961. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2962. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2963. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2964. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2965. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2966. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2967. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  2968. "\xA8\x57\x20",
  2969. .rlen = 67,
  2970. },
  2971. };
  2972. static struct cipher_testvec tf_ctr_dec_tv_template[] = {
  2973. { /* Generated with Crypto++ */
  2974. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2975. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2976. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2977. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2978. .klen = 32,
  2979. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2980. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2981. .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2982. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2983. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2984. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2985. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2986. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2987. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2988. "\x01\x41\x21\x12\x38\xAB\x52\x4F",
  2989. .ilen = 64,
  2990. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2991. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2992. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2993. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2994. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2995. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2996. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2997. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2998. .rlen = 64,
  2999. }, { /* Generated with Crypto++ */
  3000. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3001. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3002. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3003. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3004. .klen = 32,
  3005. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3006. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3007. .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  3008. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  3009. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  3010. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  3011. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  3012. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  3013. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  3014. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  3015. "\xA8\x57\x20",
  3016. .ilen = 67,
  3017. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3018. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3019. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3020. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3021. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3022. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3023. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3024. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3025. "\xC3\x37\xCE",
  3026. .rlen = 67,
  3027. },
  3028. };
  3029. static struct cipher_testvec tf_lrw_enc_tv_template[] = {
  3030. /* Generated from AES-LRW test vectors */
  3031. {
  3032. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3033. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3034. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3035. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3036. .klen = 32,
  3037. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3038. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3039. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3040. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3041. .ilen = 16,
  3042. .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
  3043. "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
  3044. .rlen = 16,
  3045. }, {
  3046. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3047. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3048. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3049. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3050. .klen = 32,
  3051. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3052. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3053. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3054. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3055. .ilen = 16,
  3056. .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
  3057. "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
  3058. .rlen = 16,
  3059. }, {
  3060. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3061. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3062. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3063. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3064. .klen = 32,
  3065. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3066. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3067. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3068. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3069. .ilen = 16,
  3070. .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
  3071. "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
  3072. .rlen = 16,
  3073. }, {
  3074. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3075. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3076. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3077. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3078. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3079. .klen = 40,
  3080. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3081. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3082. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3083. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3084. .ilen = 16,
  3085. .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
  3086. "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
  3087. .rlen = 16,
  3088. }, {
  3089. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3090. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3091. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3092. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3093. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3094. .klen = 40,
  3095. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3096. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3097. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3098. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3099. .ilen = 16,
  3100. .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
  3101. "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
  3102. .rlen = 16,
  3103. }, {
  3104. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3105. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3106. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3107. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3108. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3109. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3110. .klen = 48,
  3111. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3112. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3113. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3114. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3115. .ilen = 16,
  3116. .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
  3117. "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
  3118. .rlen = 16,
  3119. }, {
  3120. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3121. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3122. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3123. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3124. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3125. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3126. .klen = 48,
  3127. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3128. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3129. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3130. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3131. .ilen = 16,
  3132. .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
  3133. "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
  3134. .rlen = 16,
  3135. }, {
  3136. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3137. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3138. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3139. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3140. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3141. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3142. .klen = 48,
  3143. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3144. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3145. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3146. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3147. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3148. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3149. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3150. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3151. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3152. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3153. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3154. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3155. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3156. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3157. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3158. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3159. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3160. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3161. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3162. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3163. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3164. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3165. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3166. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3167. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3168. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3169. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3170. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3171. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3172. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3173. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3174. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3175. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3176. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3177. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3178. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3179. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3180. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3181. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3182. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3183. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3184. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3185. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3186. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3187. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3188. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3189. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3190. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3191. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3192. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3193. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3194. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3195. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3196. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3197. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3198. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3199. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3200. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3201. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3202. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3203. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3204. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3205. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3206. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3207. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3208. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3209. .ilen = 512,
  3210. .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
  3211. "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
  3212. "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
  3213. "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
  3214. "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
  3215. "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
  3216. "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
  3217. "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
  3218. "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
  3219. "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
  3220. "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
  3221. "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
  3222. "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
  3223. "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
  3224. "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
  3225. "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
  3226. "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
  3227. "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
  3228. "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
  3229. "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
  3230. "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
  3231. "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
  3232. "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
  3233. "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
  3234. "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
  3235. "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
  3236. "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
  3237. "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
  3238. "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
  3239. "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
  3240. "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
  3241. "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
  3242. "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
  3243. "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
  3244. "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
  3245. "\x3e\xae\x71\x90\x07\x70\x1c\x38"
  3246. "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
  3247. "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
  3248. "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
  3249. "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
  3250. "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
  3251. "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
  3252. "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
  3253. "\x93\x51\x1d\x3d\x62\x59\x83\x82"
  3254. "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
  3255. "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
  3256. "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
  3257. "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
  3258. "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
  3259. "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
  3260. "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
  3261. "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
  3262. "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
  3263. "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
  3264. "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
  3265. "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
  3266. "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
  3267. "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
  3268. "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
  3269. "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
  3270. "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
  3271. "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
  3272. "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
  3273. "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
  3274. .rlen = 512,
  3275. },
  3276. };
  3277. static struct cipher_testvec tf_lrw_dec_tv_template[] = {
  3278. /* Generated from AES-LRW test vectors */
  3279. /* same as enc vectors with input and result reversed */
  3280. {
  3281. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3282. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3283. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3284. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3285. .klen = 32,
  3286. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3287. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3288. .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
  3289. "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
  3290. .ilen = 16,
  3291. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3292. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3293. .rlen = 16,
  3294. }, {
  3295. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3296. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3297. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3298. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3299. .klen = 32,
  3300. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3301. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3302. .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
  3303. "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
  3304. .ilen = 16,
  3305. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3306. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3307. .rlen = 16,
  3308. }, {
  3309. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3310. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3311. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3312. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3313. .klen = 32,
  3314. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3315. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3316. .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
  3317. "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
  3318. .ilen = 16,
  3319. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3320. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3321. .rlen = 16,
  3322. }, {
  3323. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3324. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3325. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3326. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3327. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3328. .klen = 40,
  3329. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3330. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3331. .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
  3332. "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
  3333. .ilen = 16,
  3334. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3335. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3336. .rlen = 16,
  3337. }, {
  3338. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3339. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3340. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3341. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3342. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3343. .klen = 40,
  3344. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3345. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3346. .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
  3347. "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
  3348. .ilen = 16,
  3349. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3350. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3351. .rlen = 16,
  3352. }, {
  3353. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3354. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3355. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3356. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3357. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3358. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3359. .klen = 48,
  3360. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3361. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3362. .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
  3363. "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
  3364. .ilen = 16,
  3365. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3366. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3367. .rlen = 16,
  3368. }, {
  3369. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3370. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3371. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3372. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3373. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3374. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3375. .klen = 48,
  3376. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3377. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3378. .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
  3379. "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
  3380. .ilen = 16,
  3381. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3382. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3383. .rlen = 16,
  3384. }, {
  3385. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3386. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3387. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3388. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3389. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3390. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3391. .klen = 48,
  3392. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3393. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3394. .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
  3395. "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
  3396. "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
  3397. "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
  3398. "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
  3399. "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
  3400. "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
  3401. "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
  3402. "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
  3403. "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
  3404. "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
  3405. "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
  3406. "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
  3407. "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
  3408. "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
  3409. "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
  3410. "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
  3411. "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
  3412. "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
  3413. "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
  3414. "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
  3415. "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
  3416. "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
  3417. "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
  3418. "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
  3419. "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
  3420. "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
  3421. "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
  3422. "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
  3423. "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
  3424. "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
  3425. "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
  3426. "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
  3427. "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
  3428. "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
  3429. "\x3e\xae\x71\x90\x07\x70\x1c\x38"
  3430. "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
  3431. "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
  3432. "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
  3433. "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
  3434. "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
  3435. "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
  3436. "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
  3437. "\x93\x51\x1d\x3d\x62\x59\x83\x82"
  3438. "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
  3439. "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
  3440. "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
  3441. "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
  3442. "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
  3443. "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
  3444. "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
  3445. "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
  3446. "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
  3447. "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
  3448. "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
  3449. "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
  3450. "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
  3451. "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
  3452. "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
  3453. "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
  3454. "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
  3455. "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
  3456. "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
  3457. "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
  3458. .ilen = 512,
  3459. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3460. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3461. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3462. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3463. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3464. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3465. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3466. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3467. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3468. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3469. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3470. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3471. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3472. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3473. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3474. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3475. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3476. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3477. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3478. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3479. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3480. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3481. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3482. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3483. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3484. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3485. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3486. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3487. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3488. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3489. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3490. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3491. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3492. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3493. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3494. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3495. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3496. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3497. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3498. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3499. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3500. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3501. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3502. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3503. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3504. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3505. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3506. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3507. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3508. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3509. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3510. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3511. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3512. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3513. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3514. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3515. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3516. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3517. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3518. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3519. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3520. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3521. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3522. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3523. .rlen = 512,
  3524. },
  3525. };
  3526. static struct cipher_testvec tf_xts_enc_tv_template[] = {
  3527. /* Generated from AES-XTS test vectors */
  3528. {
  3529. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3530. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3531. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3532. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3533. .klen = 32,
  3534. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3535. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3536. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3537. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3538. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3539. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3540. .ilen = 32,
  3541. .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
  3542. "\x30\x74\xe4\x44\x52\x77\x97\x43"
  3543. "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
  3544. "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
  3545. .rlen = 32,
  3546. }, {
  3547. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3548. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3549. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3550. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3551. .klen = 32,
  3552. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3553. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3554. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3555. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3556. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3557. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3558. .ilen = 32,
  3559. .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
  3560. "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
  3561. "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
  3562. "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
  3563. .rlen = 32,
  3564. }, {
  3565. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3566. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3567. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3568. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3569. .klen = 32,
  3570. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3571. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3572. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3573. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3574. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3575. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3576. .ilen = 32,
  3577. .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
  3578. "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
  3579. "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
  3580. "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
  3581. .rlen = 32,
  3582. }, {
  3583. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3584. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3585. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3586. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3587. .klen = 32,
  3588. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3589. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3590. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3591. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3592. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3593. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3594. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3595. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3596. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3597. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3598. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3599. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3600. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3601. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3602. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3603. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3604. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3605. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3606. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3607. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3608. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3609. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3610. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3611. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3612. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3613. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3614. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3615. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3616. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3617. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3618. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3619. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3620. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3621. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3622. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3623. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3624. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3625. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3626. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3627. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3628. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3629. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3630. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3631. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3632. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3633. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3634. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3635. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3636. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3637. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3638. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3639. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3640. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3641. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3642. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3643. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3644. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3645. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3646. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3647. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3648. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3649. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3650. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3651. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3652. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3653. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3654. .ilen = 512,
  3655. .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
  3656. "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
  3657. "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
  3658. "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
  3659. "\xea\x35\x35\x8c\xb2\x46\x61\x06"
  3660. "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
  3661. "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
  3662. "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
  3663. "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
  3664. "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
  3665. "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
  3666. "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
  3667. "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
  3668. "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
  3669. "\x01\x73\x68\x32\x25\x19\xfa\xfb"
  3670. "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
  3671. "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
  3672. "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
  3673. "\x39\x80\x39\x09\x97\x65\xf2\x83"
  3674. "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
  3675. "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
  3676. "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
  3677. "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
  3678. "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
  3679. "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
  3680. "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
  3681. "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
  3682. "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
  3683. "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
  3684. "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
  3685. "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
  3686. "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
  3687. "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
  3688. "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
  3689. "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
  3690. "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
  3691. "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
  3692. "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
  3693. "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
  3694. "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
  3695. "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
  3696. "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
  3697. "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
  3698. "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
  3699. "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
  3700. "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
  3701. "\x04\x39\x73\x32\xb2\x86\x79\xe7"
  3702. "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
  3703. "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
  3704. "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
  3705. "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
  3706. "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
  3707. "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
  3708. "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
  3709. "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
  3710. "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
  3711. "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
  3712. "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
  3713. "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
  3714. "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
  3715. "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
  3716. "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
  3717. "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
  3718. "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
  3719. .rlen = 512,
  3720. }, {
  3721. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3722. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3723. "\x62\x49\x77\x57\x24\x70\x93\x69"
  3724. "\x99\x59\x57\x49\x66\x96\x76\x27"
  3725. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3726. "\x23\x84\x62\x64\x33\x83\x27\x95"
  3727. "\x02\x88\x41\x97\x16\x93\x99\x37"
  3728. "\x51\x05\x82\x09\x74\x94\x45\x92",
  3729. .klen = 64,
  3730. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  3731. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3732. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3733. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3734. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3735. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3736. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3737. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3738. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3739. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3740. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3741. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3742. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3743. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3744. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3745. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3746. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3747. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3748. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3749. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3750. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3751. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3752. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3753. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3754. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3755. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3756. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3757. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3758. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3759. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3760. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3761. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3762. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3763. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3764. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3765. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3766. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3767. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3768. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3769. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3770. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3771. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3772. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3773. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3774. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3775. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3776. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3777. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3778. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3779. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3780. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3781. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3782. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3783. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3784. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3785. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3786. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3787. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3788. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3789. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3790. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3791. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3792. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3793. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3794. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3795. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3796. .ilen = 512,
  3797. .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
  3798. "\x35\x39\x71\x88\x76\x1e\xc9\xea"
  3799. "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
  3800. "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
  3801. "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
  3802. "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
  3803. "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
  3804. "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
  3805. "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
  3806. "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
  3807. "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
  3808. "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
  3809. "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
  3810. "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
  3811. "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
  3812. "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
  3813. "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
  3814. "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
  3815. "\x69\x35\x61\x86\xf8\x86\xb9\x89"
  3816. "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
  3817. "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
  3818. "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
  3819. "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
  3820. "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
  3821. "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
  3822. "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
  3823. "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
  3824. "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
  3825. "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
  3826. "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
  3827. "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
  3828. "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
  3829. "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
  3830. "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
  3831. "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
  3832. "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
  3833. "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
  3834. "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
  3835. "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
  3836. "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
  3837. "\xad\x12\x32\x31\x03\xf7\x21\xbe"
  3838. "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
  3839. "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
  3840. "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
  3841. "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
  3842. "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
  3843. "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
  3844. "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
  3845. "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
  3846. "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
  3847. "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
  3848. "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
  3849. "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
  3850. "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
  3851. "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
  3852. "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
  3853. "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
  3854. "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
  3855. "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
  3856. "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
  3857. "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
  3858. "\xf3\xea\x67\x52\x78\xc2\xce\x70"
  3859. "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
  3860. "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
  3861. .rlen = 512,
  3862. },
  3863. };
  3864. static struct cipher_testvec tf_xts_dec_tv_template[] = {
  3865. /* Generated from AES-XTS test vectors */
  3866. /* same as enc vectors with input and result reversed */
  3867. {
  3868. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3869. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3870. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3871. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3872. .klen = 32,
  3873. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3874. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3875. .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
  3876. "\x30\x74\xe4\x44\x52\x77\x97\x43"
  3877. "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
  3878. "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
  3879. .ilen = 32,
  3880. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3881. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3882. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3883. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3884. .rlen = 32,
  3885. }, {
  3886. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3887. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3888. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3889. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3890. .klen = 32,
  3891. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3892. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3893. .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
  3894. "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
  3895. "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
  3896. "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
  3897. .ilen = 32,
  3898. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3899. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3900. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3901. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3902. .rlen = 32,
  3903. }, {
  3904. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3905. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3906. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3907. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3908. .klen = 32,
  3909. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3910. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3911. .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
  3912. "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
  3913. "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
  3914. "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
  3915. .ilen = 32,
  3916. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3917. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3918. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3919. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3920. .rlen = 32,
  3921. }, {
  3922. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3923. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3924. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3925. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3926. .klen = 32,
  3927. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3928. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3929. .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
  3930. "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
  3931. "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
  3932. "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
  3933. "\xea\x35\x35\x8c\xb2\x46\x61\x06"
  3934. "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
  3935. "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
  3936. "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
  3937. "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
  3938. "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
  3939. "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
  3940. "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
  3941. "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
  3942. "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
  3943. "\x01\x73\x68\x32\x25\x19\xfa\xfb"
  3944. "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
  3945. "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
  3946. "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
  3947. "\x39\x80\x39\x09\x97\x65\xf2\x83"
  3948. "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
  3949. "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
  3950. "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
  3951. "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
  3952. "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
  3953. "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
  3954. "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
  3955. "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
  3956. "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
  3957. "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
  3958. "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
  3959. "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
  3960. "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
  3961. "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
  3962. "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
  3963. "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
  3964. "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
  3965. "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
  3966. "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
  3967. "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
  3968. "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
  3969. "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
  3970. "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
  3971. "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
  3972. "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
  3973. "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
  3974. "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
  3975. "\x04\x39\x73\x32\xb2\x86\x79\xe7"
  3976. "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
  3977. "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
  3978. "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
  3979. "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
  3980. "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
  3981. "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
  3982. "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
  3983. "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
  3984. "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
  3985. "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
  3986. "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
  3987. "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
  3988. "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
  3989. "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
  3990. "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
  3991. "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
  3992. "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
  3993. .ilen = 512,
  3994. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3995. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3996. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3997. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3998. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3999. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4000. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4001. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4002. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4003. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4004. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4005. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4006. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4007. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4008. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4009. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4010. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4011. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4012. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4013. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4014. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4015. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4016. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4017. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4018. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4019. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4020. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4021. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4022. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4023. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4024. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4025. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4026. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4027. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4028. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4029. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4030. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4031. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4032. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4033. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4034. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4035. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4036. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4037. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4038. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4039. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4040. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4041. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4042. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4043. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4044. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4045. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4046. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4047. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4048. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4049. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4050. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4051. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4052. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4053. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4054. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4055. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4056. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4057. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4058. .rlen = 512,
  4059. }, {
  4060. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4061. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4062. "\x62\x49\x77\x57\x24\x70\x93\x69"
  4063. "\x99\x59\x57\x49\x66\x96\x76\x27"
  4064. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4065. "\x23\x84\x62\x64\x33\x83\x27\x95"
  4066. "\x02\x88\x41\x97\x16\x93\x99\x37"
  4067. "\x51\x05\x82\x09\x74\x94\x45\x92",
  4068. .klen = 64,
  4069. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  4070. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4071. .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
  4072. "\x35\x39\x71\x88\x76\x1e\xc9\xea"
  4073. "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
  4074. "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
  4075. "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
  4076. "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
  4077. "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
  4078. "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
  4079. "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
  4080. "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
  4081. "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
  4082. "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
  4083. "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
  4084. "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
  4085. "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
  4086. "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
  4087. "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
  4088. "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
  4089. "\x69\x35\x61\x86\xf8\x86\xb9\x89"
  4090. "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
  4091. "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
  4092. "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
  4093. "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
  4094. "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
  4095. "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
  4096. "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
  4097. "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
  4098. "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
  4099. "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
  4100. "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
  4101. "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
  4102. "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
  4103. "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
  4104. "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
  4105. "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
  4106. "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
  4107. "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
  4108. "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
  4109. "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
  4110. "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
  4111. "\xad\x12\x32\x31\x03\xf7\x21\xbe"
  4112. "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
  4113. "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
  4114. "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
  4115. "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
  4116. "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
  4117. "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
  4118. "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
  4119. "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
  4120. "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
  4121. "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
  4122. "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
  4123. "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
  4124. "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
  4125. "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
  4126. "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
  4127. "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
  4128. "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
  4129. "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
  4130. "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
  4131. "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
  4132. "\xf3\xea\x67\x52\x78\xc2\xce\x70"
  4133. "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
  4134. "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
  4135. .ilen = 512,
  4136. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4137. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4138. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4139. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4140. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4141. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4142. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4143. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4144. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4145. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4146. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4147. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4148. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4149. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4150. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4151. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4152. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4153. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4154. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4155. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4156. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4157. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4158. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4159. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4160. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4161. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4162. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4163. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4164. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4165. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4166. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4167. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4168. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4169. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4170. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4171. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4172. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4173. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4174. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4175. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4176. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4177. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4178. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4179. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4180. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4181. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4182. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4183. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4184. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4185. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4186. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4187. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4188. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4189. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4190. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4191. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4192. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4193. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4194. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4195. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4196. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4197. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4198. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4199. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4200. .rlen = 512,
  4201. },
  4202. };
  4203. /*
  4204. * Serpent test vectors. These are backwards because Serpent writes
  4205. * octet sequences in right-to-left mode.
  4206. */
  4207. #define SERPENT_ENC_TEST_VECTORS 5
  4208. #define SERPENT_DEC_TEST_VECTORS 5
  4209. #define TNEPRES_ENC_TEST_VECTORS 4
  4210. #define TNEPRES_DEC_TEST_VECTORS 4
  4211. #define SERPENT_CBC_ENC_TEST_VECTORS 1
  4212. #define SERPENT_CBC_DEC_TEST_VECTORS 1
  4213. #define SERPENT_CTR_ENC_TEST_VECTORS 2
  4214. #define SERPENT_CTR_DEC_TEST_VECTORS 2
  4215. #define SERPENT_LRW_ENC_TEST_VECTORS 8
  4216. #define SERPENT_LRW_DEC_TEST_VECTORS 8
  4217. #define SERPENT_XTS_ENC_TEST_VECTORS 5
  4218. #define SERPENT_XTS_DEC_TEST_VECTORS 5
  4219. static struct cipher_testvec serpent_enc_tv_template[] = {
  4220. {
  4221. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4222. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4223. .ilen = 16,
  4224. .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  4225. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  4226. .rlen = 16,
  4227. }, {
  4228. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4229. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4230. .klen = 16,
  4231. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4232. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4233. .ilen = 16,
  4234. .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  4235. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  4236. .rlen = 16,
  4237. }, {
  4238. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4239. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4240. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4241. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4242. .klen = 32,
  4243. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4244. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4245. .ilen = 16,
  4246. .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  4247. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  4248. .rlen = 16,
  4249. }, {
  4250. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  4251. .klen = 16,
  4252. .input = zeroed_string,
  4253. .ilen = 16,
  4254. .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  4255. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  4256. .rlen = 16,
  4257. }, { /* Generated with Crypto++ */
  4258. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4259. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4260. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4261. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4262. .klen = 32,
  4263. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4264. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4265. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4266. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4267. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4268. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4269. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4270. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4271. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4272. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4273. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4274. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4275. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4276. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4277. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4278. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4279. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4280. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4281. .ilen = 144,
  4282. .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
  4283. "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
  4284. "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
  4285. "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
  4286. "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
  4287. "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
  4288. "\x99\x34\x89\x5B\x54\xE9\x12\x13"
  4289. "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
  4290. "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
  4291. "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
  4292. "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
  4293. "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
  4294. "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
  4295. "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
  4296. "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
  4297. "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
  4298. "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
  4299. "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
  4300. .rlen = 144,
  4301. },
  4302. };
  4303. static struct cipher_testvec tnepres_enc_tv_template[] = {
  4304. { /* KeySize=128, PT=0, I=1 */
  4305. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4306. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4307. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  4308. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4309. .klen = 16,
  4310. .ilen = 16,
  4311. .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
  4312. "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
  4313. .rlen = 16,
  4314. }, { /* KeySize=192, PT=0, I=1 */
  4315. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  4316. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4317. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4318. .klen = 24,
  4319. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4320. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4321. .ilen = 16,
  4322. .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
  4323. "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
  4324. .rlen = 16,
  4325. }, { /* KeySize=256, PT=0, I=1 */
  4326. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  4327. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4328. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4329. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4330. .klen = 32,
  4331. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4332. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4333. .ilen = 16,
  4334. .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
  4335. "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
  4336. .rlen = 16,
  4337. }, { /* KeySize=256, I=257 */
  4338. .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
  4339. "\x17\x16\x15\x14\x13\x12\x11\x10"
  4340. "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  4341. "\x07\x06\x05\x04\x03\x02\x01\x00",
  4342. .klen = 32,
  4343. .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  4344. "\x07\x06\x05\x04\x03\x02\x01\x00",
  4345. .ilen = 16,
  4346. .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
  4347. "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
  4348. .rlen = 16,
  4349. },
  4350. };
  4351. static struct cipher_testvec serpent_dec_tv_template[] = {
  4352. {
  4353. .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  4354. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  4355. .ilen = 16,
  4356. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4357. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4358. .rlen = 16,
  4359. }, {
  4360. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4361. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4362. .klen = 16,
  4363. .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  4364. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  4365. .ilen = 16,
  4366. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4367. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4368. .rlen = 16,
  4369. }, {
  4370. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4371. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4372. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4373. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4374. .klen = 32,
  4375. .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  4376. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  4377. .ilen = 16,
  4378. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4379. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4380. .rlen = 16,
  4381. }, {
  4382. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  4383. .klen = 16,
  4384. .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  4385. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  4386. .ilen = 16,
  4387. .result = zeroed_string,
  4388. .rlen = 16,
  4389. }, { /* Generated with Crypto++ */
  4390. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4391. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4392. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4393. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4394. .klen = 32,
  4395. .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
  4396. "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
  4397. "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
  4398. "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
  4399. "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
  4400. "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
  4401. "\x99\x34\x89\x5B\x54\xE9\x12\x13"
  4402. "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
  4403. "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
  4404. "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
  4405. "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
  4406. "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
  4407. "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
  4408. "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
  4409. "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
  4410. "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
  4411. "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
  4412. "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
  4413. .ilen = 144,
  4414. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4415. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4416. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4417. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4418. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4419. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4420. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4421. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4422. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4423. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4424. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4425. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4426. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4427. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4428. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4429. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4430. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4431. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4432. .rlen = 144,
  4433. },
  4434. };
  4435. static struct cipher_testvec tnepres_dec_tv_template[] = {
  4436. {
  4437. .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
  4438. "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
  4439. .ilen = 16,
  4440. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4441. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4442. .rlen = 16,
  4443. }, {
  4444. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4445. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4446. .klen = 16,
  4447. .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
  4448. "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
  4449. .ilen = 16,
  4450. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4451. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4452. .rlen = 16,
  4453. }, {
  4454. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4455. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4456. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4457. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4458. .klen = 32,
  4459. .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
  4460. "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
  4461. .ilen = 16,
  4462. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4463. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4464. .rlen = 16,
  4465. }, { /* KeySize=128, I=121 */
  4466. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  4467. .klen = 16,
  4468. .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
  4469. "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
  4470. .ilen = 16,
  4471. .result = zeroed_string,
  4472. .rlen = 16,
  4473. },
  4474. };
  4475. static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
  4476. { /* Generated with Crypto++ */
  4477. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4478. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4479. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4480. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4481. .klen = 32,
  4482. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4483. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4484. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4485. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4486. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4487. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4488. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4489. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4490. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4491. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4492. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4493. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4494. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4495. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4496. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4497. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4498. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4499. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4500. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4501. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4502. .ilen = 144,
  4503. .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
  4504. "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
  4505. "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
  4506. "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
  4507. "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
  4508. "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
  4509. "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
  4510. "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
  4511. "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
  4512. "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
  4513. "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
  4514. "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
  4515. "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
  4516. "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
  4517. "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
  4518. "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
  4519. "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
  4520. "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
  4521. .rlen = 144,
  4522. },
  4523. };
  4524. static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
  4525. { /* Generated with Crypto++ */
  4526. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4527. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4528. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4529. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4530. .klen = 32,
  4531. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4532. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4533. .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
  4534. "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
  4535. "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
  4536. "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
  4537. "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
  4538. "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
  4539. "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
  4540. "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
  4541. "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
  4542. "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
  4543. "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
  4544. "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
  4545. "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
  4546. "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
  4547. "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
  4548. "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
  4549. "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
  4550. "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
  4551. .ilen = 144,
  4552. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4553. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4554. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4555. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4556. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4557. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4558. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4559. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4560. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4561. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4562. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4563. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4564. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4565. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4566. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4567. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4568. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4569. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4570. .rlen = 144,
  4571. },
  4572. };
  4573. static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
  4574. { /* Generated with Crypto++ */
  4575. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4576. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4577. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4578. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4579. .klen = 32,
  4580. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4581. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4582. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4583. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4584. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4585. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4586. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4587. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4588. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4589. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4590. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4591. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4592. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4593. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4594. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4595. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4596. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4597. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4598. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4599. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4600. .ilen = 144,
  4601. .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  4602. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  4603. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  4604. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  4605. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  4606. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  4607. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  4608. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  4609. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  4610. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  4611. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  4612. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  4613. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  4614. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  4615. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  4616. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  4617. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  4618. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
  4619. .rlen = 144,
  4620. }, { /* Generated with Crypto++ */
  4621. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4622. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4623. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4624. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4625. .klen = 32,
  4626. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4627. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4628. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4629. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4630. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4631. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4632. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4633. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4634. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4635. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4636. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4637. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4638. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4639. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4640. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4641. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4642. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4643. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4644. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4645. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  4646. "\xF1\x65\xFC",
  4647. .ilen = 147,
  4648. .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  4649. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  4650. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  4651. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  4652. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  4653. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  4654. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  4655. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  4656. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  4657. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  4658. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  4659. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  4660. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  4661. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  4662. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  4663. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  4664. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  4665. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
  4666. "\xE6\xD0\x97",
  4667. .rlen = 147,
  4668. },
  4669. };
  4670. static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
  4671. { /* Generated with Crypto++ */
  4672. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4673. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4674. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4675. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4676. .klen = 32,
  4677. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4678. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4679. .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  4680. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  4681. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  4682. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  4683. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  4684. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  4685. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  4686. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  4687. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  4688. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  4689. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  4690. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  4691. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  4692. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  4693. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  4694. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  4695. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  4696. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
  4697. .ilen = 144,
  4698. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4699. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4700. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4701. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4702. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4703. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4704. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4705. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4706. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4707. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4708. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4709. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4710. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4711. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4712. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4713. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4714. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4715. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4716. .rlen = 144,
  4717. }, { /* Generated with Crypto++ */
  4718. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4719. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4720. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4721. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4722. .klen = 32,
  4723. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4724. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4725. .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  4726. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  4727. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  4728. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  4729. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  4730. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  4731. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  4732. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  4733. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  4734. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  4735. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  4736. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  4737. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  4738. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  4739. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  4740. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  4741. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  4742. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
  4743. "\xE6\xD0\x97",
  4744. .ilen = 147,
  4745. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4746. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4747. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4748. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4749. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4750. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4751. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4752. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4753. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4754. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4755. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4756. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4757. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4758. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4759. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4760. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4761. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4762. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  4763. "\xF1\x65\xFC",
  4764. .rlen = 147,
  4765. },
  4766. };
  4767. static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
  4768. /* Generated from AES-LRW test vectors */
  4769. {
  4770. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  4771. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  4772. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  4773. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  4774. .klen = 32,
  4775. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4776. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4777. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4778. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4779. .ilen = 16,
  4780. .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
  4781. "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
  4782. .rlen = 16,
  4783. }, {
  4784. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  4785. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  4786. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  4787. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  4788. .klen = 32,
  4789. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4790. "\x00\x00\x00\x00\x00\x00\x00\x02",
  4791. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4792. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4793. .ilen = 16,
  4794. .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
  4795. "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
  4796. .rlen = 16,
  4797. }, {
  4798. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  4799. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  4800. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  4801. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  4802. .klen = 32,
  4803. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4804. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4805. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4806. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4807. .ilen = 16,
  4808. .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
  4809. "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
  4810. .rlen = 16,
  4811. }, {
  4812. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  4813. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  4814. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  4815. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  4816. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  4817. .klen = 40,
  4818. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4819. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4820. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4821. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4822. .ilen = 16,
  4823. .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
  4824. "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
  4825. .rlen = 16,
  4826. }, {
  4827. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  4828. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  4829. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  4830. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  4831. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  4832. .klen = 40,
  4833. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4834. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4835. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4836. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4837. .ilen = 16,
  4838. .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
  4839. "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
  4840. .rlen = 16,
  4841. }, {
  4842. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  4843. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  4844. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  4845. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  4846. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  4847. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  4848. .klen = 48,
  4849. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4850. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4851. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4852. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4853. .ilen = 16,
  4854. .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
  4855. "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
  4856. .rlen = 16,
  4857. }, {
  4858. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  4859. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  4860. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  4861. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  4862. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  4863. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  4864. .klen = 48,
  4865. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4866. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4867. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4868. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4869. .ilen = 16,
  4870. .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
  4871. "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
  4872. .rlen = 16,
  4873. }, {
  4874. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  4875. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  4876. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  4877. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  4878. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  4879. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  4880. .klen = 48,
  4881. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4882. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4883. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  4884. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  4885. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  4886. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  4887. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  4888. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  4889. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  4890. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  4891. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  4892. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  4893. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  4894. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  4895. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  4896. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  4897. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  4898. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  4899. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  4900. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  4901. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  4902. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  4903. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  4904. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  4905. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  4906. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  4907. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  4908. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  4909. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  4910. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  4911. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  4912. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  4913. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  4914. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  4915. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  4916. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  4917. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  4918. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  4919. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  4920. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  4921. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  4922. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  4923. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  4924. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  4925. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  4926. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  4927. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  4928. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  4929. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  4930. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  4931. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  4932. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  4933. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  4934. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  4935. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  4936. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  4937. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  4938. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  4939. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  4940. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  4941. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  4942. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  4943. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  4944. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  4945. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  4946. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  4947. .ilen = 512,
  4948. .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
  4949. "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
  4950. "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
  4951. "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
  4952. "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
  4953. "\xce\xab\xda\x33\x30\x20\x12\xfa"
  4954. "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
  4955. "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
  4956. "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
  4957. "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
  4958. "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
  4959. "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
  4960. "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
  4961. "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
  4962. "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
  4963. "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
  4964. "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
  4965. "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
  4966. "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
  4967. "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
  4968. "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
  4969. "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
  4970. "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
  4971. "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
  4972. "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
  4973. "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
  4974. "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
  4975. "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
  4976. "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
  4977. "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
  4978. "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
  4979. "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
  4980. "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
  4981. "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
  4982. "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
  4983. "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
  4984. "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
  4985. "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
  4986. "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
  4987. "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
  4988. "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
  4989. "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
  4990. "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
  4991. "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
  4992. "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
  4993. "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
  4994. "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
  4995. "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
  4996. "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
  4997. "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
  4998. "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
  4999. "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
  5000. "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
  5001. "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
  5002. "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
  5003. "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
  5004. "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
  5005. "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
  5006. "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
  5007. "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
  5008. "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
  5009. "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
  5010. "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
  5011. "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
  5012. .rlen = 512,
  5013. },
  5014. };
  5015. static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
  5016. /* Generated from AES-LRW test vectors */
  5017. /* same as enc vectors with input and result reversed */
  5018. {
  5019. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  5020. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  5021. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  5022. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  5023. .klen = 32,
  5024. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5025. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5026. .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
  5027. "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
  5028. .ilen = 16,
  5029. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5030. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5031. .rlen = 16,
  5032. }, {
  5033. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  5034. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  5035. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  5036. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  5037. .klen = 32,
  5038. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5039. "\x00\x00\x00\x00\x00\x00\x00\x02",
  5040. .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
  5041. "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
  5042. .ilen = 16,
  5043. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5044. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5045. .rlen = 16,
  5046. }, {
  5047. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  5048. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  5049. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  5050. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  5051. .klen = 32,
  5052. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5053. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5054. .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
  5055. "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
  5056. .ilen = 16,
  5057. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5058. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5059. .rlen = 16,
  5060. }, {
  5061. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  5062. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  5063. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  5064. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  5065. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  5066. .klen = 40,
  5067. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5068. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5069. .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
  5070. "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
  5071. .ilen = 16,
  5072. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5073. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5074. .rlen = 16,
  5075. }, {
  5076. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  5077. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  5078. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  5079. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  5080. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  5081. .klen = 40,
  5082. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5083. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5084. .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
  5085. "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
  5086. .ilen = 16,
  5087. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5088. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5089. .rlen = 16,
  5090. }, {
  5091. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  5092. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  5093. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  5094. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  5095. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  5096. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  5097. .klen = 48,
  5098. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5099. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5100. .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
  5101. "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
  5102. .ilen = 16,
  5103. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5104. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5105. .rlen = 16,
  5106. }, {
  5107. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  5108. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  5109. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  5110. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  5111. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  5112. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  5113. .klen = 48,
  5114. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5115. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5116. .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
  5117. "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
  5118. .ilen = 16,
  5119. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5120. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5121. .rlen = 16,
  5122. }, {
  5123. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  5124. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  5125. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  5126. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  5127. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  5128. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  5129. .klen = 48,
  5130. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5131. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5132. .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
  5133. "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
  5134. "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
  5135. "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
  5136. "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
  5137. "\xce\xab\xda\x33\x30\x20\x12\xfa"
  5138. "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
  5139. "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
  5140. "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
  5141. "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
  5142. "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
  5143. "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
  5144. "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
  5145. "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
  5146. "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
  5147. "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
  5148. "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
  5149. "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
  5150. "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
  5151. "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
  5152. "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
  5153. "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
  5154. "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
  5155. "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
  5156. "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
  5157. "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
  5158. "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
  5159. "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
  5160. "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
  5161. "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
  5162. "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
  5163. "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
  5164. "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
  5165. "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
  5166. "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
  5167. "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
  5168. "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
  5169. "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
  5170. "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
  5171. "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
  5172. "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
  5173. "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
  5174. "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
  5175. "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
  5176. "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
  5177. "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
  5178. "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
  5179. "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
  5180. "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
  5181. "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
  5182. "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
  5183. "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
  5184. "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
  5185. "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
  5186. "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
  5187. "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
  5188. "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
  5189. "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
  5190. "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
  5191. "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
  5192. "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
  5193. "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
  5194. "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
  5195. "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
  5196. .ilen = 512,
  5197. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  5198. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  5199. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  5200. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  5201. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  5202. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  5203. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  5204. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  5205. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  5206. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  5207. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  5208. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  5209. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  5210. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  5211. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  5212. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  5213. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  5214. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  5215. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  5216. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  5217. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  5218. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  5219. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  5220. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  5221. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  5222. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  5223. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  5224. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  5225. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  5226. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  5227. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  5228. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  5229. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  5230. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  5231. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  5232. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  5233. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  5234. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  5235. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  5236. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  5237. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  5238. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  5239. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  5240. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  5241. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  5242. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  5243. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  5244. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  5245. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  5246. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  5247. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  5248. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  5249. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  5250. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  5251. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  5252. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  5253. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  5254. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  5255. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  5256. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  5257. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  5258. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  5259. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  5260. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  5261. .rlen = 512,
  5262. },
  5263. };
  5264. static struct cipher_testvec serpent_xts_enc_tv_template[] = {
  5265. /* Generated from AES-XTS test vectors */
  5266. {
  5267. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5268. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5269. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5270. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5271. .klen = 32,
  5272. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5273. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5274. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5275. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5276. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5277. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5278. .ilen = 32,
  5279. .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
  5280. "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
  5281. "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
  5282. "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
  5283. .rlen = 32,
  5284. }, {
  5285. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  5286. "\x11\x11\x11\x11\x11\x11\x11\x11"
  5287. "\x22\x22\x22\x22\x22\x22\x22\x22"
  5288. "\x22\x22\x22\x22\x22\x22\x22\x22",
  5289. .klen = 32,
  5290. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  5291. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5292. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  5293. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5294. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5295. "\x44\x44\x44\x44\x44\x44\x44\x44",
  5296. .ilen = 32,
  5297. .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
  5298. "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
  5299. "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
  5300. "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
  5301. .rlen = 32,
  5302. }, {
  5303. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  5304. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  5305. "\x22\x22\x22\x22\x22\x22\x22\x22"
  5306. "\x22\x22\x22\x22\x22\x22\x22\x22",
  5307. .klen = 32,
  5308. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  5309. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5310. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  5311. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5312. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5313. "\x44\x44\x44\x44\x44\x44\x44\x44",
  5314. .ilen = 32,
  5315. .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
  5316. "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
  5317. "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
  5318. "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
  5319. .rlen = 32,
  5320. }, {
  5321. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  5322. "\x23\x53\x60\x28\x74\x71\x35\x26"
  5323. "\x31\x41\x59\x26\x53\x58\x97\x93"
  5324. "\x23\x84\x62\x64\x33\x83\x27\x95",
  5325. .klen = 32,
  5326. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5327. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5328. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5329. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5330. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5331. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5332. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5333. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5334. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5335. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5336. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5337. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5338. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5339. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5340. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5341. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5342. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5343. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5344. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5345. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5346. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5347. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5348. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5349. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5350. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5351. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5352. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5353. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5354. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5355. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5356. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5357. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5358. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5359. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  5360. "\x00\x01\x02\x03\x04\x05\x06\x07"
  5361. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5362. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5363. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5364. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5365. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5366. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5367. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5368. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5369. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5370. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5371. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5372. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5373. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5374. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5375. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5376. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5377. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5378. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5379. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5380. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5381. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5382. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5383. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5384. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5385. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5386. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5387. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5388. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5389. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5390. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5391. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  5392. .ilen = 512,
  5393. .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
  5394. "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
  5395. "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
  5396. "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
  5397. "\x00\x5c\x75\x14\x06\xd6\x25\x82"
  5398. "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
  5399. "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
  5400. "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
  5401. "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
  5402. "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
  5403. "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
  5404. "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
  5405. "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
  5406. "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
  5407. "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
  5408. "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
  5409. "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
  5410. "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
  5411. "\x58\xfa\x43\x91\x16\x85\x40\xbb"
  5412. "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
  5413. "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
  5414. "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
  5415. "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
  5416. "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
  5417. "\x6e\x29\x60\xbd\x10\x14\x84\x82"
  5418. "\x83\x82\x0c\x63\x73\x92\x02\x7c"
  5419. "\x55\x37\x20\x80\x17\x51\xc8\xbc"
  5420. "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
  5421. "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
  5422. "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
  5423. "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
  5424. "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
  5425. "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
  5426. "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
  5427. "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
  5428. "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
  5429. "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
  5430. "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
  5431. "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
  5432. "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
  5433. "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
  5434. "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
  5435. "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
  5436. "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
  5437. "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
  5438. "\x43\x42\x35\xd0\xcf\xec\x77\x67"
  5439. "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
  5440. "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
  5441. "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
  5442. "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
  5443. "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
  5444. "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
  5445. "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
  5446. "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
  5447. "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
  5448. "\x03\x57\xe6\x98\x52\x2f\x61\x62"
  5449. "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
  5450. "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
  5451. "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
  5452. "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
  5453. "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
  5454. "\xef\x91\x64\x1d\x18\x07\x4e\x31"
  5455. "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
  5456. "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
  5457. .rlen = 512,
  5458. }, {
  5459. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  5460. "\x23\x53\x60\x28\x74\x71\x35\x26"
  5461. "\x62\x49\x77\x57\x24\x70\x93\x69"
  5462. "\x99\x59\x57\x49\x66\x96\x76\x27"
  5463. "\x31\x41\x59\x26\x53\x58\x97\x93"
  5464. "\x23\x84\x62\x64\x33\x83\x27\x95"
  5465. "\x02\x88\x41\x97\x16\x93\x99\x37"
  5466. "\x51\x05\x82\x09\x74\x94\x45\x92",
  5467. .klen = 64,
  5468. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  5469. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5470. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5471. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5472. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5473. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5474. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5475. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5476. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5477. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5478. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5479. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5480. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5481. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5482. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5483. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5484. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5485. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5486. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5487. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5488. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5489. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5490. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5491. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5492. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5493. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5494. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5495. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5496. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5497. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5498. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5499. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5500. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5501. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  5502. "\x00\x01\x02\x03\x04\x05\x06\x07"
  5503. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5504. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5505. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5506. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5507. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5508. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5509. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5510. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5511. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5512. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5513. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5514. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5515. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5516. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5517. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5518. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5519. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5520. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5521. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5522. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5523. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5524. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5525. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5526. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5527. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5528. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5529. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5530. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5531. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5532. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5533. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  5534. .ilen = 512,
  5535. .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
  5536. "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
  5537. "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
  5538. "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
  5539. "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
  5540. "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
  5541. "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
  5542. "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
  5543. "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
  5544. "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
  5545. "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
  5546. "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
  5547. "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
  5548. "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
  5549. "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
  5550. "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
  5551. "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
  5552. "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
  5553. "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
  5554. "\xec\x9a\xda\x64\x96\xb5\x61\xff"
  5555. "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
  5556. "\x81\x85\x14\xa8\x59\xac\x8c\x94"
  5557. "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
  5558. "\x82\xc6\x4d\xca\x86\xea\x53\x28"
  5559. "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
  5560. "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
  5561. "\x05\xca\x81\x7b\xda\xa2\xde\x63"
  5562. "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
  5563. "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
  5564. "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
  5565. "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
  5566. "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
  5567. "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
  5568. "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
  5569. "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
  5570. "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
  5571. "\xfd\x43\x7d\xda\x42\x51\x87\x43"
  5572. "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
  5573. "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
  5574. "\x27\x5f\x11\xac\x71\xc7\x48\x46"
  5575. "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
  5576. "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
  5577. "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
  5578. "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
  5579. "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
  5580. "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
  5581. "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
  5582. "\x50\x88\x97\x40\x69\xb1\x37\xf5"
  5583. "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
  5584. "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
  5585. "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
  5586. "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
  5587. "\xc1\x16\x73\x50\x77\xba\xa6\x65"
  5588. "\x20\x2d\xb0\x02\x27\x89\xda\x99"
  5589. "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
  5590. "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
  5591. "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
  5592. "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
  5593. "\xa3\x0e\x33\x74\x40\x18\x39\x72"
  5594. "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
  5595. "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
  5596. "\x30\x05\xc8\x92\x98\x80\xff\x7a"
  5597. "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
  5598. "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
  5599. .rlen = 512,
  5600. },
  5601. };
  5602. static struct cipher_testvec serpent_xts_dec_tv_template[] = {
  5603. /* Generated from AES-XTS test vectors */
  5604. /* same as enc vectors with input and result reversed */
  5605. {
  5606. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5607. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5608. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5609. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5610. .klen = 32,
  5611. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5612. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5613. .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
  5614. "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
  5615. "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
  5616. "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
  5617. .ilen = 32,
  5618. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5619. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5620. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5621. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5622. .rlen = 32,
  5623. }, {
  5624. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  5625. "\x11\x11\x11\x11\x11\x11\x11\x11"
  5626. "\x22\x22\x22\x22\x22\x22\x22\x22"
  5627. "\x22\x22\x22\x22\x22\x22\x22\x22",
  5628. .klen = 32,
  5629. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  5630. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5631. .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
  5632. "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
  5633. "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
  5634. "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
  5635. .ilen = 32,
  5636. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  5637. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5638. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5639. "\x44\x44\x44\x44\x44\x44\x44\x44",
  5640. .rlen = 32,
  5641. }, {
  5642. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  5643. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  5644. "\x22\x22\x22\x22\x22\x22\x22\x22"
  5645. "\x22\x22\x22\x22\x22\x22\x22\x22",
  5646. .klen = 32,
  5647. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  5648. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5649. .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
  5650. "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
  5651. "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
  5652. "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
  5653. .ilen = 32,
  5654. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  5655. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5656. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5657. "\x44\x44\x44\x44\x44\x44\x44\x44",
  5658. .rlen = 32,
  5659. }, {
  5660. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  5661. "\x23\x53\x60\x28\x74\x71\x35\x26"
  5662. "\x31\x41\x59\x26\x53\x58\x97\x93"
  5663. "\x23\x84\x62\x64\x33\x83\x27\x95",
  5664. .klen = 32,
  5665. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5666. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5667. .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
  5668. "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
  5669. "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
  5670. "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
  5671. "\x00\x5c\x75\x14\x06\xd6\x25\x82"
  5672. "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
  5673. "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
  5674. "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
  5675. "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
  5676. "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
  5677. "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
  5678. "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
  5679. "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
  5680. "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
  5681. "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
  5682. "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
  5683. "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
  5684. "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
  5685. "\x58\xfa\x43\x91\x16\x85\x40\xbb"
  5686. "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
  5687. "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
  5688. "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
  5689. "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
  5690. "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
  5691. "\x6e\x29\x60\xbd\x10\x14\x84\x82"
  5692. "\x83\x82\x0c\x63\x73\x92\x02\x7c"
  5693. "\x55\x37\x20\x80\x17\x51\xc8\xbc"
  5694. "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
  5695. "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
  5696. "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
  5697. "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
  5698. "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
  5699. "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
  5700. "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
  5701. "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
  5702. "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
  5703. "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
  5704. "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
  5705. "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
  5706. "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
  5707. "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
  5708. "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
  5709. "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
  5710. "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
  5711. "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
  5712. "\x43\x42\x35\xd0\xcf\xec\x77\x67"
  5713. "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
  5714. "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
  5715. "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
  5716. "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
  5717. "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
  5718. "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
  5719. "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
  5720. "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
  5721. "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
  5722. "\x03\x57\xe6\x98\x52\x2f\x61\x62"
  5723. "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
  5724. "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
  5725. "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
  5726. "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
  5727. "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
  5728. "\xef\x91\x64\x1d\x18\x07\x4e\x31"
  5729. "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
  5730. "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
  5731. .ilen = 512,
  5732. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5733. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5734. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5735. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5736. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5737. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5738. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5739. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5740. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5741. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5742. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5743. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5744. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5745. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5746. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5747. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5748. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5749. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5750. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5751. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5752. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5753. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5754. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5755. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5756. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5757. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5758. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5759. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5760. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5761. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5762. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5763. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  5764. "\x00\x01\x02\x03\x04\x05\x06\x07"
  5765. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5766. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5767. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5768. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5769. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5770. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5771. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5772. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5773. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5774. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5775. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5776. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5777. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5778. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5779. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5780. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5781. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5782. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5783. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5784. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5785. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5786. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5787. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5788. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5789. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5790. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5791. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5792. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5793. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5794. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5795. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  5796. .rlen = 512,
  5797. }, {
  5798. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  5799. "\x23\x53\x60\x28\x74\x71\x35\x26"
  5800. "\x62\x49\x77\x57\x24\x70\x93\x69"
  5801. "\x99\x59\x57\x49\x66\x96\x76\x27"
  5802. "\x31\x41\x59\x26\x53\x58\x97\x93"
  5803. "\x23\x84\x62\x64\x33\x83\x27\x95"
  5804. "\x02\x88\x41\x97\x16\x93\x99\x37"
  5805. "\x51\x05\x82\x09\x74\x94\x45\x92",
  5806. .klen = 64,
  5807. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  5808. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5809. .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
  5810. "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
  5811. "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
  5812. "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
  5813. "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
  5814. "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
  5815. "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
  5816. "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
  5817. "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
  5818. "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
  5819. "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
  5820. "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
  5821. "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
  5822. "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
  5823. "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
  5824. "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
  5825. "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
  5826. "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
  5827. "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
  5828. "\xec\x9a\xda\x64\x96\xb5\x61\xff"
  5829. "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
  5830. "\x81\x85\x14\xa8\x59\xac\x8c\x94"
  5831. "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
  5832. "\x82\xc6\x4d\xca\x86\xea\x53\x28"
  5833. "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
  5834. "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
  5835. "\x05\xca\x81\x7b\xda\xa2\xde\x63"
  5836. "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
  5837. "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
  5838. "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
  5839. "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
  5840. "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
  5841. "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
  5842. "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
  5843. "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
  5844. "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
  5845. "\xfd\x43\x7d\xda\x42\x51\x87\x43"
  5846. "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
  5847. "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
  5848. "\x27\x5f\x11\xac\x71\xc7\x48\x46"
  5849. "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
  5850. "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
  5851. "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
  5852. "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
  5853. "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
  5854. "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
  5855. "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
  5856. "\x50\x88\x97\x40\x69\xb1\x37\xf5"
  5857. "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
  5858. "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
  5859. "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
  5860. "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
  5861. "\xc1\x16\x73\x50\x77\xba\xa6\x65"
  5862. "\x20\x2d\xb0\x02\x27\x89\xda\x99"
  5863. "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
  5864. "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
  5865. "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
  5866. "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
  5867. "\xa3\x0e\x33\x74\x40\x18\x39\x72"
  5868. "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
  5869. "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
  5870. "\x30\x05\xc8\x92\x98\x80\xff\x7a"
  5871. "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
  5872. "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
  5873. .ilen = 512,
  5874. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5875. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5876. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5877. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5878. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5879. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5880. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5881. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5882. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5883. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5884. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5885. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5886. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5887. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5888. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5889. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5890. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5891. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5892. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5893. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5894. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5895. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5896. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5897. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5898. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5899. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5900. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5901. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5902. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5903. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5904. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5905. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  5906. "\x00\x01\x02\x03\x04\x05\x06\x07"
  5907. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5908. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5909. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5910. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5911. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5912. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5913. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5914. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5915. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5916. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5917. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5918. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5919. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5920. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5921. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5922. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5923. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5924. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5925. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5926. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5927. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5928. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5929. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5930. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5931. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5932. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5933. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5934. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5935. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5936. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5937. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  5938. .rlen = 512,
  5939. },
  5940. };
  5941. /* Cast6 test vectors from RFC 2612 */
  5942. #define CAST6_ENC_TEST_VECTORS 3
  5943. #define CAST6_DEC_TEST_VECTORS 3
  5944. static struct cipher_testvec cast6_enc_tv_template[] = {
  5945. {
  5946. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5947. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  5948. .klen = 16,
  5949. .input = zeroed_string,
  5950. .ilen = 16,
  5951. .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  5952. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  5953. .rlen = 16,
  5954. }, {
  5955. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5956. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  5957. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  5958. .klen = 24,
  5959. .input = zeroed_string,
  5960. .ilen = 16,
  5961. .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  5962. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  5963. .rlen = 16,
  5964. }, {
  5965. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5966. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  5967. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  5968. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  5969. .klen = 32,
  5970. .input = zeroed_string,
  5971. .ilen = 16,
  5972. .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  5973. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  5974. .rlen = 16,
  5975. },
  5976. };
  5977. static struct cipher_testvec cast6_dec_tv_template[] = {
  5978. {
  5979. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5980. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  5981. .klen = 16,
  5982. .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  5983. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  5984. .ilen = 16,
  5985. .result = zeroed_string,
  5986. .rlen = 16,
  5987. }, {
  5988. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5989. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  5990. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  5991. .klen = 24,
  5992. .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  5993. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  5994. .ilen = 16,
  5995. .result = zeroed_string,
  5996. .rlen = 16,
  5997. }, {
  5998. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5999. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  6000. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  6001. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  6002. .klen = 32,
  6003. .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  6004. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  6005. .ilen = 16,
  6006. .result = zeroed_string,
  6007. .rlen = 16,
  6008. },
  6009. };
  6010. /*
  6011. * AES test vectors.
  6012. */
  6013. #define AES_ENC_TEST_VECTORS 3
  6014. #define AES_DEC_TEST_VECTORS 3
  6015. #define AES_CBC_ENC_TEST_VECTORS 4
  6016. #define AES_CBC_DEC_TEST_VECTORS 4
  6017. #define AES_LRW_ENC_TEST_VECTORS 8
  6018. #define AES_LRW_DEC_TEST_VECTORS 8
  6019. #define AES_XTS_ENC_TEST_VECTORS 5
  6020. #define AES_XTS_DEC_TEST_VECTORS 5
  6021. #define AES_CTR_ENC_TEST_VECTORS 3
  6022. #define AES_CTR_DEC_TEST_VECTORS 3
  6023. #define AES_OFB_ENC_TEST_VECTORS 1
  6024. #define AES_OFB_DEC_TEST_VECTORS 1
  6025. #define AES_CTR_3686_ENC_TEST_VECTORS 7
  6026. #define AES_CTR_3686_DEC_TEST_VECTORS 6
  6027. #define AES_GCM_ENC_TEST_VECTORS 9
  6028. #define AES_GCM_DEC_TEST_VECTORS 8
  6029. #define AES_GCM_4106_ENC_TEST_VECTORS 7
  6030. #define AES_GCM_4106_DEC_TEST_VECTORS 7
  6031. #define AES_CCM_ENC_TEST_VECTORS 7
  6032. #define AES_CCM_DEC_TEST_VECTORS 7
  6033. #define AES_CCM_4309_ENC_TEST_VECTORS 7
  6034. #define AES_CCM_4309_DEC_TEST_VECTORS 10
  6035. static struct cipher_testvec aes_enc_tv_template[] = {
  6036. { /* From FIPS-197 */
  6037. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6038. #if FIPS_FUNC_TEST == 1
  6039. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x01",
  6040. #else
  6041. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6042. #endif
  6043. .klen = 16,
  6044. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6045. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6046. .ilen = 16,
  6047. .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  6048. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  6049. .rlen = 16,
  6050. }, {
  6051. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6052. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6053. "\x10\x11\x12\x13\x14\x15\x16\x17",
  6054. .klen = 24,
  6055. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6056. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6057. .ilen = 16,
  6058. .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  6059. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  6060. .rlen = 16,
  6061. }, {
  6062. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6063. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6064. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6065. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6066. .klen = 32,
  6067. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6068. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6069. .ilen = 16,
  6070. .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  6071. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  6072. .rlen = 16,
  6073. },
  6074. };
  6075. static struct cipher_testvec aes_dec_tv_template[] = {
  6076. { /* From FIPS-197 */
  6077. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6078. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6079. .klen = 16,
  6080. .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  6081. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  6082. .ilen = 16,
  6083. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6084. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6085. .rlen = 16,
  6086. }, {
  6087. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6088. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6089. "\x10\x11\x12\x13\x14\x15\x16\x17",
  6090. .klen = 24,
  6091. .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  6092. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  6093. .ilen = 16,
  6094. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6095. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6096. .rlen = 16,
  6097. }, {
  6098. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6099. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6100. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6101. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6102. .klen = 32,
  6103. .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  6104. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  6105. .ilen = 16,
  6106. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6107. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6108. .rlen = 16,
  6109. },
  6110. };
  6111. static struct cipher_testvec aes_cbc_enc_tv_template[] = {
  6112. { /* From RFC 3602 */
  6113. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  6114. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  6115. .klen = 16,
  6116. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  6117. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  6118. .input = "Single block msg",
  6119. .ilen = 16,
  6120. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  6121. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  6122. .rlen = 16,
  6123. }, {
  6124. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  6125. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  6126. .klen = 16,
  6127. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  6128. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  6129. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6130. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6131. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6132. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6133. .ilen = 32,
  6134. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  6135. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  6136. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  6137. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  6138. .rlen = 32,
  6139. }, { /* From NIST SP800-38A */
  6140. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  6141. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  6142. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  6143. .klen = 24,
  6144. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6145. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6146. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6147. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6148. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6149. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6150. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6151. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6152. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6153. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6154. .ilen = 64,
  6155. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  6156. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  6157. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  6158. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  6159. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  6160. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  6161. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  6162. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  6163. .rlen = 64,
  6164. }, {
  6165. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  6166. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  6167. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  6168. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  6169. .klen = 32,
  6170. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6171. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6172. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6173. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6174. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6175. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6176. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6177. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6178. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6179. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6180. .ilen = 64,
  6181. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  6182. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  6183. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  6184. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  6185. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  6186. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  6187. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  6188. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  6189. .rlen = 64,
  6190. },
  6191. };
  6192. static struct cipher_testvec aes_cbc_dec_tv_template[] = {
  6193. { /* From RFC 3602 */
  6194. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  6195. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  6196. .klen = 16,
  6197. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  6198. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  6199. .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  6200. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  6201. .ilen = 16,
  6202. .result = "Single block msg",
  6203. .rlen = 16,
  6204. }, {
  6205. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  6206. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  6207. .klen = 16,
  6208. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  6209. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  6210. .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  6211. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  6212. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  6213. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  6214. .ilen = 32,
  6215. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6216. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6217. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6218. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6219. .rlen = 32,
  6220. }, { /* From NIST SP800-38A */
  6221. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  6222. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  6223. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  6224. .klen = 24,
  6225. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6226. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6227. .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  6228. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  6229. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  6230. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  6231. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  6232. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  6233. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  6234. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  6235. .ilen = 64,
  6236. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6237. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6238. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6239. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6240. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6241. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6242. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6243. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6244. .rlen = 64,
  6245. }, {
  6246. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  6247. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  6248. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  6249. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  6250. .klen = 32,
  6251. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6252. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6253. .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  6254. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  6255. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  6256. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  6257. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  6258. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  6259. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  6260. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  6261. .ilen = 64,
  6262. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6263. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6264. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6265. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6266. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6267. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6268. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6269. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6270. .rlen = 64,
  6271. },
  6272. };
  6273. static struct cipher_testvec aes_lrw_enc_tv_template[] = {
  6274. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  6275. { /* LRW-32-AES 1 */
  6276. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  6277. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  6278. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  6279. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  6280. .klen = 32,
  6281. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6282. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6283. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6284. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6285. .ilen = 16,
  6286. .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  6287. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  6288. .rlen = 16,
  6289. }, { /* LRW-32-AES 2 */
  6290. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  6291. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  6292. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  6293. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  6294. .klen = 32,
  6295. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6296. "\x00\x00\x00\x00\x00\x00\x00\x02",
  6297. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6298. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6299. .ilen = 16,
  6300. .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  6301. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  6302. .rlen = 16,
  6303. }, { /* LRW-32-AES 3 */
  6304. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  6305. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  6306. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  6307. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  6308. .klen = 32,
  6309. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6310. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6311. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6312. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6313. .ilen = 16,
  6314. .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  6315. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  6316. .rlen = 16,
  6317. }, { /* LRW-32-AES 4 */
  6318. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  6319. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  6320. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  6321. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  6322. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  6323. .klen = 40,
  6324. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6325. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6326. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6327. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6328. .ilen = 16,
  6329. .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  6330. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  6331. .rlen = 16,
  6332. }, { /* LRW-32-AES 5 */
  6333. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  6334. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  6335. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  6336. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  6337. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  6338. .klen = 40,
  6339. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6340. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6341. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6342. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6343. .ilen = 16,
  6344. .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  6345. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  6346. .rlen = 16,
  6347. }, { /* LRW-32-AES 6 */
  6348. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  6349. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  6350. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  6351. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  6352. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  6353. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  6354. .klen = 48,
  6355. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6356. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6357. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6358. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6359. .ilen = 16,
  6360. .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  6361. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  6362. .rlen = 16,
  6363. }, { /* LRW-32-AES 7 */
  6364. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  6365. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  6366. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  6367. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  6368. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  6369. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  6370. .klen = 48,
  6371. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6372. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6373. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6374. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6375. .ilen = 16,
  6376. .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  6377. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  6378. .rlen = 16,
  6379. }, {
  6380. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  6381. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  6382. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  6383. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  6384. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  6385. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  6386. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  6387. .klen = 48,
  6388. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6389. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6390. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  6391. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  6392. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  6393. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  6394. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  6395. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  6396. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  6397. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  6398. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  6399. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  6400. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  6401. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  6402. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  6403. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  6404. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  6405. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  6406. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  6407. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  6408. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  6409. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  6410. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  6411. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  6412. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  6413. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  6414. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  6415. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  6416. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  6417. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  6418. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  6419. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  6420. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  6421. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  6422. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  6423. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  6424. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  6425. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  6426. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  6427. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  6428. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  6429. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  6430. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  6431. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  6432. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  6433. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  6434. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  6435. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  6436. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  6437. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  6438. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  6439. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  6440. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  6441. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  6442. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  6443. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  6444. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  6445. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  6446. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  6447. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  6448. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  6449. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  6450. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  6451. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  6452. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  6453. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  6454. .ilen = 512,
  6455. .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  6456. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  6457. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  6458. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  6459. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  6460. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  6461. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  6462. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  6463. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  6464. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  6465. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  6466. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  6467. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  6468. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  6469. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  6470. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  6471. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  6472. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  6473. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  6474. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  6475. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  6476. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  6477. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  6478. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  6479. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  6480. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  6481. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  6482. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  6483. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  6484. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  6485. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  6486. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  6487. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  6488. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  6489. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  6490. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  6491. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  6492. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  6493. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  6494. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  6495. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  6496. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  6497. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  6498. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  6499. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  6500. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  6501. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  6502. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  6503. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  6504. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  6505. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  6506. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  6507. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  6508. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  6509. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  6510. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  6511. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  6512. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  6513. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  6514. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  6515. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  6516. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  6517. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  6518. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  6519. .rlen = 512,
  6520. }
  6521. };
  6522. static struct cipher_testvec aes_lrw_dec_tv_template[] = {
  6523. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  6524. /* same as enc vectors with input and result reversed */
  6525. { /* LRW-32-AES 1 */
  6526. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  6527. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  6528. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  6529. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  6530. .klen = 32,
  6531. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6532. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6533. .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  6534. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  6535. .ilen = 16,
  6536. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6537. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6538. .rlen = 16,
  6539. }, { /* LRW-32-AES 2 */
  6540. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  6541. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  6542. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  6543. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  6544. .klen = 32,
  6545. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6546. "\x00\x00\x00\x00\x00\x00\x00\x02",
  6547. .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  6548. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  6549. .ilen = 16,
  6550. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6551. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6552. .rlen = 16,
  6553. }, { /* LRW-32-AES 3 */
  6554. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  6555. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  6556. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  6557. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  6558. .klen = 32,
  6559. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6560. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6561. .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  6562. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  6563. .ilen = 16,
  6564. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6565. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6566. .rlen = 16,
  6567. }, { /* LRW-32-AES 4 */
  6568. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  6569. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  6570. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  6571. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  6572. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  6573. .klen = 40,
  6574. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6575. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6576. .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  6577. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  6578. .ilen = 16,
  6579. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6580. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6581. .rlen = 16,
  6582. }, { /* LRW-32-AES 5 */
  6583. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  6584. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  6585. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  6586. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  6587. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  6588. .klen = 40,
  6589. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6590. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6591. .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  6592. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  6593. .ilen = 16,
  6594. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6595. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6596. .rlen = 16,
  6597. }, { /* LRW-32-AES 6 */
  6598. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  6599. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  6600. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  6601. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  6602. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  6603. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  6604. .klen = 48,
  6605. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6606. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6607. .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  6608. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  6609. .ilen = 16,
  6610. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6611. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6612. .rlen = 16,
  6613. }, { /* LRW-32-AES 7 */
  6614. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  6615. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  6616. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  6617. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  6618. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  6619. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  6620. .klen = 48,
  6621. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6622. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6623. .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  6624. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  6625. .ilen = 16,
  6626. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6627. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6628. .rlen = 16,
  6629. }, {
  6630. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  6631. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  6632. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  6633. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  6634. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  6635. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  6636. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  6637. .klen = 48,
  6638. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6639. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6640. .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  6641. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  6642. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  6643. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  6644. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  6645. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  6646. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  6647. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  6648. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  6649. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  6650. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  6651. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  6652. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  6653. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  6654. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  6655. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  6656. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  6657. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  6658. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  6659. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  6660. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  6661. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  6662. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  6663. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  6664. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  6665. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  6666. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  6667. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  6668. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  6669. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  6670. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  6671. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  6672. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  6673. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  6674. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  6675. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  6676. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  6677. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  6678. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  6679. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  6680. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  6681. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  6682. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  6683. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  6684. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  6685. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  6686. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  6687. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  6688. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  6689. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  6690. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  6691. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  6692. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  6693. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  6694. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  6695. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  6696. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  6697. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  6698. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  6699. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  6700. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  6701. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  6702. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  6703. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  6704. .ilen = 512,
  6705. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  6706. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  6707. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  6708. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  6709. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  6710. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  6711. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  6712. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  6713. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  6714. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  6715. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  6716. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  6717. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  6718. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  6719. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  6720. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  6721. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  6722. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  6723. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  6724. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  6725. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  6726. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  6727. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  6728. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  6729. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  6730. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  6731. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  6732. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  6733. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  6734. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  6735. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  6736. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  6737. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  6738. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  6739. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  6740. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  6741. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  6742. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  6743. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  6744. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  6745. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  6746. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  6747. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  6748. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  6749. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  6750. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  6751. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  6752. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  6753. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  6754. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  6755. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  6756. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  6757. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  6758. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  6759. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  6760. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  6761. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  6762. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  6763. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  6764. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  6765. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  6766. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  6767. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  6768. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  6769. .rlen = 512,
  6770. }
  6771. };
  6772. static struct cipher_testvec aes_xts_enc_tv_template[] = {
  6773. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  6774. { /* XTS-AES 1 */
  6775. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6776. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6777. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6778. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6779. .klen = 32,
  6780. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6781. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6782. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6783. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6784. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6785. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6786. .ilen = 32,
  6787. .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  6788. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  6789. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  6790. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  6791. .rlen = 32,
  6792. }, { /* XTS-AES 2 */
  6793. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  6794. "\x11\x11\x11\x11\x11\x11\x11\x11"
  6795. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6796. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6797. .klen = 32,
  6798. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6799. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6800. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6801. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6802. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6803. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6804. .ilen = 32,
  6805. .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  6806. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  6807. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  6808. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  6809. .rlen = 32,
  6810. }, { /* XTS-AES 3 */
  6811. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  6812. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  6813. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6814. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6815. .klen = 32,
  6816. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6817. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6818. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6819. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6820. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6821. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6822. .ilen = 32,
  6823. .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  6824. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  6825. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  6826. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  6827. .rlen = 32,
  6828. }, { /* XTS-AES 4 */
  6829. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6830. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6831. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6832. "\x23\x84\x62\x64\x33\x83\x27\x95",
  6833. .klen = 32,
  6834. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6835. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6836. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6837. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6838. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6839. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6840. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6841. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6842. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6843. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6844. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6845. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6846. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6847. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6848. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6849. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6850. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6851. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6852. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6853. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6854. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6855. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6856. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6857. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6858. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6859. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6860. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6861. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6862. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6863. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6864. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6865. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6866. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6867. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6868. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6869. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6870. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6871. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6872. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6873. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6874. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6875. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6876. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6877. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6878. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6879. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6880. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6881. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6882. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6883. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6884. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6885. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6886. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6887. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6888. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6889. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6890. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6891. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6892. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6893. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6894. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6895. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6896. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6897. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6898. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6899. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  6900. .ilen = 512,
  6901. .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  6902. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  6903. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  6904. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  6905. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  6906. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  6907. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  6908. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  6909. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  6910. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  6911. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  6912. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  6913. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  6914. "\x22\x97\x61\x46\xae\x20\xce\x84"
  6915. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  6916. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  6917. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  6918. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  6919. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  6920. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  6921. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  6922. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  6923. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  6924. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  6925. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  6926. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  6927. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  6928. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  6929. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  6930. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  6931. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  6932. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  6933. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  6934. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  6935. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  6936. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  6937. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  6938. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  6939. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  6940. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  6941. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  6942. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  6943. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  6944. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  6945. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  6946. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  6947. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  6948. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  6949. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  6950. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  6951. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  6952. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  6953. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  6954. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  6955. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  6956. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  6957. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  6958. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  6959. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  6960. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  6961. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  6962. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  6963. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  6964. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  6965. .rlen = 512,
  6966. }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
  6967. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6968. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6969. "\x62\x49\x77\x57\x24\x70\x93\x69"
  6970. "\x99\x59\x57\x49\x66\x96\x76\x27"
  6971. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6972. "\x23\x84\x62\x64\x33\x83\x27\x95"
  6973. "\x02\x88\x41\x97\x16\x93\x99\x37"
  6974. "\x51\x05\x82\x09\x74\x94\x45\x92",
  6975. .klen = 64,
  6976. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  6977. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6978. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6979. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6980. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6981. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6982. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6983. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6984. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6985. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6986. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6987. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6988. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6989. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6990. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6991. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6992. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6993. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6994. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6995. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6996. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6997. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6998. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6999. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7000. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7001. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7002. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7003. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7004. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7005. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7006. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7007. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7008. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7009. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7010. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7011. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  7012. "\x00\x01\x02\x03\x04\x05\x06\x07"
  7013. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7014. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7015. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7016. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7017. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7018. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7019. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7020. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7021. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7022. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7023. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7024. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7025. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7026. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7027. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7028. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7029. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7030. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7031. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7032. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7033. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7034. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7035. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7036. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7037. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7038. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7039. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7040. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7041. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7042. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7043. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7044. .ilen = 512,
  7045. .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
  7046. "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
  7047. "\xea\x00\x80\x3f\x5e\x48\x23\x57"
  7048. "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
  7049. "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
  7050. "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
  7051. "\x68\x0a\x86\xac\x35\xad\xfc\x33"
  7052. "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
  7053. "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
  7054. "\xb1\x08\xfd\x10\x98\xba\xec\x70"
  7055. "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
  7056. "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
  7057. "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
  7058. "\xae\xba\x12\x29\x61\xd0\x3a\x75"
  7059. "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
  7060. "\x00\x02\x08\x87\x89\x14\x29\xca"
  7061. "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
  7062. "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
  7063. "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
  7064. "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
  7065. "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
  7066. "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
  7067. "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
  7068. "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
  7069. "\x93\xec\x05\xc5\x2e\x04\x93\xef"
  7070. "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
  7071. "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
  7072. "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
  7073. "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
  7074. "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
  7075. "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
  7076. "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
  7077. "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
  7078. "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
  7079. "\xbc\x48\x14\x57\x77\x8f\x61\x60"
  7080. "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
  7081. "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
  7082. "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
  7083. "\xf4\xc3\x33\xec\x44\x23\x88\x51"
  7084. "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
  7085. "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
  7086. "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
  7087. "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
  7088. "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
  7089. "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
  7090. "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
  7091. "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
  7092. "\x92\x5f\xed\xc4\xae\x74\xff\xac"
  7093. "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
  7094. "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
  7095. "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
  7096. "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
  7097. "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
  7098. "\x94\x30\x54\xff\x84\x01\x14\x93"
  7099. "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
  7100. "\x53\x76\x44\x1a\x77\xed\x43\x85"
  7101. "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
  7102. "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
  7103. "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
  7104. "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
  7105. "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
  7106. "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
  7107. "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
  7108. "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
  7109. .rlen = 512,
  7110. }
  7111. };
  7112. static struct cipher_testvec aes_xts_dec_tv_template[] = {
  7113. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  7114. { /* XTS-AES 1 */
  7115. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7116. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7117. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7118. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7119. .klen = 32,
  7120. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7121. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7122. .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  7123. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  7124. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  7125. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  7126. .ilen = 32,
  7127. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7128. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7129. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7130. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7131. .rlen = 32,
  7132. }, { /* XTS-AES 2 */
  7133. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  7134. "\x11\x11\x11\x11\x11\x11\x11\x11"
  7135. "\x22\x22\x22\x22\x22\x22\x22\x22"
  7136. "\x22\x22\x22\x22\x22\x22\x22\x22",
  7137. .klen = 32,
  7138. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  7139. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7140. .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  7141. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  7142. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  7143. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  7144. .ilen = 32,
  7145. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  7146. "\x44\x44\x44\x44\x44\x44\x44\x44"
  7147. "\x44\x44\x44\x44\x44\x44\x44\x44"
  7148. "\x44\x44\x44\x44\x44\x44\x44\x44",
  7149. .rlen = 32,
  7150. }, { /* XTS-AES 3 */
  7151. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  7152. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  7153. "\x22\x22\x22\x22\x22\x22\x22\x22"
  7154. "\x22\x22\x22\x22\x22\x22\x22\x22",
  7155. .klen = 32,
  7156. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  7157. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7158. .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  7159. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  7160. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  7161. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  7162. .ilen = 32,
  7163. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  7164. "\x44\x44\x44\x44\x44\x44\x44\x44"
  7165. "\x44\x44\x44\x44\x44\x44\x44\x44"
  7166. "\x44\x44\x44\x44\x44\x44\x44\x44",
  7167. .rlen = 32,
  7168. }, { /* XTS-AES 4 */
  7169. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  7170. "\x23\x53\x60\x28\x74\x71\x35\x26"
  7171. "\x31\x41\x59\x26\x53\x58\x97\x93"
  7172. "\x23\x84\x62\x64\x33\x83\x27\x95",
  7173. .klen = 32,
  7174. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7175. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7176. .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  7177. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  7178. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  7179. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  7180. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  7181. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  7182. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  7183. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  7184. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  7185. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  7186. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  7187. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  7188. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  7189. "\x22\x97\x61\x46\xae\x20\xce\x84"
  7190. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  7191. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  7192. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  7193. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  7194. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  7195. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  7196. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  7197. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  7198. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  7199. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  7200. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  7201. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  7202. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  7203. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  7204. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  7205. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  7206. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  7207. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  7208. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  7209. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  7210. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  7211. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  7212. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  7213. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  7214. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  7215. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  7216. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  7217. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  7218. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  7219. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  7220. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  7221. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  7222. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  7223. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  7224. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  7225. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  7226. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  7227. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  7228. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  7229. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  7230. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  7231. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  7232. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  7233. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  7234. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  7235. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  7236. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  7237. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  7238. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  7239. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  7240. .ilen = 512,
  7241. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7242. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7243. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7244. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7245. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7246. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7247. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7248. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7249. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7250. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7251. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7252. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7253. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7254. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7255. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7256. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7257. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7258. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7259. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7260. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7261. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7262. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7263. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7264. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7265. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7266. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7267. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7268. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7269. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7270. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7271. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7272. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  7273. "\x00\x01\x02\x03\x04\x05\x06\x07"
  7274. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7275. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7276. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7277. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7278. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7279. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7280. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7281. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7282. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7283. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7284. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7285. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7286. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7287. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7288. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7289. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7290. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7291. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7292. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7293. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7294. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7295. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7296. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7297. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7298. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7299. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7300. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7301. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7302. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7303. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7304. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7305. .rlen = 512,
  7306. }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
  7307. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  7308. "\x23\x53\x60\x28\x74\x71\x35\x26"
  7309. "\x62\x49\x77\x57\x24\x70\x93\x69"
  7310. "\x99\x59\x57\x49\x66\x96\x76\x27"
  7311. "\x31\x41\x59\x26\x53\x58\x97\x93"
  7312. "\x23\x84\x62\x64\x33\x83\x27\x95"
  7313. "\x02\x88\x41\x97\x16\x93\x99\x37"
  7314. "\x51\x05\x82\x09\x74\x94\x45\x92",
  7315. .klen = 64,
  7316. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  7317. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7318. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7319. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7320. .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
  7321. "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
  7322. "\xea\x00\x80\x3f\x5e\x48\x23\x57"
  7323. "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
  7324. "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
  7325. "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
  7326. "\x68\x0a\x86\xac\x35\xad\xfc\x33"
  7327. "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
  7328. "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
  7329. "\xb1\x08\xfd\x10\x98\xba\xec\x70"
  7330. "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
  7331. "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
  7332. "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
  7333. "\xae\xba\x12\x29\x61\xd0\x3a\x75"
  7334. "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
  7335. "\x00\x02\x08\x87\x89\x14\x29\xca"
  7336. "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
  7337. "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
  7338. "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
  7339. "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
  7340. "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
  7341. "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
  7342. "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
  7343. "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
  7344. "\x93\xec\x05\xc5\x2e\x04\x93\xef"
  7345. "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
  7346. "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
  7347. "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
  7348. "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
  7349. "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
  7350. "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
  7351. "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
  7352. "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
  7353. "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
  7354. "\xbc\x48\x14\x57\x77\x8f\x61\x60"
  7355. "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
  7356. "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
  7357. "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
  7358. "\xf4\xc3\x33\xec\x44\x23\x88\x51"
  7359. "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
  7360. "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
  7361. "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
  7362. "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
  7363. "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
  7364. "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
  7365. "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
  7366. "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
  7367. "\x92\x5f\xed\xc4\xae\x74\xff\xac"
  7368. "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
  7369. "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
  7370. "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
  7371. "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
  7372. "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
  7373. "\x94\x30\x54\xff\x84\x01\x14\x93"
  7374. "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
  7375. "\x53\x76\x44\x1a\x77\xed\x43\x85"
  7376. "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
  7377. "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
  7378. "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
  7379. "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
  7380. "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
  7381. "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
  7382. "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
  7383. "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
  7384. .ilen = 512,
  7385. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7386. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7387. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7388. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7389. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7390. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7391. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7392. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7393. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7394. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7395. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7396. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7397. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7398. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7399. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7400. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7401. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7402. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7403. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7404. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7405. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7406. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7407. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7408. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7409. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7410. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7411. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7412. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7413. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7414. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7415. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7416. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  7417. "\x00\x01\x02\x03\x04\x05\x06\x07"
  7418. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7419. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7420. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7421. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7422. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7423. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7424. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7425. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7426. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7427. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7428. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7429. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7430. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7431. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7432. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7433. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7434. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7435. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7436. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7437. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7438. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7439. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7440. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7441. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7442. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7443. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7444. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7445. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7446. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7447. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7448. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7449. .rlen = 512,
  7450. }
  7451. };
  7452. static struct cipher_testvec aes_ctr_enc_tv_template[] = {
  7453. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  7454. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  7455. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  7456. .klen = 16,
  7457. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7458. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7459. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7460. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7461. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7462. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7463. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7464. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7465. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7466. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7467. .ilen = 64,
  7468. .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  7469. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  7470. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  7471. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  7472. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  7473. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  7474. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  7475. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  7476. .rlen = 64,
  7477. }, {
  7478. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  7479. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  7480. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  7481. .klen = 24,
  7482. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7483. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7484. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7485. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7486. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7487. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7488. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7489. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7490. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7491. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7492. .ilen = 64,
  7493. .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  7494. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  7495. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  7496. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  7497. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  7498. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  7499. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  7500. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  7501. .rlen = 64,
  7502. }, {
  7503. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  7504. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  7505. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  7506. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  7507. .klen = 32,
  7508. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7509. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7510. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7511. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7512. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7513. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7514. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7515. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7516. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7517. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7518. .ilen = 64,
  7519. .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  7520. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  7521. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  7522. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  7523. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  7524. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  7525. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  7526. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  7527. .rlen = 64,
  7528. }
  7529. };
  7530. static struct cipher_testvec aes_ctr_dec_tv_template[] = {
  7531. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  7532. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  7533. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  7534. .klen = 16,
  7535. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7536. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7537. .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  7538. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  7539. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  7540. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  7541. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  7542. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  7543. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  7544. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  7545. .ilen = 64,
  7546. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7547. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7548. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7549. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7550. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7551. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7552. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7553. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7554. .rlen = 64,
  7555. }, {
  7556. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  7557. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  7558. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  7559. .klen = 24,
  7560. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7561. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7562. .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  7563. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  7564. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  7565. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  7566. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  7567. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  7568. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  7569. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  7570. .ilen = 64,
  7571. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7572. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7573. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7574. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7575. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7576. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7577. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7578. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7579. .rlen = 64,
  7580. }, {
  7581. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  7582. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  7583. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  7584. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  7585. .klen = 32,
  7586. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7587. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7588. .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  7589. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  7590. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  7591. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  7592. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  7593. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  7594. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  7595. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  7596. .ilen = 64,
  7597. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7598. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7599. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7600. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7601. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7602. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7603. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7604. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7605. .rlen = 64,
  7606. }
  7607. };
  7608. static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
  7609. { /* From RFC 3686 */
  7610. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  7611. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  7612. "\x00\x00\x00\x30",
  7613. .klen = 20,
  7614. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7615. .input = "Single block msg",
  7616. .ilen = 16,
  7617. .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  7618. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  7619. .rlen = 16,
  7620. }, {
  7621. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  7622. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  7623. "\x00\x6c\xb6\xdb",
  7624. .klen = 20,
  7625. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  7626. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7627. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7628. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7629. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7630. .ilen = 32,
  7631. .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  7632. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  7633. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  7634. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  7635. .rlen = 32,
  7636. }, {
  7637. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  7638. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  7639. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  7640. "\x00\x00\x00\x48",
  7641. .klen = 28,
  7642. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  7643. .input = "Single block msg",
  7644. .ilen = 16,
  7645. .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  7646. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  7647. .rlen = 16,
  7648. }, {
  7649. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  7650. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  7651. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  7652. "\x00\x96\xb0\x3b",
  7653. .klen = 28,
  7654. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  7655. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7656. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7657. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7658. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7659. .ilen = 32,
  7660. .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  7661. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  7662. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  7663. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  7664. .rlen = 32,
  7665. }, {
  7666. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  7667. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  7668. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  7669. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  7670. "\x00\x00\x00\x60",
  7671. .klen = 36,
  7672. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  7673. .input = "Single block msg",
  7674. .ilen = 16,
  7675. .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  7676. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  7677. .rlen = 16,
  7678. }, {
  7679. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  7680. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  7681. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  7682. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  7683. "\x00\xfa\xac\x24",
  7684. .klen = 36,
  7685. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  7686. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7687. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7688. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7689. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7690. .ilen = 32,
  7691. .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  7692. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  7693. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  7694. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  7695. .rlen = 32,
  7696. }, {
  7697. // generated using Crypto++
  7698. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7699. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7700. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7701. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7702. "\x00\x00\x00\x00",
  7703. .klen = 32 + 4,
  7704. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7705. .input =
  7706. "\x00\x01\x02\x03\x04\x05\x06\x07"
  7707. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7708. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7709. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7710. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7711. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7712. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7713. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7714. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7715. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7716. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7717. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7718. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7719. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7720. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7721. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7722. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7723. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7724. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7725. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7726. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7727. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7728. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7729. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7730. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7731. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7732. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7733. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7734. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7735. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7736. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7737. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  7738. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  7739. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  7740. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  7741. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  7742. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  7743. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  7744. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  7745. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  7746. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  7747. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  7748. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  7749. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  7750. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  7751. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  7752. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  7753. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  7754. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  7755. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  7756. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  7757. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  7758. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  7759. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  7760. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  7761. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  7762. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  7763. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  7764. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  7765. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  7766. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  7767. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  7768. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  7769. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  7770. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  7771. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  7772. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  7773. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  7774. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  7775. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  7776. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  7777. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  7778. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  7779. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  7780. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  7781. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  7782. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  7783. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  7784. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  7785. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  7786. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  7787. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  7788. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  7789. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  7790. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  7791. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  7792. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  7793. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  7794. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  7795. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  7796. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  7797. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  7798. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  7799. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  7800. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  7801. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  7802. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  7803. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  7804. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  7805. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  7806. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  7807. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  7808. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  7809. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  7810. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  7811. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  7812. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  7813. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  7814. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  7815. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  7816. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  7817. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  7818. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  7819. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  7820. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  7821. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  7822. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  7823. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  7824. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  7825. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  7826. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  7827. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  7828. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  7829. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  7830. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  7831. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  7832. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  7833. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  7834. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  7835. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  7836. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  7837. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  7838. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  7839. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  7840. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  7841. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  7842. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  7843. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  7844. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  7845. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  7846. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  7847. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  7848. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  7849. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  7850. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  7851. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  7852. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  7853. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  7854. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  7855. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  7856. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  7857. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  7858. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  7859. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  7860. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  7861. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  7862. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  7863. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  7864. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  7865. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  7866. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  7867. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  7868. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  7869. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  7870. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  7871. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  7872. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  7873. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  7874. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  7875. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  7876. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  7877. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  7878. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  7879. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  7880. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  7881. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  7882. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  7883. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  7884. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  7885. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  7886. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  7887. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  7888. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  7889. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  7890. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  7891. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  7892. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  7893. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  7894. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  7895. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  7896. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  7897. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  7898. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  7899. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  7900. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  7901. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  7902. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  7903. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  7904. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  7905. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  7906. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  7907. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  7908. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  7909. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  7910. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  7911. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  7912. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  7913. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  7914. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  7915. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  7916. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  7917. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  7918. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  7919. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  7920. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  7921. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  7922. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  7923. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  7924. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  7925. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  7926. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  7927. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  7928. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  7929. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  7930. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  7931. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  7932. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  7933. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  7934. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  7935. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  7936. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  7937. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  7938. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  7939. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  7940. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  7941. "\x28\x37\x46\x55\x64\x73\x82\x91"
  7942. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  7943. "\x18\x27\x36\x45\x54\x63\x72\x81"
  7944. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  7945. "\x08\x17\x26\x35\x44\x53\x62\x71"
  7946. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  7947. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  7948. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  7949. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  7950. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  7951. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  7952. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  7953. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  7954. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  7955. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  7956. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  7957. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  7958. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  7959. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  7960. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  7961. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  7962. "\x00\x11\x22\x33\x44\x55\x66\x77"
  7963. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  7964. "\x10\x21\x32\x43\x54\x65\x76\x87"
  7965. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  7966. "\x20\x31\x42\x53\x64\x75\x86\x97"
  7967. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  7968. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  7969. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  7970. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  7971. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  7972. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  7973. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  7974. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  7975. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  7976. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  7977. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  7978. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  7979. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  7980. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  7981. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  7982. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  7983. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  7984. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  7985. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  7986. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  7987. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  7988. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  7989. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  7990. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  7991. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  7992. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  7993. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  7994. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  7995. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  7996. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  7997. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  7998. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  7999. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  8000. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  8001. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  8002. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  8003. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  8004. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  8005. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  8006. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  8007. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  8008. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  8009. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  8010. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  8011. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  8012. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  8013. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  8014. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  8015. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  8016. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  8017. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  8018. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  8019. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  8020. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  8021. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  8022. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  8023. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  8024. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  8025. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  8026. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  8027. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  8028. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  8029. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  8030. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  8031. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  8032. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  8033. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  8034. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  8035. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  8036. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  8037. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  8038. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  8039. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  8040. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  8041. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  8042. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  8043. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  8044. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  8045. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  8046. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  8047. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  8048. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  8049. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  8050. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  8051. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  8052. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  8053. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  8054. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  8055. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  8056. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  8057. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  8058. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  8059. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  8060. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  8061. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  8062. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  8063. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  8064. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  8065. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  8066. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  8067. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  8068. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  8069. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  8070. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  8071. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  8072. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  8073. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  8074. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  8075. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  8076. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  8077. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  8078. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  8079. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  8080. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  8081. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  8082. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  8083. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  8084. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  8085. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  8086. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  8087. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  8088. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  8089. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  8090. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  8091. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  8092. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  8093. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  8094. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  8095. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  8096. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  8097. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  8098. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  8099. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  8100. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  8101. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  8102. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  8103. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  8104. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  8105. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  8106. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  8107. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  8108. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  8109. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  8110. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  8111. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  8112. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  8113. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  8114. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  8115. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  8116. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  8117. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  8118. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  8119. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  8120. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  8121. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  8122. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  8123. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  8124. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  8125. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  8126. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  8127. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  8128. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  8129. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  8130. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  8131. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  8132. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  8133. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  8134. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  8135. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  8136. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  8137. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  8138. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  8139. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  8140. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  8141. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  8142. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  8143. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  8144. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  8145. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  8146. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  8147. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  8148. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  8149. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  8150. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  8151. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  8152. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  8153. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  8154. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  8155. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  8156. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  8157. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  8158. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  8159. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  8160. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  8161. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  8162. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  8163. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  8164. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  8165. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  8166. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  8167. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  8168. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  8169. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  8170. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  8171. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  8172. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  8173. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  8174. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  8175. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  8176. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  8177. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  8178. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  8179. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  8180. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  8181. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  8182. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  8183. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  8184. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  8185. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  8186. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  8187. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  8188. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  8189. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  8190. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  8191. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  8192. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  8193. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  8194. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  8195. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  8196. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  8197. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  8198. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  8199. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  8200. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  8201. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  8202. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  8203. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  8204. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  8205. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  8206. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  8207. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  8208. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  8209. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  8210. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  8211. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  8212. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  8213. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  8214. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  8215. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  8216. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  8217. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  8218. "\x00\x21\x42\x63",
  8219. .ilen = 4100,
  8220. .result =
  8221. "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
  8222. "\xae\xff\x91\x3a\x44\xcf\x38\x32"
  8223. "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
  8224. "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
  8225. "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
  8226. "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
  8227. "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
  8228. "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
  8229. "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
  8230. "\x18\xff\x75\x6d\x06\x2d\x00\xab"
  8231. "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
  8232. "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
  8233. "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
  8234. "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
  8235. "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
  8236. "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
  8237. "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
  8238. "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
  8239. "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
  8240. "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
  8241. "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
  8242. "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
  8243. "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
  8244. "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
  8245. "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
  8246. "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
  8247. "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
  8248. "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
  8249. "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
  8250. "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
  8251. "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
  8252. "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
  8253. "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
  8254. "\x6a\x25\x15\x33\x4e\x45\x08\xec"
  8255. "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
  8256. "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
  8257. "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
  8258. "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
  8259. "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
  8260. "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
  8261. "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
  8262. "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
  8263. "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
  8264. "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
  8265. "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
  8266. "\x04\x02\xef\xd3\x44\xde\x76\x31"
  8267. "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
  8268. "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
  8269. "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
  8270. "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
  8271. "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
  8272. "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
  8273. "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
  8274. "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
  8275. "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
  8276. "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
  8277. "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
  8278. "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
  8279. "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
  8280. "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
  8281. "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
  8282. "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
  8283. "\x32\x03\xed\xf0\x50\x1c\x56\x39"
  8284. "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
  8285. "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
  8286. "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
  8287. "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
  8288. "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
  8289. "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
  8290. "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
  8291. "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
  8292. "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
  8293. "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
  8294. "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
  8295. "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
  8296. "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
  8297. "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
  8298. "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
  8299. "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
  8300. "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
  8301. "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
  8302. "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
  8303. "\x69\x3a\x29\x23\xac\x86\x32\xa5"
  8304. "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
  8305. "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
  8306. "\x59\x6a\xd3\x50\x59\x43\x59\xde"
  8307. "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
  8308. "\x18\x34\x0d\x1a\x63\x33\xed\x10"
  8309. "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
  8310. "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
  8311. "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
  8312. "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
  8313. "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
  8314. "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
  8315. "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
  8316. "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
  8317. "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
  8318. "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
  8319. "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
  8320. "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
  8321. "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
  8322. "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
  8323. "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
  8324. "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
  8325. "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
  8326. "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
  8327. "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
  8328. "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
  8329. "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
  8330. "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
  8331. "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
  8332. "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
  8333. "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
  8334. "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
  8335. "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
  8336. "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
  8337. "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
  8338. "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
  8339. "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
  8340. "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
  8341. "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
  8342. "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
  8343. "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
  8344. "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
  8345. "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
  8346. "\x26\x39\x83\x94\xef\x27\xd8\x53"
  8347. "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
  8348. "\x43\x7c\x95\x0a\x53\xef\x66\xda"
  8349. "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
  8350. "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
  8351. "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
  8352. "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
  8353. "\x88\xee\x73\xcf\x66\x2f\x52\x56"
  8354. "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
  8355. "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
  8356. "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
  8357. "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
  8358. "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
  8359. "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
  8360. "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
  8361. "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
  8362. "\xba\x61\x34\x38\x7c\xda\x48\x3e"
  8363. "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
  8364. "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
  8365. "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
  8366. "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
  8367. "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
  8368. "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
  8369. "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
  8370. "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
  8371. "\x35\x12\xe3\x36\x28\x27\x36\x58"
  8372. "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
  8373. "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
  8374. "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
  8375. "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
  8376. "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
  8377. "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
  8378. "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
  8379. "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
  8380. "\x89\xf3\x78\x35\x44\x62\x78\x72"
  8381. "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
  8382. "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
  8383. "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
  8384. "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
  8385. "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
  8386. "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
  8387. "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
  8388. "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
  8389. "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
  8390. "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
  8391. "\xd2\x49\x77\x81\x6d\x90\x70\xae"
  8392. "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
  8393. "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
  8394. "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
  8395. "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
  8396. "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
  8397. "\x45\x42\x27\x75\x50\xe5\xee\xb8"
  8398. "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
  8399. "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
  8400. "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
  8401. "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
  8402. "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
  8403. "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
  8404. "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
  8405. "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
  8406. "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
  8407. "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
  8408. "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
  8409. "\xa9\x21\x2b\x92\x94\x87\x62\x57"
  8410. "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
  8411. "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
  8412. "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
  8413. "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
  8414. "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
  8415. "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
  8416. "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
  8417. "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
  8418. "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
  8419. "\x69\x34\x78\x61\x24\x21\x9c\x8a"
  8420. "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
  8421. "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
  8422. "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
  8423. "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
  8424. "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
  8425. "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
  8426. "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
  8427. "\xb1\x95\x28\x86\x20\xe9\x17\x49"
  8428. "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
  8429. "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
  8430. "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
  8431. "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
  8432. "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
  8433. "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
  8434. "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
  8435. "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
  8436. "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
  8437. "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
  8438. "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
  8439. "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
  8440. "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
  8441. "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
  8442. "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
  8443. "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
  8444. "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
  8445. "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
  8446. "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
  8447. "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
  8448. "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
  8449. "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
  8450. "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
  8451. "\x29\x90\x46\x30\x92\x69\x7d\x13"
  8452. "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
  8453. "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
  8454. "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
  8455. "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
  8456. "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
  8457. "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
  8458. "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
  8459. "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
  8460. "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
  8461. "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
  8462. "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
  8463. "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
  8464. "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
  8465. "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
  8466. "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
  8467. "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
  8468. "\x77\x65\x08\x60\x11\x76\x4c\x8d"
  8469. "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
  8470. "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
  8471. "\x03\xd1\x24\x95\xec\x6d\xab\x38"
  8472. "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
  8473. "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
  8474. "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
  8475. "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
  8476. "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
  8477. "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
  8478. "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
  8479. "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
  8480. "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
  8481. "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
  8482. "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
  8483. "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
  8484. "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
  8485. "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
  8486. "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
  8487. "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
  8488. "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
  8489. "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
  8490. "\xe5\x79\x81\x73\xcd\x43\x59\x68"
  8491. "\x73\x02\x3b\x78\x21\x72\x43\x00"
  8492. "\x49\x17\xf7\x00\xaf\x68\x24\x53"
  8493. "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
  8494. "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
  8495. "\x11\x94\x13\x69\x51\x09\x28\xde"
  8496. "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
  8497. "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
  8498. "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
  8499. "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
  8500. "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
  8501. "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
  8502. "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
  8503. "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
  8504. "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
  8505. "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
  8506. "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
  8507. "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
  8508. "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
  8509. "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
  8510. "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
  8511. "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
  8512. "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
  8513. "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
  8514. "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
  8515. "\x69\xdc\xab\x24\x57\x60\x47\xc1"
  8516. "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
  8517. "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
  8518. "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
  8519. "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
  8520. "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
  8521. "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
  8522. "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
  8523. "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
  8524. "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
  8525. "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
  8526. "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
  8527. "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
  8528. "\x85\x62\x82\x70\x18\xe2\x9a\x78"
  8529. "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
  8530. "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
  8531. "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
  8532. "\x35\xf3\x61\x06\x72\x84\xc4\x32"
  8533. "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
  8534. "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
  8535. "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
  8536. "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
  8537. "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
  8538. "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
  8539. "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
  8540. "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
  8541. "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
  8542. "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
  8543. "\x4f\x73\x38\x09\x75\x64\x48\xe0"
  8544. "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
  8545. "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
  8546. "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
  8547. "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
  8548. "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
  8549. "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
  8550. "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
  8551. "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
  8552. "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
  8553. "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
  8554. "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
  8555. "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
  8556. "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
  8557. "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
  8558. "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
  8559. "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
  8560. "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
  8561. "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
  8562. "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
  8563. "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
  8564. "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
  8565. "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
  8566. "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
  8567. "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
  8568. "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
  8569. "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
  8570. "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
  8571. "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
  8572. "\xce\x4d\x5f\x18\x60\xce\x87\x22"
  8573. "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
  8574. "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
  8575. "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
  8576. "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
  8577. "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
  8578. "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
  8579. "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
  8580. "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
  8581. "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
  8582. "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
  8583. "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
  8584. "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
  8585. "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
  8586. "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
  8587. "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
  8588. "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
  8589. "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
  8590. "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
  8591. "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
  8592. "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
  8593. "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
  8594. "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
  8595. "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
  8596. "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
  8597. "\xce\x54\xf9\x18\x58\xb5\xff\x44"
  8598. "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
  8599. "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
  8600. "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
  8601. "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
  8602. "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
  8603. "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
  8604. "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
  8605. "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
  8606. "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
  8607. "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
  8608. "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
  8609. "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
  8610. "\x0c\xd6\x04\x14\xde\x51\x74\x75"
  8611. "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
  8612. "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
  8613. "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
  8614. "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
  8615. "\x75\x46\x65\x4e\x07\x34\x37\xa3"
  8616. "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
  8617. "\x69\x24\x0e\x38\x67\x43\x8c\xde"
  8618. "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
  8619. "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
  8620. "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
  8621. "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
  8622. "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
  8623. "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
  8624. "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
  8625. "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
  8626. "\x91\x7d\x62\x64\x96\x72\xde\xfc"
  8627. "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
  8628. "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
  8629. "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
  8630. "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
  8631. "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
  8632. "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
  8633. "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
  8634. "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
  8635. "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
  8636. "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
  8637. "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
  8638. "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
  8639. "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
  8640. "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
  8641. "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
  8642. "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
  8643. "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
  8644. "\xae\xed\x39\x88\x42\x11\x3c\xed"
  8645. "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
  8646. "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
  8647. "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
  8648. "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
  8649. "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
  8650. "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
  8651. "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
  8652. "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
  8653. "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
  8654. "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
  8655. "\x34\x17\xde\xba\x47\xf1\x06\x18"
  8656. "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
  8657. "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
  8658. "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
  8659. "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
  8660. "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
  8661. "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
  8662. "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
  8663. "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
  8664. "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
  8665. "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
  8666. "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
  8667. "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
  8668. "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
  8669. "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
  8670. "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
  8671. "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
  8672. "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
  8673. "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
  8674. "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
  8675. "\x2c\x56\x39\x79\x0f\x69\x44\x75"
  8676. "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
  8677. "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
  8678. "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
  8679. "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
  8680. "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
  8681. "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
  8682. "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
  8683. "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
  8684. "\x63\x9b\xce\x61\x24\x79\xc0\x70"
  8685. "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
  8686. "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
  8687. "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
  8688. "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
  8689. "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
  8690. "\x74\x56\x58\x40\x02\x37\x52\x2c"
  8691. "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
  8692. "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
  8693. "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
  8694. "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
  8695. "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
  8696. "\xed\x38\x80\x36\x72\x43\x27\x49"
  8697. "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
  8698. "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
  8699. "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
  8700. "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
  8701. "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
  8702. "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
  8703. "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
  8704. "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
  8705. "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
  8706. "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
  8707. "\x12\xee\x30\xfe\xd8\x30\xef\x34"
  8708. "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
  8709. "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
  8710. "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
  8711. "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
  8712. "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
  8713. "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
  8714. "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
  8715. "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
  8716. "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
  8717. "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
  8718. "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
  8719. "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
  8720. "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
  8721. "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
  8722. "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
  8723. "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
  8724. "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
  8725. "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
  8726. "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
  8727. "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
  8728. "\x44\x12\xfb\x73\x77\xd4\x13\x39"
  8729. "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
  8730. "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
  8731. "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
  8732. "\x4b\xef\x31\x18\xea\xac\xb1\x84"
  8733. "\x21\xed\xda\x86",
  8734. .rlen = 4100,
  8735. .np = 2,
  8736. .tap = { 4064, 36 },
  8737. },
  8738. };
  8739. static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
  8740. { /* From RFC 3686 */
  8741. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  8742. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  8743. "\x00\x00\x00\x30",
  8744. .klen = 20,
  8745. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8746. .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  8747. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  8748. .ilen = 16,
  8749. .result = "Single block msg",
  8750. .rlen = 16,
  8751. }, {
  8752. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  8753. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  8754. "\x00\x6c\xb6\xdb",
  8755. .klen = 20,
  8756. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  8757. .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  8758. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  8759. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  8760. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  8761. .ilen = 32,
  8762. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8763. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8764. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8765. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8766. .rlen = 32,
  8767. }, {
  8768. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  8769. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  8770. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  8771. "\x00\x00\x00\x48",
  8772. .klen = 28,
  8773. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  8774. .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  8775. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  8776. .ilen = 16,
  8777. .result = "Single block msg",
  8778. .rlen = 16,
  8779. }, {
  8780. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  8781. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  8782. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  8783. "\x00\x96\xb0\x3b",
  8784. .klen = 28,
  8785. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  8786. .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  8787. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  8788. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  8789. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  8790. .ilen = 32,
  8791. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8792. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8793. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8794. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8795. .rlen = 32,
  8796. }, {
  8797. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  8798. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  8799. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  8800. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  8801. "\x00\x00\x00\x60",
  8802. .klen = 36,
  8803. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  8804. .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  8805. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  8806. .ilen = 16,
  8807. .result = "Single block msg",
  8808. .rlen = 16,
  8809. }, {
  8810. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  8811. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  8812. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  8813. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  8814. "\x00\xfa\xac\x24",
  8815. .klen = 36,
  8816. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  8817. .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  8818. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  8819. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  8820. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  8821. .ilen = 32,
  8822. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8823. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8824. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8825. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8826. .rlen = 32,
  8827. },
  8828. };
  8829. static struct cipher_testvec aes_ofb_enc_tv_template[] = {
  8830. /* From NIST Special Publication 800-38A, Appendix F.5 */
  8831. {
  8832. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  8833. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  8834. .klen = 16,
  8835. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
  8836. "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8837. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  8838. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  8839. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  8840. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  8841. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  8842. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  8843. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  8844. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  8845. .ilen = 64,
  8846. .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
  8847. "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
  8848. "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
  8849. "\x3c\x52\xda\xc5\x4e\xd8\x25"
  8850. "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
  8851. "\x44\xf7\xa8\x22\x60\xed\xcc"
  8852. "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
  8853. "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
  8854. .rlen = 64,
  8855. }
  8856. };
  8857. static struct cipher_testvec aes_ofb_dec_tv_template[] = {
  8858. /* From NIST Special Publication 800-38A, Appendix F.5 */
  8859. {
  8860. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  8861. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  8862. .klen = 16,
  8863. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
  8864. "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8865. .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
  8866. "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
  8867. "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
  8868. "\x3c\x52\xda\xc5\x4e\xd8\x25"
  8869. "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
  8870. "\x44\xf7\xa8\x22\x60\xed\xcc"
  8871. "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
  8872. "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
  8873. .ilen = 64,
  8874. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  8875. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  8876. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  8877. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  8878. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  8879. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  8880. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  8881. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  8882. .rlen = 64,
  8883. }
  8884. };
  8885. static struct aead_testvec aes_gcm_enc_tv_template[] = {
  8886. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  8887. .key = zeroed_string,
  8888. .klen = 16,
  8889. .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
  8890. "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
  8891. .rlen = 16,
  8892. }, {
  8893. .key = zeroed_string,
  8894. .klen = 16,
  8895. .input = zeroed_string,
  8896. .ilen = 16,
  8897. .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
  8898. "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
  8899. "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
  8900. "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
  8901. .rlen = 32,
  8902. }, {
  8903. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  8904. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  8905. .klen = 16,
  8906. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  8907. "\xde\xca\xf8\x88",
  8908. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  8909. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  8910. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  8911. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  8912. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  8913. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  8914. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  8915. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  8916. .ilen = 64,
  8917. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  8918. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  8919. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  8920. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  8921. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  8922. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  8923. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  8924. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  8925. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  8926. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  8927. .rlen = 80,
  8928. }, {
  8929. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  8930. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  8931. .klen = 16,
  8932. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  8933. "\xde\xca\xf8\x88",
  8934. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  8935. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  8936. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  8937. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  8938. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  8939. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  8940. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  8941. "\xba\x63\x7b\x39",
  8942. .ilen = 60,
  8943. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  8944. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  8945. "\xab\xad\xda\xd2",
  8946. .alen = 20,
  8947. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  8948. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  8949. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  8950. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  8951. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  8952. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  8953. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  8954. "\x3d\x58\xe0\x91"
  8955. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  8956. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  8957. .rlen = 76,
  8958. }, {
  8959. .key = zeroed_string,
  8960. .klen = 24,
  8961. .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
  8962. "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
  8963. .rlen = 16,
  8964. }, {
  8965. .key = zeroed_string,
  8966. .klen = 24,
  8967. .input = zeroed_string,
  8968. .ilen = 16,
  8969. .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  8970. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  8971. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  8972. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  8973. .rlen = 32,
  8974. }, {
  8975. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  8976. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  8977. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  8978. .klen = 24,
  8979. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  8980. "\xde\xca\xf8\x88",
  8981. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  8982. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  8983. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  8984. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  8985. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  8986. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  8987. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  8988. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  8989. .ilen = 64,
  8990. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  8991. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  8992. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  8993. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  8994. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  8995. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  8996. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  8997. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  8998. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  8999. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  9000. .rlen = 80,
  9001. }, {
  9002. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9003. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9004. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  9005. .klen = 24,
  9006. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9007. "\xde\xca\xf8\x88",
  9008. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9009. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9010. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9011. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9012. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9013. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9014. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9015. "\xba\x63\x7b\x39",
  9016. .ilen = 60,
  9017. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9018. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9019. "\xab\xad\xda\xd2",
  9020. .alen = 20,
  9021. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  9022. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  9023. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  9024. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  9025. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  9026. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  9027. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  9028. "\xcc\xda\x27\x10"
  9029. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  9030. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  9031. .rlen = 76,
  9032. .np = 2,
  9033. .tap = { 32, 28 },
  9034. .anp = 2,
  9035. .atap = { 8, 12 }
  9036. }, {
  9037. .key = zeroed_string,
  9038. .klen = 32,
  9039. .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
  9040. "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
  9041. .rlen = 16,
  9042. }
  9043. };
  9044. static struct aead_testvec aes_gcm_dec_tv_template[] = {
  9045. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  9046. .key = zeroed_string,
  9047. .klen = 32,
  9048. .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
  9049. "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
  9050. "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
  9051. "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
  9052. .ilen = 32,
  9053. .result = zeroed_string,
  9054. .rlen = 16,
  9055. }, {
  9056. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9057. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9058. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9059. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  9060. .klen = 32,
  9061. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9062. "\xde\xca\xf8\x88",
  9063. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  9064. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  9065. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  9066. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  9067. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  9068. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  9069. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  9070. "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
  9071. "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
  9072. "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
  9073. .ilen = 80,
  9074. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9075. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9076. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9077. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9078. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9079. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9080. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9081. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  9082. .rlen = 64,
  9083. }, {
  9084. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9085. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9086. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9087. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  9088. .klen = 32,
  9089. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9090. "\xde\xca\xf8\x88",
  9091. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  9092. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  9093. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  9094. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  9095. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  9096. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  9097. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  9098. "\xbc\xc9\xf6\x62"
  9099. "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
  9100. "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
  9101. .ilen = 76,
  9102. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9103. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9104. "\xab\xad\xda\xd2",
  9105. .alen = 20,
  9106. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9107. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9108. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9109. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9110. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9111. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9112. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9113. "\xba\x63\x7b\x39",
  9114. .rlen = 60,
  9115. .np = 2,
  9116. .tap = { 48, 28 },
  9117. .anp = 3,
  9118. .atap = { 8, 8, 4 }
  9119. }, {
  9120. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9121. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  9122. .klen = 16,
  9123. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9124. "\xde\xca\xf8\x88",
  9125. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  9126. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  9127. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  9128. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  9129. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  9130. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  9131. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  9132. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  9133. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  9134. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  9135. .ilen = 80,
  9136. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9137. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9138. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9139. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9140. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9141. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9142. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9143. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  9144. .rlen = 64,
  9145. }, {
  9146. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9147. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  9148. .klen = 16,
  9149. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9150. "\xde\xca\xf8\x88",
  9151. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  9152. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  9153. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  9154. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  9155. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  9156. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  9157. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  9158. "\x3d\x58\xe0\x91"
  9159. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  9160. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  9161. .ilen = 76,
  9162. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9163. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9164. "\xab\xad\xda\xd2",
  9165. .alen = 20,
  9166. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9167. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9168. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9169. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9170. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9171. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9172. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9173. "\xba\x63\x7b\x39",
  9174. .rlen = 60,
  9175. }, {
  9176. .key = zeroed_string,
  9177. .klen = 24,
  9178. .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  9179. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  9180. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  9181. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  9182. .ilen = 32,
  9183. .result = zeroed_string,
  9184. .rlen = 16,
  9185. }, {
  9186. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9187. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9188. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  9189. .klen = 24,
  9190. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9191. "\xde\xca\xf8\x88",
  9192. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  9193. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  9194. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  9195. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  9196. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  9197. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  9198. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  9199. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  9200. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  9201. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  9202. .ilen = 80,
  9203. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9204. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9205. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9206. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9207. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9208. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9209. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9210. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  9211. .rlen = 64,
  9212. }, {
  9213. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9214. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9215. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  9216. .klen = 24,
  9217. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9218. "\xde\xca\xf8\x88",
  9219. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  9220. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  9221. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  9222. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  9223. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  9224. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  9225. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  9226. "\xcc\xda\x27\x10"
  9227. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  9228. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  9229. .ilen = 76,
  9230. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9231. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9232. "\xab\xad\xda\xd2",
  9233. .alen = 20,
  9234. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9235. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9236. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9237. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9238. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9239. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9240. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9241. "\xba\x63\x7b\x39",
  9242. .rlen = 60,
  9243. }
  9244. };
  9245. static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
  9246. { /* Generated using Crypto++ */
  9247. .key = zeroed_string,
  9248. .klen = 20,
  9249. .iv = zeroed_string,
  9250. .input = zeroed_string,
  9251. .ilen = 16,
  9252. .assoc = zeroed_string,
  9253. .alen = 8,
  9254. .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
  9255. "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
  9256. "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
  9257. "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
  9258. .rlen = 32,
  9259. },{
  9260. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9261. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9262. "\x00\x00\x00\x00",
  9263. .klen = 20,
  9264. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9265. "\x00\x00\x00\x00",
  9266. .input = zeroed_string,
  9267. .ilen = 16,
  9268. .assoc = zeroed_string,
  9269. .alen = 8,
  9270. .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
  9271. "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
  9272. "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
  9273. "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
  9274. .rlen = 32,
  9275. }, {
  9276. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9277. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9278. "\x00\x00\x00\x00",
  9279. .klen = 20,
  9280. .iv = zeroed_string,
  9281. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9282. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9283. .ilen = 16,
  9284. .assoc = zeroed_string,
  9285. .alen = 8,
  9286. .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  9287. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  9288. "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
  9289. "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
  9290. .rlen = 32,
  9291. }, {
  9292. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9293. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9294. "\x00\x00\x00\x00",
  9295. .klen = 20,
  9296. .iv = zeroed_string,
  9297. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9298. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9299. .ilen = 16,
  9300. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9301. .alen = 8,
  9302. .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  9303. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  9304. "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
  9305. "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
  9306. .rlen = 32,
  9307. }, {
  9308. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9309. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9310. "\x00\x00\x00\x00",
  9311. .klen = 20,
  9312. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9313. "\x00\x00\x00\x00",
  9314. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9315. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9316. .ilen = 16,
  9317. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9318. .alen = 8,
  9319. .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  9320. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  9321. "\x64\x50\xF9\x32\x13\xFB\x74\x61"
  9322. "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
  9323. .rlen = 32,
  9324. }, {
  9325. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9326. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9327. "\x00\x00\x00\x00",
  9328. .klen = 20,
  9329. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9330. "\x00\x00\x00\x00",
  9331. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9332. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9333. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9334. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9335. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9336. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9337. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9338. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9339. .ilen = 64,
  9340. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9341. .alen = 8,
  9342. .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  9343. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  9344. "\x98\x14\xA1\x42\x37\x80\xFD\x90"
  9345. "\x68\x12\x01\xA8\x91\x89\xB9\x83"
  9346. "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
  9347. "\x94\x5F\x18\x12\xBA\x27\x09\x39"
  9348. "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
  9349. "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
  9350. "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
  9351. "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
  9352. .rlen = 80,
  9353. }, {
  9354. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9355. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9356. "\x00\x00\x00\x00",
  9357. .klen = 20,
  9358. .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
  9359. "\x00\x00\x00\x00",
  9360. .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
  9361. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9362. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9363. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9364. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9365. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9366. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9367. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9368. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9369. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9370. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9371. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9372. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9373. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9374. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9375. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9376. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9377. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9378. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9379. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9380. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9381. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9382. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9383. "\xff\xff\xff\xff\xff\xff\xff\xff",
  9384. .ilen = 192,
  9385. .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  9386. "\xaa\xaa\xaa\xaa",
  9387. .alen = 12,
  9388. .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
  9389. "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
  9390. "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
  9391. "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
  9392. "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
  9393. "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
  9394. "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
  9395. "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
  9396. "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
  9397. "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
  9398. "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
  9399. "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
  9400. "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
  9401. "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
  9402. "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
  9403. "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
  9404. "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
  9405. "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
  9406. "\x7E\x13\x06\x82\x08\x17\xA4\x35"
  9407. "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
  9408. "\xA3\x05\x38\x95\x20\x1A\x47\x04"
  9409. "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
  9410. "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
  9411. "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
  9412. "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
  9413. "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
  9414. .rlen = 208,
  9415. }
  9416. };
  9417. static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
  9418. { /* Generated using Crypto++ */
  9419. .key = zeroed_string,
  9420. .klen = 20,
  9421. .iv = zeroed_string,
  9422. .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
  9423. "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
  9424. "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
  9425. "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
  9426. .ilen = 32,
  9427. .assoc = zeroed_string,
  9428. .alen = 8,
  9429. .result = zeroed_string,
  9430. .rlen = 16,
  9431. },{
  9432. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9433. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9434. "\x00\x00\x00\x00",
  9435. .klen = 20,
  9436. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9437. "\x00\x00\x00\x00",
  9438. .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
  9439. "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
  9440. "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
  9441. "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
  9442. .ilen = 32,
  9443. .assoc = zeroed_string,
  9444. .alen = 8,
  9445. .result = zeroed_string,
  9446. .rlen = 16,
  9447. }, {
  9448. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9449. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9450. "\x00\x00\x00\x00",
  9451. .klen = 20,
  9452. .iv = zeroed_string,
  9453. .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  9454. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  9455. "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
  9456. "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
  9457. .ilen = 32,
  9458. .assoc = zeroed_string,
  9459. .alen = 8,
  9460. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9461. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9462. .rlen = 16,
  9463. }, {
  9464. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9465. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9466. "\x00\x00\x00\x00",
  9467. .klen = 20,
  9468. .iv = zeroed_string,
  9469. .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  9470. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  9471. "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
  9472. "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
  9473. .ilen = 32,
  9474. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9475. .alen = 8,
  9476. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9477. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9478. .rlen = 16,
  9479. }, {
  9480. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9481. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9482. "\x00\x00\x00\x00",
  9483. .klen = 20,
  9484. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9485. "\x00\x00\x00\x00",
  9486. .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  9487. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  9488. "\x64\x50\xF9\x32\x13\xFB\x74\x61"
  9489. "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
  9490. .ilen = 32,
  9491. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9492. .alen = 8,
  9493. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9494. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9495. .rlen = 16,
  9496. }, {
  9497. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9498. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9499. "\x00\x00\x00\x00",
  9500. .klen = 20,
  9501. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9502. "\x00\x00\x00\x00",
  9503. .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  9504. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  9505. "\x98\x14\xA1\x42\x37\x80\xFD\x90"
  9506. "\x68\x12\x01\xA8\x91\x89\xB9\x83"
  9507. "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
  9508. "\x94\x5F\x18\x12\xBA\x27\x09\x39"
  9509. "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
  9510. "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
  9511. "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
  9512. "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
  9513. .ilen = 80,
  9514. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9515. .alen = 8,
  9516. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9517. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9518. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9519. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9520. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9521. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9522. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9523. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9524. .rlen = 64,
  9525. }, {
  9526. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9527. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9528. "\x00\x00\x00\x00",
  9529. .klen = 20,
  9530. .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
  9531. "\x00\x00\x00\x00",
  9532. .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
  9533. "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
  9534. "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
  9535. "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
  9536. "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
  9537. "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
  9538. "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
  9539. "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
  9540. "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
  9541. "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
  9542. "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
  9543. "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
  9544. "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
  9545. "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
  9546. "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
  9547. "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
  9548. "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
  9549. "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
  9550. "\x7E\x13\x06\x82\x08\x17\xA4\x35"
  9551. "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
  9552. "\xA3\x05\x38\x95\x20\x1A\x47\x04"
  9553. "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
  9554. "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
  9555. "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
  9556. "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
  9557. "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
  9558. .ilen = 208,
  9559. .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  9560. "\xaa\xaa\xaa\xaa",
  9561. .alen = 12,
  9562. .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
  9563. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9564. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9565. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9566. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9567. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9568. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9569. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9570. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9571. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9572. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9573. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9574. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9575. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9576. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9577. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9578. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9579. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9580. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9581. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9582. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9583. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9584. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9585. "\xff\xff\xff\xff\xff\xff\xff\xff",
  9586. .rlen = 192,
  9587. }
  9588. };
  9589. static struct aead_testvec aes_ccm_enc_tv_template[] = {
  9590. { /* From RFC 3610 */
  9591. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9592. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9593. .klen = 16,
  9594. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  9595. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9596. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  9597. .alen = 8,
  9598. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9599. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9600. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  9601. .ilen = 23,
  9602. .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  9603. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  9604. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  9605. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  9606. .rlen = 31,
  9607. }, {
  9608. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9609. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9610. .klen = 16,
  9611. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  9612. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9613. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9614. "\x08\x09\x0a\x0b",
  9615. .alen = 12,
  9616. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  9617. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  9618. "\x1c\x1d\x1e\x1f",
  9619. .ilen = 20,
  9620. .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  9621. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  9622. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  9623. "\x7d\x9c\x2d\x93",
  9624. .rlen = 28,
  9625. }, {
  9626. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9627. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9628. .klen = 16,
  9629. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  9630. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9631. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  9632. .alen = 8,
  9633. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9634. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9635. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  9636. "\x20",
  9637. .ilen = 25,
  9638. .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  9639. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  9640. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  9641. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  9642. "\x7e\x5f\x4e",
  9643. .rlen = 35,
  9644. }, {
  9645. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9646. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9647. .klen = 16,
  9648. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  9649. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9650. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9651. "\x08\x09\x0a\x0b",
  9652. .alen = 12,
  9653. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  9654. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  9655. "\x1c\x1d\x1e",
  9656. .ilen = 19,
  9657. .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
  9658. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  9659. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  9660. "\x4d\x99\x99\x88\xdd",
  9661. .rlen = 29,
  9662. }, {
  9663. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9664. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9665. .klen = 16,
  9666. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  9667. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9668. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  9669. .alen = 8,
  9670. .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  9671. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  9672. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  9673. .ilen = 24,
  9674. .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  9675. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  9676. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  9677. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  9678. .rlen = 32,
  9679. }, {
  9680. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9681. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9682. .klen = 16,
  9683. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  9684. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9685. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  9686. "\x20\xea\x60\xc0",
  9687. .alen = 12,
  9688. .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  9689. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  9690. "\x3a\x80\x3b\xa8\x7f",
  9691. .ilen = 21,
  9692. .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  9693. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  9694. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  9695. "\x5a\xe0\x70\x45\x51",
  9696. .rlen = 29,
  9697. }, {
  9698. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9699. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9700. .klen = 16,
  9701. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  9702. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9703. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  9704. .alen = 8,
  9705. .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  9706. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  9707. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  9708. .ilen = 23,
  9709. .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  9710. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  9711. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  9712. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  9713. "\xba",
  9714. .rlen = 33,
  9715. },
  9716. };
  9717. static struct aead_testvec aes_ccm_dec_tv_template[] = {
  9718. { /* From RFC 3610 */
  9719. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9720. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9721. .klen = 16,
  9722. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  9723. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9724. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  9725. .alen = 8,
  9726. .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  9727. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  9728. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  9729. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  9730. .ilen = 31,
  9731. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9732. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9733. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  9734. .rlen = 23,
  9735. }, {
  9736. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9737. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9738. .klen = 16,
  9739. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  9740. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9741. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9742. "\x08\x09\x0a\x0b",
  9743. .alen = 12,
  9744. .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  9745. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  9746. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  9747. "\x7d\x9c\x2d\x93",
  9748. .ilen = 28,
  9749. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  9750. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  9751. "\x1c\x1d\x1e\x1f",
  9752. .rlen = 20,
  9753. }, {
  9754. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9755. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9756. .klen = 16,
  9757. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  9758. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9759. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  9760. .alen = 8,
  9761. .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  9762. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  9763. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  9764. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  9765. "\x7e\x5f\x4e",
  9766. .ilen = 35,
  9767. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9768. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9769. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  9770. "\x20",
  9771. .rlen = 25,
  9772. }, {
  9773. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9774. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9775. .klen = 16,
  9776. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  9777. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9778. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9779. "\x08\x09\x0a\x0b",
  9780. .alen = 12,
  9781. .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
  9782. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  9783. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  9784. "\x4d\x99\x99\x88\xdd",
  9785. .ilen = 29,
  9786. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  9787. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  9788. "\x1c\x1d\x1e",
  9789. .rlen = 19,
  9790. }, {
  9791. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9792. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9793. .klen = 16,
  9794. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  9795. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9796. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  9797. .alen = 8,
  9798. .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  9799. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  9800. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  9801. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  9802. .ilen = 32,
  9803. .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  9804. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  9805. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  9806. .rlen = 24,
  9807. }, {
  9808. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9809. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9810. .klen = 16,
  9811. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  9812. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9813. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  9814. "\x20\xea\x60\xc0",
  9815. .alen = 12,
  9816. .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  9817. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  9818. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  9819. "\x5a\xe0\x70\x45\x51",
  9820. .ilen = 29,
  9821. .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  9822. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  9823. "\x3a\x80\x3b\xa8\x7f",
  9824. .rlen = 21,
  9825. }, {
  9826. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9827. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9828. .klen = 16,
  9829. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  9830. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9831. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  9832. .alen = 8,
  9833. .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  9834. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  9835. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  9836. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  9837. "\xba",
  9838. .ilen = 33,
  9839. .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  9840. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  9841. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  9842. .rlen = 23,
  9843. },
  9844. };
  9845. /*
  9846. * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
  9847. * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
  9848. * Special Publication 800-38C's test vectors also use nonce lengths our
  9849. * implementation doesn't support. The following are taken from fips cavs
  9850. * fax files on hand at Red Hat.
  9851. *
  9852. * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
  9853. * part of the nonce which combine w/the iv, but need to be input this way.
  9854. */
  9855. static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
  9856. {
  9857. .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
  9858. "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
  9859. "\x96\xac\x59",
  9860. .klen = 19,
  9861. .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
  9862. .alen = 0,
  9863. .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
  9864. "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
  9865. "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
  9866. "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
  9867. .ilen = 32,
  9868. .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
  9869. "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
  9870. "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
  9871. "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
  9872. "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
  9873. "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
  9874. .rlen = 48,
  9875. }, {
  9876. .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
  9877. "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
  9878. "\x4f\xa3\x19",
  9879. .klen = 19,
  9880. .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
  9881. .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
  9882. "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
  9883. "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
  9884. "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
  9885. .alen = 32,
  9886. .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
  9887. "\xa9\x28\x63\xba\x12\xa3\x14\x85"
  9888. "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
  9889. "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
  9890. .ilen = 32,
  9891. .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
  9892. "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
  9893. "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
  9894. "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
  9895. "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
  9896. "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
  9897. .rlen = 48,
  9898. }, {
  9899. .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
  9900. "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
  9901. "\x53\x14\x73\x66\x8d\x88\xf6\x80"
  9902. "\xa0\x20\x35",
  9903. .klen = 27,
  9904. .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
  9905. .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
  9906. "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
  9907. "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
  9908. "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
  9909. .alen = 32,
  9910. .ilen = 0,
  9911. .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
  9912. "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
  9913. .rlen = 16,
  9914. }, {
  9915. .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
  9916. "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
  9917. "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
  9918. "\xd6\x3c\x8c",
  9919. .klen = 27,
  9920. .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
  9921. .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
  9922. "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
  9923. "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
  9924. "\xe3\x00\x73\x69\x84\x69\x87\x79",
  9925. .alen = 32,
  9926. .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
  9927. "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
  9928. "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
  9929. "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
  9930. .ilen = 32,
  9931. .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
  9932. "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
  9933. "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
  9934. "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
  9935. "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
  9936. "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
  9937. .rlen = 48,
  9938. }, {
  9939. .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
  9940. "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
  9941. "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
  9942. "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
  9943. "\x1e\x29\x91",
  9944. .klen = 35,
  9945. .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
  9946. .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
  9947. "\x78\x2b\x94\x02\x29\x0f\x42\x27"
  9948. "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
  9949. "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
  9950. .alen = 32,
  9951. .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
  9952. "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
  9953. "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
  9954. "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
  9955. .ilen = 32,
  9956. .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
  9957. "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
  9958. "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
  9959. "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
  9960. "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
  9961. .rlen = 40,
  9962. }, {
  9963. .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
  9964. "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
  9965. "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
  9966. "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
  9967. "\xf9\xd9\x4e",
  9968. .klen = 35,
  9969. .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
  9970. .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
  9971. "\x13\x02\x01\x0c\x83\x4c\x96\x35"
  9972. "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
  9973. "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
  9974. .alen = 32,
  9975. .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
  9976. "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
  9977. "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
  9978. "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
  9979. .ilen = 32,
  9980. .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
  9981. "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
  9982. "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
  9983. "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
  9984. "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
  9985. "\x7b\x72\x8a\xf7",
  9986. .rlen = 44,
  9987. }, {
  9988. .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
  9989. "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
  9990. "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
  9991. "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
  9992. "\x24\xa7\x8b",
  9993. .klen = 35,
  9994. .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
  9995. .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
  9996. "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
  9997. "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
  9998. "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
  9999. .alen = 32,
  10000. .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
  10001. "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
  10002. "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
  10003. "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
  10004. .ilen = 32,
  10005. .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
  10006. "\xef\xbb\x80\x21\x04\x6c\x58\x09"
  10007. "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
  10008. "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
  10009. "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
  10010. "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
  10011. .rlen = 48,
  10012. },
  10013. };
  10014. static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
  10015. {
  10016. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  10017. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  10018. "\xc6\xfb\x7d",
  10019. .klen = 19,
  10020. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  10021. .alen = 0,
  10022. .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
  10023. .ilen = 8,
  10024. .result = "\x00",
  10025. .rlen = 0,
  10026. .novrfy = 1,
  10027. }, {
  10028. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  10029. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  10030. "\xaf\x94\x87",
  10031. .klen = 19,
  10032. .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
  10033. .alen = 0,
  10034. .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
  10035. .ilen = 8,
  10036. .result = "\x00",
  10037. .rlen = 0,
  10038. }, {
  10039. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  10040. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  10041. "\xc6\xfb\x7d",
  10042. .klen = 19,
  10043. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  10044. .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
  10045. "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
  10046. "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
  10047. "\xd8\x94\x99\x91\x81\x54\x62\x57",
  10048. .alen = 32,
  10049. .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
  10050. "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
  10051. "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
  10052. "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
  10053. "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
  10054. "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
  10055. .ilen = 48,
  10056. .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
  10057. "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
  10058. "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
  10059. "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
  10060. .rlen = 32,
  10061. .novrfy = 1,
  10062. }, {
  10063. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  10064. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  10065. "\x05\xe0\xc9",
  10066. .klen = 19,
  10067. .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
  10068. .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
  10069. "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
  10070. "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
  10071. "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
  10072. .alen = 32,
  10073. .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
  10074. "\xad\x83\x52\x6d\x71\x03\x25\x1c"
  10075. "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
  10076. "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
  10077. "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
  10078. "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
  10079. .ilen = 48,
  10080. .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
  10081. "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
  10082. "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
  10083. "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
  10084. .rlen = 32,
  10085. }, {
  10086. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  10087. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  10088. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  10089. "\xee\x49\x83",
  10090. .klen = 27,
  10091. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  10092. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  10093. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  10094. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  10095. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  10096. .alen = 32,
  10097. .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
  10098. .ilen = 8,
  10099. .result = "\x00",
  10100. .rlen = 0,
  10101. }, {
  10102. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  10103. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  10104. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  10105. "\xee\x49\x83",
  10106. .klen = 27,
  10107. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  10108. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  10109. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  10110. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  10111. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  10112. .alen = 32,
  10113. .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
  10114. "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
  10115. "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
  10116. "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
  10117. "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
  10118. .ilen = 40,
  10119. .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
  10120. "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
  10121. "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
  10122. "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
  10123. .rlen = 32,
  10124. }, {
  10125. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  10126. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  10127. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  10128. "\xd1\xfc\x57",
  10129. .klen = 27,
  10130. .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
  10131. .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
  10132. "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
  10133. "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
  10134. "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
  10135. .alen = 32,
  10136. .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
  10137. "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
  10138. "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
  10139. "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
  10140. "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
  10141. "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
  10142. .ilen = 48,
  10143. .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
  10144. "\x99\x2a\xa8\xca\x04\x25\x45\x90"
  10145. "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
  10146. "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
  10147. .rlen = 32,
  10148. .novrfy = 1,
  10149. }, {
  10150. .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
  10151. "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
  10152. "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
  10153. "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
  10154. "\xee\x49\x83",
  10155. .klen = 35,
  10156. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  10157. .alen = 0,
  10158. .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
  10159. .ilen = 8,
  10160. .result = "\x00",
  10161. .rlen = 0,
  10162. }, {
  10163. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  10164. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  10165. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  10166. "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
  10167. "\x85\x34\x66",
  10168. .klen = 35,
  10169. .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
  10170. .alen = 0,
  10171. .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
  10172. "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
  10173. "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
  10174. "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
  10175. "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
  10176. "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
  10177. .ilen = 48,
  10178. .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
  10179. "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
  10180. "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
  10181. "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
  10182. .rlen = 32,
  10183. .novrfy = 1,
  10184. }, {
  10185. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  10186. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  10187. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  10188. "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
  10189. "\xcf\x76\x3f",
  10190. .klen = 35,
  10191. .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
  10192. .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
  10193. "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
  10194. "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
  10195. "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
  10196. .alen = 32,
  10197. .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
  10198. "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
  10199. "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
  10200. "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
  10201. "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
  10202. "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
  10203. .ilen = 48,
  10204. .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
  10205. "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
  10206. "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
  10207. "\x04\x49\x3b\x19\x93\x57\x25\x5d",
  10208. .rlen = 32,
  10209. },
  10210. };
  10211. /*
  10212. * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
  10213. * test vectors, taken from Appendix B.2.9 and B.2.10:
  10214. * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
  10215. * Only AES-128 is supported at this time.
  10216. */
  10217. #define ANSI_CPRNG_AES_TEST_VECTORS 6
  10218. static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
  10219. {
  10220. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  10221. #if FIPS_FUNC_TEST == 8
  10222. "\xee\x06\x1c\xab\xb8\xd4\x62\x02",
  10223. #else
  10224. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  10225. #endif
  10226. .klen = 16,
  10227. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  10228. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
  10229. .dtlen = 16,
  10230. .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
  10231. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10232. .vlen = 16,
  10233. .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
  10234. "\x84\x79\x66\x85\xc1\x2f\x76\x41",
  10235. .rlen = 16,
  10236. .loops = 1,
  10237. }, {
  10238. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  10239. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  10240. .klen = 16,
  10241. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  10242. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
  10243. .dtlen = 16,
  10244. .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
  10245. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10246. .vlen = 16,
  10247. .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
  10248. "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
  10249. .rlen = 16,
  10250. .loops = 1,
  10251. }, {
  10252. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  10253. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  10254. .klen = 16,
  10255. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  10256. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
  10257. .dtlen = 16,
  10258. .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
  10259. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10260. .vlen = 16,
  10261. .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
  10262. "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
  10263. .rlen = 16,
  10264. .loops = 1,
  10265. }, {
  10266. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  10267. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  10268. .klen = 16,
  10269. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  10270. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
  10271. .dtlen = 16,
  10272. .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
  10273. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10274. .vlen = 16,
  10275. .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
  10276. "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
  10277. .rlen = 16,
  10278. .loops = 1,
  10279. }, {
  10280. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  10281. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  10282. .klen = 16,
  10283. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  10284. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
  10285. .dtlen = 16,
  10286. .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
  10287. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10288. .vlen = 16,
  10289. .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
  10290. "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
  10291. .rlen = 16,
  10292. .loops = 1,
  10293. }, { /* Monte Carlo Test */
  10294. .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
  10295. "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
  10296. .klen = 16,
  10297. .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
  10298. "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
  10299. .dtlen = 16,
  10300. .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
  10301. "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
  10302. .vlen = 16,
  10303. .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
  10304. "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
  10305. .rlen = 16,
  10306. .loops = 10000,
  10307. },
  10308. };
  10309. #ifdef CONFIG_CRYPTO_DRBG
  10310. /*
  10311. * SP800-90A DRBG Test vectors from
  10312. * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
  10313. *
  10314. * Test vectors for DRBG with prediction resistance. All types of DRBGs
  10315. * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
  10316. * w/o personalization string, w/ and w/o additional input string).
  10317. */
  10318. static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
  10319. {
  10320. .entropy = (unsigned char *)
  10321. "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
  10322. "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
  10323. "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
  10324. "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
  10325. .entropylen = 48,
  10326. .entpra = (unsigned char *)
  10327. "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
  10328. "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
  10329. "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
  10330. .entprb = (unsigned char *)
  10331. "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
  10332. "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
  10333. "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
  10334. .entprlen = 32,
  10335. .expected = (unsigned char *)
  10336. "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
  10337. "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
  10338. "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
  10339. "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
  10340. "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
  10341. "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
  10342. "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
  10343. "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
  10344. "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
  10345. "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
  10346. "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
  10347. .expectedlen = 128,
  10348. .addtla = NULL,
  10349. .addtlb = NULL,
  10350. .addtllen = 0,
  10351. .pers = NULL,
  10352. .perslen = 0,
  10353. }, {
  10354. .entropy = (unsigned char *)
  10355. "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
  10356. "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
  10357. "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
  10358. "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
  10359. .entropylen = 48,
  10360. .entpra = (unsigned char *)
  10361. "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
  10362. "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
  10363. "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
  10364. .entprb = (unsigned char *)
  10365. "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
  10366. "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
  10367. "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
  10368. .entprlen = 32,
  10369. .expected = (unsigned char *)
  10370. "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
  10371. "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
  10372. "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
  10373. "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
  10374. "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
  10375. "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
  10376. "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
  10377. "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
  10378. "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
  10379. "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
  10380. "\x50\x47\xa3\x63\x81\x16\xaf\x19",
  10381. .expectedlen = 128,
  10382. .addtla = (unsigned char *)
  10383. "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
  10384. "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
  10385. "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
  10386. .addtlb = (unsigned char *)
  10387. "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
  10388. "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
  10389. "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
  10390. .addtllen = 32,
  10391. .pers = NULL,
  10392. .perslen = 0,
  10393. }, {
  10394. .entropy = (unsigned char *)
  10395. "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
  10396. "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
  10397. "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
  10398. "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
  10399. .entropylen = 48,
  10400. .entpra = (unsigned char *)
  10401. "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
  10402. "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
  10403. "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
  10404. .entprb = (unsigned char *)
  10405. "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
  10406. "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
  10407. "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
  10408. .entprlen = 32,
  10409. .expected = (unsigned char *)
  10410. "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
  10411. "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
  10412. "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
  10413. "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
  10414. "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
  10415. "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
  10416. "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
  10417. "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
  10418. "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
  10419. "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
  10420. "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
  10421. .expectedlen = 128,
  10422. .addtla = NULL,
  10423. .addtlb = NULL,
  10424. .addtllen = 0,
  10425. .pers = (unsigned char *)
  10426. "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
  10427. "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
  10428. "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
  10429. .perslen = 32,
  10430. }, {
  10431. .entropy = (unsigned char *)
  10432. "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
  10433. "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
  10434. "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
  10435. "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
  10436. .entropylen = 48,
  10437. .entpra = (unsigned char *)
  10438. "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
  10439. "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
  10440. "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
  10441. .entprb = (unsigned char *)
  10442. "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
  10443. "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
  10444. "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
  10445. .entprlen = 32,
  10446. .expected = (unsigned char *)
  10447. "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
  10448. "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
  10449. "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
  10450. "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
  10451. "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
  10452. "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
  10453. "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
  10454. "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
  10455. "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
  10456. "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
  10457. "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
  10458. .expectedlen = 128,
  10459. .addtla = (unsigned char *)
  10460. "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
  10461. "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
  10462. "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
  10463. .addtlb = (unsigned char *)
  10464. "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
  10465. "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
  10466. "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
  10467. .addtllen = 32,
  10468. .pers = (unsigned char *)
  10469. "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
  10470. "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
  10471. "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
  10472. .perslen = 32,
  10473. },
  10474. };
  10475. static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
  10476. {
  10477. .entropy = (unsigned char *)
  10478. "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
  10479. "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
  10480. "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
  10481. "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
  10482. .entropylen = 48,
  10483. .entpra = (unsigned char *)
  10484. "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
  10485. "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
  10486. "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
  10487. .entprb = (unsigned char *)
  10488. "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
  10489. "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
  10490. "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
  10491. .entprlen = 32,
  10492. .expected = (unsigned char *)
  10493. "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
  10494. "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
  10495. "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
  10496. "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
  10497. "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
  10498. "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
  10499. "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
  10500. "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
  10501. "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
  10502. "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
  10503. "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
  10504. .expectedlen = 128,
  10505. .addtla = NULL,
  10506. .addtlb = NULL,
  10507. .addtllen = 0,
  10508. .pers = NULL,
  10509. .perslen = 0,
  10510. }, {
  10511. .entropy = (unsigned char *)
  10512. "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
  10513. "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
  10514. "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
  10515. "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
  10516. .entropylen = 48,
  10517. .entpra = (unsigned char *)
  10518. "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
  10519. "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
  10520. "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
  10521. .entprb = (unsigned char *)
  10522. "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
  10523. "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
  10524. "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
  10525. .entprlen = 32,
  10526. .expected = (unsigned char *)
  10527. "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
  10528. "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
  10529. "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
  10530. "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
  10531. "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
  10532. "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
  10533. "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
  10534. "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
  10535. "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
  10536. "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
  10537. "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
  10538. .expectedlen = 128,
  10539. .addtla = (unsigned char *)
  10540. "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
  10541. "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
  10542. "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
  10543. .addtlb = (unsigned char *)
  10544. "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
  10545. "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
  10546. "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
  10547. .addtllen = 32,
  10548. .pers = NULL,
  10549. .perslen = 0,
  10550. }, {
  10551. .entropy = (unsigned char *)
  10552. "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
  10553. "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
  10554. "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
  10555. "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
  10556. .entropylen = 48,
  10557. .entpra = (unsigned char *)
  10558. "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
  10559. "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
  10560. "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
  10561. .entprb = (unsigned char *)
  10562. "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
  10563. "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
  10564. "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
  10565. .entprlen = 32,
  10566. .expected = (unsigned char *)
  10567. "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
  10568. "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
  10569. "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
  10570. "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
  10571. "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
  10572. "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
  10573. "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
  10574. "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
  10575. "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
  10576. "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
  10577. "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
  10578. .expectedlen = 128,
  10579. .addtla = NULL,
  10580. .addtlb = NULL,
  10581. .addtllen = 0,
  10582. .pers = (unsigned char *)
  10583. "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
  10584. "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
  10585. "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
  10586. .perslen = 32,
  10587. }, {
  10588. .entropy = (unsigned char *)
  10589. "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
  10590. "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
  10591. "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
  10592. "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
  10593. .entropylen = 48,
  10594. .entpra = (unsigned char *)
  10595. "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
  10596. "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
  10597. "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
  10598. .entprb = (unsigned char *)
  10599. "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
  10600. "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
  10601. "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
  10602. .entprlen = 32,
  10603. .expected = (unsigned char *)
  10604. "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
  10605. "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
  10606. "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
  10607. "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
  10608. "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
  10609. "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
  10610. "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
  10611. "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
  10612. "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
  10613. "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
  10614. "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
  10615. .expectedlen = 128,
  10616. .addtla = (unsigned char *)
  10617. "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
  10618. "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
  10619. "\x86\x88\x55\x28\xc1\x69\xdd\x76",
  10620. .addtlb = (unsigned char *)
  10621. "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
  10622. "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
  10623. "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
  10624. .addtllen = 32,
  10625. .pers = (unsigned char *)
  10626. "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
  10627. "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
  10628. "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
  10629. .perslen = 32,
  10630. },
  10631. };
  10632. static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
  10633. {
  10634. .entropy = (unsigned char *)
  10635. "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
  10636. "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
  10637. .entropylen = 24,
  10638. .entpra = (unsigned char *)
  10639. "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
  10640. "\xb4\xec\x80\xb1",
  10641. .entprb = (unsigned char *)
  10642. "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
  10643. "\x28\x07\xeb\xc2",
  10644. .entprlen = 16,
  10645. .expected = (unsigned char *)
  10646. "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
  10647. "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
  10648. "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
  10649. "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
  10650. "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
  10651. "\x8a\xf1\x23\xa8",
  10652. .expectedlen = 64,
  10653. .addtla = NULL,
  10654. .addtlb = NULL,
  10655. .addtllen = 0,
  10656. .pers = NULL,
  10657. .perslen = 0,
  10658. }, {
  10659. .entropy = (unsigned char *)
  10660. "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
  10661. "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
  10662. .entropylen = 24,
  10663. .entpra = (unsigned char *)
  10664. "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
  10665. "\x67\xd1\x08\xf8",
  10666. .entprb = (unsigned char *)
  10667. "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
  10668. "\xd4\xba\x04\x58",
  10669. .entprlen = 16,
  10670. .expected = (unsigned char *)
  10671. "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
  10672. "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
  10673. "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
  10674. "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
  10675. "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
  10676. "\xc1\x02\x41\x82",
  10677. .expectedlen = 64,
  10678. .addtla = (unsigned char *)
  10679. "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
  10680. "\xeb\xb3\x01\x76",
  10681. .addtlb = (unsigned char *)
  10682. "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
  10683. "\xd0\x7f\xcc\x43",
  10684. .addtllen = 16,
  10685. .pers = NULL,
  10686. .perslen = 0,
  10687. }, {
  10688. .entropy = (unsigned char *)
  10689. "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
  10690. "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
  10691. .entropylen = 24,
  10692. .entpra = (unsigned char *)
  10693. "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
  10694. "\xc3\x0f\xe3\xb0",
  10695. .entprb = (unsigned char *)
  10696. "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
  10697. "\xd6\x9c\x9d\xe8",
  10698. .entprlen = 16,
  10699. .expected = (unsigned char *)
  10700. "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
  10701. "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
  10702. "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
  10703. "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
  10704. "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
  10705. "\x72\x82\x0c\xcf",
  10706. .expectedlen = 64,
  10707. .addtla = NULL,
  10708. .addtlb = NULL,
  10709. .addtllen = 0,
  10710. .pers = (unsigned char *)
  10711. "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
  10712. "\x21\x52\xb3\xad",
  10713. .perslen = 16,
  10714. }, {
  10715. .entropy = (unsigned char *)
  10716. "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
  10717. "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
  10718. .entropylen = 24,
  10719. .entpra = (unsigned char *)
  10720. "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
  10721. "\xc4\x2c\xe8\x10",
  10722. .entprb = (unsigned char *)
  10723. "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
  10724. "\x08\xf7\xa5\x01",
  10725. .entprlen = 16,
  10726. .expected = (unsigned char *)
  10727. "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
  10728. "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
  10729. "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
  10730. "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
  10731. "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
  10732. "\x23\xc5\x1f\x68",
  10733. .expectedlen = 64,
  10734. .addtla = (unsigned char *)
  10735. "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
  10736. "\x23\x6d\xad\x1d",
  10737. .addtlb = (unsigned char *)
  10738. "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
  10739. "\xbc\x59\x31\x8c",
  10740. .addtllen = 16,
  10741. .pers = (unsigned char *)
  10742. "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
  10743. "\x37\x3c\x5c\x0b",
  10744. .perslen = 16,
  10745. },
  10746. };
  10747. /*
  10748. * SP800-90A DRBG Test vectors from
  10749. * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
  10750. *
  10751. * Test vectors for DRBG without prediction resistance. All types of DRBGs
  10752. * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
  10753. * w/o personalization string, w/ and w/o additional input string).
  10754. */
  10755. static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
  10756. {
  10757. .entropy = (unsigned char *)
  10758. "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
  10759. "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
  10760. "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
  10761. "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
  10762. .entropylen = 48,
  10763. .expected = (unsigned char *)
  10764. "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
  10765. "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
  10766. "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
  10767. "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
  10768. "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
  10769. "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
  10770. "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
  10771. "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
  10772. "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
  10773. "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
  10774. "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
  10775. .expectedlen = 128,
  10776. .addtla = NULL,
  10777. .addtlb = NULL,
  10778. .addtllen = 0,
  10779. .pers = NULL,
  10780. .perslen = 0,
  10781. }, {
  10782. .entropy = (unsigned char *)
  10783. "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
  10784. "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
  10785. "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
  10786. "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
  10787. .entropylen = 48,
  10788. .expected = (unsigned char *)
  10789. "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
  10790. "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
  10791. "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
  10792. "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
  10793. "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
  10794. "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
  10795. "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
  10796. "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
  10797. "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
  10798. "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
  10799. "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
  10800. .expectedlen = 128,
  10801. .addtla = (unsigned char *)
  10802. "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
  10803. "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
  10804. "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
  10805. .addtlb = (unsigned char *)
  10806. "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
  10807. "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
  10808. "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
  10809. .addtllen = 32,
  10810. .pers = NULL,
  10811. .perslen = 0,
  10812. }, {
  10813. .entropy = (unsigned char *)
  10814. "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
  10815. "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
  10816. "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
  10817. "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
  10818. .entropylen = 48,
  10819. .expected = (unsigned char *)
  10820. "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
  10821. "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
  10822. "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
  10823. "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
  10824. "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
  10825. "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
  10826. "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
  10827. "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
  10828. "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
  10829. "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
  10830. "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
  10831. .expectedlen = 128,
  10832. .addtla = NULL,
  10833. .addtlb = NULL,
  10834. .addtllen = 0,
  10835. .pers = (unsigned char *)
  10836. "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
  10837. "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
  10838. "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
  10839. .perslen = 32,
  10840. }, {
  10841. .entropy = (unsigned char *)
  10842. "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
  10843. "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
  10844. "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
  10845. "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
  10846. .entropylen = 48,
  10847. .expected = (unsigned char *)
  10848. "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
  10849. "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
  10850. "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
  10851. "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
  10852. "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
  10853. "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
  10854. "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
  10855. "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
  10856. "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
  10857. "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
  10858. "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
  10859. .expectedlen = 128,
  10860. .addtla = (unsigned char *)
  10861. "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
  10862. "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
  10863. "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
  10864. .addtlb = (unsigned char *)
  10865. "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
  10866. "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
  10867. "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
  10868. .addtllen = 32,
  10869. .pers = (unsigned char *)
  10870. "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
  10871. "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
  10872. "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
  10873. .perslen = 32,
  10874. },
  10875. };
  10876. static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
  10877. {
  10878. .entropy = (unsigned char *)
  10879. "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
  10880. "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
  10881. "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
  10882. "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
  10883. .entropylen = 48,
  10884. .expected = (unsigned char *)
  10885. "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
  10886. "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
  10887. "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
  10888. "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
  10889. "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
  10890. "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
  10891. "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
  10892. "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
  10893. "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
  10894. "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
  10895. "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
  10896. .expectedlen = 128,
  10897. .addtla = NULL,
  10898. .addtlb = NULL,
  10899. .addtllen = 0,
  10900. .pers = NULL,
  10901. .perslen = 0,
  10902. }, {
  10903. .entropy = (unsigned char *)
  10904. "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
  10905. "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
  10906. "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
  10907. "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
  10908. .entropylen = 48,
  10909. .expected = (unsigned char *)
  10910. "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
  10911. "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
  10912. "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
  10913. "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
  10914. "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
  10915. "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
  10916. "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
  10917. "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
  10918. "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
  10919. "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
  10920. "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
  10921. .expectedlen = 128,
  10922. .addtla = (unsigned char *)
  10923. "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
  10924. "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
  10925. "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
  10926. .addtlb = (unsigned char *)
  10927. "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
  10928. "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
  10929. "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
  10930. .addtllen = 32,
  10931. .pers = NULL,
  10932. .perslen = 0,
  10933. }, {
  10934. .entropy = (unsigned char *)
  10935. "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
  10936. "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
  10937. "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
  10938. "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
  10939. .entropylen = 48,
  10940. .expected = (unsigned char *)
  10941. "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
  10942. "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
  10943. "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
  10944. "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
  10945. "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
  10946. "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
  10947. "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
  10948. "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
  10949. "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
  10950. "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
  10951. "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
  10952. .expectedlen = 128,
  10953. .addtla = NULL,
  10954. .addtlb = NULL,
  10955. .addtllen = 0,
  10956. .pers = (unsigned char *)
  10957. "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
  10958. "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
  10959. "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
  10960. .perslen = 32,
  10961. }, {
  10962. .entropy = (unsigned char *)
  10963. "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
  10964. "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
  10965. "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
  10966. "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
  10967. .entropylen = 48,
  10968. .expected = (unsigned char *)
  10969. "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
  10970. "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
  10971. "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
  10972. "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
  10973. "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
  10974. "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
  10975. "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
  10976. "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
  10977. "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
  10978. "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
  10979. "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
  10980. .expectedlen = 128,
  10981. .addtla = (unsigned char *)
  10982. "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
  10983. "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
  10984. "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
  10985. .addtlb = (unsigned char *)
  10986. "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
  10987. "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
  10988. "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
  10989. .addtllen = 32,
  10990. .pers = (unsigned char *)
  10991. "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
  10992. "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
  10993. "\x36\x60\x3b\xca\x37\xc9\xee\x29",
  10994. .perslen = 32,
  10995. },
  10996. };
  10997. static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
  10998. {
  10999. .entropy = (unsigned char *)
  11000. "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
  11001. "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
  11002. "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
  11003. "\xac\x9b\xbb\x00",
  11004. .entropylen = 40,
  11005. .expected = (unsigned char *)
  11006. "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
  11007. "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
  11008. "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
  11009. "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
  11010. "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
  11011. "\x9a\x9d\xf1\x0d",
  11012. .expectedlen = 64,
  11013. .addtla = NULL,
  11014. .addtlb = NULL,
  11015. .addtllen = 0,
  11016. .pers = NULL,
  11017. .perslen = 0,
  11018. },
  11019. };
  11020. static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
  11021. {
  11022. .entropy = (unsigned char *)
  11023. "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
  11024. "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
  11025. "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
  11026. "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
  11027. .entropylen = 48,
  11028. .expected = (unsigned char *)
  11029. "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
  11030. "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
  11031. "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
  11032. "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
  11033. "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
  11034. "\xb4\xf0\x7e\x1d",
  11035. .expectedlen = 64,
  11036. .addtla = NULL,
  11037. .addtlb = NULL,
  11038. .addtllen = 0,
  11039. .pers = NULL,
  11040. .perslen = 0,
  11041. },
  11042. };
  11043. static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
  11044. {
  11045. .entropy = (unsigned char *)
  11046. "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
  11047. "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
  11048. .entropylen = 24,
  11049. .expected = (unsigned char *)
  11050. "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
  11051. "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
  11052. "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
  11053. "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
  11054. "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
  11055. "\xcb\x2d\xd6\xb0",
  11056. .expectedlen = 64,
  11057. .addtla = NULL,
  11058. .addtlb = NULL,
  11059. .addtllen = 0,
  11060. .pers = NULL,
  11061. .perslen = 0,
  11062. }, {
  11063. .entropy = (unsigned char *)
  11064. "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
  11065. "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
  11066. .entropylen = 24,
  11067. .expected = (unsigned char *)
  11068. "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
  11069. "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
  11070. "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
  11071. "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
  11072. "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
  11073. "\xc3\xdf\xb3\x81",
  11074. .expectedlen = 64,
  11075. .addtla = (unsigned char *)
  11076. "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
  11077. "\x91\x4d\x81\x56",
  11078. .addtlb = (unsigned char *)
  11079. "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
  11080. "\x4a\x55\xd1\xc6",
  11081. .addtllen = 16,
  11082. .pers = NULL,
  11083. .perslen = 0,
  11084. }, {
  11085. .entropy = (unsigned char *)
  11086. "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
  11087. "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
  11088. .entropylen = 24,
  11089. .expected = (unsigned char *)
  11090. "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
  11091. "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
  11092. "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
  11093. "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
  11094. "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
  11095. "\x34\x30\x0c\x3d",
  11096. .expectedlen = 64,
  11097. .addtla = NULL,
  11098. .addtlb = NULL,
  11099. .addtllen = 0,
  11100. .pers = (unsigned char *)
  11101. "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
  11102. "\x0b\xc6\x97\x54",
  11103. .perslen = 16,
  11104. }, {
  11105. .entropy = (unsigned char *)
  11106. "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
  11107. "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
  11108. .entropylen = 24,
  11109. .expected = (unsigned char *)
  11110. "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
  11111. "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
  11112. "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
  11113. "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
  11114. "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
  11115. "\x2b\x49\x1e\x5c",
  11116. .expectedlen = 64,
  11117. .addtla = (unsigned char *)
  11118. "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
  11119. "\x44\x85\xe7\xfe",
  11120. .addtlb = (unsigned char *)
  11121. "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
  11122. "\x82\x16\x62\x7f",
  11123. .addtllen = 16,
  11124. .pers = (unsigned char *)
  11125. "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
  11126. "\x8e\xcf\xe0\x02",
  11127. .perslen = 16,
  11128. },
  11129. };
  11130. #endif
  11131. /* Cast5 test vectors from RFC 2144 */
  11132. #define CAST5_ENC_TEST_VECTORS 3
  11133. #define CAST5_DEC_TEST_VECTORS 3
  11134. static struct cipher_testvec cast5_enc_tv_template[] = {
  11135. {
  11136. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  11137. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  11138. .klen = 16,
  11139. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11140. .ilen = 8,
  11141. .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  11142. .rlen = 8,
  11143. }, {
  11144. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  11145. "\x23\x45",
  11146. .klen = 10,
  11147. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11148. .ilen = 8,
  11149. .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  11150. .rlen = 8,
  11151. }, {
  11152. .key = "\x01\x23\x45\x67\x12",
  11153. .klen = 5,
  11154. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11155. .ilen = 8,
  11156. .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  11157. .rlen = 8,
  11158. },
  11159. };
  11160. static struct cipher_testvec cast5_dec_tv_template[] = {
  11161. {
  11162. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  11163. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  11164. .klen = 16,
  11165. .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  11166. .ilen = 8,
  11167. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11168. .rlen = 8,
  11169. }, {
  11170. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  11171. "\x23\x45",
  11172. .klen = 10,
  11173. .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  11174. .ilen = 8,
  11175. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11176. .rlen = 8,
  11177. }, {
  11178. .key = "\x01\x23\x45\x67\x12",
  11179. .klen = 5,
  11180. .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  11181. .ilen = 8,
  11182. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11183. .rlen = 8,
  11184. },
  11185. };
  11186. /*
  11187. * ARC4 test vectors from OpenSSL
  11188. */
  11189. #define ARC4_ENC_TEST_VECTORS 7
  11190. #define ARC4_DEC_TEST_VECTORS 7
  11191. static struct cipher_testvec arc4_enc_tv_template[] = {
  11192. {
  11193. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11194. .klen = 8,
  11195. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11196. .ilen = 8,
  11197. .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  11198. .rlen = 8,
  11199. }, {
  11200. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11201. .klen = 8,
  11202. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11203. .ilen = 8,
  11204. .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  11205. .rlen = 8,
  11206. }, {
  11207. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11208. .klen = 8,
  11209. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11210. .ilen = 8,
  11211. .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  11212. .rlen = 8,
  11213. }, {
  11214. .key = "\xef\x01\x23\x45",
  11215. .klen = 4,
  11216. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11217. "\x00\x00\x00\x00\x00\x00\x00\x00"
  11218. "\x00\x00\x00\x00",
  11219. .ilen = 20,
  11220. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  11221. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  11222. "\x36\xb6\x78\x58",
  11223. .rlen = 20,
  11224. }, {
  11225. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11226. .klen = 8,
  11227. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  11228. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  11229. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  11230. "\x12\x34\x56\x78",
  11231. .ilen = 28,
  11232. .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  11233. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  11234. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  11235. "\x40\x01\x1e\xcf",
  11236. .rlen = 28,
  11237. }, {
  11238. .key = "\xef\x01\x23\x45",
  11239. .klen = 4,
  11240. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11241. "\x00\x00",
  11242. .ilen = 10,
  11243. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  11244. "\xbd\x61",
  11245. .rlen = 10,
  11246. }, {
  11247. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  11248. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11249. .klen = 16,
  11250. .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  11251. .ilen = 8,
  11252. .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  11253. .rlen = 8,
  11254. },
  11255. };
  11256. static struct cipher_testvec arc4_dec_tv_template[] = {
  11257. {
  11258. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11259. .klen = 8,
  11260. .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  11261. .ilen = 8,
  11262. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11263. .rlen = 8,
  11264. }, {
  11265. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11266. .klen = 8,
  11267. .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  11268. .ilen = 8,
  11269. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11270. .rlen = 8,
  11271. }, {
  11272. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11273. .klen = 8,
  11274. .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  11275. .ilen = 8,
  11276. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11277. .rlen = 8,
  11278. }, {
  11279. .key = "\xef\x01\x23\x45",
  11280. .klen = 4,
  11281. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  11282. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  11283. "\x36\xb6\x78\x58",
  11284. .ilen = 20,
  11285. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11286. "\x00\x00\x00\x00\x00\x00\x00\x00"
  11287. "\x00\x00\x00\x00",
  11288. .rlen = 20,
  11289. }, {
  11290. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11291. .klen = 8,
  11292. .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  11293. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  11294. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  11295. "\x40\x01\x1e\xcf",
  11296. .ilen = 28,
  11297. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  11298. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  11299. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  11300. "\x12\x34\x56\x78",
  11301. .rlen = 28,
  11302. }, {
  11303. .key = "\xef\x01\x23\x45",
  11304. .klen = 4,
  11305. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  11306. "\xbd\x61",
  11307. .ilen = 10,
  11308. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11309. "\x00\x00",
  11310. .rlen = 10,
  11311. }, {
  11312. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  11313. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11314. .klen = 16,
  11315. .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  11316. .ilen = 8,
  11317. .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  11318. .rlen = 8,
  11319. },
  11320. };
  11321. /*
  11322. * TEA test vectors
  11323. */
  11324. #define TEA_ENC_TEST_VECTORS 4
  11325. #define TEA_DEC_TEST_VECTORS 4
  11326. static struct cipher_testvec tea_enc_tv_template[] = {
  11327. {
  11328. .key = zeroed_string,
  11329. .klen = 16,
  11330. .input = zeroed_string,
  11331. .ilen = 8,
  11332. .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  11333. .rlen = 8,
  11334. }, {
  11335. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  11336. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  11337. .klen = 16,
  11338. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  11339. .ilen = 8,
  11340. .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  11341. .rlen = 8,
  11342. }, {
  11343. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  11344. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  11345. .klen = 16,
  11346. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  11347. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  11348. .ilen = 16,
  11349. .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  11350. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  11351. .rlen = 16,
  11352. }, {
  11353. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  11354. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  11355. .klen = 16,
  11356. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  11357. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  11358. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  11359. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  11360. .ilen = 32,
  11361. .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  11362. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  11363. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  11364. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  11365. .rlen = 32,
  11366. }
  11367. };
  11368. static struct cipher_testvec tea_dec_tv_template[] = {
  11369. {
  11370. .key = zeroed_string,
  11371. .klen = 16,
  11372. .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  11373. .ilen = 8,
  11374. .result = zeroed_string,
  11375. .rlen = 8,
  11376. }, {
  11377. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  11378. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  11379. .klen = 16,
  11380. .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  11381. .ilen = 8,
  11382. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  11383. .rlen = 8,
  11384. }, {
  11385. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  11386. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  11387. .klen = 16,
  11388. .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  11389. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  11390. .ilen = 16,
  11391. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  11392. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  11393. .rlen = 16,
  11394. }, {
  11395. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  11396. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  11397. .klen = 16,
  11398. .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  11399. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  11400. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  11401. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  11402. .ilen = 32,
  11403. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  11404. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  11405. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  11406. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  11407. .rlen = 32,
  11408. }
  11409. };
  11410. /*
  11411. * XTEA test vectors
  11412. */
  11413. #define XTEA_ENC_TEST_VECTORS 4
  11414. #define XTEA_DEC_TEST_VECTORS 4
  11415. static struct cipher_testvec xtea_enc_tv_template[] = {
  11416. {
  11417. .key = zeroed_string,
  11418. .klen = 16,
  11419. .input = zeroed_string,
  11420. .ilen = 8,
  11421. .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  11422. .rlen = 8,
  11423. }, {
  11424. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  11425. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  11426. .klen = 16,
  11427. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  11428. .ilen = 8,
  11429. .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  11430. .rlen = 8,
  11431. }, {
  11432. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  11433. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  11434. .klen = 16,
  11435. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  11436. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  11437. .ilen = 16,
  11438. .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  11439. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  11440. .rlen = 16,
  11441. }, {
  11442. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  11443. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  11444. .klen = 16,
  11445. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  11446. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  11447. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  11448. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  11449. .ilen = 32,
  11450. .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  11451. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  11452. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  11453. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  11454. .rlen = 32,
  11455. }
  11456. };
  11457. static struct cipher_testvec xtea_dec_tv_template[] = {
  11458. {
  11459. .key = zeroed_string,
  11460. .klen = 16,
  11461. .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  11462. .ilen = 8,
  11463. .result = zeroed_string,
  11464. .rlen = 8,
  11465. }, {
  11466. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  11467. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  11468. .klen = 16,
  11469. .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  11470. .ilen = 8,
  11471. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  11472. .rlen = 8,
  11473. }, {
  11474. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  11475. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  11476. .klen = 16,
  11477. .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  11478. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  11479. .ilen = 16,
  11480. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  11481. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  11482. .rlen = 16,
  11483. }, {
  11484. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  11485. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  11486. .klen = 16,
  11487. .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  11488. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  11489. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  11490. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  11491. .ilen = 32,
  11492. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  11493. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  11494. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  11495. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  11496. .rlen = 32,
  11497. }
  11498. };
  11499. /*
  11500. * KHAZAD test vectors.
  11501. */
  11502. #define KHAZAD_ENC_TEST_VECTORS 5
  11503. #define KHAZAD_DEC_TEST_VECTORS 5
  11504. static struct cipher_testvec khazad_enc_tv_template[] = {
  11505. {
  11506. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  11507. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11508. .klen = 16,
  11509. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11510. .ilen = 8,
  11511. .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  11512. .rlen = 8,
  11513. }, {
  11514. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  11515. "\x38\x38\x38\x38\x38\x38\x38\x38",
  11516. .klen = 16,
  11517. .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
  11518. .ilen = 8,
  11519. .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  11520. .rlen = 8,
  11521. }, {
  11522. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  11523. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  11524. .klen = 16,
  11525. .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  11526. .ilen = 8,
  11527. .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  11528. .rlen = 8,
  11529. }, {
  11530. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  11531. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  11532. .klen = 16,
  11533. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  11534. .ilen = 8,
  11535. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  11536. .rlen = 8,
  11537. }, {
  11538. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  11539. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  11540. .klen = 16,
  11541. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  11542. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  11543. .ilen = 16,
  11544. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  11545. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  11546. .rlen = 16,
  11547. },
  11548. };
  11549. static struct cipher_testvec khazad_dec_tv_template[] = {
  11550. {
  11551. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  11552. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11553. .klen = 16,
  11554. .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  11555. .ilen = 8,
  11556. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11557. .rlen = 8,
  11558. }, {
  11559. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  11560. "\x38\x38\x38\x38\x38\x38\x38\x38",
  11561. .klen = 16,
  11562. .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  11563. .ilen = 8,
  11564. .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
  11565. .rlen = 8,
  11566. }, {
  11567. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  11568. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  11569. .klen = 16,
  11570. .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  11571. .ilen = 8,
  11572. .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  11573. .rlen = 8,
  11574. }, {
  11575. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  11576. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  11577. .klen = 16,
  11578. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  11579. .ilen = 8,
  11580. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  11581. .rlen = 8,
  11582. }, {
  11583. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  11584. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  11585. .klen = 16,
  11586. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  11587. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  11588. .ilen = 16,
  11589. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  11590. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  11591. .rlen = 16,
  11592. },
  11593. };
  11594. /*
  11595. * Anubis test vectors.
  11596. */
  11597. #define ANUBIS_ENC_TEST_VECTORS 5
  11598. #define ANUBIS_DEC_TEST_VECTORS 5
  11599. #define ANUBIS_CBC_ENC_TEST_VECTORS 2
  11600. #define ANUBIS_CBC_DEC_TEST_VECTORS 2
  11601. static struct cipher_testvec anubis_enc_tv_template[] = {
  11602. {
  11603. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11604. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  11605. .klen = 16,
  11606. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11607. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  11608. .ilen = 16,
  11609. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  11610. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  11611. .rlen = 16,
  11612. }, {
  11613. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  11614. "\x03\x03\x03\x03\x03\x03\x03\x03"
  11615. "\x03\x03\x03\x03",
  11616. .klen = 20,
  11617. .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
  11618. "\x03\x03\x03\x03\x03\x03\x03\x03",
  11619. .ilen = 16,
  11620. .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  11621. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  11622. .rlen = 16,
  11623. }, {
  11624. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  11625. "\x24\x24\x24\x24\x24\x24\x24\x24"
  11626. "\x24\x24\x24\x24\x24\x24\x24\x24"
  11627. "\x24\x24\x24\x24",
  11628. .klen = 28,
  11629. .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
  11630. "\x24\x24\x24\x24\x24\x24\x24\x24",
  11631. .ilen = 16,
  11632. .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  11633. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  11634. .rlen = 16,
  11635. }, {
  11636. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  11637. "\x25\x25\x25\x25\x25\x25\x25\x25"
  11638. "\x25\x25\x25\x25\x25\x25\x25\x25"
  11639. "\x25\x25\x25\x25\x25\x25\x25\x25",
  11640. .klen = 32,
  11641. .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
  11642. "\x25\x25\x25\x25\x25\x25\x25\x25",
  11643. .ilen = 16,
  11644. .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  11645. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  11646. .rlen = 16,
  11647. }, {
  11648. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  11649. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11650. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11651. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11652. "\x35\x35\x35\x35\x35\x35\x35\x35",
  11653. .klen = 40,
  11654. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  11655. "\x35\x35\x35\x35\x35\x35\x35\x35",
  11656. .ilen = 16,
  11657. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  11658. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  11659. .rlen = 16,
  11660. },
  11661. };
  11662. static struct cipher_testvec anubis_dec_tv_template[] = {
  11663. {
  11664. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11665. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  11666. .klen = 16,
  11667. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  11668. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  11669. .ilen = 16,
  11670. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11671. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  11672. .rlen = 16,
  11673. }, {
  11674. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  11675. "\x03\x03\x03\x03\x03\x03\x03\x03"
  11676. "\x03\x03\x03\x03",
  11677. .klen = 20,
  11678. .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  11679. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  11680. .ilen = 16,
  11681. .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
  11682. "\x03\x03\x03\x03\x03\x03\x03\x03",
  11683. .rlen = 16,
  11684. }, {
  11685. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  11686. "\x24\x24\x24\x24\x24\x24\x24\x24"
  11687. "\x24\x24\x24\x24\x24\x24\x24\x24"
  11688. "\x24\x24\x24\x24",
  11689. .klen = 28,
  11690. .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  11691. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  11692. .ilen = 16,
  11693. .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
  11694. "\x24\x24\x24\x24\x24\x24\x24\x24",
  11695. .rlen = 16,
  11696. }, {
  11697. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  11698. "\x25\x25\x25\x25\x25\x25\x25\x25"
  11699. "\x25\x25\x25\x25\x25\x25\x25\x25"
  11700. "\x25\x25\x25\x25\x25\x25\x25\x25",
  11701. .klen = 32,
  11702. .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  11703. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  11704. .ilen = 16,
  11705. .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
  11706. "\x25\x25\x25\x25\x25\x25\x25\x25",
  11707. .rlen = 16,
  11708. }, {
  11709. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  11710. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11711. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11712. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11713. "\x35\x35\x35\x35\x35\x35\x35\x35",
  11714. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  11715. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  11716. .klen = 40,
  11717. .ilen = 16,
  11718. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  11719. "\x35\x35\x35\x35\x35\x35\x35\x35",
  11720. .rlen = 16,
  11721. },
  11722. };
  11723. static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
  11724. {
  11725. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11726. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  11727. .klen = 16,
  11728. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11729. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11730. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11731. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  11732. .ilen = 32,
  11733. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  11734. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  11735. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  11736. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  11737. .rlen = 32,
  11738. }, {
  11739. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  11740. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11741. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11742. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11743. "\x35\x35\x35\x35\x35\x35\x35\x35",
  11744. .klen = 40,
  11745. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  11746. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11747. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11748. "\x35\x35\x35\x35\x35\x35\x35\x35",
  11749. .ilen = 32,
  11750. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  11751. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  11752. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  11753. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  11754. .rlen = 32,
  11755. },
  11756. };
  11757. static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
  11758. {
  11759. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11760. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  11761. .klen = 16,
  11762. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  11763. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  11764. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  11765. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  11766. .ilen = 32,
  11767. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11768. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11769. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  11770. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  11771. .rlen = 32,
  11772. }, {
  11773. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  11774. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11775. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11776. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11777. "\x35\x35\x35\x35\x35\x35\x35\x35",
  11778. .klen = 40,
  11779. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  11780. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  11781. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  11782. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  11783. .ilen = 32,
  11784. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  11785. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11786. "\x35\x35\x35\x35\x35\x35\x35\x35"
  11787. "\x35\x35\x35\x35\x35\x35\x35\x35",
  11788. .rlen = 32,
  11789. },
  11790. };
  11791. /*
  11792. * XETA test vectors
  11793. */
  11794. #define XETA_ENC_TEST_VECTORS 4
  11795. #define XETA_DEC_TEST_VECTORS 4
  11796. static struct cipher_testvec xeta_enc_tv_template[] = {
  11797. {
  11798. .key = zeroed_string,
  11799. .klen = 16,
  11800. .input = zeroed_string,
  11801. .ilen = 8,
  11802. .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  11803. .rlen = 8,
  11804. }, {
  11805. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  11806. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  11807. .klen = 16,
  11808. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  11809. .ilen = 8,
  11810. .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  11811. .rlen = 8,
  11812. }, {
  11813. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  11814. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  11815. .klen = 16,
  11816. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  11817. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  11818. .ilen = 16,
  11819. .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  11820. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  11821. .rlen = 16,
  11822. }, {
  11823. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  11824. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  11825. .klen = 16,
  11826. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  11827. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  11828. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  11829. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  11830. .ilen = 32,
  11831. .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  11832. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  11833. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  11834. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  11835. .rlen = 32,
  11836. }
  11837. };
  11838. static struct cipher_testvec xeta_dec_tv_template[] = {
  11839. {
  11840. .key = zeroed_string,
  11841. .klen = 16,
  11842. .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  11843. .ilen = 8,
  11844. .result = zeroed_string,
  11845. .rlen = 8,
  11846. }, {
  11847. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  11848. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  11849. .klen = 16,
  11850. .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  11851. .ilen = 8,
  11852. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  11853. .rlen = 8,
  11854. }, {
  11855. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  11856. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  11857. .klen = 16,
  11858. .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  11859. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  11860. .ilen = 16,
  11861. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  11862. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  11863. .rlen = 16,
  11864. }, {
  11865. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  11866. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  11867. .klen = 16,
  11868. .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  11869. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  11870. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  11871. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  11872. .ilen = 32,
  11873. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  11874. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  11875. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  11876. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  11877. .rlen = 32,
  11878. }
  11879. };
  11880. /*
  11881. * FCrypt test vectors
  11882. */
  11883. #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
  11884. #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
  11885. static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
  11886. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  11887. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11888. .klen = 8,
  11889. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11890. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11891. .ilen = 8,
  11892. .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  11893. .rlen = 8,
  11894. }, {
  11895. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  11896. .klen = 8,
  11897. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11898. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  11899. .ilen = 8,
  11900. .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  11901. .rlen = 8,
  11902. }, { /* From Arla */
  11903. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11904. .klen = 8,
  11905. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11906. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  11907. .ilen = 48,
  11908. .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  11909. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  11910. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  11911. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  11912. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  11913. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  11914. .rlen = 48,
  11915. }, {
  11916. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11917. .klen = 8,
  11918. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11919. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  11920. .ilen = 48,
  11921. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  11922. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  11923. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  11924. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  11925. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  11926. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  11927. .rlen = 48,
  11928. }, { /* split-page version */
  11929. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11930. .klen = 8,
  11931. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11932. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  11933. .ilen = 48,
  11934. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  11935. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  11936. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  11937. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  11938. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  11939. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  11940. .rlen = 48,
  11941. .np = 2,
  11942. .tap = { 20, 28 },
  11943. }
  11944. };
  11945. static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
  11946. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  11947. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11948. .klen = 8,
  11949. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11950. .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  11951. .ilen = 8,
  11952. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11953. .rlen = 8,
  11954. }, {
  11955. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  11956. .klen = 8,
  11957. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11958. .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  11959. .ilen = 8,
  11960. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  11961. .rlen = 8,
  11962. }, { /* From Arla */
  11963. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11964. .klen = 8,
  11965. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11966. .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  11967. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  11968. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  11969. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  11970. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  11971. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  11972. .ilen = 48,
  11973. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  11974. .rlen = 48,
  11975. }, {
  11976. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11977. .klen = 8,
  11978. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11979. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  11980. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  11981. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  11982. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  11983. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  11984. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  11985. .ilen = 48,
  11986. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  11987. .rlen = 48,
  11988. }, { /* split-page version */
  11989. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11990. .klen = 8,
  11991. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11992. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  11993. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  11994. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  11995. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  11996. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  11997. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  11998. .ilen = 48,
  11999. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  12000. .rlen = 48,
  12001. .np = 2,
  12002. .tap = { 20, 28 },
  12003. }
  12004. };
  12005. /*
  12006. * CAMELLIA test vectors.
  12007. */
  12008. #define CAMELLIA_ENC_TEST_VECTORS 4
  12009. #define CAMELLIA_DEC_TEST_VECTORS 4
  12010. #define CAMELLIA_CBC_ENC_TEST_VECTORS 3
  12011. #define CAMELLIA_CBC_DEC_TEST_VECTORS 3
  12012. #define CAMELLIA_CTR_ENC_TEST_VECTORS 2
  12013. #define CAMELLIA_CTR_DEC_TEST_VECTORS 2
  12014. #define CAMELLIA_LRW_ENC_TEST_VECTORS 8
  12015. #define CAMELLIA_LRW_DEC_TEST_VECTORS 8
  12016. #define CAMELLIA_XTS_ENC_TEST_VECTORS 5
  12017. #define CAMELLIA_XTS_DEC_TEST_VECTORS 5
  12018. static struct cipher_testvec camellia_enc_tv_template[] = {
  12019. {
  12020. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12021. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  12022. .klen = 16,
  12023. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12024. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  12025. .ilen = 16,
  12026. .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
  12027. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  12028. .rlen = 16,
  12029. }, {
  12030. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12031. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  12032. "\x00\x11\x22\x33\x44\x55\x66\x77",
  12033. .klen = 24,
  12034. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12035. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  12036. .ilen = 16,
  12037. .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  12038. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  12039. .rlen = 16,
  12040. }, {
  12041. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12042. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  12043. "\x00\x11\x22\x33\x44\x55\x66\x77"
  12044. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  12045. .klen = 32,
  12046. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12047. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  12048. .ilen = 16,
  12049. .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  12050. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  12051. .rlen = 16,
  12052. },
  12053. { /* Generated with Crypto++ */
  12054. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  12055. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  12056. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  12057. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  12058. .klen = 32,
  12059. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12060. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12061. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12062. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12063. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12064. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  12065. .ilen = 48,
  12066. .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
  12067. "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
  12068. "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
  12069. "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
  12070. "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
  12071. "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
  12072. .rlen = 48,
  12073. },
  12074. };
  12075. static struct cipher_testvec camellia_dec_tv_template[] = {
  12076. {
  12077. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12078. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  12079. .klen = 16,
  12080. .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
  12081. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  12082. .ilen = 16,
  12083. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12084. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  12085. .rlen = 16,
  12086. }, {
  12087. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12088. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  12089. "\x00\x11\x22\x33\x44\x55\x66\x77",
  12090. .klen = 24,
  12091. .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  12092. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  12093. .ilen = 16,
  12094. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12095. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  12096. .rlen = 16,
  12097. }, {
  12098. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12099. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  12100. "\x00\x11\x22\x33\x44\x55\x66\x77"
  12101. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  12102. .klen = 32,
  12103. .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  12104. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  12105. .ilen = 16,
  12106. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  12107. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  12108. .rlen = 16,
  12109. },
  12110. { /* Generated with Crypto++ */
  12111. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  12112. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  12113. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  12114. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  12115. .klen = 32,
  12116. .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
  12117. "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
  12118. "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
  12119. "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
  12120. "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
  12121. "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
  12122. .ilen = 48,
  12123. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12124. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12125. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12126. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12127. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12128. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  12129. .rlen = 48,
  12130. },
  12131. };
  12132. static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
  12133. {
  12134. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  12135. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  12136. .klen = 16,
  12137. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  12138. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  12139. .input = "Single block msg",
  12140. .ilen = 16,
  12141. .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  12142. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  12143. .rlen = 16,
  12144. }, {
  12145. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  12146. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  12147. .klen = 16,
  12148. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  12149. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  12150. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12151. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12152. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12153. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  12154. .ilen = 32,
  12155. .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  12156. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  12157. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  12158. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  12159. .rlen = 32,
  12160. },
  12161. { /* Generated with Crypto++ */
  12162. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12163. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  12164. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  12165. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  12166. .klen = 32,
  12167. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  12168. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  12169. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12170. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12171. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12172. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12173. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12174. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  12175. .ilen = 48,
  12176. .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
  12177. "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
  12178. "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
  12179. "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
  12180. "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
  12181. "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
  12182. .rlen = 48,
  12183. },
  12184. };
  12185. static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
  12186. {
  12187. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  12188. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  12189. .klen = 16,
  12190. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  12191. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  12192. .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  12193. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  12194. .ilen = 16,
  12195. .result = "Single block msg",
  12196. .rlen = 16,
  12197. }, {
  12198. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  12199. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  12200. .klen = 16,
  12201. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  12202. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  12203. .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  12204. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  12205. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  12206. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  12207. .ilen = 32,
  12208. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12209. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12210. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12211. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  12212. .rlen = 32,
  12213. },
  12214. { /* Generated with Crypto++ */
  12215. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12216. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  12217. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  12218. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  12219. .klen = 32,
  12220. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  12221. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  12222. .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
  12223. "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
  12224. "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
  12225. "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
  12226. "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
  12227. "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
  12228. .ilen = 48,
  12229. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12230. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12231. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12232. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12233. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12234. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  12235. .rlen = 48,
  12236. },
  12237. };
  12238. static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
  12239. { /* Generated with Crypto++ */
  12240. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12241. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  12242. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  12243. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  12244. .klen = 32,
  12245. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  12246. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  12247. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12248. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12249. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12250. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12251. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12252. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  12253. .ilen = 48,
  12254. .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  12255. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  12256. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  12257. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  12258. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  12259. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
  12260. .rlen = 48,
  12261. },
  12262. { /* Generated with Crypto++ */
  12263. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12264. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  12265. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  12266. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  12267. .klen = 32,
  12268. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  12269. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  12270. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12271. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12272. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12273. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12274. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12275. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  12276. "\xDF\x76\x0D",
  12277. .ilen = 51,
  12278. .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  12279. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  12280. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  12281. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  12282. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  12283. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
  12284. "\x1E\x43\xEF",
  12285. .rlen = 51,
  12286. },
  12287. };
  12288. static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
  12289. { /* Generated with Crypto++ */
  12290. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12291. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  12292. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  12293. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  12294. .klen = 32,
  12295. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  12296. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  12297. .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  12298. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  12299. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  12300. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  12301. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  12302. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
  12303. .ilen = 48,
  12304. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12305. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12306. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12307. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12308. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12309. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  12310. .rlen = 48,
  12311. },
  12312. { /* Generated with Crypto++ */
  12313. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12314. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  12315. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  12316. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  12317. .klen = 32,
  12318. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  12319. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  12320. .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  12321. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  12322. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  12323. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  12324. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  12325. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
  12326. "\x1E\x43\xEF",
  12327. .ilen = 51,
  12328. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12329. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12330. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12331. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12332. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12333. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  12334. "\xDF\x76\x0D",
  12335. .rlen = 51,
  12336. },
  12337. };
  12338. static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
  12339. /* Generated from AES-LRW test vectors */
  12340. {
  12341. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  12342. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  12343. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  12344. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  12345. .klen = 32,
  12346. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12347. "\x00\x00\x00\x00\x00\x00\x00\x01",
  12348. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12349. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12350. .ilen = 16,
  12351. .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
  12352. "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
  12353. .rlen = 16,
  12354. }, {
  12355. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  12356. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  12357. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  12358. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  12359. .klen = 32,
  12360. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12361. "\x00\x00\x00\x00\x00\x00\x00\x02",
  12362. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12363. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12364. .ilen = 16,
  12365. .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
  12366. "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
  12367. .rlen = 16,
  12368. }, {
  12369. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  12370. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  12371. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  12372. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  12373. .klen = 32,
  12374. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12375. "\x00\x00\x00\x02\x00\x00\x00\x00",
  12376. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12377. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12378. .ilen = 16,
  12379. .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
  12380. "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
  12381. .rlen = 16,
  12382. }, {
  12383. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  12384. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  12385. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  12386. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  12387. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  12388. .klen = 40,
  12389. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12390. "\x00\x00\x00\x00\x00\x00\x00\x01",
  12391. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12392. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12393. .ilen = 16,
  12394. .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
  12395. "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
  12396. .rlen = 16,
  12397. }, {
  12398. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  12399. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  12400. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  12401. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  12402. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  12403. .klen = 40,
  12404. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12405. "\x00\x00\x00\x02\x00\x00\x00\x00",
  12406. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12407. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12408. .ilen = 16,
  12409. .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
  12410. "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
  12411. .rlen = 16,
  12412. }, {
  12413. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  12414. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  12415. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  12416. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  12417. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  12418. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  12419. .klen = 48,
  12420. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12421. "\x00\x00\x00\x00\x00\x00\x00\x01",
  12422. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12423. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12424. .ilen = 16,
  12425. .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
  12426. "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
  12427. .rlen = 16,
  12428. }, {
  12429. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  12430. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  12431. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  12432. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  12433. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  12434. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  12435. .klen = 48,
  12436. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12437. "\x00\x00\x00\x02\x00\x00\x00\x00",
  12438. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12439. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12440. .ilen = 16,
  12441. .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
  12442. "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
  12443. .rlen = 16,
  12444. }, {
  12445. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  12446. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  12447. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  12448. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  12449. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  12450. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  12451. .klen = 48,
  12452. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12453. "\x00\x00\x00\x00\x00\x00\x00\x01",
  12454. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  12455. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  12456. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  12457. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  12458. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  12459. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  12460. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  12461. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  12462. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  12463. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  12464. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  12465. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  12466. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  12467. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  12468. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  12469. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  12470. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  12471. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  12472. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  12473. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  12474. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  12475. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  12476. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  12477. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  12478. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  12479. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  12480. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  12481. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  12482. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  12483. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  12484. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  12485. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  12486. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  12487. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  12488. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  12489. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  12490. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  12491. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  12492. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  12493. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  12494. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  12495. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  12496. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  12497. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  12498. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  12499. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  12500. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  12501. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  12502. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  12503. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  12504. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  12505. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  12506. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  12507. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  12508. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  12509. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  12510. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  12511. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  12512. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  12513. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  12514. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  12515. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  12516. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  12517. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  12518. .ilen = 512,
  12519. .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
  12520. "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
  12521. "\x67\x76\xac\x2c\xd2\x63\x18\x93"
  12522. "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
  12523. "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
  12524. "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
  12525. "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
  12526. "\x62\xdd\x78\x81\xea\x1d\xef\x04"
  12527. "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
  12528. "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
  12529. "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
  12530. "\x40\x41\x69\xaa\x71\xc0\x37\xec"
  12531. "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
  12532. "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
  12533. "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
  12534. "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
  12535. "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
  12536. "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
  12537. "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
  12538. "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
  12539. "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
  12540. "\x42\x08\x40\x82\x06\x1c\x2d\x55"
  12541. "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
  12542. "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
  12543. "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
  12544. "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
  12545. "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
  12546. "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
  12547. "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
  12548. "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
  12549. "\xed\x14\xa9\x57\x19\x63\x40\x04"
  12550. "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
  12551. "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
  12552. "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
  12553. "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
  12554. "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
  12555. "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
  12556. "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
  12557. "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
  12558. "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
  12559. "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
  12560. "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
  12561. "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
  12562. "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
  12563. "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
  12564. "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
  12565. "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
  12566. "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
  12567. "\x35\xa5\x83\x04\x84\x01\x99\x56"
  12568. "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
  12569. "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
  12570. "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
  12571. "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
  12572. "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
  12573. "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
  12574. "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
  12575. "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
  12576. "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
  12577. "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
  12578. "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
  12579. "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
  12580. "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
  12581. "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
  12582. "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
  12583. .rlen = 512,
  12584. },
  12585. };
  12586. static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
  12587. /* Generated from AES-LRW test vectors */
  12588. /* same as enc vectors with input and result reversed */
  12589. {
  12590. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  12591. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  12592. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  12593. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  12594. .klen = 32,
  12595. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12596. "\x00\x00\x00\x00\x00\x00\x00\x01",
  12597. .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
  12598. "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
  12599. .ilen = 16,
  12600. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12601. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12602. .rlen = 16,
  12603. }, {
  12604. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  12605. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  12606. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  12607. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  12608. .klen = 32,
  12609. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12610. "\x00\x00\x00\x00\x00\x00\x00\x02",
  12611. .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
  12612. "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
  12613. .ilen = 16,
  12614. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12615. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12616. .rlen = 16,
  12617. }, {
  12618. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  12619. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  12620. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  12621. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  12622. .klen = 32,
  12623. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12624. "\x00\x00\x00\x02\x00\x00\x00\x00",
  12625. .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
  12626. "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
  12627. .ilen = 16,
  12628. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12629. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12630. .rlen = 16,
  12631. }, {
  12632. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  12633. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  12634. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  12635. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  12636. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  12637. .klen = 40,
  12638. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12639. "\x00\x00\x00\x00\x00\x00\x00\x01",
  12640. .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
  12641. "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
  12642. .ilen = 16,
  12643. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12644. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12645. .rlen = 16,
  12646. }, {
  12647. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  12648. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  12649. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  12650. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  12651. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  12652. .klen = 40,
  12653. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12654. "\x00\x00\x00\x02\x00\x00\x00\x00",
  12655. .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
  12656. "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
  12657. .ilen = 16,
  12658. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12659. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12660. .rlen = 16,
  12661. }, {
  12662. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  12663. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  12664. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  12665. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  12666. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  12667. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  12668. .klen = 48,
  12669. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12670. "\x00\x00\x00\x00\x00\x00\x00\x01",
  12671. .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
  12672. "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
  12673. .ilen = 16,
  12674. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12675. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12676. .rlen = 16,
  12677. }, {
  12678. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  12679. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  12680. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  12681. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  12682. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  12683. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  12684. .klen = 48,
  12685. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12686. "\x00\x00\x00\x02\x00\x00\x00\x00",
  12687. .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
  12688. "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
  12689. .ilen = 16,
  12690. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  12691. "\x38\x39\x41\x42\x43\x44\x45\x46",
  12692. .rlen = 16,
  12693. }, {
  12694. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  12695. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  12696. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  12697. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  12698. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  12699. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  12700. .klen = 48,
  12701. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12702. "\x00\x00\x00\x00\x00\x00\x00\x01",
  12703. .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
  12704. "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
  12705. "\x67\x76\xac\x2c\xd2\x63\x18\x93"
  12706. "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
  12707. "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
  12708. "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
  12709. "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
  12710. "\x62\xdd\x78\x81\xea\x1d\xef\x04"
  12711. "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
  12712. "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
  12713. "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
  12714. "\x40\x41\x69\xaa\x71\xc0\x37\xec"
  12715. "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
  12716. "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
  12717. "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
  12718. "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
  12719. "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
  12720. "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
  12721. "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
  12722. "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
  12723. "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
  12724. "\x42\x08\x40\x82\x06\x1c\x2d\x55"
  12725. "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
  12726. "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
  12727. "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
  12728. "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
  12729. "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
  12730. "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
  12731. "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
  12732. "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
  12733. "\xed\x14\xa9\x57\x19\x63\x40\x04"
  12734. "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
  12735. "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
  12736. "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
  12737. "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
  12738. "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
  12739. "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
  12740. "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
  12741. "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
  12742. "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
  12743. "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
  12744. "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
  12745. "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
  12746. "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
  12747. "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
  12748. "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
  12749. "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
  12750. "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
  12751. "\x35\xa5\x83\x04\x84\x01\x99\x56"
  12752. "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
  12753. "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
  12754. "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
  12755. "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
  12756. "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
  12757. "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
  12758. "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
  12759. "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
  12760. "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
  12761. "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
  12762. "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
  12763. "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
  12764. "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
  12765. "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
  12766. "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
  12767. .ilen = 512,
  12768. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  12769. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  12770. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  12771. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  12772. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  12773. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  12774. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  12775. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  12776. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  12777. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  12778. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  12779. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  12780. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  12781. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  12782. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  12783. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  12784. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  12785. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  12786. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  12787. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  12788. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  12789. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  12790. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  12791. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  12792. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  12793. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  12794. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  12795. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  12796. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  12797. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  12798. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  12799. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  12800. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  12801. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  12802. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  12803. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  12804. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  12805. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  12806. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  12807. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  12808. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  12809. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  12810. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  12811. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  12812. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  12813. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  12814. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  12815. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  12816. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  12817. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  12818. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  12819. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  12820. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  12821. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  12822. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  12823. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  12824. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  12825. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  12826. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  12827. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  12828. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  12829. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  12830. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  12831. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  12832. .rlen = 512,
  12833. },
  12834. };
  12835. static struct cipher_testvec camellia_xts_enc_tv_template[] = {
  12836. /* Generated from AES-XTS test vectors */
  12837. {
  12838. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12839. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12840. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12841. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12842. .klen = 32,
  12843. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12844. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12845. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12846. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12847. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12848. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12849. .ilen = 32,
  12850. .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
  12851. "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
  12852. "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
  12853. "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
  12854. .rlen = 32,
  12855. }, {
  12856. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  12857. "\x11\x11\x11\x11\x11\x11\x11\x11"
  12858. "\x22\x22\x22\x22\x22\x22\x22\x22"
  12859. "\x22\x22\x22\x22\x22\x22\x22\x22",
  12860. .klen = 32,
  12861. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  12862. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12863. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  12864. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12865. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12866. "\x44\x44\x44\x44\x44\x44\x44\x44",
  12867. .ilen = 32,
  12868. .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
  12869. "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
  12870. "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
  12871. "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
  12872. .rlen = 32,
  12873. }, {
  12874. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  12875. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  12876. "\x22\x22\x22\x22\x22\x22\x22\x22"
  12877. "\x22\x22\x22\x22\x22\x22\x22\x22",
  12878. .klen = 32,
  12879. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  12880. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12881. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  12882. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12883. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12884. "\x44\x44\x44\x44\x44\x44\x44\x44",
  12885. .ilen = 32,
  12886. .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
  12887. "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
  12888. "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
  12889. "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
  12890. .rlen = 32,
  12891. }, {
  12892. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  12893. "\x23\x53\x60\x28\x74\x71\x35\x26"
  12894. "\x31\x41\x59\x26\x53\x58\x97\x93"
  12895. "\x23\x84\x62\x64\x33\x83\x27\x95",
  12896. .klen = 32,
  12897. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12898. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12899. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12900. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12901. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12902. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12903. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12904. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12905. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12906. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12907. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12908. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12909. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12910. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12911. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12912. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12913. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12914. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12915. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12916. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12917. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12918. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12919. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12920. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12921. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12922. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12923. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12924. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12925. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12926. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12927. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12928. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12929. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12930. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  12931. "\x00\x01\x02\x03\x04\x05\x06\x07"
  12932. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12933. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12934. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12935. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12936. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12937. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12938. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12939. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12940. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12941. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12942. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12943. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12944. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12945. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12946. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12947. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12948. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12949. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12950. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12951. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12952. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12953. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12954. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12955. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12956. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12957. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12958. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12959. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12960. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12961. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12962. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  12963. .ilen = 512,
  12964. .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
  12965. "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
  12966. "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
  12967. "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
  12968. "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
  12969. "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
  12970. "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
  12971. "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
  12972. "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
  12973. "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
  12974. "\x08\xda\x76\x00\x65\xcf\x7b\x31"
  12975. "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
  12976. "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
  12977. "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
  12978. "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
  12979. "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
  12980. "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
  12981. "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
  12982. "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
  12983. "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
  12984. "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
  12985. "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
  12986. "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
  12987. "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
  12988. "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
  12989. "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
  12990. "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
  12991. "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
  12992. "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
  12993. "\x16\x31\xb2\x47\x91\x67\xaa\x28"
  12994. "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
  12995. "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
  12996. "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
  12997. "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
  12998. "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
  12999. "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
  13000. "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
  13001. "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
  13002. "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
  13003. "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
  13004. "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
  13005. "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
  13006. "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
  13007. "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
  13008. "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
  13009. "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
  13010. "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
  13011. "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
  13012. "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
  13013. "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
  13014. "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
  13015. "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
  13016. "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
  13017. "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
  13018. "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
  13019. "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
  13020. "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
  13021. "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
  13022. "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
  13023. "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
  13024. "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
  13025. "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
  13026. "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
  13027. "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
  13028. .rlen = 512,
  13029. }, {
  13030. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  13031. "\x23\x53\x60\x28\x74\x71\x35\x26"
  13032. "\x62\x49\x77\x57\x24\x70\x93\x69"
  13033. "\x99\x59\x57\x49\x66\x96\x76\x27"
  13034. "\x31\x41\x59\x26\x53\x58\x97\x93"
  13035. "\x23\x84\x62\x64\x33\x83\x27\x95"
  13036. "\x02\x88\x41\x97\x16\x93\x99\x37"
  13037. "\x51\x05\x82\x09\x74\x94\x45\x92",
  13038. .klen = 64,
  13039. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  13040. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13041. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13042. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  13043. "\x10\x11\x12\x13\x14\x15\x16\x17"
  13044. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  13045. "\x20\x21\x22\x23\x24\x25\x26\x27"
  13046. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  13047. "\x30\x31\x32\x33\x34\x35\x36\x37"
  13048. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  13049. "\x40\x41\x42\x43\x44\x45\x46\x47"
  13050. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  13051. "\x50\x51\x52\x53\x54\x55\x56\x57"
  13052. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  13053. "\x60\x61\x62\x63\x64\x65\x66\x67"
  13054. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  13055. "\x70\x71\x72\x73\x74\x75\x76\x77"
  13056. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  13057. "\x80\x81\x82\x83\x84\x85\x86\x87"
  13058. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  13059. "\x90\x91\x92\x93\x94\x95\x96\x97"
  13060. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  13061. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  13062. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  13063. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  13064. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  13065. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  13066. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  13067. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  13068. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  13069. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  13070. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  13071. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  13072. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  13073. "\x00\x01\x02\x03\x04\x05\x06\x07"
  13074. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  13075. "\x10\x11\x12\x13\x14\x15\x16\x17"
  13076. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  13077. "\x20\x21\x22\x23\x24\x25\x26\x27"
  13078. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  13079. "\x30\x31\x32\x33\x34\x35\x36\x37"
  13080. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  13081. "\x40\x41\x42\x43\x44\x45\x46\x47"
  13082. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  13083. "\x50\x51\x52\x53\x54\x55\x56\x57"
  13084. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  13085. "\x60\x61\x62\x63\x64\x65\x66\x67"
  13086. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  13087. "\x70\x71\x72\x73\x74\x75\x76\x77"
  13088. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  13089. "\x80\x81\x82\x83\x84\x85\x86\x87"
  13090. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  13091. "\x90\x91\x92\x93\x94\x95\x96\x97"
  13092. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  13093. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  13094. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  13095. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  13096. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  13097. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  13098. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  13099. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  13100. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  13101. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  13102. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  13103. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  13104. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  13105. .ilen = 512,
  13106. .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
  13107. "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
  13108. "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
  13109. "\xf1\x74\xac\x96\x05\x7b\x32\xca"
  13110. "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
  13111. "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
  13112. "\x97\x07\x82\xf0\x07\x12\x38\x0a"
  13113. "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
  13114. "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
  13115. "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
  13116. "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
  13117. "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
  13118. "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
  13119. "\x41\x82\x0c\x45\x39\x35\xa8\x75"
  13120. "\x03\x29\x01\x84\x8c\xab\x48\xbe"
  13121. "\x11\x56\x22\x67\xb7\x67\x1a\x09"
  13122. "\xa1\x72\x25\x41\x3c\x39\x65\x80"
  13123. "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
  13124. "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
  13125. "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
  13126. "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
  13127. "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
  13128. "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
  13129. "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
  13130. "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
  13131. "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
  13132. "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
  13133. "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
  13134. "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
  13135. "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
  13136. "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
  13137. "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
  13138. "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
  13139. "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
  13140. "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
  13141. "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
  13142. "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
  13143. "\xef\x38\x52\x18\x0e\x29\x7e\xef"
  13144. "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
  13145. "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
  13146. "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
  13147. "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
  13148. "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
  13149. "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
  13150. "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
  13151. "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
  13152. "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
  13153. "\x21\x17\xf8\x59\x15\x24\x64\x22"
  13154. "\x57\x48\x80\xd5\x3d\x92\x30\x07"
  13155. "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
  13156. "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
  13157. "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
  13158. "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
  13159. "\x6b\x84\xf3\x00\xba\x52\x05\x02"
  13160. "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
  13161. "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
  13162. "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
  13163. "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
  13164. "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
  13165. "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
  13166. "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
  13167. "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
  13168. "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
  13169. "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
  13170. .rlen = 512,
  13171. },
  13172. };
  13173. static struct cipher_testvec camellia_xts_dec_tv_template[] = {
  13174. /* Generated from AES-XTS test vectors */
  13175. /* same as enc vectors with input and result reversed */
  13176. {
  13177. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13178. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13179. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13180. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13181. .klen = 32,
  13182. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13183. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13184. .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
  13185. "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
  13186. "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
  13187. "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
  13188. .ilen = 32,
  13189. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13190. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13191. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13192. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13193. .rlen = 32,
  13194. }, {
  13195. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  13196. "\x11\x11\x11\x11\x11\x11\x11\x11"
  13197. "\x22\x22\x22\x22\x22\x22\x22\x22"
  13198. "\x22\x22\x22\x22\x22\x22\x22\x22",
  13199. .klen = 32,
  13200. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  13201. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13202. .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
  13203. "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
  13204. "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
  13205. "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
  13206. .ilen = 32,
  13207. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  13208. "\x44\x44\x44\x44\x44\x44\x44\x44"
  13209. "\x44\x44\x44\x44\x44\x44\x44\x44"
  13210. "\x44\x44\x44\x44\x44\x44\x44\x44",
  13211. .rlen = 32,
  13212. }, {
  13213. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  13214. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  13215. "\x22\x22\x22\x22\x22\x22\x22\x22"
  13216. "\x22\x22\x22\x22\x22\x22\x22\x22",
  13217. .klen = 32,
  13218. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  13219. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13220. .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
  13221. "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
  13222. "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
  13223. "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
  13224. .ilen = 32,
  13225. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  13226. "\x44\x44\x44\x44\x44\x44\x44\x44"
  13227. "\x44\x44\x44\x44\x44\x44\x44\x44"
  13228. "\x44\x44\x44\x44\x44\x44\x44\x44",
  13229. .rlen = 32,
  13230. }, {
  13231. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  13232. "\x23\x53\x60\x28\x74\x71\x35\x26"
  13233. "\x31\x41\x59\x26\x53\x58\x97\x93"
  13234. "\x23\x84\x62\x64\x33\x83\x27\x95",
  13235. .klen = 32,
  13236. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13237. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13238. .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
  13239. "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
  13240. "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
  13241. "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
  13242. "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
  13243. "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
  13244. "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
  13245. "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
  13246. "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
  13247. "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
  13248. "\x08\xda\x76\x00\x65\xcf\x7b\x31"
  13249. "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
  13250. "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
  13251. "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
  13252. "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
  13253. "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
  13254. "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
  13255. "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
  13256. "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
  13257. "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
  13258. "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
  13259. "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
  13260. "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
  13261. "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
  13262. "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
  13263. "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
  13264. "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
  13265. "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
  13266. "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
  13267. "\x16\x31\xb2\x47\x91\x67\xaa\x28"
  13268. "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
  13269. "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
  13270. "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
  13271. "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
  13272. "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
  13273. "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
  13274. "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
  13275. "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
  13276. "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
  13277. "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
  13278. "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
  13279. "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
  13280. "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
  13281. "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
  13282. "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
  13283. "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
  13284. "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
  13285. "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
  13286. "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
  13287. "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
  13288. "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
  13289. "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
  13290. "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
  13291. "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
  13292. "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
  13293. "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
  13294. "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
  13295. "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
  13296. "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
  13297. "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
  13298. "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
  13299. "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
  13300. "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
  13301. "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
  13302. .ilen = 512,
  13303. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13304. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  13305. "\x10\x11\x12\x13\x14\x15\x16\x17"
  13306. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  13307. "\x20\x21\x22\x23\x24\x25\x26\x27"
  13308. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  13309. "\x30\x31\x32\x33\x34\x35\x36\x37"
  13310. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  13311. "\x40\x41\x42\x43\x44\x45\x46\x47"
  13312. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  13313. "\x50\x51\x52\x53\x54\x55\x56\x57"
  13314. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  13315. "\x60\x61\x62\x63\x64\x65\x66\x67"
  13316. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  13317. "\x70\x71\x72\x73\x74\x75\x76\x77"
  13318. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  13319. "\x80\x81\x82\x83\x84\x85\x86\x87"
  13320. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  13321. "\x90\x91\x92\x93\x94\x95\x96\x97"
  13322. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  13323. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  13324. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  13325. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  13326. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  13327. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  13328. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  13329. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  13330. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  13331. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  13332. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  13333. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  13334. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  13335. "\x00\x01\x02\x03\x04\x05\x06\x07"
  13336. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  13337. "\x10\x11\x12\x13\x14\x15\x16\x17"
  13338. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  13339. "\x20\x21\x22\x23\x24\x25\x26\x27"
  13340. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  13341. "\x30\x31\x32\x33\x34\x35\x36\x37"
  13342. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  13343. "\x40\x41\x42\x43\x44\x45\x46\x47"
  13344. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  13345. "\x50\x51\x52\x53\x54\x55\x56\x57"
  13346. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  13347. "\x60\x61\x62\x63\x64\x65\x66\x67"
  13348. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  13349. "\x70\x71\x72\x73\x74\x75\x76\x77"
  13350. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  13351. "\x80\x81\x82\x83\x84\x85\x86\x87"
  13352. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  13353. "\x90\x91\x92\x93\x94\x95\x96\x97"
  13354. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  13355. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  13356. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  13357. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  13358. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  13359. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  13360. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  13361. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  13362. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  13363. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  13364. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  13365. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  13366. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  13367. .rlen = 512,
  13368. }, {
  13369. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  13370. "\x23\x53\x60\x28\x74\x71\x35\x26"
  13371. "\x62\x49\x77\x57\x24\x70\x93\x69"
  13372. "\x99\x59\x57\x49\x66\x96\x76\x27"
  13373. "\x31\x41\x59\x26\x53\x58\x97\x93"
  13374. "\x23\x84\x62\x64\x33\x83\x27\x95"
  13375. "\x02\x88\x41\x97\x16\x93\x99\x37"
  13376. "\x51\x05\x82\x09\x74\x94\x45\x92",
  13377. .klen = 64,
  13378. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  13379. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13380. .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
  13381. "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
  13382. "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
  13383. "\xf1\x74\xac\x96\x05\x7b\x32\xca"
  13384. "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
  13385. "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
  13386. "\x97\x07\x82\xf0\x07\x12\x38\x0a"
  13387. "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
  13388. "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
  13389. "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
  13390. "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
  13391. "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
  13392. "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
  13393. "\x41\x82\x0c\x45\x39\x35\xa8\x75"
  13394. "\x03\x29\x01\x84\x8c\xab\x48\xbe"
  13395. "\x11\x56\x22\x67\xb7\x67\x1a\x09"
  13396. "\xa1\x72\x25\x41\x3c\x39\x65\x80"
  13397. "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
  13398. "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
  13399. "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
  13400. "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
  13401. "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
  13402. "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
  13403. "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
  13404. "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
  13405. "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
  13406. "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
  13407. "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
  13408. "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
  13409. "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
  13410. "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
  13411. "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
  13412. "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
  13413. "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
  13414. "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
  13415. "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
  13416. "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
  13417. "\xef\x38\x52\x18\x0e\x29\x7e\xef"
  13418. "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
  13419. "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
  13420. "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
  13421. "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
  13422. "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
  13423. "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
  13424. "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
  13425. "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
  13426. "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
  13427. "\x21\x17\xf8\x59\x15\x24\x64\x22"
  13428. "\x57\x48\x80\xd5\x3d\x92\x30\x07"
  13429. "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
  13430. "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
  13431. "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
  13432. "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
  13433. "\x6b\x84\xf3\x00\xba\x52\x05\x02"
  13434. "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
  13435. "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
  13436. "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
  13437. "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
  13438. "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
  13439. "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
  13440. "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
  13441. "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
  13442. "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
  13443. "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
  13444. .ilen = 512,
  13445. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13446. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  13447. "\x10\x11\x12\x13\x14\x15\x16\x17"
  13448. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  13449. "\x20\x21\x22\x23\x24\x25\x26\x27"
  13450. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  13451. "\x30\x31\x32\x33\x34\x35\x36\x37"
  13452. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  13453. "\x40\x41\x42\x43\x44\x45\x46\x47"
  13454. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  13455. "\x50\x51\x52\x53\x54\x55\x56\x57"
  13456. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  13457. "\x60\x61\x62\x63\x64\x65\x66\x67"
  13458. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  13459. "\x70\x71\x72\x73\x74\x75\x76\x77"
  13460. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  13461. "\x80\x81\x82\x83\x84\x85\x86\x87"
  13462. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  13463. "\x90\x91\x92\x93\x94\x95\x96\x97"
  13464. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  13465. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  13466. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  13467. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  13468. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  13469. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  13470. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  13471. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  13472. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  13473. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  13474. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  13475. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  13476. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  13477. "\x00\x01\x02\x03\x04\x05\x06\x07"
  13478. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  13479. "\x10\x11\x12\x13\x14\x15\x16\x17"
  13480. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  13481. "\x20\x21\x22\x23\x24\x25\x26\x27"
  13482. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  13483. "\x30\x31\x32\x33\x34\x35\x36\x37"
  13484. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  13485. "\x40\x41\x42\x43\x44\x45\x46\x47"
  13486. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  13487. "\x50\x51\x52\x53\x54\x55\x56\x57"
  13488. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  13489. "\x60\x61\x62\x63\x64\x65\x66\x67"
  13490. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  13491. "\x70\x71\x72\x73\x74\x75\x76\x77"
  13492. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  13493. "\x80\x81\x82\x83\x84\x85\x86\x87"
  13494. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  13495. "\x90\x91\x92\x93\x94\x95\x96\x97"
  13496. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  13497. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  13498. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  13499. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  13500. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  13501. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  13502. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  13503. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  13504. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  13505. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  13506. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  13507. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  13508. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  13509. .rlen = 512,
  13510. },
  13511. };
  13512. /*
  13513. * SEED test vectors
  13514. */
  13515. #define SEED_ENC_TEST_VECTORS 4
  13516. #define SEED_DEC_TEST_VECTORS 4
  13517. static struct cipher_testvec seed_enc_tv_template[] = {
  13518. {
  13519. .key = zeroed_string,
  13520. .klen = 16,
  13521. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13522. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  13523. .ilen = 16,
  13524. .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  13525. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  13526. .rlen = 16,
  13527. }, {
  13528. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13529. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  13530. .klen = 16,
  13531. .input = zeroed_string,
  13532. .ilen = 16,
  13533. .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  13534. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  13535. .rlen = 16,
  13536. }, {
  13537. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  13538. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  13539. .klen = 16,
  13540. .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  13541. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  13542. .ilen = 16,
  13543. .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  13544. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  13545. .rlen = 16,
  13546. }, {
  13547. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  13548. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  13549. .klen = 16,
  13550. .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  13551. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  13552. .ilen = 16,
  13553. .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  13554. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  13555. .rlen = 16,
  13556. }
  13557. };
  13558. static struct cipher_testvec seed_dec_tv_template[] = {
  13559. {
  13560. .key = zeroed_string,
  13561. .klen = 16,
  13562. .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  13563. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  13564. .ilen = 16,
  13565. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13566. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  13567. .rlen = 16,
  13568. }, {
  13569. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13570. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  13571. .klen = 16,
  13572. .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  13573. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  13574. .ilen = 16,
  13575. .result = zeroed_string,
  13576. .rlen = 16,
  13577. }, {
  13578. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  13579. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  13580. .klen = 16,
  13581. .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  13582. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  13583. .ilen = 16,
  13584. .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  13585. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  13586. .rlen = 16,
  13587. }, {
  13588. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  13589. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  13590. .klen = 16,
  13591. .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  13592. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  13593. .ilen = 16,
  13594. .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  13595. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  13596. .rlen = 16,
  13597. }
  13598. };
  13599. #define SALSA20_STREAM_ENC_TEST_VECTORS 5
  13600. static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
  13601. /*
  13602. * Testvectors from verified.test-vectors submitted to ECRYPT.
  13603. * They are truncated to size 39, 64, 111, 129 to test a variety
  13604. * of input length.
  13605. */
  13606. { /* Set 3, vector 0 */
  13607. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13608. "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
  13609. .klen = 16,
  13610. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13611. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13612. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13613. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13614. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13615. "\x00\x00\x00\x00\x00\x00\x00",
  13616. .ilen = 39,
  13617. .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
  13618. "\x68\x02\x41\x0C\x68\x86\x88\x89"
  13619. "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
  13620. "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
  13621. "\x58\x3F\x52\x79\x70\xEB\xC1",
  13622. .rlen = 39,
  13623. }, { /* Set 5, vector 0 */
  13624. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13625. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13626. .klen = 16,
  13627. .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
  13628. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13629. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13630. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13631. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13632. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13633. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13634. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13635. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13636. .ilen = 64,
  13637. .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
  13638. "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
  13639. "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
  13640. "\x46\x26\xBF\x44\x3F\x21\x97\x76"
  13641. "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
  13642. "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
  13643. "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
  13644. "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
  13645. .rlen = 64,
  13646. }, { /* Set 3, vector 27 */
  13647. .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
  13648. "\x23\x24\x25\x26\x27\x28\x29\x2A"
  13649. "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
  13650. "\x33\x34\x35\x36\x37\x38\x39\x3A",
  13651. .klen = 32,
  13652. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13653. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13654. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13655. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13656. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13657. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13658. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13659. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13660. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13661. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13662. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13663. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13664. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13665. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13666. "\x00\x00\x00\x00\x00\x00\x00",
  13667. .ilen = 111,
  13668. .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
  13669. "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
  13670. "\x87\xD9\x47\xF8\x28\x91\x35\x98"
  13671. "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
  13672. "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
  13673. "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
  13674. "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
  13675. "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
  13676. "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
  13677. "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
  13678. "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
  13679. "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
  13680. "\x95\x46\x45\x54\xE9\x75\x03\x08"
  13681. "\x44\xAF\xE5\x8A\x81\x12\x09",
  13682. .rlen = 111,
  13683. }, { /* Set 5, vector 27 */
  13684. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13685. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13686. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13687. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13688. .klen = 32,
  13689. .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
  13690. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13691. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13692. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13693. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13694. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13695. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13696. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13697. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13698. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13699. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13700. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13701. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13702. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13703. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13704. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13705. "\x00\x00\x00\x00\x00\x00\x00\x00"
  13706. "\x00",
  13707. .ilen = 129,
  13708. .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
  13709. "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
  13710. "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
  13711. "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
  13712. "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
  13713. "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
  13714. "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
  13715. "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
  13716. "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
  13717. "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
  13718. "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
  13719. "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
  13720. "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
  13721. "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
  13722. "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
  13723. "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
  13724. "\x5A",
  13725. .rlen = 129,
  13726. }, { /* large test vector generated using Crypto++ */
  13727. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13728. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  13729. "\x10\x11\x12\x13\x14\x15\x16\x17"
  13730. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  13731. .klen = 32,
  13732. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13733. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13734. .input =
  13735. "\x00\x01\x02\x03\x04\x05\x06\x07"
  13736. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  13737. "\x10\x11\x12\x13\x14\x15\x16\x17"
  13738. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  13739. "\x20\x21\x22\x23\x24\x25\x26\x27"
  13740. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  13741. "\x30\x31\x32\x33\x34\x35\x36\x37"
  13742. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  13743. "\x40\x41\x42\x43\x44\x45\x46\x47"
  13744. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  13745. "\x50\x51\x52\x53\x54\x55\x56\x57"
  13746. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  13747. "\x60\x61\x62\x63\x64\x65\x66\x67"
  13748. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  13749. "\x70\x71\x72\x73\x74\x75\x76\x77"
  13750. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  13751. "\x80\x81\x82\x83\x84\x85\x86\x87"
  13752. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  13753. "\x90\x91\x92\x93\x94\x95\x96\x97"
  13754. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  13755. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  13756. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  13757. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  13758. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  13759. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  13760. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  13761. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  13762. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  13763. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  13764. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  13765. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  13766. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  13767. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  13768. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  13769. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  13770. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  13771. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  13772. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  13773. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  13774. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  13775. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  13776. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  13777. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  13778. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  13779. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  13780. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  13781. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  13782. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  13783. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  13784. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  13785. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  13786. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  13787. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  13788. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  13789. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  13790. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  13791. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  13792. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  13793. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  13794. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  13795. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  13796. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  13797. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  13798. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  13799. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  13800. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  13801. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  13802. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  13803. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  13804. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  13805. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  13806. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  13807. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  13808. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  13809. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  13810. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  13811. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  13812. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  13813. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  13814. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  13815. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  13816. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  13817. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  13818. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  13819. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  13820. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  13821. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  13822. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  13823. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  13824. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  13825. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  13826. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  13827. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  13828. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  13829. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  13830. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  13831. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  13832. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  13833. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  13834. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  13835. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  13836. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  13837. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  13838. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  13839. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  13840. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  13841. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  13842. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  13843. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  13844. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  13845. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  13846. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  13847. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  13848. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  13849. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  13850. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  13851. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  13852. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  13853. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  13854. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  13855. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  13856. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  13857. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  13858. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  13859. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  13860. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  13861. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  13862. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  13863. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  13864. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  13865. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  13866. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  13867. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  13868. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  13869. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  13870. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  13871. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  13872. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  13873. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  13874. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  13875. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  13876. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  13877. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  13878. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  13879. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  13880. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  13881. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  13882. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  13883. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  13884. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  13885. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  13886. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  13887. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  13888. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  13889. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  13890. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  13891. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  13892. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  13893. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  13894. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  13895. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  13896. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  13897. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  13898. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  13899. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  13900. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  13901. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  13902. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  13903. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  13904. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  13905. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  13906. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  13907. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  13908. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  13909. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  13910. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  13911. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  13912. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  13913. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  13914. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  13915. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  13916. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  13917. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  13918. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  13919. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  13920. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  13921. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  13922. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  13923. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  13924. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  13925. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  13926. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  13927. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  13928. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  13929. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  13930. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  13931. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  13932. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  13933. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  13934. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  13935. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  13936. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  13937. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  13938. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  13939. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  13940. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  13941. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  13942. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  13943. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  13944. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  13945. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  13946. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  13947. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  13948. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  13949. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  13950. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  13951. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  13952. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  13953. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  13954. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  13955. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  13956. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  13957. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  13958. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  13959. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  13960. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  13961. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  13962. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  13963. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  13964. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  13965. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  13966. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  13967. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  13968. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  13969. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  13970. "\x28\x37\x46\x55\x64\x73\x82\x91"
  13971. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  13972. "\x18\x27\x36\x45\x54\x63\x72\x81"
  13973. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  13974. "\x08\x17\x26\x35\x44\x53\x62\x71"
  13975. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  13976. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  13977. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  13978. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  13979. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  13980. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  13981. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  13982. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  13983. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  13984. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  13985. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  13986. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  13987. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  13988. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  13989. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  13990. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  13991. "\x00\x11\x22\x33\x44\x55\x66\x77"
  13992. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  13993. "\x10\x21\x32\x43\x54\x65\x76\x87"
  13994. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  13995. "\x20\x31\x42\x53\x64\x75\x86\x97"
  13996. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  13997. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  13998. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  13999. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  14000. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  14001. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  14002. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  14003. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  14004. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  14005. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  14006. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  14007. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  14008. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  14009. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  14010. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  14011. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  14012. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  14013. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  14014. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  14015. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  14016. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  14017. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  14018. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  14019. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  14020. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  14021. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  14022. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  14023. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  14024. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  14025. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  14026. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  14027. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  14028. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  14029. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  14030. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  14031. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  14032. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  14033. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  14034. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  14035. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  14036. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  14037. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  14038. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  14039. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  14040. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  14041. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  14042. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  14043. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  14044. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  14045. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  14046. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  14047. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  14048. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  14049. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  14050. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  14051. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  14052. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  14053. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  14054. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  14055. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  14056. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  14057. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  14058. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  14059. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  14060. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  14061. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  14062. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  14063. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  14064. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  14065. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  14066. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  14067. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  14068. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  14069. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  14070. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  14071. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  14072. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  14073. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  14074. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  14075. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  14076. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  14077. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  14078. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  14079. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  14080. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  14081. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  14082. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  14083. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  14084. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  14085. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  14086. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  14087. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  14088. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  14089. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  14090. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  14091. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  14092. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  14093. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  14094. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  14095. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  14096. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  14097. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  14098. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  14099. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  14100. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  14101. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  14102. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  14103. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  14104. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  14105. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  14106. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  14107. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  14108. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  14109. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  14110. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  14111. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  14112. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  14113. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  14114. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  14115. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  14116. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  14117. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  14118. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  14119. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  14120. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  14121. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  14122. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  14123. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  14124. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  14125. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  14126. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  14127. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  14128. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  14129. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  14130. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  14131. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  14132. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  14133. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  14134. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  14135. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  14136. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  14137. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  14138. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  14139. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  14140. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  14141. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  14142. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  14143. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  14144. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  14145. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  14146. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  14147. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  14148. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  14149. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  14150. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  14151. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  14152. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  14153. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  14154. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  14155. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  14156. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  14157. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  14158. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  14159. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  14160. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  14161. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  14162. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  14163. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  14164. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  14165. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  14166. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  14167. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  14168. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  14169. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  14170. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  14171. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  14172. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  14173. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  14174. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  14175. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  14176. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  14177. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  14178. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  14179. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  14180. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  14181. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  14182. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  14183. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  14184. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  14185. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  14186. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  14187. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  14188. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  14189. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  14190. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  14191. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  14192. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  14193. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  14194. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  14195. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  14196. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  14197. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  14198. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  14199. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  14200. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  14201. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  14202. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  14203. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  14204. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  14205. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  14206. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  14207. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  14208. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  14209. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  14210. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  14211. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  14212. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  14213. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  14214. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  14215. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  14216. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  14217. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  14218. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  14219. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  14220. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  14221. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  14222. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  14223. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  14224. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  14225. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  14226. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  14227. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  14228. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  14229. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  14230. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  14231. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  14232. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  14233. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  14234. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  14235. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  14236. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  14237. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  14238. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  14239. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  14240. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  14241. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  14242. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  14243. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  14244. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  14245. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  14246. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  14247. "\x00\x21\x42\x63",
  14248. .ilen = 4100,
  14249. .result =
  14250. "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
  14251. "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
  14252. "\x29\x01\xce\x98\x55\x53\xf9\x0c"
  14253. "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
  14254. "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
  14255. "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
  14256. "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
  14257. "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
  14258. "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
  14259. "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
  14260. "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
  14261. "\xbb\xde\x56\x86\xab\x65\x21\x30"
  14262. "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
  14263. "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
  14264. "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
  14265. "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
  14266. "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
  14267. "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
  14268. "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
  14269. "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
  14270. "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
  14271. "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
  14272. "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
  14273. "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
  14274. "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
  14275. "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
  14276. "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
  14277. "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
  14278. "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
  14279. "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
  14280. "\x45\xff\x3f\xce\x55\xf6\x95\x10"
  14281. "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
  14282. "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
  14283. "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
  14284. "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
  14285. "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
  14286. "\x62\x08\x18\x7a\x25\x49\x28\xac"
  14287. "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
  14288. "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
  14289. "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
  14290. "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
  14291. "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
  14292. "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
  14293. "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
  14294. "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
  14295. "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
  14296. "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
  14297. "\x33\xee\x14\x19\x22\x52\x89\xa7"
  14298. "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
  14299. "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
  14300. "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
  14301. "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
  14302. "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
  14303. "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
  14304. "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
  14305. "\x04\x07\x08\x52\xe6\xc0\xda\x93"
  14306. "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
  14307. "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
  14308. "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
  14309. "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
  14310. "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
  14311. "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
  14312. "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
  14313. "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
  14314. "\x5a\x90\xae\x75\x0a\x74\x18\x89"
  14315. "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
  14316. "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
  14317. "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
  14318. "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
  14319. "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
  14320. "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
  14321. "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
  14322. "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
  14323. "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
  14324. "\x49\x97\x33\xab\x36\x14\x0a\x70"
  14325. "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
  14326. "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
  14327. "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
  14328. "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
  14329. "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
  14330. "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
  14331. "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
  14332. "\x47\x13\x28\x73\x3c\xbb\x00\x90"
  14333. "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
  14334. "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
  14335. "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
  14336. "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
  14337. "\xad\x04\x07\xae\x22\x90\x4a\x93"
  14338. "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
  14339. "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
  14340. "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
  14341. "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
  14342. "\x53\xf9\x80\x10\xde\x80\xa2\x41"
  14343. "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
  14344. "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
  14345. "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
  14346. "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
  14347. "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
  14348. "\xde\xff\x07\x44\xdd\x56\x1b\xad"
  14349. "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
  14350. "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
  14351. "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
  14352. "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
  14353. "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
  14354. "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
  14355. "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
  14356. "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
  14357. "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
  14358. "\x23\xf8\x66\x18\x14\x28\x34\x0f"
  14359. "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
  14360. "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
  14361. "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
  14362. "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
  14363. "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
  14364. "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
  14365. "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
  14366. "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
  14367. "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
  14368. "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
  14369. "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
  14370. "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
  14371. "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
  14372. "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
  14373. "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
  14374. "\xca\x8e\x61\x87\xde\xad\x80\xd2"
  14375. "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
  14376. "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
  14377. "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
  14378. "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
  14379. "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
  14380. "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
  14381. "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
  14382. "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
  14383. "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
  14384. "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
  14385. "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
  14386. "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
  14387. "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
  14388. "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
  14389. "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
  14390. "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
  14391. "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
  14392. "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
  14393. "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
  14394. "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
  14395. "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
  14396. "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
  14397. "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
  14398. "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
  14399. "\x54\xda\x24\x6a\xc4\x41\x65\x46"
  14400. "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
  14401. "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
  14402. "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
  14403. "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
  14404. "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
  14405. "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
  14406. "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
  14407. "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
  14408. "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
  14409. "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
  14410. "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
  14411. "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
  14412. "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
  14413. "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
  14414. "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
  14415. "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
  14416. "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
  14417. "\xef\xcc\xa7\xec\xab\x43\x09\x18"
  14418. "\xd3\xab\x68\xd1\x07\x99\x44\x47"
  14419. "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
  14420. "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
  14421. "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
  14422. "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
  14423. "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
  14424. "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
  14425. "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
  14426. "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
  14427. "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
  14428. "\x71\x6e\x9f\x58\x15\x67\x72\x87"
  14429. "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
  14430. "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
  14431. "\xba\x41\x54\xac\xf0\xfc\x59\x12"
  14432. "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
  14433. "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
  14434. "\x2e\x53\x49\x97\x94\x33\xae\x40"
  14435. "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
  14436. "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
  14437. "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
  14438. "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
  14439. "\xce\x87\xad\xcc\x72\x05\x00\x29"
  14440. "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
  14441. "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
  14442. "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
  14443. "\xac\xc0\x79\x50\x69\xca\x59\x32"
  14444. "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
  14445. "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
  14446. "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
  14447. "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
  14448. "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
  14449. "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
  14450. "\x05\x68\x6b\xab\xe3\x41\x49\xed"
  14451. "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
  14452. "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
  14453. "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
  14454. "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
  14455. "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
  14456. "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
  14457. "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
  14458. "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
  14459. "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
  14460. "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
  14461. "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
  14462. "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
  14463. "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
  14464. "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
  14465. "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
  14466. "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
  14467. "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
  14468. "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
  14469. "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
  14470. "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
  14471. "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
  14472. "\x85\x75\xe6\x43\xf6\x87\x08\x68"
  14473. "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
  14474. "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
  14475. "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
  14476. "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
  14477. "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
  14478. "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
  14479. "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
  14480. "\xaf\x55\xeb\x22\xac\x93\x68\x32"
  14481. "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
  14482. "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
  14483. "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
  14484. "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
  14485. "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
  14486. "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
  14487. "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
  14488. "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
  14489. "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
  14490. "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
  14491. "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
  14492. "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
  14493. "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
  14494. "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
  14495. "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
  14496. "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
  14497. "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
  14498. "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
  14499. "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
  14500. "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
  14501. "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
  14502. "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
  14503. "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
  14504. "\x38\x55\xab\x33\x26\xef\x9f\x43"
  14505. "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
  14506. "\x58\x09\x09\x1b\xc3\x65\x46\x46"
  14507. "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
  14508. "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
  14509. "\x63\x86\xf2\x03\x67\x45\xd2\x72"
  14510. "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
  14511. "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
  14512. "\x2b\x82\x39\xbd\x69\x54\xed\x62"
  14513. "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
  14514. "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
  14515. "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
  14516. "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
  14517. "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
  14518. "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
  14519. "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
  14520. "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
  14521. "\x55\xad\xa4\xd1\x22\x54\x70\x94"
  14522. "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
  14523. "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
  14524. "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
  14525. "\x62\x36\x43\xb2\x82\x15\x75\x50"
  14526. "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
  14527. "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
  14528. "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
  14529. "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
  14530. "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
  14531. "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
  14532. "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
  14533. "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
  14534. "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
  14535. "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
  14536. "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
  14537. "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
  14538. "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
  14539. "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
  14540. "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
  14541. "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
  14542. "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
  14543. "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
  14544. "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
  14545. "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
  14546. "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
  14547. "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
  14548. "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
  14549. "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
  14550. "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
  14551. "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
  14552. "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
  14553. "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
  14554. "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
  14555. "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
  14556. "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
  14557. "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
  14558. "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
  14559. "\x42\x19\x23\x7d\xc8\x73\xee\x25"
  14560. "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
  14561. "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
  14562. "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
  14563. "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
  14564. "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
  14565. "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
  14566. "\xdb\x87\xee\xef\x55\x89\x2a\x59"
  14567. "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
  14568. "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
  14569. "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
  14570. "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
  14571. "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
  14572. "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
  14573. "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
  14574. "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
  14575. "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
  14576. "\xae\xab\x86\x09\x89\xc9\xc2\x40"
  14577. "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
  14578. "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
  14579. "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
  14580. "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
  14581. "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
  14582. "\x95\xd9\x34\x34\x86\xc6\x41\x94"
  14583. "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
  14584. "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
  14585. "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
  14586. "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
  14587. "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
  14588. "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
  14589. "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
  14590. "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
  14591. "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
  14592. "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
  14593. "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
  14594. "\xa7\x33\x34\x86\xca\xe4\x96\x23"
  14595. "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
  14596. "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
  14597. "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
  14598. "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
  14599. "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
  14600. "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
  14601. "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
  14602. "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
  14603. "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
  14604. "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
  14605. "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
  14606. "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
  14607. "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
  14608. "\x68\xc8\x7f\x51\x22\x42\xef\x49"
  14609. "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
  14610. "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
  14611. "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
  14612. "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
  14613. "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
  14614. "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
  14615. "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
  14616. "\x73\x2e\x71\x79\x16\x06\x63\x28"
  14617. "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
  14618. "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
  14619. "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
  14620. "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
  14621. "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
  14622. "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
  14623. "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
  14624. "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
  14625. "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
  14626. "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
  14627. "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
  14628. "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
  14629. "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
  14630. "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
  14631. "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
  14632. "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
  14633. "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
  14634. "\x19\x07\xaf\x90\x62\x5c\x68\x98"
  14635. "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
  14636. "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
  14637. "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
  14638. "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
  14639. "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
  14640. "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
  14641. "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
  14642. "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
  14643. "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
  14644. "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
  14645. "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
  14646. "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
  14647. "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
  14648. "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
  14649. "\x21\x33\x44\xfe\x7f\x35\x32\x93"
  14650. "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
  14651. "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
  14652. "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
  14653. "\x64\xf0\x48\xe5\x57\x99\xee\x75"
  14654. "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
  14655. "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
  14656. "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
  14657. "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
  14658. "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
  14659. "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
  14660. "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
  14661. "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
  14662. "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
  14663. "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
  14664. "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
  14665. "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
  14666. "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
  14667. "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
  14668. "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
  14669. "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
  14670. "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
  14671. "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
  14672. "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
  14673. "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
  14674. "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
  14675. "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
  14676. "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
  14677. "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
  14678. "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
  14679. "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
  14680. "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
  14681. "\x56\xf5\x4e\x01\x35\x27\x45\x77"
  14682. "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
  14683. "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
  14684. "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
  14685. "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
  14686. "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
  14687. "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
  14688. "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
  14689. "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
  14690. "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
  14691. "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
  14692. "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
  14693. "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
  14694. "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
  14695. "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
  14696. "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
  14697. "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
  14698. "\x87\x8f\x03\x21\x28\x95\x0c\x89"
  14699. "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
  14700. "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
  14701. "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
  14702. "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
  14703. "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
  14704. "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
  14705. "\x85\x73\x78\x45\x20\x7f\xae\x13"
  14706. "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
  14707. "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
  14708. "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
  14709. "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
  14710. "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
  14711. "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
  14712. "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
  14713. "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
  14714. "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
  14715. "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
  14716. "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
  14717. "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
  14718. "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
  14719. "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
  14720. "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
  14721. "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
  14722. "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
  14723. "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
  14724. "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
  14725. "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
  14726. "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
  14727. "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
  14728. "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
  14729. "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
  14730. "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
  14731. "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
  14732. "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
  14733. "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
  14734. "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
  14735. "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
  14736. "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
  14737. "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
  14738. "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
  14739. "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
  14740. "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
  14741. "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
  14742. "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
  14743. "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
  14744. "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
  14745. "\x6e\x12\x17\x72\x63\x57\xc7\xba"
  14746. "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
  14747. "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
  14748. "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
  14749. "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
  14750. "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
  14751. "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
  14752. "\x0c\x24\x43\x31\x40\x57\xf1\x72"
  14753. "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
  14754. "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
  14755. "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
  14756. "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
  14757. "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
  14758. "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
  14759. "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
  14760. "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
  14761. "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
  14762. "\xaf\xdf\x11\x95",
  14763. .rlen = 4100,
  14764. .np = 2,
  14765. .tap = { 4064, 36 },
  14766. },
  14767. };
  14768. /*
  14769. * CTS (Cipher Text Stealing) mode tests
  14770. */
  14771. #define CTS_MODE_ENC_TEST_VECTORS 6
  14772. #define CTS_MODE_DEC_TEST_VECTORS 6
  14773. static struct cipher_testvec cts_mode_enc_tv_template[] = {
  14774. { /* from rfc3962 */
  14775. .klen = 16,
  14776. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14777. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14778. .ilen = 17,
  14779. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14780. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14781. "\x20",
  14782. .rlen = 17,
  14783. .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  14784. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  14785. "\x97",
  14786. }, {
  14787. .klen = 16,
  14788. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14789. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14790. .ilen = 31,
  14791. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14792. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14793. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14794. "\x20\x47\x61\x75\x27\x73\x20",
  14795. .rlen = 31,
  14796. .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  14797. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  14798. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14799. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  14800. }, {
  14801. .klen = 16,
  14802. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14803. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14804. .ilen = 32,
  14805. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14806. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14807. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14808. "\x20\x47\x61\x75\x27\x73\x20\x43",
  14809. .rlen = 32,
  14810. .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14811. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  14812. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14813. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  14814. }, {
  14815. .klen = 16,
  14816. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14817. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14818. .ilen = 47,
  14819. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14820. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14821. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14822. "\x20\x47\x61\x75\x27\x73\x20\x43"
  14823. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  14824. "\x70\x6c\x65\x61\x73\x65\x2c",
  14825. .rlen = 47,
  14826. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14827. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  14828. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  14829. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  14830. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14831. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  14832. }, {
  14833. .klen = 16,
  14834. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14835. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14836. .ilen = 48,
  14837. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14838. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14839. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14840. "\x20\x47\x61\x75\x27\x73\x20\x43"
  14841. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  14842. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  14843. .rlen = 48,
  14844. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14845. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  14846. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  14847. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  14848. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14849. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  14850. }, {
  14851. .klen = 16,
  14852. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14853. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14854. .ilen = 64,
  14855. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14856. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14857. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14858. "\x20\x47\x61\x75\x27\x73\x20\x43"
  14859. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  14860. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  14861. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  14862. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  14863. .rlen = 64,
  14864. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14865. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  14866. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14867. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  14868. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  14869. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  14870. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  14871. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  14872. }
  14873. };
  14874. static struct cipher_testvec cts_mode_dec_tv_template[] = {
  14875. { /* from rfc3962 */
  14876. .klen = 16,
  14877. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14878. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14879. .rlen = 17,
  14880. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14881. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14882. "\x20",
  14883. .ilen = 17,
  14884. .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  14885. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  14886. "\x97",
  14887. }, {
  14888. .klen = 16,
  14889. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14890. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14891. .rlen = 31,
  14892. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14893. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14894. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14895. "\x20\x47\x61\x75\x27\x73\x20",
  14896. .ilen = 31,
  14897. .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  14898. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  14899. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14900. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  14901. }, {
  14902. .klen = 16,
  14903. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14904. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14905. .rlen = 32,
  14906. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14907. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14908. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14909. "\x20\x47\x61\x75\x27\x73\x20\x43",
  14910. .ilen = 32,
  14911. .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14912. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  14913. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14914. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  14915. }, {
  14916. .klen = 16,
  14917. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14918. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14919. .rlen = 47,
  14920. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14921. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14922. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14923. "\x20\x47\x61\x75\x27\x73\x20\x43"
  14924. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  14925. "\x70\x6c\x65\x61\x73\x65\x2c",
  14926. .ilen = 47,
  14927. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14928. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  14929. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  14930. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  14931. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14932. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  14933. }, {
  14934. .klen = 16,
  14935. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14936. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14937. .rlen = 48,
  14938. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14939. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14940. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14941. "\x20\x47\x61\x75\x27\x73\x20\x43"
  14942. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  14943. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  14944. .ilen = 48,
  14945. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14946. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  14947. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  14948. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  14949. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14950. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  14951. }, {
  14952. .klen = 16,
  14953. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14954. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14955. .rlen = 64,
  14956. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14957. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14958. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14959. "\x20\x47\x61\x75\x27\x73\x20\x43"
  14960. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  14961. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  14962. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  14963. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  14964. .ilen = 64,
  14965. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14966. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  14967. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14968. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  14969. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  14970. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  14971. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  14972. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  14973. }
  14974. };
  14975. /*
  14976. * Compression stuff.
  14977. */
  14978. #define COMP_BUF_SIZE 512
  14979. struct comp_testvec {
  14980. int inlen, outlen;
  14981. char input[COMP_BUF_SIZE];
  14982. char output[COMP_BUF_SIZE];
  14983. };
  14984. struct pcomp_testvec {
  14985. void *params;
  14986. unsigned int paramsize;
  14987. int inlen, outlen;
  14988. char input[COMP_BUF_SIZE];
  14989. char output[COMP_BUF_SIZE];
  14990. };
  14991. /*
  14992. * Deflate test vectors (null-terminated strings).
  14993. * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
  14994. */
  14995. #define DEFLATE_COMP_TEST_VECTORS 2
  14996. #define DEFLATE_DECOMP_TEST_VECTORS 2
  14997. static struct comp_testvec deflate_comp_tv_template[] = {
  14998. {
  14999. .inlen = 70,
  15000. .outlen = 38,
  15001. .input = "Join us now and share the software "
  15002. "Join us now and share the software ",
  15003. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  15004. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  15005. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  15006. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  15007. "\x71\xbc\x08\x2b\x01\x00",
  15008. }, {
  15009. .inlen = 191,
  15010. .outlen = 122,
  15011. .input = "This document describes a compression method based on the DEFLATE"
  15012. "compression algorithm. This document defines the application of "
  15013. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  15014. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  15015. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  15016. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  15017. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  15018. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  15019. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  15020. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  15021. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  15022. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  15023. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  15024. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  15025. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  15026. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  15027. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  15028. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  15029. "\xfa\x02",
  15030. },
  15031. };
  15032. static struct comp_testvec deflate_decomp_tv_template[] = {
  15033. {
  15034. .inlen = 122,
  15035. .outlen = 191,
  15036. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  15037. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  15038. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  15039. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  15040. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  15041. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  15042. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  15043. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  15044. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  15045. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  15046. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  15047. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  15048. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  15049. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  15050. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  15051. "\xfa\x02",
  15052. .output = "This document describes a compression method based on the DEFLATE"
  15053. "compression algorithm. This document defines the application of "
  15054. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  15055. }, {
  15056. .inlen = 38,
  15057. .outlen = 70,
  15058. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  15059. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  15060. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  15061. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  15062. "\x71\xbc\x08\x2b\x01\x00",
  15063. .output = "Join us now and share the software "
  15064. "Join us now and share the software ",
  15065. },
  15066. };
  15067. #define ZLIB_COMP_TEST_VECTORS 2
  15068. #define ZLIB_DECOMP_TEST_VECTORS 2
  15069. static const struct {
  15070. struct nlattr nla;
  15071. int val;
  15072. } deflate_comp_params[] = {
  15073. {
  15074. .nla = {
  15075. .nla_len = NLA_HDRLEN + sizeof(int),
  15076. .nla_type = ZLIB_COMP_LEVEL,
  15077. },
  15078. .val = Z_DEFAULT_COMPRESSION,
  15079. }, {
  15080. .nla = {
  15081. .nla_len = NLA_HDRLEN + sizeof(int),
  15082. .nla_type = ZLIB_COMP_METHOD,
  15083. },
  15084. .val = Z_DEFLATED,
  15085. }, {
  15086. .nla = {
  15087. .nla_len = NLA_HDRLEN + sizeof(int),
  15088. .nla_type = ZLIB_COMP_WINDOWBITS,
  15089. },
  15090. .val = -11,
  15091. }, {
  15092. .nla = {
  15093. .nla_len = NLA_HDRLEN + sizeof(int),
  15094. .nla_type = ZLIB_COMP_MEMLEVEL,
  15095. },
  15096. .val = MAX_MEM_LEVEL,
  15097. }, {
  15098. .nla = {
  15099. .nla_len = NLA_HDRLEN + sizeof(int),
  15100. .nla_type = ZLIB_COMP_STRATEGY,
  15101. },
  15102. .val = Z_DEFAULT_STRATEGY,
  15103. }
  15104. };
  15105. static const struct {
  15106. struct nlattr nla;
  15107. int val;
  15108. } deflate_decomp_params[] = {
  15109. {
  15110. .nla = {
  15111. .nla_len = NLA_HDRLEN + sizeof(int),
  15112. .nla_type = ZLIB_DECOMP_WINDOWBITS,
  15113. },
  15114. .val = -11,
  15115. }
  15116. };
  15117. static struct pcomp_testvec zlib_comp_tv_template[] = {
  15118. {
  15119. .params = &deflate_comp_params,
  15120. .paramsize = sizeof(deflate_comp_params),
  15121. .inlen = 70,
  15122. .outlen = 38,
  15123. .input = "Join us now and share the software "
  15124. "Join us now and share the software ",
  15125. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  15126. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  15127. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  15128. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  15129. "\x71\xbc\x08\x2b\x01\x00",
  15130. }, {
  15131. .params = &deflate_comp_params,
  15132. .paramsize = sizeof(deflate_comp_params),
  15133. .inlen = 191,
  15134. .outlen = 122,
  15135. .input = "This document describes a compression method based on the DEFLATE"
  15136. "compression algorithm. This document defines the application of "
  15137. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  15138. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  15139. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  15140. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  15141. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  15142. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  15143. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  15144. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  15145. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  15146. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  15147. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  15148. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  15149. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  15150. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  15151. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  15152. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  15153. "\xfa\x02",
  15154. },
  15155. };
  15156. static struct pcomp_testvec zlib_decomp_tv_template[] = {
  15157. {
  15158. .params = &deflate_decomp_params,
  15159. .paramsize = sizeof(deflate_decomp_params),
  15160. .inlen = 122,
  15161. .outlen = 191,
  15162. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  15163. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  15164. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  15165. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  15166. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  15167. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  15168. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  15169. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  15170. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  15171. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  15172. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  15173. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  15174. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  15175. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  15176. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  15177. "\xfa\x02",
  15178. .output = "This document describes a compression method based on the DEFLATE"
  15179. "compression algorithm. This document defines the application of "
  15180. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  15181. }, {
  15182. .params = &deflate_decomp_params,
  15183. .paramsize = sizeof(deflate_decomp_params),
  15184. .inlen = 38,
  15185. .outlen = 70,
  15186. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  15187. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  15188. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  15189. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  15190. "\x71\xbc\x08\x2b\x01\x00",
  15191. .output = "Join us now and share the software "
  15192. "Join us now and share the software ",
  15193. },
  15194. };
  15195. /*
  15196. * LZO test vectors (null-terminated strings).
  15197. */
  15198. #define LZO_COMP_TEST_VECTORS 2
  15199. #define LZO_DECOMP_TEST_VECTORS 2
  15200. static struct comp_testvec lzo_comp_tv_template[] = {
  15201. {
  15202. .inlen = 70,
  15203. .outlen = 57,
  15204. .input = "Join us now and share the software "
  15205. "Join us now and share the software ",
  15206. .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  15207. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  15208. "\x64\x20\x73\x68\x61\x72\x65\x20"
  15209. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  15210. "\x77\x70\x01\x32\x88\x00\x0c\x65"
  15211. "\x20\x74\x68\x65\x20\x73\x6f\x66"
  15212. "\x74\x77\x61\x72\x65\x20\x11\x00"
  15213. "\x00",
  15214. }, {
  15215. .inlen = 159,
  15216. .outlen = 131,
  15217. .input = "This document describes a compression method based on the LZO "
  15218. "compression algorithm. This document defines the application of "
  15219. "the LZO algorithm used in UBIFS.",
  15220. .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
  15221. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  15222. "\x64\x65\x73\x63\x72\x69\x62\x65"
  15223. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  15224. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  15225. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  15226. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  15227. "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
  15228. "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
  15229. "\x72\x69\x74\x68\x6d\x2e\x20\x20"
  15230. "\x2e\x54\x01\x03\x66\x69\x6e\x65"
  15231. "\x73\x20\x74\x06\x05\x61\x70\x70"
  15232. "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
  15233. "\x66\x88\x02\x60\x09\x27\xf0\x00"
  15234. "\x0c\x20\x75\x73\x65\x64\x20\x69"
  15235. "\x6e\x20\x55\x42\x49\x46\x53\x2e"
  15236. "\x11\x00\x00",
  15237. },
  15238. };
  15239. static struct comp_testvec lzo_decomp_tv_template[] = {
  15240. {
  15241. .inlen = 133,
  15242. .outlen = 159,
  15243. .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  15244. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  15245. "\x64\x65\x73\x63\x72\x69\x62\x65"
  15246. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  15247. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  15248. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  15249. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  15250. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  15251. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  15252. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  15253. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  15254. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  15255. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  15256. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  15257. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  15258. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  15259. "\x53\x2e\x11\x00\x00",
  15260. .output = "This document describes a compression method based on the LZO "
  15261. "compression algorithm. This document defines the application of "
  15262. "the LZO algorithm used in UBIFS.",
  15263. }, {
  15264. .inlen = 46,
  15265. .outlen = 70,
  15266. .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  15267. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  15268. "\x64\x20\x73\x68\x61\x72\x65\x20"
  15269. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  15270. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  15271. "\x3d\x88\x00\x11\x00\x00",
  15272. .output = "Join us now and share the software "
  15273. "Join us now and share the software ",
  15274. },
  15275. };
  15276. /*
  15277. * Michael MIC test vectors from IEEE 802.11i
  15278. */
  15279. #define MICHAEL_MIC_TEST_VECTORS 6
  15280. static struct hash_testvec michael_mic_tv_template[] = {
  15281. {
  15282. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15283. .ksize = 8,
  15284. .plaintext = zeroed_string,
  15285. .psize = 0,
  15286. .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  15287. },
  15288. {
  15289. .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  15290. .ksize = 8,
  15291. .plaintext = "M",
  15292. .psize = 1,
  15293. .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  15294. },
  15295. {
  15296. .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  15297. .ksize = 8,
  15298. .plaintext = "Mi",
  15299. .psize = 2,
  15300. .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  15301. },
  15302. {
  15303. .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  15304. .ksize = 8,
  15305. .plaintext = "Mic",
  15306. .psize = 3,
  15307. .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  15308. },
  15309. {
  15310. .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  15311. .ksize = 8,
  15312. .plaintext = "Mich",
  15313. .psize = 4,
  15314. .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  15315. },
  15316. {
  15317. .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  15318. .ksize = 8,
  15319. .plaintext = "Michael",
  15320. .psize = 7,
  15321. .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
  15322. }
  15323. };
  15324. /*
  15325. * CRC32C test vectors
  15326. */
  15327. #define CRC32C_TEST_VECTORS 14
  15328. static struct hash_testvec crc32c_tv_template[] = {
  15329. {
  15330. .psize = 0,
  15331. .digest = "\x00\x00\x00\x00",
  15332. },
  15333. {
  15334. .key = "\x87\xa9\xcb\xed",
  15335. .ksize = 4,
  15336. .psize = 0,
  15337. .digest = "\x78\x56\x34\x12",
  15338. },
  15339. {
  15340. .key = "\xff\xff\xff\xff",
  15341. .ksize = 4,
  15342. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  15343. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  15344. "\x11\x12\x13\x14\x15\x16\x17\x18"
  15345. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  15346. "\x21\x22\x23\x24\x25\x26\x27\x28",
  15347. .psize = 40,
  15348. .digest = "\x7f\x15\x2c\x0e",
  15349. },
  15350. {
  15351. .key = "\xff\xff\xff\xff",
  15352. .ksize = 4,
  15353. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  15354. "\x31\x32\x33\x34\x35\x36\x37\x38"
  15355. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  15356. "\x41\x42\x43\x44\x45\x46\x47\x48"
  15357. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  15358. .psize = 40,
  15359. .digest = "\xf6\xeb\x80\xe9",
  15360. },
  15361. {
  15362. .key = "\xff\xff\xff\xff",
  15363. .ksize = 4,
  15364. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  15365. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  15366. "\x61\x62\x63\x64\x65\x66\x67\x68"
  15367. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  15368. "\x71\x72\x73\x74\x75\x76\x77\x78",
  15369. .psize = 40,
  15370. .digest = "\xed\xbd\x74\xde",
  15371. },
  15372. {
  15373. .key = "\xff\xff\xff\xff",
  15374. .ksize = 4,
  15375. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  15376. "\x81\x82\x83\x84\x85\x86\x87\x88"
  15377. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  15378. "\x91\x92\x93\x94\x95\x96\x97\x98"
  15379. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  15380. .psize = 40,
  15381. .digest = "\x62\xc8\x79\xd5",
  15382. },
  15383. {
  15384. .key = "\xff\xff\xff\xff",
  15385. .ksize = 4,
  15386. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  15387. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  15388. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  15389. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  15390. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  15391. .psize = 40,
  15392. .digest = "\xd0\x9a\x97\xba",
  15393. },
  15394. {
  15395. .key = "\xff\xff\xff\xff",
  15396. .ksize = 4,
  15397. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  15398. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  15399. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  15400. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  15401. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  15402. .psize = 40,
  15403. .digest = "\x13\xd9\x29\x2b",
  15404. },
  15405. {
  15406. .key = "\x80\xea\xd3\xf1",
  15407. .ksize = 4,
  15408. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  15409. "\x31\x32\x33\x34\x35\x36\x37\x38"
  15410. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  15411. "\x41\x42\x43\x44\x45\x46\x47\x48"
  15412. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  15413. .psize = 40,
  15414. .digest = "\x0c\xb5\xe2\xa2",
  15415. },
  15416. {
  15417. .key = "\xf3\x4a\x1d\x5d",
  15418. .ksize = 4,
  15419. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  15420. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  15421. "\x61\x62\x63\x64\x65\x66\x67\x68"
  15422. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  15423. "\x71\x72\x73\x74\x75\x76\x77\x78",
  15424. .psize = 40,
  15425. .digest = "\xd1\x7f\xfb\xa6",
  15426. },
  15427. {
  15428. .key = "\x2e\x80\x04\x59",
  15429. .ksize = 4,
  15430. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  15431. "\x81\x82\x83\x84\x85\x86\x87\x88"
  15432. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  15433. "\x91\x92\x93\x94\x95\x96\x97\x98"
  15434. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  15435. .psize = 40,
  15436. .digest = "\x59\x33\xe6\x7a",
  15437. },
  15438. {
  15439. .key = "\xa6\xcc\x19\x85",
  15440. .ksize = 4,
  15441. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  15442. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  15443. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  15444. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  15445. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  15446. .psize = 40,
  15447. .digest = "\xbe\x03\x01\xd2",
  15448. },
  15449. {
  15450. .key = "\x41\xfc\xfe\x2d",
  15451. .ksize = 4,
  15452. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  15453. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  15454. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  15455. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  15456. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  15457. .psize = 40,
  15458. .digest = "\x75\xd3\xc5\x24",
  15459. },
  15460. {
  15461. .key = "\xff\xff\xff\xff",
  15462. .ksize = 4,
  15463. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  15464. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  15465. "\x11\x12\x13\x14\x15\x16\x17\x18"
  15466. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  15467. "\x21\x22\x23\x24\x25\x26\x27\x28"
  15468. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  15469. "\x31\x32\x33\x34\x35\x36\x37\x38"
  15470. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  15471. "\x41\x42\x43\x44\x45\x46\x47\x48"
  15472. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  15473. "\x51\x52\x53\x54\x55\x56\x57\x58"
  15474. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  15475. "\x61\x62\x63\x64\x65\x66\x67\x68"
  15476. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  15477. "\x71\x72\x73\x74\x75\x76\x77\x78"
  15478. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  15479. "\x81\x82\x83\x84\x85\x86\x87\x88"
  15480. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  15481. "\x91\x92\x93\x94\x95\x96\x97\x98"
  15482. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  15483. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  15484. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  15485. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  15486. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  15487. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  15488. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  15489. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  15490. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  15491. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  15492. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  15493. .psize = 240,
  15494. .digest = "\x75\xd3\xc5\x24",
  15495. .np = 2,
  15496. .tap = { 31, 209 }
  15497. },
  15498. };
  15499. #define LZ4_COMP_TEST_VECTORS 1
  15500. #define LZ4_DECOMP_TEST_VECTORS 1
  15501. static struct comp_testvec lz4_comp_tv_template[] = {
  15502. {
  15503. .inlen = 255,
  15504. .outlen = 218,
  15505. .input = "LZ4 is lossless compression algorithm, providing"
  15506. " compression speed at 400 MB/s per core, scalable "
  15507. "with multi-cores CPU. It features an extremely fast "
  15508. "decoder, with speed in multiple GB/s per core, "
  15509. "typically reaching RAM speed limits on multi-core "
  15510. "systems.",
  15511. .output = "\xf9\x21\x4c\x5a\x34\x20\x69\x73\x20\x6c\x6f\x73\x73"
  15512. "\x6c\x65\x73\x73\x20\x63\x6f\x6d\x70\x72\x65\x73\x73"
  15513. "\x69\x6f\x6e\x20\x61\x6c\x67\x6f\x72\x69\x74\x68\x6d"
  15514. "\x2c\x20\x70\x72\x6f\x76\x69\x64\x69\x6e\x67\x21\x00"
  15515. "\xf0\x21\x73\x70\x65\x65\x64\x20\x61\x74\x20\x34\x30"
  15516. "\x30\x20\x4d\x42\x2f\x73\x20\x70\x65\x72\x20\x63\x6f"
  15517. "\x72\x65\x2c\x20\x73\x63\x61\x6c\x61\x62\x6c\x65\x20"
  15518. "\x77\x69\x74\x68\x20\x6d\x75\x6c\x74\x69\x2d\x1a\x00"
  15519. "\xf0\x00\x73\x20\x43\x50\x55\x2e\x20\x49\x74\x20\x66"
  15520. "\x65\x61\x74\x75\x11\x00\xf2\x0b\x61\x6e\x20\x65\x78"
  15521. "\x74\x72\x65\x6d\x65\x6c\x79\x20\x66\x61\x73\x74\x20"
  15522. "\x64\x65\x63\x6f\x64\x65\x72\x2c\x3d\x00\x02\x67\x00"
  15523. "\x22\x69\x6e\x46\x00\x5a\x70\x6c\x65\x20\x47\x6c\x00"
  15524. "\xf0\x00\x74\x79\x70\x69\x63\x61\x6c\x6c\x79\x20\x72"
  15525. "\x65\x61\x63\x68\xa7\x00\x33\x52\x41\x4d\x38\x00\x83"
  15526. "\x6c\x69\x6d\x69\x74\x73\x20\x6f\x3f\x00\x01\x85\x00"
  15527. "\x90\x20\x73\x79\x73\x74\x65\x6d\x73\x2e",
  15528. },
  15529. };
  15530. static struct comp_testvec lz4_decomp_tv_template[] = {
  15531. {
  15532. .inlen = 218,
  15533. .outlen = 255,
  15534. .input = "\xf9\x21\x4c\x5a\x34\x20\x69\x73\x20\x6c\x6f\x73\x73"
  15535. "\x6c\x65\x73\x73\x20\x63\x6f\x6d\x70\x72\x65\x73\x73"
  15536. "\x69\x6f\x6e\x20\x61\x6c\x67\x6f\x72\x69\x74\x68\x6d"
  15537. "\x2c\x20\x70\x72\x6f\x76\x69\x64\x69\x6e\x67\x21\x00"
  15538. "\xf0\x21\x73\x70\x65\x65\x64\x20\x61\x74\x20\x34\x30"
  15539. "\x30\x20\x4d\x42\x2f\x73\x20\x70\x65\x72\x20\x63\x6f"
  15540. "\x72\x65\x2c\x20\x73\x63\x61\x6c\x61\x62\x6c\x65\x20"
  15541. "\x77\x69\x74\x68\x20\x6d\x75\x6c\x74\x69\x2d\x1a\x00"
  15542. "\xf0\x00\x73\x20\x43\x50\x55\x2e\x20\x49\x74\x20\x66"
  15543. "\x65\x61\x74\x75\x11\x00\xf2\x0b\x61\x6e\x20\x65\x78"
  15544. "\x74\x72\x65\x6d\x65\x6c\x79\x20\x66\x61\x73\x74\x20"
  15545. "\x64\x65\x63\x6f\x64\x65\x72\x2c\x3d\x00\x02\x67\x00"
  15546. "\x22\x69\x6e\x46\x00\x5a\x70\x6c\x65\x20\x47\x6c\x00"
  15547. "\xf0\x00\x74\x79\x70\x69\x63\x61\x6c\x6c\x79\x20\x72"
  15548. "\x65\x61\x63\x68\xa7\x00\x33\x52\x41\x4d\x38\x00\x83"
  15549. "\x6c\x69\x6d\x69\x74\x73\x20\x6f\x3f\x00\x01\x85\x00"
  15550. "\x90\x20\x73\x79\x73\x74\x65\x6d\x73\x2e",
  15551. .output = "LZ4 is lossless compression algorithm, providing"
  15552. " compression speed at 400 MB/s per core, scalable "
  15553. "with multi-cores CPU. It features an extremely fast "
  15554. "decoder, with speed in multiple GB/s per core, "
  15555. "typically reaching RAM speed limits on multi-core "
  15556. "systems.",
  15557. },
  15558. };
  15559. #define LZ4HC_COMP_TEST_VECTORS 1
  15560. #define LZ4HC_DECOMP_TEST_VECTORS 1
  15561. static struct comp_testvec lz4hc_comp_tv_template[] = {
  15562. {
  15563. .inlen = 255,
  15564. .outlen = 216,
  15565. .input = "LZ4 is lossless compression algorithm, providing"
  15566. " compression speed at 400 MB/s per core, scalable "
  15567. "with multi-cores CPU. It features an extremely fast "
  15568. "decoder, with speed in multiple GB/s per core, "
  15569. "typically reaching RAM speed limits on multi-core "
  15570. "systems.",
  15571. .output = "\xf9\x21\x4c\x5a\x34\x20\x69\x73\x20\x6c\x6f\x73\x73"
  15572. "\x6c\x65\x73\x73\x20\x63\x6f\x6d\x70\x72\x65\x73\x73"
  15573. "\x69\x6f\x6e\x20\x61\x6c\x67\x6f\x72\x69\x74\x68\x6d"
  15574. "\x2c\x20\x70\x72\x6f\x76\x69\x64\x69\x6e\x67\x21\x00"
  15575. "\xf0\x21\x73\x70\x65\x65\x64\x20\x61\x74\x20\x34\x30"
  15576. "\x30\x20\x4d\x42\x2f\x73\x20\x70\x65\x72\x20\x63\x6f"
  15577. "\x72\x65\x2c\x20\x73\x63\x61\x6c\x61\x62\x6c\x65\x20"
  15578. "\x77\x69\x74\x68\x20\x6d\x75\x6c\x74\x69\x2d\x1a\x00"
  15579. "\xf0\x00\x73\x20\x43\x50\x55\x2e\x20\x49\x74\x20\x66"
  15580. "\x65\x61\x74\x75\x11\x00\xf2\x0b\x61\x6e\x20\x65\x78"
  15581. "\x74\x72\x65\x6d\x65\x6c\x79\x20\x66\x61\x73\x74\x20"
  15582. "\x64\x65\x63\x6f\x64\x65\x72\x2c\x3d\x00\x02\x67\x00"
  15583. "\x22\x69\x6e\x46\x00\x5a\x70\x6c\x65\x20\x47\x6c\x00"
  15584. "\xf0\x00\x74\x79\x70\x69\x63\x61\x6c\x6c\x79\x20\x72"
  15585. "\x65\x61\x63\x68\xa7\x00\x33\x52\x41\x4d\x38\x00\x97"
  15586. "\x6c\x69\x6d\x69\x74\x73\x20\x6f\x6e\x85\x00\x90\x20"
  15587. "\x73\x79\x73\x74\x65\x6d\x73\x2e",
  15588. },
  15589. };
  15590. static struct comp_testvec lz4hc_decomp_tv_template[] = {
  15591. {
  15592. .inlen = 216,
  15593. .outlen = 255,
  15594. .input = "\xf9\x21\x4c\x5a\x34\x20\x69\x73\x20\x6c\x6f\x73\x73"
  15595. "\x6c\x65\x73\x73\x20\x63\x6f\x6d\x70\x72\x65\x73\x73"
  15596. "\x69\x6f\x6e\x20\x61\x6c\x67\x6f\x72\x69\x74\x68\x6d"
  15597. "\x2c\x20\x70\x72\x6f\x76\x69\x64\x69\x6e\x67\x21\x00"
  15598. "\xf0\x21\x73\x70\x65\x65\x64\x20\x61\x74\x20\x34\x30"
  15599. "\x30\x20\x4d\x42\x2f\x73\x20\x70\x65\x72\x20\x63\x6f"
  15600. "\x72\x65\x2c\x20\x73\x63\x61\x6c\x61\x62\x6c\x65\x20"
  15601. "\x77\x69\x74\x68\x20\x6d\x75\x6c\x74\x69\x2d\x1a\x00"
  15602. "\xf0\x00\x73\x20\x43\x50\x55\x2e\x20\x49\x74\x20\x66"
  15603. "\x65\x61\x74\x75\x11\x00\xf2\x0b\x61\x6e\x20\x65\x78"
  15604. "\x74\x72\x65\x6d\x65\x6c\x79\x20\x66\x61\x73\x74\x20"
  15605. "\x64\x65\x63\x6f\x64\x65\x72\x2c\x3d\x00\x02\x67\x00"
  15606. "\x22\x69\x6e\x46\x00\x5a\x70\x6c\x65\x20\x47\x6c\x00"
  15607. "\xf0\x00\x74\x79\x70\x69\x63\x61\x6c\x6c\x79\x20\x72"
  15608. "\x65\x61\x63\x68\xa7\x00\x33\x52\x41\x4d\x38\x00\x97"
  15609. "\x6c\x69\x6d\x69\x74\x73\x20\x6f\x6e\x85\x00\x90\x20"
  15610. "\x73\x79\x73\x74\x65\x6d\x73\x2e",
  15611. .output = "LZ4 is lossless compression algorithm, providing"
  15612. " compression speed at 400 MB/s per core, scalable "
  15613. "with multi-cores CPU. It features an extremely fast "
  15614. "decoder, with speed in multiple GB/s per core, "
  15615. "typically reaching RAM speed limits on multi-core "
  15616. "systems.",
  15617. },
  15618. };
  15619. #endif /* _CRYPTO_TESTMGR_H */