testmgr.h 507 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861
  1. /*
  2. * Algorithm testing framework and tests.
  3. *
  4. * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
  5. * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
  6. * Copyright (c) 2007 Nokia Siemens Networks
  7. * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
  8. *
  9. * Updated RFC4106 AES-GCM testing. Some test vectors were taken from
  10. * http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/
  11. * gcm/gcm-test-vectors.tar.gz
  12. * Authors: Aidan O'Mahony (aidan.o.mahony@intel.com)
  13. * Adrian Hoban <adrian.hoban@intel.com>
  14. * Gabriele Paoloni <gabriele.paoloni@intel.com>
  15. * Tadeusz Struk (tadeusz.struk@intel.com)
  16. * Copyright (c) 2010, Intel Corporation.
  17. *
  18. * This program is free software; you can redistribute it and/or modify it
  19. * under the terms of the GNU General Public License as published by the Free
  20. * Software Foundation; either version 2 of the License, or (at your option)
  21. * any later version.
  22. *
  23. */
  24. #ifndef _CRYPTO_TESTMGR_H
  25. #define _CRYPTO_TESTMGR_H
  26. #include <linux/netlink.h>
  27. #include <linux/zlib.h>
  28. #include <crypto/compress.h>
  29. #define MAX_DIGEST_SIZE 64
  30. #define MAX_TAP 8
  31. #define MAX_KEYLEN 56
  32. #define MAX_IVLEN 32
  33. struct hash_testvec {
  34. /* only used with keyed hash algorithms */
  35. char *key;
  36. char *plaintext;
  37. char *digest;
  38. unsigned char tap[MAX_TAP];
  39. unsigned char psize;
  40. unsigned char np;
  41. unsigned char ksize;
  42. };
  43. struct cipher_testvec {
  44. char *key;
  45. char *iv;
  46. char *input;
  47. char *result;
  48. unsigned short tap[MAX_TAP];
  49. int np;
  50. unsigned char fail;
  51. unsigned char wk; /* weak key flag */
  52. unsigned char klen;
  53. unsigned short ilen;
  54. unsigned short rlen;
  55. };
  56. struct aead_testvec {
  57. char *key;
  58. char *iv;
  59. char *input;
  60. char *assoc;
  61. char *result;
  62. unsigned char tap[MAX_TAP];
  63. unsigned char atap[MAX_TAP];
  64. int np;
  65. int anp;
  66. unsigned char fail;
  67. unsigned char novrfy; /* ccm dec verification failure expected */
  68. unsigned char wk; /* weak key flag */
  69. unsigned char klen;
  70. unsigned short ilen;
  71. unsigned short alen;
  72. unsigned short rlen;
  73. };
  74. struct cprng_testvec {
  75. char *key;
  76. char *dt;
  77. char *v;
  78. char *result;
  79. unsigned char klen;
  80. unsigned short dtlen;
  81. unsigned short vlen;
  82. unsigned short rlen;
  83. unsigned short loops;
  84. };
  85. static char zeroed_string[48];
  86. /*
  87. * MD4 test vectors from RFC1320
  88. */
  89. #define MD4_TEST_VECTORS 7
  90. static struct hash_testvec md4_tv_template [] = {
  91. {
  92. .plaintext = "",
  93. .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
  94. "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
  95. }, {
  96. .plaintext = "a",
  97. .psize = 1,
  98. .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
  99. "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
  100. }, {
  101. .plaintext = "abc",
  102. .psize = 3,
  103. .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
  104. "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
  105. }, {
  106. .plaintext = "message digest",
  107. .psize = 14,
  108. .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
  109. "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
  110. }, {
  111. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  112. .psize = 26,
  113. .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
  114. "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
  115. .np = 2,
  116. .tap = { 13, 13 },
  117. }, {
  118. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  119. .psize = 62,
  120. .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
  121. "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
  122. }, {
  123. .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
  124. "45678901234567890",
  125. .psize = 80,
  126. .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
  127. "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
  128. },
  129. };
  130. /*
  131. * MD5 test vectors from RFC1321
  132. */
  133. #define MD5_TEST_VECTORS 7
  134. static struct hash_testvec md5_tv_template[] = {
  135. {
  136. .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
  137. "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
  138. }, {
  139. .plaintext = "a",
  140. .psize = 1,
  141. .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
  142. "\x31\xc3\x99\xe2\x69\x77\x26\x61",
  143. }, {
  144. .plaintext = "abc",
  145. .psize = 3,
  146. .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
  147. "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
  148. }, {
  149. .plaintext = "message digest",
  150. .psize = 14,
  151. .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
  152. "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
  153. }, {
  154. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  155. .psize = 26,
  156. .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
  157. "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
  158. .np = 2,
  159. .tap = {13, 13}
  160. }, {
  161. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  162. .psize = 62,
  163. .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
  164. "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
  165. }, {
  166. .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
  167. "345678901234567890",
  168. .psize = 80,
  169. .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
  170. "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
  171. }
  172. };
  173. /*
  174. * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
  175. */
  176. #define RMD128_TEST_VECTORS 10
  177. static struct hash_testvec rmd128_tv_template[] = {
  178. {
  179. .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
  180. "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
  181. }, {
  182. .plaintext = "a",
  183. .psize = 1,
  184. .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
  185. "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
  186. }, {
  187. .plaintext = "abc",
  188. .psize = 3,
  189. .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
  190. "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
  191. }, {
  192. .plaintext = "message digest",
  193. .psize = 14,
  194. .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
  195. "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
  196. }, {
  197. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  198. .psize = 26,
  199. .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
  200. "\x10\x71\x49\x22\xb3\x71\x83\x4e",
  201. }, {
  202. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  203. "fghijklmnopqrstuvwxyz0123456789",
  204. .psize = 62,
  205. .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
  206. "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
  207. }, {
  208. .plaintext = "1234567890123456789012345678901234567890"
  209. "1234567890123456789012345678901234567890",
  210. .psize = 80,
  211. .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
  212. "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
  213. }, {
  214. .plaintext = "abcdbcdecdefdefgefghfghighij"
  215. "hijkijkljklmklmnlmnomnopnopq",
  216. .psize = 56,
  217. .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
  218. "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
  219. .np = 2,
  220. .tap = { 28, 28 },
  221. }, {
  222. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  223. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  224. "lmnopqrsmnopqrstnopqrstu",
  225. .psize = 112,
  226. .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
  227. "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
  228. }, {
  229. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  230. .psize = 32,
  231. .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
  232. "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
  233. }
  234. };
  235. /*
  236. * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
  237. */
  238. #define RMD160_TEST_VECTORS 10
  239. static struct hash_testvec rmd160_tv_template[] = {
  240. {
  241. .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
  242. "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
  243. }, {
  244. .plaintext = "a",
  245. .psize = 1,
  246. .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
  247. "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
  248. }, {
  249. .plaintext = "abc",
  250. .psize = 3,
  251. .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
  252. "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
  253. }, {
  254. .plaintext = "message digest",
  255. .psize = 14,
  256. .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
  257. "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
  258. }, {
  259. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  260. .psize = 26,
  261. .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
  262. "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
  263. }, {
  264. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  265. "fghijklmnopqrstuvwxyz0123456789",
  266. .psize = 62,
  267. .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
  268. "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
  269. }, {
  270. .plaintext = "1234567890123456789012345678901234567890"
  271. "1234567890123456789012345678901234567890",
  272. .psize = 80,
  273. .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
  274. "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
  275. }, {
  276. .plaintext = "abcdbcdecdefdefgefghfghighij"
  277. "hijkijkljklmklmnlmnomnopnopq",
  278. .psize = 56,
  279. .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
  280. "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
  281. .np = 2,
  282. .tap = { 28, 28 },
  283. }, {
  284. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  285. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  286. "lmnopqrsmnopqrstnopqrstu",
  287. .psize = 112,
  288. .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
  289. "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
  290. }, {
  291. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  292. .psize = 32,
  293. .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
  294. "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
  295. }
  296. };
  297. /*
  298. * RIPEMD-256 test vectors
  299. */
  300. #define RMD256_TEST_VECTORS 8
  301. static struct hash_testvec rmd256_tv_template[] = {
  302. {
  303. .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
  304. "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
  305. "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
  306. "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
  307. }, {
  308. .plaintext = "a",
  309. .psize = 1,
  310. .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
  311. "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
  312. "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
  313. "\xcd\x88\x3a\x91\x34\x69\x29\x25",
  314. }, {
  315. .plaintext = "abc",
  316. .psize = 3,
  317. .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
  318. "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
  319. "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
  320. "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
  321. }, {
  322. .plaintext = "message digest",
  323. .psize = 14,
  324. .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
  325. "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
  326. "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
  327. "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
  328. }, {
  329. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  330. .psize = 26,
  331. .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
  332. "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
  333. "\x78\x96\x11\x8a\x51\x97\x96\x87"
  334. "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
  335. }, {
  336. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  337. "fghijklmnopqrstuvwxyz0123456789",
  338. .psize = 62,
  339. .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
  340. "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
  341. "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
  342. "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
  343. }, {
  344. .plaintext = "1234567890123456789012345678901234567890"
  345. "1234567890123456789012345678901234567890",
  346. .psize = 80,
  347. .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
  348. "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
  349. "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
  350. "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
  351. }, {
  352. .plaintext = "abcdbcdecdefdefgefghfghighij"
  353. "hijkijkljklmklmnlmnomnopnopq",
  354. .psize = 56,
  355. .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
  356. "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
  357. "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
  358. "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
  359. .np = 2,
  360. .tap = { 28, 28 },
  361. }
  362. };
  363. /*
  364. * RIPEMD-320 test vectors
  365. */
  366. #define RMD320_TEST_VECTORS 8
  367. static struct hash_testvec rmd320_tv_template[] = {
  368. {
  369. .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
  370. "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
  371. "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
  372. "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
  373. }, {
  374. .plaintext = "a",
  375. .psize = 1,
  376. .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
  377. "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
  378. "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
  379. "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
  380. }, {
  381. .plaintext = "abc",
  382. .psize = 3,
  383. .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
  384. "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
  385. "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
  386. "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
  387. }, {
  388. .plaintext = "message digest",
  389. .psize = 14,
  390. .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
  391. "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
  392. "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
  393. "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
  394. }, {
  395. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  396. .psize = 26,
  397. .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
  398. "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
  399. "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
  400. "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
  401. }, {
  402. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  403. "fghijklmnopqrstuvwxyz0123456789",
  404. .psize = 62,
  405. .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
  406. "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
  407. "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
  408. "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
  409. }, {
  410. .plaintext = "1234567890123456789012345678901234567890"
  411. "1234567890123456789012345678901234567890",
  412. .psize = 80,
  413. .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
  414. "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
  415. "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
  416. "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
  417. }, {
  418. .plaintext = "abcdbcdecdefdefgefghfghighij"
  419. "hijkijkljklmklmnlmnomnopnopq",
  420. .psize = 56,
  421. .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
  422. "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
  423. "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
  424. "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
  425. .np = 2,
  426. .tap = { 28, 28 },
  427. }
  428. };
  429. /*
  430. * SHA1 test vectors from from FIPS PUB 180-1
  431. * Long vector from CAVS 5.0
  432. */
  433. #define SHA1_TEST_VECTORS 3
  434. static struct hash_testvec sha1_tv_template[] = {
  435. {
  436. .plaintext = "abc",
  437. .psize = 3,
  438. .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
  439. "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
  440. }, {
  441. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  442. .psize = 56,
  443. .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
  444. "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
  445. .np = 2,
  446. .tap = { 28, 28 }
  447. }, {
  448. .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
  449. "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
  450. "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
  451. "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
  452. "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
  453. "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
  454. "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
  455. "\x72\x28\x26\xc0\x66\x86\x9e\xda"
  456. "\xcd\x73\xb2\x54\x80\x35\x18\x58"
  457. "\x13\xe2\x26\x34\xa9\xda\x44\x00"
  458. "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
  459. "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
  460. "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
  461. "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
  462. "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
  463. "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
  464. "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
  465. "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
  466. "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
  467. "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
  468. "\x5a\x90\x11",
  469. .psize = 163,
  470. .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
  471. "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
  472. .np = 4,
  473. .tap = { 63, 64, 31, 5 }
  474. }
  475. };
  476. /*
  477. * SHA224 test vectors from from FIPS PUB 180-2
  478. */
  479. #define SHA224_TEST_VECTORS 2
  480. static struct hash_testvec sha224_tv_template[] = {
  481. {
  482. .plaintext = "abc",
  483. .psize = 3,
  484. .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
  485. "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
  486. "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
  487. "\xE3\x6C\x9D\xA7",
  488. }, {
  489. .plaintext =
  490. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  491. .psize = 56,
  492. .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
  493. "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
  494. "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
  495. "\x52\x52\x25\x25",
  496. .np = 2,
  497. .tap = { 28, 28 }
  498. }
  499. };
  500. /*
  501. * SHA256 test vectors from from NIST
  502. */
  503. #define SHA256_TEST_VECTORS 2
  504. static struct hash_testvec sha256_tv_template[] = {
  505. {
  506. .plaintext = "abc",
  507. .psize = 3,
  508. .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
  509. "\x41\x41\x40\xde\x5d\xae\x22\x23"
  510. "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
  511. "\xb4\x10\xff\x61\xf2\x00\x15\xad",
  512. }, {
  513. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  514. .psize = 56,
  515. .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
  516. "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
  517. "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
  518. "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
  519. .np = 2,
  520. .tap = { 28, 28 }
  521. },
  522. };
  523. /*
  524. * SHA384 test vectors from from NIST and kerneli
  525. */
  526. #define SHA384_TEST_VECTORS 4
  527. static struct hash_testvec sha384_tv_template[] = {
  528. {
  529. .plaintext= "abc",
  530. .psize = 3,
  531. .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
  532. "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
  533. "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
  534. "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
  535. "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
  536. "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
  537. }, {
  538. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  539. .psize = 56,
  540. .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
  541. "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
  542. "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
  543. "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
  544. "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
  545. "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
  546. }, {
  547. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  548. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  549. .psize = 112,
  550. .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
  551. "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
  552. "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
  553. "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
  554. "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
  555. "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
  556. }, {
  557. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  558. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  559. .psize = 104,
  560. .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
  561. "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
  562. "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
  563. "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
  564. "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
  565. "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
  566. .np = 4,
  567. .tap = { 26, 26, 26, 26 }
  568. },
  569. };
  570. /*
  571. * SHA512 test vectors from from NIST and kerneli
  572. */
  573. #define SHA512_TEST_VECTORS 4
  574. static struct hash_testvec sha512_tv_template[] = {
  575. {
  576. .plaintext = "abc",
  577. .psize = 3,
  578. .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
  579. "\xcc\x41\x73\x49\xae\x20\x41\x31"
  580. "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
  581. "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
  582. "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
  583. "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
  584. "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
  585. "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
  586. }, {
  587. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  588. .psize = 56,
  589. .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
  590. "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
  591. "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
  592. "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
  593. "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
  594. "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
  595. "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
  596. "\x54\xec\x63\x12\x38\xca\x34\x45",
  597. }, {
  598. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  599. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  600. .psize = 112,
  601. .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
  602. "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
  603. "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
  604. "\x72\x99\xae\xad\xb6\x88\x90\x18"
  605. "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
  606. "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
  607. "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
  608. "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
  609. }, {
  610. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  611. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  612. .psize = 104,
  613. .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
  614. "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
  615. "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
  616. "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
  617. "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
  618. "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
  619. "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
  620. "\xed\xb4\x19\x87\x23\x28\x50\xc9",
  621. .np = 4,
  622. .tap = { 26, 26, 26, 26 }
  623. },
  624. };
  625. /*
  626. * WHIRLPOOL test vectors from Whirlpool package
  627. * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
  628. * submission
  629. */
  630. #define WP512_TEST_VECTORS 8
  631. static struct hash_testvec wp512_tv_template[] = {
  632. {
  633. .plaintext = "",
  634. .psize = 0,
  635. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  636. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  637. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  638. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  639. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  640. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
  641. "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
  642. "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
  643. }, {
  644. .plaintext = "a",
  645. .psize = 1,
  646. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  647. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  648. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  649. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  650. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  651. "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
  652. "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
  653. "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
  654. }, {
  655. .plaintext = "abc",
  656. .psize = 3,
  657. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  658. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  659. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  660. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  661. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  662. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
  663. "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
  664. "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
  665. }, {
  666. .plaintext = "message digest",
  667. .psize = 14,
  668. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  669. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  670. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  671. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  672. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  673. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
  674. "\x92\xED\x92\x00\x52\x83\x8F\x33"
  675. "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
  676. }, {
  677. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  678. .psize = 26,
  679. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  680. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  681. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  682. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  683. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  684. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
  685. "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
  686. "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
  687. }, {
  688. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  689. "abcdefghijklmnopqrstuvwxyz0123456789",
  690. .psize = 62,
  691. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  692. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  693. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  694. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  695. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  696. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
  697. "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
  698. "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
  699. }, {
  700. .plaintext = "1234567890123456789012345678901234567890"
  701. "1234567890123456789012345678901234567890",
  702. .psize = 80,
  703. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  704. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  705. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  706. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  707. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  708. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
  709. "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
  710. "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
  711. }, {
  712. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  713. .psize = 32,
  714. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  715. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  716. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  717. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  718. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  719. "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
  720. "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
  721. "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
  722. },
  723. };
  724. #define WP384_TEST_VECTORS 8
  725. static struct hash_testvec wp384_tv_template[] = {
  726. {
  727. .plaintext = "",
  728. .psize = 0,
  729. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  730. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  731. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  732. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  733. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  734. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
  735. }, {
  736. .plaintext = "a",
  737. .psize = 1,
  738. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  739. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  740. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  741. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  742. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  743. "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
  744. }, {
  745. .plaintext = "abc",
  746. .psize = 3,
  747. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  748. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  749. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  750. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  751. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  752. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
  753. }, {
  754. .plaintext = "message digest",
  755. .psize = 14,
  756. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  757. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  758. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  759. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  760. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  761. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
  762. }, {
  763. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  764. .psize = 26,
  765. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  766. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  767. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  768. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  769. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  770. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
  771. }, {
  772. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  773. "abcdefghijklmnopqrstuvwxyz0123456789",
  774. .psize = 62,
  775. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  776. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  777. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  778. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  779. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  780. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
  781. }, {
  782. .plaintext = "1234567890123456789012345678901234567890"
  783. "1234567890123456789012345678901234567890",
  784. .psize = 80,
  785. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  786. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  787. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  788. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  789. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  790. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
  791. }, {
  792. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  793. .psize = 32,
  794. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  795. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  796. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  797. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  798. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  799. "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
  800. },
  801. };
  802. #define WP256_TEST_VECTORS 8
  803. static struct hash_testvec wp256_tv_template[] = {
  804. {
  805. .plaintext = "",
  806. .psize = 0,
  807. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  808. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  809. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  810. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
  811. }, {
  812. .plaintext = "a",
  813. .psize = 1,
  814. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  815. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  816. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  817. "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
  818. }, {
  819. .plaintext = "abc",
  820. .psize = 3,
  821. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  822. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  823. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  824. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
  825. }, {
  826. .plaintext = "message digest",
  827. .psize = 14,
  828. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  829. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  830. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  831. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
  832. }, {
  833. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  834. .psize = 26,
  835. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  836. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  837. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  838. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
  839. }, {
  840. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  841. "abcdefghijklmnopqrstuvwxyz0123456789",
  842. .psize = 62,
  843. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  844. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  845. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  846. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
  847. }, {
  848. .plaintext = "1234567890123456789012345678901234567890"
  849. "1234567890123456789012345678901234567890",
  850. .psize = 80,
  851. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  852. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  853. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  854. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
  855. }, {
  856. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  857. .psize = 32,
  858. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  859. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  860. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  861. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
  862. },
  863. };
  864. /*
  865. * TIGER test vectors from Tiger website
  866. */
  867. #define TGR192_TEST_VECTORS 6
  868. static struct hash_testvec tgr192_tv_template[] = {
  869. {
  870. .plaintext = "",
  871. .psize = 0,
  872. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  873. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  874. "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
  875. }, {
  876. .plaintext = "abc",
  877. .psize = 3,
  878. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  879. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  880. "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
  881. }, {
  882. .plaintext = "Tiger",
  883. .psize = 5,
  884. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  885. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  886. "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
  887. }, {
  888. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  889. .psize = 64,
  890. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  891. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  892. "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
  893. }, {
  894. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  895. .psize = 64,
  896. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  897. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  898. "\x57\x89\x65\x65\x97\x5f\x91\x97",
  899. }, {
  900. .plaintext = "Tiger - A Fast New Hash Function, "
  901. "by Ross Anderson and Eli Biham, "
  902. "proceedings of Fast Software Encryption 3, "
  903. "Cambridge, 1996.",
  904. .psize = 125,
  905. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  906. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  907. "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
  908. },
  909. };
  910. #define TGR160_TEST_VECTORS 6
  911. static struct hash_testvec tgr160_tv_template[] = {
  912. {
  913. .plaintext = "",
  914. .psize = 0,
  915. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  916. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  917. "\xf3\x73\xde\x2d",
  918. }, {
  919. .plaintext = "abc",
  920. .psize = 3,
  921. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  922. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  923. "\x93\x5f\x7b\x95",
  924. }, {
  925. .plaintext = "Tiger",
  926. .psize = 5,
  927. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  928. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  929. "\x37\x79\x0c\x11",
  930. }, {
  931. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  932. .psize = 64,
  933. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  934. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  935. "\xb5\x86\x44\x50",
  936. }, {
  937. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  938. .psize = 64,
  939. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  940. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  941. "\x57\x89\x65\x65",
  942. }, {
  943. .plaintext = "Tiger - A Fast New Hash Function, "
  944. "by Ross Anderson and Eli Biham, "
  945. "proceedings of Fast Software Encryption 3, "
  946. "Cambridge, 1996.",
  947. .psize = 125,
  948. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  949. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  950. "\xdd\x68\x15\x1d",
  951. },
  952. };
  953. #define TGR128_TEST_VECTORS 6
  954. static struct hash_testvec tgr128_tv_template[] = {
  955. {
  956. .plaintext = "",
  957. .psize = 0,
  958. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  959. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
  960. }, {
  961. .plaintext = "abc",
  962. .psize = 3,
  963. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  964. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
  965. }, {
  966. .plaintext = "Tiger",
  967. .psize = 5,
  968. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  969. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
  970. }, {
  971. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  972. .psize = 64,
  973. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  974. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
  975. }, {
  976. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  977. .psize = 64,
  978. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  979. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
  980. }, {
  981. .plaintext = "Tiger - A Fast New Hash Function, "
  982. "by Ross Anderson and Eli Biham, "
  983. "proceedings of Fast Software Encryption 3, "
  984. "Cambridge, 1996.",
  985. .psize = 125,
  986. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  987. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
  988. },
  989. };
  990. #define GHASH_TEST_VECTORS 1
  991. static struct hash_testvec ghash_tv_template[] =
  992. {
  993. {
  994. .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
  995. .ksize = 16,
  996. .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
  997. .psize = 16,
  998. .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
  999. "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
  1000. },
  1001. };
  1002. /*
  1003. * HMAC-MD5 test vectors from RFC2202
  1004. * (These need to be fixed to not use strlen).
  1005. */
  1006. #define HMAC_MD5_TEST_VECTORS 7
  1007. static struct hash_testvec hmac_md5_tv_template[] =
  1008. {
  1009. {
  1010. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1011. .ksize = 16,
  1012. .plaintext = "Hi There",
  1013. .psize = 8,
  1014. .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
  1015. "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
  1016. }, {
  1017. .key = "Jefe",
  1018. .ksize = 4,
  1019. .plaintext = "what do ya want for nothing?",
  1020. .psize = 28,
  1021. .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
  1022. "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
  1023. .np = 2,
  1024. .tap = {14, 14}
  1025. }, {
  1026. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1027. .ksize = 16,
  1028. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1029. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1030. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1031. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1032. .psize = 50,
  1033. .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
  1034. "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
  1035. }, {
  1036. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1037. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1038. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1039. .ksize = 25,
  1040. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1041. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1042. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1043. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1044. .psize = 50,
  1045. .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
  1046. "\x3a\x75\x16\x47\x46\xff\xaa\x79",
  1047. }, {
  1048. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1049. .ksize = 16,
  1050. .plaintext = "Test With Truncation",
  1051. .psize = 20,
  1052. .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
  1053. "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
  1054. }, {
  1055. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1056. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1057. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1058. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1059. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1060. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1061. "\xaa\xaa",
  1062. .ksize = 80,
  1063. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1064. .psize = 54,
  1065. .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
  1066. "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
  1067. }, {
  1068. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1069. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1070. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1071. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1072. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1073. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1074. "\xaa\xaa",
  1075. .ksize = 80,
  1076. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1077. "Block-Size Data",
  1078. .psize = 73,
  1079. .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
  1080. "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
  1081. },
  1082. };
  1083. /*
  1084. * HMAC-RIPEMD128 test vectors from RFC2286
  1085. */
  1086. #define HMAC_RMD128_TEST_VECTORS 7
  1087. static struct hash_testvec hmac_rmd128_tv_template[] = {
  1088. {
  1089. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1090. .ksize = 16,
  1091. .plaintext = "Hi There",
  1092. .psize = 8,
  1093. .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
  1094. "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
  1095. }, {
  1096. .key = "Jefe",
  1097. .ksize = 4,
  1098. .plaintext = "what do ya want for nothing?",
  1099. .psize = 28,
  1100. .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
  1101. "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
  1102. .np = 2,
  1103. .tap = { 14, 14 },
  1104. }, {
  1105. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1106. .ksize = 16,
  1107. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1108. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1109. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1110. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1111. .psize = 50,
  1112. .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
  1113. "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
  1114. }, {
  1115. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1116. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1117. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1118. .ksize = 25,
  1119. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1120. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1121. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1122. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1123. .psize = 50,
  1124. .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
  1125. "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
  1126. }, {
  1127. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1128. .ksize = 16,
  1129. .plaintext = "Test With Truncation",
  1130. .psize = 20,
  1131. .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
  1132. "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
  1133. }, {
  1134. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1135. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1136. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1137. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1138. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1139. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1140. "\xaa\xaa",
  1141. .ksize = 80,
  1142. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1143. .psize = 54,
  1144. .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
  1145. "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
  1146. }, {
  1147. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1148. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1149. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1150. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1151. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1152. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1153. "\xaa\xaa",
  1154. .ksize = 80,
  1155. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1156. "Block-Size Data",
  1157. .psize = 73,
  1158. .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
  1159. "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
  1160. },
  1161. };
  1162. /*
  1163. * HMAC-RIPEMD160 test vectors from RFC2286
  1164. */
  1165. #define HMAC_RMD160_TEST_VECTORS 7
  1166. static struct hash_testvec hmac_rmd160_tv_template[] = {
  1167. {
  1168. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1169. .ksize = 20,
  1170. .plaintext = "Hi There",
  1171. .psize = 8,
  1172. .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
  1173. "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
  1174. }, {
  1175. .key = "Jefe",
  1176. .ksize = 4,
  1177. .plaintext = "what do ya want for nothing?",
  1178. .psize = 28,
  1179. .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
  1180. "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
  1181. .np = 2,
  1182. .tap = { 14, 14 },
  1183. }, {
  1184. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1185. .ksize = 20,
  1186. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1187. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1188. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1189. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1190. .psize = 50,
  1191. .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
  1192. "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
  1193. }, {
  1194. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1195. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1196. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1197. .ksize = 25,
  1198. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1199. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1200. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1201. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1202. .psize = 50,
  1203. .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
  1204. "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
  1205. }, {
  1206. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1207. .ksize = 20,
  1208. .plaintext = "Test With Truncation",
  1209. .psize = 20,
  1210. .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
  1211. "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
  1212. }, {
  1213. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1214. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1215. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1216. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1217. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1218. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1219. "\xaa\xaa",
  1220. .ksize = 80,
  1221. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1222. .psize = 54,
  1223. .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
  1224. "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
  1225. }, {
  1226. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1227. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1228. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1229. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1230. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1231. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1232. "\xaa\xaa",
  1233. .ksize = 80,
  1234. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1235. "Block-Size Data",
  1236. .psize = 73,
  1237. .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
  1238. "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
  1239. },
  1240. };
  1241. /*
  1242. * HMAC-SHA1 test vectors from RFC2202
  1243. */
  1244. #define HMAC_SHA1_TEST_VECTORS 7
  1245. static struct hash_testvec hmac_sha1_tv_template[] = {
  1246. {
  1247. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1248. .ksize = 20,
  1249. .plaintext = "Hi There",
  1250. .psize = 8,
  1251. .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
  1252. "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
  1253. "\x46\xbe",
  1254. }, {
  1255. .key = "Jefe",
  1256. .ksize = 4,
  1257. .plaintext = "what do ya want for nothing?",
  1258. .psize = 28,
  1259. .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
  1260. "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
  1261. .np = 2,
  1262. .tap = { 14, 14 }
  1263. }, {
  1264. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1265. .ksize = 20,
  1266. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1267. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1268. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1269. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1270. .psize = 50,
  1271. .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
  1272. "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
  1273. }, {
  1274. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1275. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1276. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1277. .ksize = 25,
  1278. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1279. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1280. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1281. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1282. .psize = 50,
  1283. .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
  1284. "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
  1285. }, {
  1286. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1287. .ksize = 20,
  1288. .plaintext = "Test With Truncation",
  1289. .psize = 20,
  1290. .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
  1291. "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
  1292. }, {
  1293. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1294. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1295. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1296. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1297. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1298. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1299. "\xaa\xaa",
  1300. .ksize = 80,
  1301. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1302. .psize = 54,
  1303. .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
  1304. "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
  1305. }, {
  1306. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1307. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1308. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1309. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1310. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1311. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1312. "\xaa\xaa",
  1313. .ksize = 80,
  1314. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1315. "Block-Size Data",
  1316. .psize = 73,
  1317. .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
  1318. "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
  1319. },
  1320. };
  1321. /*
  1322. * SHA224 HMAC test vectors from RFC4231
  1323. */
  1324. #define HMAC_SHA224_TEST_VECTORS 4
  1325. static struct hash_testvec hmac_sha224_tv_template[] = {
  1326. {
  1327. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1328. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1329. "\x0b\x0b\x0b\x0b",
  1330. .ksize = 20,
  1331. /* ("Hi There") */
  1332. .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
  1333. .psize = 8,
  1334. .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
  1335. "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
  1336. "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
  1337. "\x53\x68\x4b\x22",
  1338. }, {
  1339. .key = "Jefe",
  1340. .ksize = 4,
  1341. /* ("what do ya want for nothing?") */
  1342. .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
  1343. "\x79\x61\x20\x77\x61\x6e\x74\x20"
  1344. "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
  1345. "\x69\x6e\x67\x3f",
  1346. .psize = 28,
  1347. .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
  1348. "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
  1349. "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
  1350. "\x8f\xd0\x5e\x44",
  1351. .np = 4,
  1352. .tap = { 7, 7, 7, 7 }
  1353. }, {
  1354. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1355. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1356. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1357. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1358. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1359. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1360. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1361. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1362. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1363. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1364. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1365. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1366. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1367. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1368. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1369. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1370. "\xaa\xaa\xaa",
  1371. .ksize = 131,
  1372. /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
  1373. .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
  1374. "\x6e\x67\x20\x4c\x61\x72\x67\x65"
  1375. "\x72\x20\x54\x68\x61\x6e\x20\x42"
  1376. "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
  1377. "\x65\x20\x4b\x65\x79\x20\x2d\x20"
  1378. "\x48\x61\x73\x68\x20\x4b\x65\x79"
  1379. "\x20\x46\x69\x72\x73\x74",
  1380. .psize = 54,
  1381. .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
  1382. "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
  1383. "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
  1384. "\x3f\xa6\x87\x0e",
  1385. }, {
  1386. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1387. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1388. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1389. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1390. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1391. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1392. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1393. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1394. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1395. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1396. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1397. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1398. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1399. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1400. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1401. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1402. "\xaa\xaa\xaa",
  1403. .ksize = 131,
  1404. /* ("This is a test using a larger than block-size key and a")
  1405. (" larger than block-size data. The key needs to be")
  1406. (" hashed before being used by the HMAC algorithm.") */
  1407. .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
  1408. "\x61\x20\x74\x65\x73\x74\x20\x75"
  1409. "\x73\x69\x6e\x67\x20\x61\x20\x6c"
  1410. "\x61\x72\x67\x65\x72\x20\x74\x68"
  1411. "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
  1412. "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
  1413. "\x79\x20\x61\x6e\x64\x20\x61\x20"
  1414. "\x6c\x61\x72\x67\x65\x72\x20\x74"
  1415. "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
  1416. "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
  1417. "\x61\x74\x61\x2e\x20\x54\x68\x65"
  1418. "\x20\x6b\x65\x79\x20\x6e\x65\x65"
  1419. "\x64\x73\x20\x74\x6f\x20\x62\x65"
  1420. "\x20\x68\x61\x73\x68\x65\x64\x20"
  1421. "\x62\x65\x66\x6f\x72\x65\x20\x62"
  1422. "\x65\x69\x6e\x67\x20\x75\x73\x65"
  1423. "\x64\x20\x62\x79\x20\x74\x68\x65"
  1424. "\x20\x48\x4d\x41\x43\x20\x61\x6c"
  1425. "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
  1426. .psize = 152,
  1427. .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
  1428. "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
  1429. "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
  1430. "\xf6\xf5\x65\xd1",
  1431. },
  1432. };
  1433. /*
  1434. * HMAC-SHA256 test vectors from
  1435. * draft-ietf-ipsec-ciph-sha-256-01.txt
  1436. */
  1437. #define HMAC_SHA256_TEST_VECTORS 10
  1438. static struct hash_testvec hmac_sha256_tv_template[] = {
  1439. {
  1440. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1441. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1442. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1443. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1444. .ksize = 32,
  1445. .plaintext = "abc",
  1446. .psize = 3,
  1447. .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
  1448. "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
  1449. "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
  1450. "\x92\x75\x90\x21\xcf\xab\x81\x81",
  1451. }, {
  1452. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1453. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1454. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1455. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1456. .ksize = 32,
  1457. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1458. .psize = 56,
  1459. .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
  1460. "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
  1461. "\xe6\x98\xe3\x61\x19\x42\x11\x49"
  1462. "\xea\x8c\x71\x24\x56\x69\x7d\x30",
  1463. }, {
  1464. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1465. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1466. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1467. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1468. .ksize = 32,
  1469. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
  1470. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1471. .psize = 112,
  1472. .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
  1473. "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
  1474. "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
  1475. "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
  1476. }, {
  1477. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1478. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1479. "\x0b\x0b\x0b\x0b\x0b\x0b",
  1480. .ksize = 32,
  1481. .plaintext = "Hi There",
  1482. .psize = 8,
  1483. .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
  1484. "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
  1485. "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
  1486. "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
  1487. }, {
  1488. .key = "Jefe",
  1489. .ksize = 4,
  1490. .plaintext = "what do ya want for nothing?",
  1491. .psize = 28,
  1492. .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
  1493. "\x6a\x04\x24\x26\x08\x95\x75\xc7"
  1494. "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
  1495. "\x9d\xec\x58\xb9\x64\xec\x38\x43",
  1496. .np = 2,
  1497. .tap = { 14, 14 }
  1498. }, {
  1499. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1500. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1501. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1502. .ksize = 32,
  1503. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1504. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1505. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1506. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1507. .psize = 50,
  1508. .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
  1509. "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
  1510. "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
  1511. "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
  1512. }, {
  1513. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1514. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1515. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1516. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  1517. "\x21\x22\x23\x24\x25",
  1518. .ksize = 37,
  1519. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1520. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1521. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1522. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1523. .psize = 50,
  1524. .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
  1525. "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
  1526. "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
  1527. "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
  1528. }, {
  1529. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1530. "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1531. "\x0c\x0c\x0c\x0c\x0c\x0c",
  1532. .ksize = 32,
  1533. .plaintext = "Test With Truncation",
  1534. .psize = 20,
  1535. .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
  1536. "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
  1537. "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
  1538. "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
  1539. }, {
  1540. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1541. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1542. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1543. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1544. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1545. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1546. "\xaa\xaa",
  1547. .ksize = 80,
  1548. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1549. .psize = 54,
  1550. .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
  1551. "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
  1552. "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
  1553. "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
  1554. }, {
  1555. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1556. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1557. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1558. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1559. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1560. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1561. "\xaa\xaa",
  1562. .ksize = 80,
  1563. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
  1564. "One Block-Size Data",
  1565. .psize = 73,
  1566. .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
  1567. "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
  1568. "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
  1569. "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
  1570. },
  1571. };
  1572. #define XCBC_AES_TEST_VECTORS 6
  1573. static struct hash_testvec aes_xcbc128_tv_template[] = {
  1574. {
  1575. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1576. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1577. .plaintext = zeroed_string,
  1578. .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
  1579. "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
  1580. .psize = 0,
  1581. .ksize = 16,
  1582. }, {
  1583. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1584. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1585. .plaintext = "\x00\x01\x02",
  1586. .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
  1587. "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
  1588. .psize = 3,
  1589. .ksize = 16,
  1590. } , {
  1591. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1592. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1593. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1594. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1595. .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
  1596. "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
  1597. .psize = 16,
  1598. .ksize = 16,
  1599. }, {
  1600. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1601. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1602. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1603. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1604. "\x10\x11\x12\x13",
  1605. .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
  1606. "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
  1607. .tap = { 10, 10 },
  1608. .psize = 20,
  1609. .np = 2,
  1610. .ksize = 16,
  1611. }, {
  1612. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1613. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1614. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1615. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1616. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1617. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  1618. .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
  1619. "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
  1620. .psize = 32,
  1621. .ksize = 16,
  1622. }, {
  1623. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1624. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1625. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1626. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1627. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1628. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  1629. "\x20\x21",
  1630. .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
  1631. "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
  1632. .tap = { 17, 17 },
  1633. .psize = 34,
  1634. .np = 2,
  1635. .ksize = 16,
  1636. }
  1637. };
  1638. #define VMAC_AES_TEST_VECTORS 8
  1639. static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
  1640. '\x02', '\x03', '\x02', '\x02',
  1641. '\x02', '\x04', '\x01', '\x07',
  1642. '\x04', '\x01', '\x04', '\x03',};
  1643. static char vmac_string2[128] = {'a', 'b', 'c',};
  1644. static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
  1645. 'a', 'b', 'c', 'a', 'b', 'c',
  1646. 'a', 'b', 'c', 'a', 'b', 'c',
  1647. 'a', 'b', 'c', 'a', 'b', 'c',
  1648. 'a', 'b', 'c', 'a', 'b', 'c',
  1649. 'a', 'b', 'c', 'a', 'b', 'c',
  1650. 'a', 'b', 'c', 'a', 'b', 'c',
  1651. 'a', 'b', 'c', 'a', 'b', 'c',
  1652. };
  1653. static struct hash_testvec aes_vmac128_tv_template[] = {
  1654. {
  1655. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1656. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1657. .plaintext = NULL,
  1658. .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
  1659. .psize = 0,
  1660. .ksize = 16,
  1661. }, {
  1662. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1663. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1664. .plaintext = vmac_string1,
  1665. .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
  1666. .psize = 128,
  1667. .ksize = 16,
  1668. }, {
  1669. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1670. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1671. .plaintext = vmac_string2,
  1672. .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
  1673. .psize = 128,
  1674. .ksize = 16,
  1675. }, {
  1676. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1677. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1678. .plaintext = vmac_string3,
  1679. .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
  1680. .psize = 128,
  1681. .ksize = 16,
  1682. }, {
  1683. .key = "abcdefghijklmnop",
  1684. .plaintext = NULL,
  1685. .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
  1686. .psize = 0,
  1687. .ksize = 16,
  1688. }, {
  1689. .key = "abcdefghijklmnop",
  1690. .plaintext = vmac_string1,
  1691. .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
  1692. .psize = 128,
  1693. .ksize = 16,
  1694. }, {
  1695. .key = "abcdefghijklmnop",
  1696. .plaintext = vmac_string2,
  1697. .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
  1698. .psize = 128,
  1699. .ksize = 16,
  1700. }, {
  1701. .key = "abcdefghijklmnop",
  1702. .plaintext = vmac_string3,
  1703. .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
  1704. .psize = 128,
  1705. .ksize = 16,
  1706. },
  1707. };
  1708. /*
  1709. * SHA384 HMAC test vectors from RFC4231
  1710. */
  1711. #define HMAC_SHA384_TEST_VECTORS 4
  1712. static struct hash_testvec hmac_sha384_tv_template[] = {
  1713. {
  1714. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1715. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1716. "\x0b\x0b\x0b\x0b",
  1717. .ksize = 20,
  1718. .plaintext = "Hi There",
  1719. .psize = 8,
  1720. .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
  1721. "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
  1722. "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
  1723. "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
  1724. "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
  1725. "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
  1726. }, {
  1727. .key = "Jefe",
  1728. .ksize = 4,
  1729. .plaintext = "what do ya want for nothing?",
  1730. .psize = 28,
  1731. .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
  1732. "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
  1733. "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
  1734. "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
  1735. "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
  1736. "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
  1737. .np = 4,
  1738. .tap = { 7, 7, 7, 7 }
  1739. }, {
  1740. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1741. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1742. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1743. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1744. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1745. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1746. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1747. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1748. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1749. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1750. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1751. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1752. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1753. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1754. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1755. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1756. "\xaa\xaa\xaa",
  1757. .ksize = 131,
  1758. .plaintext = "Test Using Larger Than Block-Siz"
  1759. "e Key - Hash Key First",
  1760. .psize = 54,
  1761. .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
  1762. "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
  1763. "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
  1764. "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
  1765. "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
  1766. "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
  1767. }, {
  1768. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1769. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1770. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1771. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1772. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1773. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1774. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1775. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1776. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1777. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1778. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1779. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1780. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1781. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1782. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1783. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1784. "\xaa\xaa\xaa",
  1785. .ksize = 131,
  1786. .plaintext = "This is a test u"
  1787. "sing a larger th"
  1788. "an block-size ke"
  1789. "y and a larger t"
  1790. "han block-size d"
  1791. "ata. The key nee"
  1792. "ds to be hashed "
  1793. "before being use"
  1794. "d by the HMAC al"
  1795. "gorithm.",
  1796. .psize = 152,
  1797. .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
  1798. "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
  1799. "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
  1800. "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
  1801. "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
  1802. "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
  1803. },
  1804. };
  1805. /*
  1806. * SHA512 HMAC test vectors from RFC4231
  1807. */
  1808. #define HMAC_SHA512_TEST_VECTORS 4
  1809. static struct hash_testvec hmac_sha512_tv_template[] = {
  1810. {
  1811. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1812. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1813. "\x0b\x0b\x0b\x0b",
  1814. .ksize = 20,
  1815. .plaintext = "Hi There",
  1816. .psize = 8,
  1817. .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
  1818. "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
  1819. "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
  1820. "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
  1821. "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
  1822. "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
  1823. "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
  1824. "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
  1825. }, {
  1826. .key = "Jefe",
  1827. .ksize = 4,
  1828. .plaintext = "what do ya want for nothing?",
  1829. .psize = 28,
  1830. .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
  1831. "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
  1832. "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
  1833. "\x10\x27\x0c\xd7\xea\x25\x05\x54"
  1834. "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
  1835. "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
  1836. "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
  1837. "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
  1838. .np = 4,
  1839. .tap = { 7, 7, 7, 7 }
  1840. }, {
  1841. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1842. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1843. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1844. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1845. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1846. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1847. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1848. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1849. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1850. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1851. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1852. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1853. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1854. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1855. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1856. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1857. "\xaa\xaa\xaa",
  1858. .ksize = 131,
  1859. .plaintext = "Test Using Large"
  1860. "r Than Block-Siz"
  1861. "e Key - Hash Key"
  1862. " First",
  1863. .psize = 54,
  1864. .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
  1865. "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
  1866. "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
  1867. "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
  1868. "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
  1869. "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
  1870. "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
  1871. "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
  1872. }, {
  1873. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1874. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1875. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1876. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1877. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1878. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1879. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1880. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1881. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1882. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1883. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1884. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1885. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1886. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1887. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1888. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1889. "\xaa\xaa\xaa",
  1890. .ksize = 131,
  1891. .plaintext =
  1892. "This is a test u"
  1893. "sing a larger th"
  1894. "an block-size ke"
  1895. "y and a larger t"
  1896. "han block-size d"
  1897. "ata. The key nee"
  1898. "ds to be hashed "
  1899. "before being use"
  1900. "d by the HMAC al"
  1901. "gorithm.",
  1902. .psize = 152,
  1903. .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
  1904. "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
  1905. "\xde\xbd\x71\xf8\x86\x72\x89\x86"
  1906. "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
  1907. "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
  1908. "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
  1909. "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
  1910. "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
  1911. },
  1912. };
  1913. /*
  1914. * DES test vectors.
  1915. */
  1916. #define DES_ENC_TEST_VECTORS 10
  1917. #define DES_DEC_TEST_VECTORS 4
  1918. #define DES_CBC_ENC_TEST_VECTORS 5
  1919. #define DES_CBC_DEC_TEST_VECTORS 4
  1920. #define DES3_EDE_ENC_TEST_VECTORS 3
  1921. #define DES3_EDE_DEC_TEST_VECTORS 3
  1922. #define DES3_EDE_CBC_ENC_TEST_VECTORS 1
  1923. #define DES3_EDE_CBC_DEC_TEST_VECTORS 1
  1924. static struct cipher_testvec des_enc_tv_template[] = {
  1925. { /* From Applied Cryptography */
  1926. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1927. .klen = 8,
  1928. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1929. .ilen = 8,
  1930. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1931. .rlen = 8,
  1932. }, { /* Same key, different plaintext block */
  1933. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1934. .klen = 8,
  1935. .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
  1936. .ilen = 8,
  1937. .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1938. .rlen = 8,
  1939. }, { /* Sbox test from NBS */
  1940. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1941. .klen = 8,
  1942. .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1943. .ilen = 8,
  1944. .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1945. .rlen = 8,
  1946. }, { /* Three blocks */
  1947. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1948. .klen = 8,
  1949. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1950. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1951. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1952. .ilen = 24,
  1953. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1954. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1955. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1956. .rlen = 24,
  1957. }, { /* Weak key */
  1958. .fail = 1,
  1959. .wk = 1,
  1960. .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
  1961. .klen = 8,
  1962. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1963. .ilen = 8,
  1964. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1965. .rlen = 8,
  1966. }, { /* Two blocks -- for testing encryption across pages */
  1967. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1968. .klen = 8,
  1969. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1970. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1971. .ilen = 16,
  1972. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1973. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1974. .rlen = 16,
  1975. .np = 2,
  1976. .tap = { 8, 8 }
  1977. }, { /* Four blocks -- for testing encryption with chunking */
  1978. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1979. .klen = 8,
  1980. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1981. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1982. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
  1983. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1984. .ilen = 32,
  1985. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1986. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1987. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
  1988. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1989. .rlen = 32,
  1990. .np = 3,
  1991. .tap = { 14, 10, 8 }
  1992. }, {
  1993. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1994. .klen = 8,
  1995. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1996. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1997. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1998. .ilen = 24,
  1999. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2000. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  2001. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  2002. .rlen = 24,
  2003. .np = 4,
  2004. .tap = { 2, 1, 3, 18 }
  2005. }, {
  2006. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2007. .klen = 8,
  2008. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2009. "\x22\x33\x44\x55\x66\x77\x88\x99",
  2010. .ilen = 16,
  2011. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2012. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  2013. .rlen = 16,
  2014. .np = 5,
  2015. .tap = { 2, 2, 2, 2, 8 }
  2016. }, {
  2017. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2018. .klen = 8,
  2019. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  2020. .ilen = 8,
  2021. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  2022. .rlen = 8,
  2023. .np = 8,
  2024. .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
  2025. },
  2026. };
  2027. static struct cipher_testvec des_dec_tv_template[] = {
  2028. { /* From Applied Cryptography */
  2029. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2030. .klen = 8,
  2031. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  2032. .ilen = 8,
  2033. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  2034. .rlen = 8,
  2035. }, { /* Sbox test from NBS */
  2036. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  2037. .klen = 8,
  2038. .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2039. .ilen = 8,
  2040. .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  2041. .rlen = 8,
  2042. }, { /* Two blocks, for chunking test */
  2043. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2044. .klen = 8,
  2045. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2046. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2047. .ilen = 16,
  2048. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2049. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  2050. .rlen = 16,
  2051. .np = 2,
  2052. .tap = { 8, 8 }
  2053. }, {
  2054. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2055. .klen = 8,
  2056. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2057. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2058. .ilen = 16,
  2059. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2060. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  2061. .rlen = 16,
  2062. .np = 3,
  2063. .tap = { 3, 12, 1 }
  2064. },
  2065. };
  2066. static struct cipher_testvec des_cbc_enc_tv_template[] = {
  2067. { /* From OpenSSL */
  2068. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2069. .klen = 8,
  2070. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2071. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2072. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2073. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2074. .ilen = 24,
  2075. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  2076. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  2077. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  2078. .rlen = 24,
  2079. }, { /* FIPS Pub 81 */
  2080. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2081. .klen = 8,
  2082. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  2083. .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  2084. .ilen = 8,
  2085. .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2086. .rlen = 8,
  2087. }, {
  2088. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2089. .klen = 8,
  2090. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2091. .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2092. .ilen = 8,
  2093. .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2094. .rlen = 8,
  2095. }, {
  2096. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2097. .klen = 8,
  2098. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2099. .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2100. .ilen = 8,
  2101. .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2102. .rlen = 8,
  2103. }, { /* Copy of openssl vector for chunk testing */
  2104. /* From OpenSSL */
  2105. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2106. .klen = 8,
  2107. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2108. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2109. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2110. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2111. .ilen = 24,
  2112. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  2113. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  2114. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  2115. .rlen = 24,
  2116. .np = 2,
  2117. .tap = { 13, 11 }
  2118. },
  2119. };
  2120. static struct cipher_testvec des_cbc_dec_tv_template[] = {
  2121. { /* FIPS Pub 81 */
  2122. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2123. .klen = 8,
  2124. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  2125. .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2126. .ilen = 8,
  2127. .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  2128. .rlen = 8,
  2129. }, {
  2130. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2131. .klen = 8,
  2132. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2133. .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2134. .ilen = 8,
  2135. .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2136. .rlen = 8,
  2137. }, {
  2138. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2139. .klen = 8,
  2140. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2141. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2142. .ilen = 8,
  2143. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2144. .rlen = 8,
  2145. }, { /* Copy of above, for chunk testing */
  2146. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2147. .klen = 8,
  2148. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2149. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2150. .ilen = 8,
  2151. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2152. .rlen = 8,
  2153. .np = 2,
  2154. .tap = { 4, 4 }
  2155. },
  2156. };
  2157. static struct cipher_testvec des3_ede_enc_tv_template[] = {
  2158. { /* These are from openssl */
  2159. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2160. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2161. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2162. .klen = 24,
  2163. .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2164. .ilen = 8,
  2165. .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2166. .rlen = 8,
  2167. }, {
  2168. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2169. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2170. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2171. .klen = 24,
  2172. .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2173. .ilen = 8,
  2174. .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2175. .rlen = 8,
  2176. }, {
  2177. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2178. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2179. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2180. .klen = 24,
  2181. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2182. .ilen = 8,
  2183. .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2184. .rlen = 8,
  2185. },
  2186. };
  2187. static struct cipher_testvec des3_ede_dec_tv_template[] = {
  2188. { /* These are from openssl */
  2189. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2190. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2191. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2192. .klen = 24,
  2193. .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2194. .ilen = 8,
  2195. .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2196. .rlen = 8,
  2197. }, {
  2198. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2199. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2200. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2201. .klen = 24,
  2202. .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2203. .ilen = 8,
  2204. .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2205. .rlen = 8,
  2206. }, {
  2207. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2208. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2209. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2210. .klen = 24,
  2211. .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2212. .ilen = 8,
  2213. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2214. .rlen = 8,
  2215. },
  2216. };
  2217. static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
  2218. { /* Generated from openssl */
  2219. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2220. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2221. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2222. .klen = 24,
  2223. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2224. .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2225. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2226. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2227. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2228. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2229. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2230. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2231. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2232. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2233. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2234. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2235. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2236. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2237. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2238. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2239. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2240. .ilen = 128,
  2241. .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2242. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2243. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2244. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2245. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2246. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2247. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2248. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2249. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2250. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2251. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2252. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2253. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2254. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2255. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2256. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2257. .rlen = 128,
  2258. },
  2259. };
  2260. static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
  2261. { /* Generated from openssl */
  2262. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2263. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2264. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2265. .klen = 24,
  2266. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2267. .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2268. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2269. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2270. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2271. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2272. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2273. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2274. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2275. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2276. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2277. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2278. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2279. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2280. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2281. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2282. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2283. .ilen = 128,
  2284. .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2285. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2286. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2287. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2288. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2289. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2290. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2291. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2292. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2293. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2294. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2295. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2296. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2297. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2298. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2299. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2300. .rlen = 128,
  2301. },
  2302. };
  2303. /*
  2304. * Blowfish test vectors.
  2305. */
  2306. #define BF_ENC_TEST_VECTORS 7
  2307. #define BF_DEC_TEST_VECTORS 7
  2308. #define BF_CBC_ENC_TEST_VECTORS 2
  2309. #define BF_CBC_DEC_TEST_VECTORS 2
  2310. #define BF_CTR_ENC_TEST_VECTORS 2
  2311. #define BF_CTR_DEC_TEST_VECTORS 2
  2312. static struct cipher_testvec bf_enc_tv_template[] = {
  2313. { /* DES test vectors from OpenSSL */
  2314. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2315. .klen = 8,
  2316. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2317. .ilen = 8,
  2318. .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2319. .rlen = 8,
  2320. }, {
  2321. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2322. .klen = 8,
  2323. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2324. .ilen = 8,
  2325. .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2326. .rlen = 8,
  2327. }, {
  2328. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2329. .klen = 8,
  2330. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2331. .ilen = 8,
  2332. .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2333. .rlen = 8,
  2334. }, { /* Vary the keylength... */
  2335. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2336. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2337. .klen = 16,
  2338. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2339. .ilen = 8,
  2340. .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2341. .rlen = 8,
  2342. }, {
  2343. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2344. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2345. "\x00\x11\x22\x33\x44",
  2346. .klen = 21,
  2347. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2348. .ilen = 8,
  2349. .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2350. .rlen = 8,
  2351. }, { /* Generated with bf488 */
  2352. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2353. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2354. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2355. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2356. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2357. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2358. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2359. .klen = 56,
  2360. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2361. .ilen = 8,
  2362. .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2363. .rlen = 8,
  2364. }, { /* Generated with Crypto++ */
  2365. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2366. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2367. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2368. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2369. .klen = 32,
  2370. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2371. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2372. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2373. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2374. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2375. .ilen = 40,
  2376. .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
  2377. "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
  2378. "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
  2379. "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
  2380. "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
  2381. .rlen = 40,
  2382. },
  2383. };
  2384. static struct cipher_testvec bf_dec_tv_template[] = {
  2385. { /* DES test vectors from OpenSSL */
  2386. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2387. .klen = 8,
  2388. .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2389. .ilen = 8,
  2390. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2391. .rlen = 8,
  2392. }, {
  2393. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2394. .klen = 8,
  2395. .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2396. .ilen = 8,
  2397. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2398. .rlen = 8,
  2399. }, {
  2400. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2401. .klen = 8,
  2402. .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2403. .ilen = 8,
  2404. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2405. .rlen = 8,
  2406. }, { /* Vary the keylength... */
  2407. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2408. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2409. .klen = 16,
  2410. .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2411. .ilen = 8,
  2412. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2413. .rlen = 8,
  2414. }, {
  2415. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2416. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2417. "\x00\x11\x22\x33\x44",
  2418. .klen = 21,
  2419. .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2420. .ilen = 8,
  2421. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2422. .rlen = 8,
  2423. }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
  2424. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2425. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2426. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2427. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2428. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2429. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2430. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2431. .klen = 56,
  2432. .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2433. .ilen = 8,
  2434. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2435. .rlen = 8,
  2436. }, { /* Generated with Crypto++ */
  2437. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2438. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2439. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2440. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2441. .klen = 32,
  2442. .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
  2443. "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
  2444. "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
  2445. "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
  2446. "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
  2447. .ilen = 40,
  2448. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2449. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2450. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2451. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2452. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2453. .rlen = 40,
  2454. },
  2455. };
  2456. static struct cipher_testvec bf_cbc_enc_tv_template[] = {
  2457. { /* From OpenSSL */
  2458. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2459. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2460. .klen = 16,
  2461. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2462. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2463. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2464. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2465. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2466. .ilen = 32,
  2467. .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2468. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2469. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2470. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2471. .rlen = 32,
  2472. }, { /* Generated with Crypto++ */
  2473. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2474. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2475. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2476. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2477. .klen = 32,
  2478. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2479. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2480. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2481. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2482. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2483. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2484. .ilen = 40,
  2485. .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
  2486. "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
  2487. "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
  2488. "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
  2489. "\x01\x9C\x93\x63\x51\x60\x82\xD2",
  2490. .rlen = 40,
  2491. },
  2492. };
  2493. static struct cipher_testvec bf_cbc_dec_tv_template[] = {
  2494. { /* From OpenSSL */
  2495. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2496. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2497. .klen = 16,
  2498. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2499. .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2500. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2501. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2502. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2503. .ilen = 32,
  2504. .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2505. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2506. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2507. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2508. .rlen = 32,
  2509. }, { /* Generated with Crypto++ */
  2510. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2511. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2512. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2513. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2514. .klen = 32,
  2515. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2516. .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
  2517. "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
  2518. "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
  2519. "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
  2520. "\x01\x9C\x93\x63\x51\x60\x82\xD2",
  2521. .ilen = 40,
  2522. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2523. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2524. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2525. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2526. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2527. .rlen = 40,
  2528. },
  2529. };
  2530. static struct cipher_testvec bf_ctr_enc_tv_template[] = {
  2531. { /* Generated with Crypto++ */
  2532. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2533. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2534. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2535. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2536. .klen = 32,
  2537. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2538. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2539. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2540. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2541. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2542. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2543. .ilen = 40,
  2544. .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2545. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2546. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2547. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2548. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
  2549. .rlen = 40,
  2550. }, { /* Generated with Crypto++ */
  2551. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2552. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2553. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2554. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2555. .klen = 32,
  2556. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2557. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2558. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2559. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2560. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2561. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2562. "\x6D\x04\x9B",
  2563. .ilen = 43,
  2564. .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2565. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2566. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2567. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2568. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
  2569. "\x3D\xA7\xE9",
  2570. .rlen = 43,
  2571. },
  2572. };
  2573. static struct cipher_testvec bf_ctr_dec_tv_template[] = {
  2574. { /* Generated with Crypto++ */
  2575. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2576. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2577. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2578. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2579. .klen = 32,
  2580. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2581. .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2582. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2583. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2584. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2585. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
  2586. .ilen = 40,
  2587. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2588. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2589. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2590. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2591. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2592. .rlen = 40,
  2593. }, { /* Generated with Crypto++ */
  2594. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2595. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2596. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2597. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2598. .klen = 32,
  2599. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2600. .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2601. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2602. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2603. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2604. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
  2605. "\x3D\xA7\xE9",
  2606. .ilen = 43,
  2607. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2608. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2609. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2610. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2611. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2612. "\x6D\x04\x9B",
  2613. .rlen = 43,
  2614. },
  2615. };
  2616. /*
  2617. * Twofish test vectors.
  2618. */
  2619. #define TF_ENC_TEST_VECTORS 4
  2620. #define TF_DEC_TEST_VECTORS 4
  2621. #define TF_CBC_ENC_TEST_VECTORS 5
  2622. #define TF_CBC_DEC_TEST_VECTORS 5
  2623. #define TF_CTR_ENC_TEST_VECTORS 2
  2624. #define TF_CTR_DEC_TEST_VECTORS 2
  2625. #define TF_LRW_ENC_TEST_VECTORS 8
  2626. #define TF_LRW_DEC_TEST_VECTORS 8
  2627. #define TF_XTS_ENC_TEST_VECTORS 5
  2628. #define TF_XTS_DEC_TEST_VECTORS 5
  2629. static struct cipher_testvec tf_enc_tv_template[] = {
  2630. {
  2631. .key = zeroed_string,
  2632. .klen = 16,
  2633. .input = zeroed_string,
  2634. .ilen = 16,
  2635. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2636. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2637. .rlen = 16,
  2638. }, {
  2639. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2640. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2641. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2642. .klen = 24,
  2643. .input = zeroed_string,
  2644. .ilen = 16,
  2645. .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2646. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2647. .rlen = 16,
  2648. }, {
  2649. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2650. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2651. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2652. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2653. .klen = 32,
  2654. .input = zeroed_string,
  2655. .ilen = 16,
  2656. .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2657. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2658. .rlen = 16,
  2659. }, { /* Generated with Crypto++ */
  2660. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  2661. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  2662. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  2663. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  2664. .klen = 32,
  2665. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2666. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2667. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2668. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2669. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2670. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2671. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2672. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2673. .ilen = 64,
  2674. .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
  2675. "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
  2676. "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
  2677. "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
  2678. "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
  2679. "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
  2680. "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
  2681. "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
  2682. .rlen = 64,
  2683. },
  2684. };
  2685. static struct cipher_testvec tf_dec_tv_template[] = {
  2686. {
  2687. .key = zeroed_string,
  2688. .klen = 16,
  2689. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2690. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2691. .ilen = 16,
  2692. .result = zeroed_string,
  2693. .rlen = 16,
  2694. }, {
  2695. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2696. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2697. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2698. .klen = 24,
  2699. .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2700. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2701. .ilen = 16,
  2702. .result = zeroed_string,
  2703. .rlen = 16,
  2704. }, {
  2705. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2706. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2707. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2708. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2709. .klen = 32,
  2710. .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2711. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2712. .ilen = 16,
  2713. .result = zeroed_string,
  2714. .rlen = 16,
  2715. }, { /* Generated with Crypto++ */
  2716. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  2717. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  2718. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  2719. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  2720. .klen = 32,
  2721. .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
  2722. "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
  2723. "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
  2724. "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
  2725. "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
  2726. "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
  2727. "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
  2728. "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
  2729. .ilen = 64,
  2730. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2731. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2732. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2733. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2734. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2735. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2736. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2737. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2738. .rlen = 64,
  2739. },
  2740. };
  2741. static struct cipher_testvec tf_cbc_enc_tv_template[] = {
  2742. { /* Generated with Nettle */
  2743. .key = zeroed_string,
  2744. .klen = 16,
  2745. .iv = zeroed_string,
  2746. .input = zeroed_string,
  2747. .ilen = 16,
  2748. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2749. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2750. .rlen = 16,
  2751. }, {
  2752. .key = zeroed_string,
  2753. .klen = 16,
  2754. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2755. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2756. .input = zeroed_string,
  2757. .ilen = 16,
  2758. .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2759. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2760. .rlen = 16,
  2761. }, {
  2762. .key = zeroed_string,
  2763. .klen = 16,
  2764. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2765. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2766. .input = zeroed_string,
  2767. .ilen = 16,
  2768. .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2769. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2770. .rlen = 16,
  2771. }, {
  2772. .key = zeroed_string,
  2773. .klen = 16,
  2774. .iv = zeroed_string,
  2775. .input = zeroed_string,
  2776. .ilen = 48,
  2777. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2778. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2779. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2780. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2781. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2782. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2783. .rlen = 48,
  2784. }, { /* Generated with Crypto++ */
  2785. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2786. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2787. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2788. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2789. .klen = 32,
  2790. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2791. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2792. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2793. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2794. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2795. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2796. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2797. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2798. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2799. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2800. .ilen = 64,
  2801. .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
  2802. "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
  2803. "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
  2804. "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
  2805. "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
  2806. "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
  2807. "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
  2808. "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
  2809. .rlen = 64,
  2810. },
  2811. };
  2812. static struct cipher_testvec tf_cbc_dec_tv_template[] = {
  2813. { /* Reverse of the first four above */
  2814. .key = zeroed_string,
  2815. .klen = 16,
  2816. .iv = zeroed_string,
  2817. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2818. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2819. .ilen = 16,
  2820. .result = zeroed_string,
  2821. .rlen = 16,
  2822. }, {
  2823. .key = zeroed_string,
  2824. .klen = 16,
  2825. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2826. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2827. .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2828. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2829. .ilen = 16,
  2830. .result = zeroed_string,
  2831. .rlen = 16,
  2832. }, {
  2833. .key = zeroed_string,
  2834. .klen = 16,
  2835. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2836. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2837. .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2838. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2839. .ilen = 16,
  2840. .result = zeroed_string,
  2841. .rlen = 16,
  2842. }, {
  2843. .key = zeroed_string,
  2844. .klen = 16,
  2845. .iv = zeroed_string,
  2846. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2847. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2848. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2849. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2850. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2851. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2852. .ilen = 48,
  2853. .result = zeroed_string,
  2854. .rlen = 48,
  2855. }, { /* Generated with Crypto++ */
  2856. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2857. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2858. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2859. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2860. .klen = 32,
  2861. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2862. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2863. .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
  2864. "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
  2865. "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
  2866. "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
  2867. "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
  2868. "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
  2869. "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
  2870. "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
  2871. .ilen = 64,
  2872. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2873. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2874. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2875. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2876. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2877. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2878. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2879. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2880. .rlen = 64,
  2881. },
  2882. };
  2883. static struct cipher_testvec tf_ctr_enc_tv_template[] = {
  2884. { /* Generated with Crypto++ */
  2885. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2886. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2887. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2888. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2889. .klen = 32,
  2890. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2891. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2892. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2893. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2894. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2895. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2896. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2897. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2898. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2899. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2900. .ilen = 64,
  2901. .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2902. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2903. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2904. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2905. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2906. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2907. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2908. "\x01\x41\x21\x12\x38\xAB\x52\x4F",
  2909. .rlen = 64,
  2910. }, { /* Generated with Crypto++ */
  2911. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2912. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2913. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2914. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2915. .klen = 32,
  2916. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2917. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2918. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2919. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2920. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2921. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2922. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2923. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2924. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2925. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  2926. "\xC3\x37\xCE",
  2927. .ilen = 67,
  2928. .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2929. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2930. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2931. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2932. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2933. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2934. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2935. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  2936. "\xA8\x57\x20",
  2937. .rlen = 67,
  2938. },
  2939. };
  2940. static struct cipher_testvec tf_ctr_dec_tv_template[] = {
  2941. { /* Generated with Crypto++ */
  2942. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2943. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2944. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2945. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2946. .klen = 32,
  2947. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2948. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2949. .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2950. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2951. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2952. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2953. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2954. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2955. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2956. "\x01\x41\x21\x12\x38\xAB\x52\x4F",
  2957. .ilen = 64,
  2958. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2959. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2960. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2961. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2962. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2963. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2964. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2965. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
  2966. .rlen = 64,
  2967. }, { /* Generated with Crypto++ */
  2968. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2969. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2970. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2971. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2972. .klen = 32,
  2973. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  2974. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  2975. .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  2976. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  2977. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  2978. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  2979. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  2980. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  2981. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  2982. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  2983. "\xA8\x57\x20",
  2984. .ilen = 67,
  2985. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2986. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2987. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2988. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2989. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2990. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2991. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2992. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  2993. "\xC3\x37\xCE",
  2994. .rlen = 67,
  2995. },
  2996. };
  2997. static struct cipher_testvec tf_lrw_enc_tv_template[] = {
  2998. /* Generated from AES-LRW test vectors */
  2999. {
  3000. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3001. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3002. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3003. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3004. .klen = 32,
  3005. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3006. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3007. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3008. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3009. .ilen = 16,
  3010. .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
  3011. "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
  3012. .rlen = 16,
  3013. }, {
  3014. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3015. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3016. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3017. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3018. .klen = 32,
  3019. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3020. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3021. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3022. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3023. .ilen = 16,
  3024. .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
  3025. "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
  3026. .rlen = 16,
  3027. }, {
  3028. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3029. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3030. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3031. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3032. .klen = 32,
  3033. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3034. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3035. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3036. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3037. .ilen = 16,
  3038. .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
  3039. "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
  3040. .rlen = 16,
  3041. }, {
  3042. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3043. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3044. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3045. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3046. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3047. .klen = 40,
  3048. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3049. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3050. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3051. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3052. .ilen = 16,
  3053. .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
  3054. "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
  3055. .rlen = 16,
  3056. }, {
  3057. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3058. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3059. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3060. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3061. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3062. .klen = 40,
  3063. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3064. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3065. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3066. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3067. .ilen = 16,
  3068. .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
  3069. "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
  3070. .rlen = 16,
  3071. }, {
  3072. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3073. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3074. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3075. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3076. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3077. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3078. .klen = 48,
  3079. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3080. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3081. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3082. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3083. .ilen = 16,
  3084. .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
  3085. "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
  3086. .rlen = 16,
  3087. }, {
  3088. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3089. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3090. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3091. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3092. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3093. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3094. .klen = 48,
  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 = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
  3101. "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
  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 = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3114. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3115. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3116. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3117. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3118. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3119. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3120. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3121. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3122. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3123. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3124. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3125. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3126. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3127. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3128. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3129. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3130. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3131. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3132. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3133. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3134. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3135. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3136. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3137. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3138. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3139. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3140. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3141. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3142. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3143. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3144. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3145. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3146. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3147. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3148. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3149. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3150. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3151. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3152. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3153. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3154. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3155. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3156. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3157. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3158. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3159. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3160. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3161. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3162. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3163. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3164. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3165. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3166. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3167. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3168. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3169. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3170. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3171. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3172. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3173. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3174. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3175. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3176. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3177. .ilen = 512,
  3178. .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
  3179. "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
  3180. "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
  3181. "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
  3182. "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
  3183. "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
  3184. "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
  3185. "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
  3186. "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
  3187. "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
  3188. "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
  3189. "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
  3190. "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
  3191. "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
  3192. "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
  3193. "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
  3194. "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
  3195. "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
  3196. "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
  3197. "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
  3198. "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
  3199. "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
  3200. "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
  3201. "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
  3202. "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
  3203. "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
  3204. "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
  3205. "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
  3206. "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
  3207. "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
  3208. "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
  3209. "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
  3210. "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
  3211. "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
  3212. "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
  3213. "\x3e\xae\x71\x90\x07\x70\x1c\x38"
  3214. "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
  3215. "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
  3216. "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
  3217. "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
  3218. "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
  3219. "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
  3220. "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
  3221. "\x93\x51\x1d\x3d\x62\x59\x83\x82"
  3222. "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
  3223. "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
  3224. "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
  3225. "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
  3226. "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
  3227. "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
  3228. "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
  3229. "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
  3230. "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
  3231. "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
  3232. "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
  3233. "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
  3234. "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
  3235. "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
  3236. "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
  3237. "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
  3238. "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
  3239. "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
  3240. "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
  3241. "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
  3242. .rlen = 512,
  3243. },
  3244. };
  3245. static struct cipher_testvec tf_lrw_dec_tv_template[] = {
  3246. /* Generated from AES-LRW test vectors */
  3247. /* same as enc vectors with input and result reversed */
  3248. {
  3249. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3250. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3251. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3252. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3253. .klen = 32,
  3254. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3255. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3256. .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
  3257. "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
  3258. .ilen = 16,
  3259. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3260. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3261. .rlen = 16,
  3262. }, {
  3263. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3264. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3265. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3266. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3267. .klen = 32,
  3268. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3269. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3270. .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
  3271. "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
  3272. .ilen = 16,
  3273. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3274. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3275. .rlen = 16,
  3276. }, {
  3277. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3278. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3279. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3280. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3281. .klen = 32,
  3282. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3283. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3284. .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
  3285. "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
  3286. .ilen = 16,
  3287. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3288. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3289. .rlen = 16,
  3290. }, {
  3291. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3292. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3293. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3294. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3295. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3296. .klen = 40,
  3297. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3298. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3299. .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
  3300. "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
  3301. .ilen = 16,
  3302. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3303. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3304. .rlen = 16,
  3305. }, {
  3306. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3307. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3308. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3309. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3310. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3311. .klen = 40,
  3312. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3313. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3314. .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
  3315. "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
  3316. .ilen = 16,
  3317. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3318. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3319. .rlen = 16,
  3320. }, {
  3321. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3322. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3323. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3324. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3325. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3326. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3327. .klen = 48,
  3328. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3329. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3330. .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
  3331. "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
  3332. .ilen = 16,
  3333. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3334. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3335. .rlen = 16,
  3336. }, {
  3337. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3338. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3339. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3340. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3341. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3342. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3343. .klen = 48,
  3344. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3345. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3346. .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
  3347. "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
  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\x38\xeb\xaf\x12\x43\x1a\x89"
  3363. "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
  3364. "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
  3365. "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
  3366. "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
  3367. "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
  3368. "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
  3369. "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
  3370. "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
  3371. "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
  3372. "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
  3373. "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
  3374. "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
  3375. "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
  3376. "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
  3377. "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
  3378. "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
  3379. "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
  3380. "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
  3381. "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
  3382. "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
  3383. "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
  3384. "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
  3385. "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
  3386. "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
  3387. "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
  3388. "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
  3389. "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
  3390. "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
  3391. "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
  3392. "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
  3393. "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
  3394. "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
  3395. "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
  3396. "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
  3397. "\x3e\xae\x71\x90\x07\x70\x1c\x38"
  3398. "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
  3399. "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
  3400. "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
  3401. "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
  3402. "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
  3403. "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
  3404. "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
  3405. "\x93\x51\x1d\x3d\x62\x59\x83\x82"
  3406. "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
  3407. "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
  3408. "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
  3409. "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
  3410. "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
  3411. "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
  3412. "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
  3413. "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
  3414. "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
  3415. "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
  3416. "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
  3417. "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
  3418. "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
  3419. "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
  3420. "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
  3421. "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
  3422. "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
  3423. "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
  3424. "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
  3425. "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
  3426. .ilen = 512,
  3427. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3428. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3429. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3430. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3431. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3432. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3433. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3434. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3435. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3436. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3437. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3438. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3439. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3440. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3441. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3442. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3443. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3444. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3445. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3446. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3447. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3448. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3449. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3450. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3451. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3452. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3453. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3454. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3455. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3456. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3457. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3458. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3459. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3460. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3461. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3462. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3463. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3464. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3465. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3466. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3467. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3468. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3469. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3470. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3471. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3472. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3473. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3474. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3475. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3476. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3477. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3478. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3479. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3480. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3481. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3482. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3483. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3484. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3485. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3486. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3487. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3488. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3489. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3490. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3491. .rlen = 512,
  3492. },
  3493. };
  3494. static struct cipher_testvec tf_xts_enc_tv_template[] = {
  3495. /* Generated from AES-XTS test vectors */
  3496. {
  3497. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3498. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3499. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3500. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3501. .klen = 32,
  3502. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3503. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3504. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3505. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3506. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3507. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3508. .ilen = 32,
  3509. .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
  3510. "\x30\x74\xe4\x44\x52\x77\x97\x43"
  3511. "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
  3512. "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
  3513. .rlen = 32,
  3514. }, {
  3515. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3516. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3517. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3518. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3519. .klen = 32,
  3520. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3521. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3522. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3523. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3524. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3525. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3526. .ilen = 32,
  3527. .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
  3528. "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
  3529. "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
  3530. "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
  3531. .rlen = 32,
  3532. }, {
  3533. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3534. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3535. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3536. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3537. .klen = 32,
  3538. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3539. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3540. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3541. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3542. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3543. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3544. .ilen = 32,
  3545. .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
  3546. "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
  3547. "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
  3548. "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
  3549. .rlen = 32,
  3550. }, {
  3551. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3552. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3553. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3554. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3555. .klen = 32,
  3556. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3557. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3558. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3559. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3560. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3561. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3562. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3563. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3564. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3565. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3566. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3567. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3568. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3569. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3570. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3571. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3572. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3573. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3574. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3575. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3576. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3577. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3578. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3579. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3580. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3581. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3582. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3583. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3584. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3585. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3586. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3587. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3588. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3589. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3590. "\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. .ilen = 512,
  3623. .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
  3624. "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
  3625. "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
  3626. "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
  3627. "\xea\x35\x35\x8c\xb2\x46\x61\x06"
  3628. "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
  3629. "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
  3630. "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
  3631. "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
  3632. "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
  3633. "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
  3634. "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
  3635. "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
  3636. "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
  3637. "\x01\x73\x68\x32\x25\x19\xfa\xfb"
  3638. "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
  3639. "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
  3640. "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
  3641. "\x39\x80\x39\x09\x97\x65\xf2\x83"
  3642. "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
  3643. "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
  3644. "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
  3645. "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
  3646. "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
  3647. "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
  3648. "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
  3649. "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
  3650. "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
  3651. "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
  3652. "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
  3653. "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
  3654. "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
  3655. "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
  3656. "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
  3657. "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
  3658. "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
  3659. "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
  3660. "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
  3661. "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
  3662. "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
  3663. "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
  3664. "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
  3665. "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
  3666. "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
  3667. "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
  3668. "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
  3669. "\x04\x39\x73\x32\xb2\x86\x79\xe7"
  3670. "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
  3671. "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
  3672. "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
  3673. "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
  3674. "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
  3675. "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
  3676. "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
  3677. "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
  3678. "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
  3679. "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
  3680. "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
  3681. "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
  3682. "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
  3683. "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
  3684. "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
  3685. "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
  3686. "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
  3687. .rlen = 512,
  3688. }, {
  3689. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3690. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3691. "\x62\x49\x77\x57\x24\x70\x93\x69"
  3692. "\x99\x59\x57\x49\x66\x96\x76\x27"
  3693. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3694. "\x23\x84\x62\x64\x33\x83\x27\x95"
  3695. "\x02\x88\x41\x97\x16\x93\x99\x37"
  3696. "\x51\x05\x82\x09\x74\x94\x45\x92",
  3697. .klen = 64,
  3698. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  3699. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3700. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3701. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3702. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3703. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3704. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3705. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3706. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3707. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3708. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3709. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3710. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3711. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3712. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3713. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3714. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3715. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3716. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3717. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3718. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3719. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3720. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3721. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3722. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3723. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3724. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3725. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3726. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3727. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3728. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3729. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3730. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3731. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3732. "\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. .ilen = 512,
  3765. .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
  3766. "\x35\x39\x71\x88\x76\x1e\xc9\xea"
  3767. "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
  3768. "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
  3769. "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
  3770. "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
  3771. "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
  3772. "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
  3773. "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
  3774. "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
  3775. "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
  3776. "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
  3777. "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
  3778. "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
  3779. "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
  3780. "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
  3781. "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
  3782. "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
  3783. "\x69\x35\x61\x86\xf8\x86\xb9\x89"
  3784. "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
  3785. "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
  3786. "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
  3787. "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
  3788. "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
  3789. "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
  3790. "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
  3791. "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
  3792. "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
  3793. "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
  3794. "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
  3795. "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
  3796. "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
  3797. "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
  3798. "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
  3799. "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
  3800. "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
  3801. "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
  3802. "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
  3803. "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
  3804. "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
  3805. "\xad\x12\x32\x31\x03\xf7\x21\xbe"
  3806. "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
  3807. "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
  3808. "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
  3809. "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
  3810. "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
  3811. "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
  3812. "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
  3813. "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
  3814. "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
  3815. "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
  3816. "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
  3817. "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
  3818. "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
  3819. "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
  3820. "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
  3821. "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
  3822. "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
  3823. "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
  3824. "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
  3825. "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
  3826. "\xf3\xea\x67\x52\x78\xc2\xce\x70"
  3827. "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
  3828. "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
  3829. .rlen = 512,
  3830. },
  3831. };
  3832. static struct cipher_testvec tf_xts_dec_tv_template[] = {
  3833. /* Generated from AES-XTS test vectors */
  3834. /* same as enc vectors with input and result reversed */
  3835. {
  3836. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3837. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3838. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3839. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3840. .klen = 32,
  3841. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3842. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3843. .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
  3844. "\x30\x74\xe4\x44\x52\x77\x97\x43"
  3845. "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
  3846. "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
  3847. .ilen = 32,
  3848. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3849. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3850. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3851. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3852. .rlen = 32,
  3853. }, {
  3854. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3855. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3856. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3857. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3858. .klen = 32,
  3859. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3860. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3861. .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
  3862. "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
  3863. "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
  3864. "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
  3865. .ilen = 32,
  3866. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3867. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3868. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3869. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3870. .rlen = 32,
  3871. }, {
  3872. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3873. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3874. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3875. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3876. .klen = 32,
  3877. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3878. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3879. .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
  3880. "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
  3881. "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
  3882. "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
  3883. .ilen = 32,
  3884. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3885. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3886. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3887. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3888. .rlen = 32,
  3889. }, {
  3890. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3891. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3892. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3893. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3894. .klen = 32,
  3895. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3896. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3897. .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
  3898. "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
  3899. "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
  3900. "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
  3901. "\xea\x35\x35\x8c\xb2\x46\x61\x06"
  3902. "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
  3903. "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
  3904. "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
  3905. "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
  3906. "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
  3907. "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
  3908. "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
  3909. "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
  3910. "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
  3911. "\x01\x73\x68\x32\x25\x19\xfa\xfb"
  3912. "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
  3913. "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
  3914. "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
  3915. "\x39\x80\x39\x09\x97\x65\xf2\x83"
  3916. "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
  3917. "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
  3918. "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
  3919. "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
  3920. "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
  3921. "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
  3922. "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
  3923. "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
  3924. "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
  3925. "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
  3926. "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
  3927. "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
  3928. "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
  3929. "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
  3930. "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
  3931. "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
  3932. "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
  3933. "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
  3934. "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
  3935. "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
  3936. "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
  3937. "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
  3938. "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
  3939. "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
  3940. "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
  3941. "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
  3942. "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
  3943. "\x04\x39\x73\x32\xb2\x86\x79\xe7"
  3944. "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
  3945. "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
  3946. "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
  3947. "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
  3948. "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
  3949. "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
  3950. "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
  3951. "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
  3952. "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
  3953. "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
  3954. "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
  3955. "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
  3956. "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
  3957. "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
  3958. "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
  3959. "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
  3960. "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
  3961. .ilen = 512,
  3962. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3963. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3964. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3965. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3966. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3967. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3968. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3969. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3970. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3971. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3972. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3973. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3974. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3975. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3976. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3977. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3978. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3979. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3980. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3981. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3982. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3983. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3984. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3985. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3986. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3987. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3988. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3989. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3990. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3991. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3992. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3993. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3994. "\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. .rlen = 512,
  4027. }, {
  4028. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4029. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4030. "\x62\x49\x77\x57\x24\x70\x93\x69"
  4031. "\x99\x59\x57\x49\x66\x96\x76\x27"
  4032. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4033. "\x23\x84\x62\x64\x33\x83\x27\x95"
  4034. "\x02\x88\x41\x97\x16\x93\x99\x37"
  4035. "\x51\x05\x82\x09\x74\x94\x45\x92",
  4036. .klen = 64,
  4037. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  4038. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4039. .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
  4040. "\x35\x39\x71\x88\x76\x1e\xc9\xea"
  4041. "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
  4042. "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
  4043. "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
  4044. "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
  4045. "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
  4046. "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
  4047. "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
  4048. "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
  4049. "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
  4050. "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
  4051. "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
  4052. "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
  4053. "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
  4054. "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
  4055. "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
  4056. "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
  4057. "\x69\x35\x61\x86\xf8\x86\xb9\x89"
  4058. "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
  4059. "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
  4060. "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
  4061. "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
  4062. "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
  4063. "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
  4064. "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
  4065. "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
  4066. "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
  4067. "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
  4068. "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
  4069. "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
  4070. "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
  4071. "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
  4072. "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
  4073. "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
  4074. "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
  4075. "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
  4076. "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
  4077. "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
  4078. "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
  4079. "\xad\x12\x32\x31\x03\xf7\x21\xbe"
  4080. "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
  4081. "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
  4082. "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
  4083. "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
  4084. "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
  4085. "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
  4086. "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
  4087. "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
  4088. "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
  4089. "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
  4090. "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
  4091. "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
  4092. "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
  4093. "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
  4094. "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
  4095. "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
  4096. "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
  4097. "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
  4098. "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
  4099. "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
  4100. "\xf3\xea\x67\x52\x78\xc2\xce\x70"
  4101. "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
  4102. "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
  4103. .ilen = 512,
  4104. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4105. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4106. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4107. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4108. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4109. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4110. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4111. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4112. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4113. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4114. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4115. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4116. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4117. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4118. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4119. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4120. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4121. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4122. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4123. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4124. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4125. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4126. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4127. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4128. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4129. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4130. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4131. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4132. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4133. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4134. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4135. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4136. "\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. .rlen = 512,
  4169. },
  4170. };
  4171. /*
  4172. * Serpent test vectors. These are backwards because Serpent writes
  4173. * octet sequences in right-to-left mode.
  4174. */
  4175. #define SERPENT_ENC_TEST_VECTORS 5
  4176. #define SERPENT_DEC_TEST_VECTORS 5
  4177. #define TNEPRES_ENC_TEST_VECTORS 4
  4178. #define TNEPRES_DEC_TEST_VECTORS 4
  4179. #define SERPENT_CBC_ENC_TEST_VECTORS 1
  4180. #define SERPENT_CBC_DEC_TEST_VECTORS 1
  4181. #define SERPENT_CTR_ENC_TEST_VECTORS 2
  4182. #define SERPENT_CTR_DEC_TEST_VECTORS 2
  4183. #define SERPENT_LRW_ENC_TEST_VECTORS 8
  4184. #define SERPENT_LRW_DEC_TEST_VECTORS 8
  4185. #define SERPENT_XTS_ENC_TEST_VECTORS 5
  4186. #define SERPENT_XTS_DEC_TEST_VECTORS 5
  4187. static struct cipher_testvec serpent_enc_tv_template[] = {
  4188. {
  4189. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4190. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4191. .ilen = 16,
  4192. .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  4193. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  4194. .rlen = 16,
  4195. }, {
  4196. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4197. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4198. .klen = 16,
  4199. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4200. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4201. .ilen = 16,
  4202. .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  4203. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  4204. .rlen = 16,
  4205. }, {
  4206. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4207. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4208. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4209. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4210. .klen = 32,
  4211. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4212. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4213. .ilen = 16,
  4214. .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  4215. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  4216. .rlen = 16,
  4217. }, {
  4218. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  4219. .klen = 16,
  4220. .input = zeroed_string,
  4221. .ilen = 16,
  4222. .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  4223. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  4224. .rlen = 16,
  4225. }, { /* Generated with Crypto++ */
  4226. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4227. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4228. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4229. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4230. .klen = 32,
  4231. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4232. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4233. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4234. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4235. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4236. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4237. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4238. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4239. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4240. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4241. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4242. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4243. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4244. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4245. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4246. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4247. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4248. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4249. .ilen = 144,
  4250. .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
  4251. "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
  4252. "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
  4253. "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
  4254. "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
  4255. "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
  4256. "\x99\x34\x89\x5B\x54\xE9\x12\x13"
  4257. "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
  4258. "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
  4259. "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
  4260. "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
  4261. "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
  4262. "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
  4263. "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
  4264. "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
  4265. "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
  4266. "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
  4267. "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
  4268. .rlen = 144,
  4269. },
  4270. };
  4271. static struct cipher_testvec tnepres_enc_tv_template[] = {
  4272. { /* KeySize=128, PT=0, I=1 */
  4273. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4274. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4275. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  4276. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4277. .klen = 16,
  4278. .ilen = 16,
  4279. .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
  4280. "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
  4281. .rlen = 16,
  4282. }, { /* KeySize=192, PT=0, I=1 */
  4283. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  4284. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4285. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4286. .klen = 24,
  4287. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4288. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4289. .ilen = 16,
  4290. .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
  4291. "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
  4292. .rlen = 16,
  4293. }, { /* KeySize=256, PT=0, I=1 */
  4294. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  4295. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4296. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4297. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4298. .klen = 32,
  4299. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4300. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4301. .ilen = 16,
  4302. .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
  4303. "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
  4304. .rlen = 16,
  4305. }, { /* KeySize=256, I=257 */
  4306. .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
  4307. "\x17\x16\x15\x14\x13\x12\x11\x10"
  4308. "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  4309. "\x07\x06\x05\x04\x03\x02\x01\x00",
  4310. .klen = 32,
  4311. .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  4312. "\x07\x06\x05\x04\x03\x02\x01\x00",
  4313. .ilen = 16,
  4314. .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
  4315. "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
  4316. .rlen = 16,
  4317. },
  4318. };
  4319. static struct cipher_testvec serpent_dec_tv_template[] = {
  4320. {
  4321. .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  4322. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  4323. .ilen = 16,
  4324. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4325. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4326. .rlen = 16,
  4327. }, {
  4328. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4329. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4330. .klen = 16,
  4331. .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  4332. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  4333. .ilen = 16,
  4334. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4335. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4336. .rlen = 16,
  4337. }, {
  4338. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4339. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4340. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4341. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4342. .klen = 32,
  4343. .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  4344. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  4345. .ilen = 16,
  4346. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4347. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4348. .rlen = 16,
  4349. }, {
  4350. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  4351. .klen = 16,
  4352. .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  4353. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  4354. .ilen = 16,
  4355. .result = zeroed_string,
  4356. .rlen = 16,
  4357. }, { /* Generated with Crypto++ */
  4358. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4359. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4360. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4361. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4362. .klen = 32,
  4363. .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
  4364. "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
  4365. "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
  4366. "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
  4367. "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
  4368. "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
  4369. "\x99\x34\x89\x5B\x54\xE9\x12\x13"
  4370. "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
  4371. "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
  4372. "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
  4373. "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
  4374. "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
  4375. "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
  4376. "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
  4377. "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
  4378. "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
  4379. "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
  4380. "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
  4381. .ilen = 144,
  4382. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4383. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4384. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4385. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4386. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4387. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4388. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4389. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4390. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4391. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4392. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4393. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4394. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4395. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4396. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4397. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4398. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4399. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4400. .rlen = 144,
  4401. },
  4402. };
  4403. static struct cipher_testvec tnepres_dec_tv_template[] = {
  4404. {
  4405. .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
  4406. "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
  4407. .ilen = 16,
  4408. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4409. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4410. .rlen = 16,
  4411. }, {
  4412. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4413. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4414. .klen = 16,
  4415. .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
  4416. "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
  4417. .ilen = 16,
  4418. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4419. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4420. .rlen = 16,
  4421. }, {
  4422. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4423. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4424. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4425. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4426. .klen = 32,
  4427. .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
  4428. "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
  4429. .ilen = 16,
  4430. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4431. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  4432. .rlen = 16,
  4433. }, { /* KeySize=128, I=121 */
  4434. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  4435. .klen = 16,
  4436. .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
  4437. "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
  4438. .ilen = 16,
  4439. .result = zeroed_string,
  4440. .rlen = 16,
  4441. },
  4442. };
  4443. static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
  4444. { /* Generated with Crypto++ */
  4445. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4446. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4447. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4448. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4449. .klen = 32,
  4450. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4451. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4452. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4453. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4454. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4455. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4456. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4457. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4458. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4459. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4460. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4461. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4462. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4463. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4464. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4465. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4466. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4467. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4468. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4469. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4470. .ilen = 144,
  4471. .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
  4472. "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
  4473. "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
  4474. "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
  4475. "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
  4476. "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
  4477. "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
  4478. "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
  4479. "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
  4480. "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
  4481. "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
  4482. "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
  4483. "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
  4484. "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
  4485. "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
  4486. "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
  4487. "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
  4488. "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
  4489. .rlen = 144,
  4490. },
  4491. };
  4492. static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
  4493. { /* Generated with Crypto++ */
  4494. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4495. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4496. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4497. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4498. .klen = 32,
  4499. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4500. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4501. .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
  4502. "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
  4503. "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
  4504. "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
  4505. "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
  4506. "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
  4507. "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
  4508. "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
  4509. "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
  4510. "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
  4511. "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
  4512. "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
  4513. "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
  4514. "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
  4515. "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
  4516. "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
  4517. "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
  4518. "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
  4519. .ilen = 144,
  4520. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4521. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4522. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4523. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4524. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4525. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4526. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4527. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4528. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4529. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4530. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4531. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4532. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4533. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4534. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4535. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4536. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4537. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4538. .rlen = 144,
  4539. },
  4540. };
  4541. static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
  4542. { /* Generated with Crypto++ */
  4543. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4544. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4545. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4546. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4547. .klen = 32,
  4548. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4549. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4550. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4551. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4552. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4553. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4554. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4555. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4556. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4557. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4558. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4559. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4560. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4561. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4562. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4563. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4564. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4565. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4566. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4567. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4568. .ilen = 144,
  4569. .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  4570. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  4571. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  4572. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  4573. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  4574. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  4575. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  4576. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  4577. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  4578. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  4579. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  4580. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  4581. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  4582. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  4583. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  4584. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  4585. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  4586. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
  4587. .rlen = 144,
  4588. }, { /* Generated with Crypto++ */
  4589. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4590. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4591. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4592. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4593. .klen = 32,
  4594. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4595. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4596. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4597. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4598. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4599. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4600. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4601. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4602. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4603. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4604. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4605. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4606. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4607. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4608. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4609. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4610. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4611. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4612. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4613. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  4614. "\xF1\x65\xFC",
  4615. .ilen = 147,
  4616. .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  4617. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  4618. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  4619. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  4620. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  4621. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  4622. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  4623. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  4624. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  4625. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  4626. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  4627. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  4628. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  4629. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  4630. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  4631. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  4632. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  4633. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
  4634. "\xE6\xD0\x97",
  4635. .rlen = 147,
  4636. },
  4637. };
  4638. static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
  4639. { /* Generated with Crypto++ */
  4640. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4641. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4642. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4643. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4644. .klen = 32,
  4645. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4646. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4647. .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  4648. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  4649. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  4650. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  4651. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  4652. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  4653. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  4654. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  4655. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  4656. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  4657. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  4658. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  4659. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  4660. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  4661. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  4662. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  4663. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  4664. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
  4665. .ilen = 144,
  4666. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4667. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4668. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4669. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4670. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4671. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4672. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4673. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4674. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4675. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4676. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4677. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4678. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4679. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4680. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4681. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4682. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4683. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  4684. .rlen = 144,
  4685. }, { /* Generated with Crypto++ */
  4686. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  4687. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  4688. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  4689. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  4690. .klen = 32,
  4691. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  4692. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  4693. .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  4694. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  4695. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  4696. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  4697. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  4698. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  4699. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  4700. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  4701. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  4702. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  4703. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  4704. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  4705. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  4706. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  4707. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  4708. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  4709. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  4710. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
  4711. "\xE6\xD0\x97",
  4712. .ilen = 147,
  4713. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  4714. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  4715. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  4716. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  4717. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  4718. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  4719. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  4720. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  4721. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  4722. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  4723. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  4724. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  4725. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  4726. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  4727. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  4728. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  4729. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  4730. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  4731. "\xF1\x65\xFC",
  4732. .rlen = 147,
  4733. },
  4734. };
  4735. static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
  4736. /* Generated from AES-LRW test vectors */
  4737. {
  4738. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  4739. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  4740. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  4741. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  4742. .klen = 32,
  4743. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4744. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4745. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4746. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4747. .ilen = 16,
  4748. .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
  4749. "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
  4750. .rlen = 16,
  4751. }, {
  4752. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  4753. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  4754. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  4755. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  4756. .klen = 32,
  4757. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4758. "\x00\x00\x00\x00\x00\x00\x00\x02",
  4759. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4760. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4761. .ilen = 16,
  4762. .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
  4763. "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
  4764. .rlen = 16,
  4765. }, {
  4766. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  4767. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  4768. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  4769. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  4770. .klen = 32,
  4771. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4772. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4773. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4774. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4775. .ilen = 16,
  4776. .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
  4777. "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
  4778. .rlen = 16,
  4779. }, {
  4780. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  4781. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  4782. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  4783. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  4784. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  4785. .klen = 40,
  4786. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4787. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4788. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4789. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4790. .ilen = 16,
  4791. .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
  4792. "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
  4793. .rlen = 16,
  4794. }, {
  4795. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  4796. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  4797. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  4798. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  4799. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  4800. .klen = 40,
  4801. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4802. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4803. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4804. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4805. .ilen = 16,
  4806. .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
  4807. "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
  4808. .rlen = 16,
  4809. }, {
  4810. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  4811. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  4812. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  4813. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  4814. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  4815. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  4816. .klen = 48,
  4817. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4818. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4819. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4820. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4821. .ilen = 16,
  4822. .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
  4823. "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
  4824. .rlen = 16,
  4825. }, {
  4826. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  4827. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  4828. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  4829. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  4830. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  4831. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  4832. .klen = 48,
  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 = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
  4839. "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
  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 = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  4852. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  4853. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  4854. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  4855. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  4856. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  4857. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  4858. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  4859. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  4860. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  4861. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  4862. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  4863. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  4864. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  4865. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  4866. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  4867. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  4868. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  4869. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  4870. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  4871. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  4872. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  4873. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  4874. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  4875. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  4876. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  4877. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  4878. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  4879. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  4880. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  4881. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  4882. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  4883. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  4884. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  4885. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  4886. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  4887. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  4888. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  4889. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  4890. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  4891. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  4892. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  4893. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  4894. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  4895. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  4896. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  4897. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  4898. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  4899. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  4900. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  4901. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  4902. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  4903. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  4904. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  4905. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  4906. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  4907. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  4908. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  4909. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  4910. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  4911. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  4912. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  4913. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  4914. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  4915. .ilen = 512,
  4916. .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
  4917. "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
  4918. "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
  4919. "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
  4920. "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
  4921. "\xce\xab\xda\x33\x30\x20\x12\xfa"
  4922. "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
  4923. "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
  4924. "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
  4925. "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
  4926. "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
  4927. "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
  4928. "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
  4929. "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
  4930. "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
  4931. "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
  4932. "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
  4933. "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
  4934. "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
  4935. "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
  4936. "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
  4937. "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
  4938. "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
  4939. "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
  4940. "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
  4941. "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
  4942. "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
  4943. "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
  4944. "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
  4945. "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
  4946. "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
  4947. "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
  4948. "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
  4949. "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
  4950. "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
  4951. "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
  4952. "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
  4953. "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
  4954. "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
  4955. "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
  4956. "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
  4957. "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
  4958. "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
  4959. "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
  4960. "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
  4961. "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
  4962. "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
  4963. "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
  4964. "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
  4965. "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
  4966. "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
  4967. "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
  4968. "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
  4969. "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
  4970. "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
  4971. "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
  4972. "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
  4973. "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
  4974. "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
  4975. "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
  4976. "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
  4977. "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
  4978. "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
  4979. "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
  4980. .rlen = 512,
  4981. },
  4982. };
  4983. static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
  4984. /* Generated from AES-LRW test vectors */
  4985. /* same as enc vectors with input and result reversed */
  4986. {
  4987. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  4988. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  4989. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  4990. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  4991. .klen = 32,
  4992. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4993. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4994. .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
  4995. "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
  4996. .ilen = 16,
  4997. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4998. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4999. .rlen = 16,
  5000. }, {
  5001. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  5002. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  5003. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  5004. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  5005. .klen = 32,
  5006. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5007. "\x00\x00\x00\x00\x00\x00\x00\x02",
  5008. .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
  5009. "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
  5010. .ilen = 16,
  5011. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5012. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5013. .rlen = 16,
  5014. }, {
  5015. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  5016. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  5017. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  5018. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  5019. .klen = 32,
  5020. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5021. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5022. .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
  5023. "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
  5024. .ilen = 16,
  5025. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5026. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5027. .rlen = 16,
  5028. }, {
  5029. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  5030. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  5031. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  5032. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  5033. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  5034. .klen = 40,
  5035. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5036. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5037. .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
  5038. "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
  5039. .ilen = 16,
  5040. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5041. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5042. .rlen = 16,
  5043. }, {
  5044. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  5045. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  5046. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  5047. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  5048. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  5049. .klen = 40,
  5050. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5051. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5052. .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
  5053. "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
  5054. .ilen = 16,
  5055. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5056. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5057. .rlen = 16,
  5058. }, {
  5059. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  5060. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  5061. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  5062. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  5063. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  5064. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  5065. .klen = 48,
  5066. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5067. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5068. .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
  5069. "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
  5070. .ilen = 16,
  5071. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5072. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5073. .rlen = 16,
  5074. }, {
  5075. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  5076. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  5077. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  5078. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  5079. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  5080. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  5081. .klen = 48,
  5082. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5083. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5084. .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
  5085. "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
  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 = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
  5101. "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
  5102. "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
  5103. "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
  5104. "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
  5105. "\xce\xab\xda\x33\x30\x20\x12\xfa"
  5106. "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
  5107. "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
  5108. "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
  5109. "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
  5110. "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
  5111. "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
  5112. "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
  5113. "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
  5114. "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
  5115. "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
  5116. "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
  5117. "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
  5118. "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
  5119. "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
  5120. "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
  5121. "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
  5122. "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
  5123. "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
  5124. "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
  5125. "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
  5126. "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
  5127. "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
  5128. "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
  5129. "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
  5130. "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
  5131. "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
  5132. "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
  5133. "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
  5134. "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
  5135. "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
  5136. "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
  5137. "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
  5138. "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
  5139. "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
  5140. "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
  5141. "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
  5142. "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
  5143. "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
  5144. "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
  5145. "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
  5146. "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
  5147. "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
  5148. "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
  5149. "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
  5150. "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
  5151. "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
  5152. "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
  5153. "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
  5154. "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
  5155. "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
  5156. "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
  5157. "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
  5158. "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
  5159. "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
  5160. "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
  5161. "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
  5162. "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
  5163. "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
  5164. .ilen = 512,
  5165. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  5166. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  5167. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  5168. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  5169. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  5170. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  5171. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  5172. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  5173. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  5174. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  5175. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  5176. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  5177. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  5178. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  5179. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  5180. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  5181. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  5182. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  5183. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  5184. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  5185. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  5186. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  5187. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  5188. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  5189. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  5190. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  5191. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  5192. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  5193. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  5194. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  5195. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  5196. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  5197. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  5198. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  5199. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  5200. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  5201. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  5202. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  5203. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  5204. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  5205. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  5206. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  5207. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  5208. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  5209. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  5210. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  5211. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  5212. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  5213. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  5214. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  5215. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  5216. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  5217. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  5218. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  5219. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  5220. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  5221. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  5222. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  5223. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  5224. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  5225. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  5226. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  5227. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  5228. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  5229. .rlen = 512,
  5230. },
  5231. };
  5232. static struct cipher_testvec serpent_xts_enc_tv_template[] = {
  5233. /* Generated from AES-XTS test vectors */
  5234. {
  5235. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5236. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5237. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5238. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5239. .klen = 32,
  5240. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5241. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5242. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5243. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5244. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5245. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5246. .ilen = 32,
  5247. .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
  5248. "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
  5249. "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
  5250. "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
  5251. .rlen = 32,
  5252. }, {
  5253. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  5254. "\x11\x11\x11\x11\x11\x11\x11\x11"
  5255. "\x22\x22\x22\x22\x22\x22\x22\x22"
  5256. "\x22\x22\x22\x22\x22\x22\x22\x22",
  5257. .klen = 32,
  5258. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  5259. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5260. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  5261. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5262. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5263. "\x44\x44\x44\x44\x44\x44\x44\x44",
  5264. .ilen = 32,
  5265. .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
  5266. "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
  5267. "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
  5268. "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
  5269. .rlen = 32,
  5270. }, {
  5271. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  5272. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  5273. "\x22\x22\x22\x22\x22\x22\x22\x22"
  5274. "\x22\x22\x22\x22\x22\x22\x22\x22",
  5275. .klen = 32,
  5276. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  5277. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5278. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  5279. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5280. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5281. "\x44\x44\x44\x44\x44\x44\x44\x44",
  5282. .ilen = 32,
  5283. .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
  5284. "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
  5285. "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
  5286. "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
  5287. .rlen = 32,
  5288. }, {
  5289. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  5290. "\x23\x53\x60\x28\x74\x71\x35\x26"
  5291. "\x31\x41\x59\x26\x53\x58\x97\x93"
  5292. "\x23\x84\x62\x64\x33\x83\x27\x95",
  5293. .klen = 32,
  5294. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5295. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5296. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5297. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5298. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5299. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5300. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5301. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5302. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5303. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5304. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5305. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5306. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5307. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5308. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5309. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5310. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5311. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5312. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5313. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5314. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5315. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5316. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5317. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5318. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5319. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5320. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5321. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5322. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5323. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5324. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5325. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5326. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5327. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  5328. "\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. .ilen = 512,
  5361. .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
  5362. "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
  5363. "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
  5364. "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
  5365. "\x00\x5c\x75\x14\x06\xd6\x25\x82"
  5366. "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
  5367. "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
  5368. "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
  5369. "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
  5370. "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
  5371. "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
  5372. "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
  5373. "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
  5374. "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
  5375. "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
  5376. "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
  5377. "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
  5378. "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
  5379. "\x58\xfa\x43\x91\x16\x85\x40\xbb"
  5380. "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
  5381. "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
  5382. "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
  5383. "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
  5384. "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
  5385. "\x6e\x29\x60\xbd\x10\x14\x84\x82"
  5386. "\x83\x82\x0c\x63\x73\x92\x02\x7c"
  5387. "\x55\x37\x20\x80\x17\x51\xc8\xbc"
  5388. "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
  5389. "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
  5390. "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
  5391. "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
  5392. "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
  5393. "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
  5394. "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
  5395. "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
  5396. "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
  5397. "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
  5398. "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
  5399. "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
  5400. "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
  5401. "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
  5402. "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
  5403. "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
  5404. "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
  5405. "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
  5406. "\x43\x42\x35\xd0\xcf\xec\x77\x67"
  5407. "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
  5408. "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
  5409. "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
  5410. "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
  5411. "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
  5412. "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
  5413. "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
  5414. "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
  5415. "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
  5416. "\x03\x57\xe6\x98\x52\x2f\x61\x62"
  5417. "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
  5418. "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
  5419. "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
  5420. "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
  5421. "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
  5422. "\xef\x91\x64\x1d\x18\x07\x4e\x31"
  5423. "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
  5424. "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
  5425. .rlen = 512,
  5426. }, {
  5427. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  5428. "\x23\x53\x60\x28\x74\x71\x35\x26"
  5429. "\x62\x49\x77\x57\x24\x70\x93\x69"
  5430. "\x99\x59\x57\x49\x66\x96\x76\x27"
  5431. "\x31\x41\x59\x26\x53\x58\x97\x93"
  5432. "\x23\x84\x62\x64\x33\x83\x27\x95"
  5433. "\x02\x88\x41\x97\x16\x93\x99\x37"
  5434. "\x51\x05\x82\x09\x74\x94\x45\x92",
  5435. .klen = 64,
  5436. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  5437. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5438. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5439. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5440. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5441. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5442. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5443. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5444. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5445. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5446. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5447. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5448. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5449. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5450. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5451. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5452. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5453. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5454. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5455. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5456. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5457. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5458. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5459. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5460. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5461. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5462. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5463. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5464. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5465. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5466. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5467. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5468. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5469. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  5470. "\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. .ilen = 512,
  5503. .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
  5504. "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
  5505. "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
  5506. "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
  5507. "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
  5508. "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
  5509. "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
  5510. "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
  5511. "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
  5512. "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
  5513. "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
  5514. "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
  5515. "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
  5516. "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
  5517. "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
  5518. "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
  5519. "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
  5520. "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
  5521. "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
  5522. "\xec\x9a\xda\x64\x96\xb5\x61\xff"
  5523. "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
  5524. "\x81\x85\x14\xa8\x59\xac\x8c\x94"
  5525. "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
  5526. "\x82\xc6\x4d\xca\x86\xea\x53\x28"
  5527. "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
  5528. "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
  5529. "\x05\xca\x81\x7b\xda\xa2\xde\x63"
  5530. "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
  5531. "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
  5532. "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
  5533. "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
  5534. "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
  5535. "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
  5536. "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
  5537. "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
  5538. "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
  5539. "\xfd\x43\x7d\xda\x42\x51\x87\x43"
  5540. "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
  5541. "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
  5542. "\x27\x5f\x11\xac\x71\xc7\x48\x46"
  5543. "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
  5544. "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
  5545. "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
  5546. "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
  5547. "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
  5548. "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
  5549. "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
  5550. "\x50\x88\x97\x40\x69\xb1\x37\xf5"
  5551. "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
  5552. "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
  5553. "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
  5554. "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
  5555. "\xc1\x16\x73\x50\x77\xba\xa6\x65"
  5556. "\x20\x2d\xb0\x02\x27\x89\xda\x99"
  5557. "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
  5558. "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
  5559. "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
  5560. "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
  5561. "\xa3\x0e\x33\x74\x40\x18\x39\x72"
  5562. "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
  5563. "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
  5564. "\x30\x05\xc8\x92\x98\x80\xff\x7a"
  5565. "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
  5566. "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
  5567. .rlen = 512,
  5568. },
  5569. };
  5570. static struct cipher_testvec serpent_xts_dec_tv_template[] = {
  5571. /* Generated from AES-XTS test vectors */
  5572. /* same as enc vectors with input and result reversed */
  5573. {
  5574. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5575. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5576. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5577. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5578. .klen = 32,
  5579. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5580. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5581. .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
  5582. "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
  5583. "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
  5584. "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
  5585. .ilen = 32,
  5586. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5587. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5588. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5589. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5590. .rlen = 32,
  5591. }, {
  5592. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  5593. "\x11\x11\x11\x11\x11\x11\x11\x11"
  5594. "\x22\x22\x22\x22\x22\x22\x22\x22"
  5595. "\x22\x22\x22\x22\x22\x22\x22\x22",
  5596. .klen = 32,
  5597. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  5598. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5599. .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
  5600. "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
  5601. "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
  5602. "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
  5603. .ilen = 32,
  5604. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  5605. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5606. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5607. "\x44\x44\x44\x44\x44\x44\x44\x44",
  5608. .rlen = 32,
  5609. }, {
  5610. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  5611. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  5612. "\x22\x22\x22\x22\x22\x22\x22\x22"
  5613. "\x22\x22\x22\x22\x22\x22\x22\x22",
  5614. .klen = 32,
  5615. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  5616. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5617. .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
  5618. "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
  5619. "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
  5620. "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
  5621. .ilen = 32,
  5622. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  5623. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5624. "\x44\x44\x44\x44\x44\x44\x44\x44"
  5625. "\x44\x44\x44\x44\x44\x44\x44\x44",
  5626. .rlen = 32,
  5627. }, {
  5628. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  5629. "\x23\x53\x60\x28\x74\x71\x35\x26"
  5630. "\x31\x41\x59\x26\x53\x58\x97\x93"
  5631. "\x23\x84\x62\x64\x33\x83\x27\x95",
  5632. .klen = 32,
  5633. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5634. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5635. .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
  5636. "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
  5637. "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
  5638. "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
  5639. "\x00\x5c\x75\x14\x06\xd6\x25\x82"
  5640. "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
  5641. "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
  5642. "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
  5643. "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
  5644. "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
  5645. "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
  5646. "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
  5647. "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
  5648. "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
  5649. "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
  5650. "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
  5651. "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
  5652. "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
  5653. "\x58\xfa\x43\x91\x16\x85\x40\xbb"
  5654. "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
  5655. "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
  5656. "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
  5657. "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
  5658. "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
  5659. "\x6e\x29\x60\xbd\x10\x14\x84\x82"
  5660. "\x83\x82\x0c\x63\x73\x92\x02\x7c"
  5661. "\x55\x37\x20\x80\x17\x51\xc8\xbc"
  5662. "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
  5663. "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
  5664. "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
  5665. "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
  5666. "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
  5667. "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
  5668. "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
  5669. "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
  5670. "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
  5671. "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
  5672. "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
  5673. "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
  5674. "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
  5675. "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
  5676. "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
  5677. "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
  5678. "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
  5679. "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
  5680. "\x43\x42\x35\xd0\xcf\xec\x77\x67"
  5681. "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
  5682. "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
  5683. "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
  5684. "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
  5685. "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
  5686. "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
  5687. "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
  5688. "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
  5689. "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
  5690. "\x03\x57\xe6\x98\x52\x2f\x61\x62"
  5691. "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
  5692. "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
  5693. "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
  5694. "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
  5695. "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
  5696. "\xef\x91\x64\x1d\x18\x07\x4e\x31"
  5697. "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
  5698. "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
  5699. .ilen = 512,
  5700. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5701. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5702. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5703. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5704. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5705. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5706. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5707. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5708. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5709. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5710. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5711. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5712. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5713. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5714. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5715. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5716. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5717. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5718. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5719. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5720. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5721. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5722. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5723. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5724. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5725. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5726. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5727. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5728. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5729. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5730. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5731. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  5732. "\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. .rlen = 512,
  5765. }, {
  5766. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  5767. "\x23\x53\x60\x28\x74\x71\x35\x26"
  5768. "\x62\x49\x77\x57\x24\x70\x93\x69"
  5769. "\x99\x59\x57\x49\x66\x96\x76\x27"
  5770. "\x31\x41\x59\x26\x53\x58\x97\x93"
  5771. "\x23\x84\x62\x64\x33\x83\x27\x95"
  5772. "\x02\x88\x41\x97\x16\x93\x99\x37"
  5773. "\x51\x05\x82\x09\x74\x94\x45\x92",
  5774. .klen = 64,
  5775. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  5776. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5777. .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
  5778. "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
  5779. "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
  5780. "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
  5781. "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
  5782. "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
  5783. "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
  5784. "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
  5785. "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
  5786. "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
  5787. "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
  5788. "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
  5789. "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
  5790. "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
  5791. "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
  5792. "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
  5793. "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
  5794. "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
  5795. "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
  5796. "\xec\x9a\xda\x64\x96\xb5\x61\xff"
  5797. "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
  5798. "\x81\x85\x14\xa8\x59\xac\x8c\x94"
  5799. "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
  5800. "\x82\xc6\x4d\xca\x86\xea\x53\x28"
  5801. "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
  5802. "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
  5803. "\x05\xca\x81\x7b\xda\xa2\xde\x63"
  5804. "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
  5805. "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
  5806. "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
  5807. "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
  5808. "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
  5809. "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
  5810. "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
  5811. "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
  5812. "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
  5813. "\xfd\x43\x7d\xda\x42\x51\x87\x43"
  5814. "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
  5815. "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
  5816. "\x27\x5f\x11\xac\x71\xc7\x48\x46"
  5817. "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
  5818. "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
  5819. "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
  5820. "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
  5821. "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
  5822. "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
  5823. "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
  5824. "\x50\x88\x97\x40\x69\xb1\x37\xf5"
  5825. "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
  5826. "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
  5827. "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
  5828. "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
  5829. "\xc1\x16\x73\x50\x77\xba\xa6\x65"
  5830. "\x20\x2d\xb0\x02\x27\x89\xda\x99"
  5831. "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
  5832. "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
  5833. "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
  5834. "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
  5835. "\xa3\x0e\x33\x74\x40\x18\x39\x72"
  5836. "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
  5837. "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
  5838. "\x30\x05\xc8\x92\x98\x80\xff\x7a"
  5839. "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
  5840. "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
  5841. .ilen = 512,
  5842. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5843. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5844. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5845. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5846. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5847. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5848. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5849. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5850. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5851. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5852. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5853. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5854. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5855. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5856. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5857. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5858. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5859. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5860. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5861. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5862. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5863. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5864. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5865. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5866. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5867. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5868. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5869. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5870. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5871. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5872. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5873. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  5874. "\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. .rlen = 512,
  5907. },
  5908. };
  5909. /* Cast6 test vectors from RFC 2612 */
  5910. #define CAST6_ENC_TEST_VECTORS 3
  5911. #define CAST6_DEC_TEST_VECTORS 3
  5912. static struct cipher_testvec cast6_enc_tv_template[] = {
  5913. {
  5914. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5915. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  5916. .klen = 16,
  5917. .input = zeroed_string,
  5918. .ilen = 16,
  5919. .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  5920. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  5921. .rlen = 16,
  5922. }, {
  5923. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5924. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  5925. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  5926. .klen = 24,
  5927. .input = zeroed_string,
  5928. .ilen = 16,
  5929. .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  5930. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  5931. .rlen = 16,
  5932. }, {
  5933. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5934. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  5935. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  5936. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  5937. .klen = 32,
  5938. .input = zeroed_string,
  5939. .ilen = 16,
  5940. .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  5941. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  5942. .rlen = 16,
  5943. },
  5944. };
  5945. static struct cipher_testvec cast6_dec_tv_template[] = {
  5946. {
  5947. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5948. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  5949. .klen = 16,
  5950. .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  5951. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  5952. .ilen = 16,
  5953. .result = zeroed_string,
  5954. .rlen = 16,
  5955. }, {
  5956. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5957. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  5958. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  5959. .klen = 24,
  5960. .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  5961. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  5962. .ilen = 16,
  5963. .result = zeroed_string,
  5964. .rlen = 16,
  5965. }, {
  5966. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  5967. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  5968. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  5969. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  5970. .klen = 32,
  5971. .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  5972. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  5973. .ilen = 16,
  5974. .result = zeroed_string,
  5975. .rlen = 16,
  5976. },
  5977. };
  5978. /*
  5979. * AES test vectors.
  5980. */
  5981. #define AES_ENC_TEST_VECTORS 3
  5982. #define AES_DEC_TEST_VECTORS 3
  5983. #define AES_CBC_ENC_TEST_VECTORS 4
  5984. #define AES_CBC_DEC_TEST_VECTORS 4
  5985. #define AES_LRW_ENC_TEST_VECTORS 8
  5986. #define AES_LRW_DEC_TEST_VECTORS 8
  5987. #define AES_XTS_ENC_TEST_VECTORS 5
  5988. #define AES_XTS_DEC_TEST_VECTORS 5
  5989. #define AES_CTR_ENC_TEST_VECTORS 3
  5990. #define AES_CTR_DEC_TEST_VECTORS 3
  5991. #define AES_OFB_ENC_TEST_VECTORS 1
  5992. #define AES_OFB_DEC_TEST_VECTORS 1
  5993. #define AES_CTR_3686_ENC_TEST_VECTORS 7
  5994. #define AES_CTR_3686_DEC_TEST_VECTORS 6
  5995. #define AES_GCM_ENC_TEST_VECTORS 9
  5996. #define AES_GCM_DEC_TEST_VECTORS 8
  5997. #define AES_GCM_4106_ENC_TEST_VECTORS 7
  5998. #define AES_GCM_4106_DEC_TEST_VECTORS 7
  5999. #define AES_CCM_ENC_TEST_VECTORS 7
  6000. #define AES_CCM_DEC_TEST_VECTORS 7
  6001. #define AES_CCM_4309_ENC_TEST_VECTORS 7
  6002. #define AES_CCM_4309_DEC_TEST_VECTORS 10
  6003. static struct cipher_testvec aes_enc_tv_template[] = {
  6004. { /* From FIPS-197 */
  6005. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6006. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6007. .klen = 16,
  6008. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6009. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6010. .ilen = 16,
  6011. .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  6012. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  6013. .rlen = 16,
  6014. }, {
  6015. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6016. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6017. "\x10\x11\x12\x13\x14\x15\x16\x17",
  6018. .klen = 24,
  6019. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6020. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6021. .ilen = 16,
  6022. .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  6023. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  6024. .rlen = 16,
  6025. }, {
  6026. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6027. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6028. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6029. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6030. .klen = 32,
  6031. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6032. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6033. .ilen = 16,
  6034. .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  6035. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  6036. .rlen = 16,
  6037. },
  6038. };
  6039. static struct cipher_testvec aes_dec_tv_template[] = {
  6040. { /* From FIPS-197 */
  6041. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6042. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6043. .klen = 16,
  6044. .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  6045. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  6046. .ilen = 16,
  6047. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6048. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  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 = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  6056. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  6057. .ilen = 16,
  6058. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6059. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  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 = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  6068. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  6069. .ilen = 16,
  6070. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6071. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6072. .rlen = 16,
  6073. },
  6074. };
  6075. static struct cipher_testvec aes_cbc_enc_tv_template[] = {
  6076. { /* From RFC 3602 */
  6077. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  6078. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  6079. .klen = 16,
  6080. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  6081. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  6082. .input = "Single block msg",
  6083. .ilen = 16,
  6084. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  6085. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  6086. .rlen = 16,
  6087. }, {
  6088. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  6089. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  6090. .klen = 16,
  6091. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  6092. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  6093. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6094. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6095. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6096. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6097. .ilen = 32,
  6098. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  6099. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  6100. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  6101. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  6102. .rlen = 32,
  6103. }, { /* From NIST SP800-38A */
  6104. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  6105. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  6106. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  6107. .klen = 24,
  6108. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6109. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6110. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6111. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6112. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6113. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6114. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6115. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6116. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6117. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6118. .ilen = 64,
  6119. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  6120. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  6121. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  6122. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  6123. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  6124. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  6125. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  6126. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  6127. .rlen = 64,
  6128. }, {
  6129. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  6130. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  6131. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  6132. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  6133. .klen = 32,
  6134. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6135. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6136. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6137. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6138. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6139. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6140. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6141. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6142. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6143. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6144. .ilen = 64,
  6145. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  6146. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  6147. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  6148. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  6149. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  6150. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  6151. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  6152. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  6153. .rlen = 64,
  6154. },
  6155. };
  6156. static struct cipher_testvec aes_cbc_dec_tv_template[] = {
  6157. { /* From RFC 3602 */
  6158. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  6159. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  6160. .klen = 16,
  6161. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  6162. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  6163. .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  6164. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  6165. .ilen = 16,
  6166. .result = "Single block msg",
  6167. .rlen = 16,
  6168. }, {
  6169. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  6170. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  6171. .klen = 16,
  6172. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  6173. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  6174. .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  6175. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  6176. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  6177. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  6178. .ilen = 32,
  6179. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6180. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6181. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6182. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6183. .rlen = 32,
  6184. }, { /* From NIST SP800-38A */
  6185. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  6186. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  6187. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  6188. .klen = 24,
  6189. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6190. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6191. .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  6192. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  6193. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  6194. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  6195. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  6196. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  6197. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  6198. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  6199. .ilen = 64,
  6200. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6201. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6202. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6203. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6204. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6205. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6206. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6207. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6208. .rlen = 64,
  6209. }, {
  6210. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  6211. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  6212. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  6213. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  6214. .klen = 32,
  6215. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6216. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6217. .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  6218. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  6219. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  6220. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  6221. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  6222. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  6223. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  6224. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  6225. .ilen = 64,
  6226. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6227. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6228. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6229. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6230. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6231. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6232. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6233. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6234. .rlen = 64,
  6235. },
  6236. };
  6237. static struct cipher_testvec aes_lrw_enc_tv_template[] = {
  6238. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  6239. { /* LRW-32-AES 1 */
  6240. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  6241. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  6242. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  6243. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  6244. .klen = 32,
  6245. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6246. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6247. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6248. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6249. .ilen = 16,
  6250. .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  6251. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  6252. .rlen = 16,
  6253. }, { /* LRW-32-AES 2 */
  6254. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  6255. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  6256. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  6257. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  6258. .klen = 32,
  6259. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6260. "\x00\x00\x00\x00\x00\x00\x00\x02",
  6261. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6262. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6263. .ilen = 16,
  6264. .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  6265. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  6266. .rlen = 16,
  6267. }, { /* LRW-32-AES 3 */
  6268. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  6269. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  6270. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  6271. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  6272. .klen = 32,
  6273. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6274. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6275. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6276. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6277. .ilen = 16,
  6278. .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  6279. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  6280. .rlen = 16,
  6281. }, { /* LRW-32-AES 4 */
  6282. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  6283. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  6284. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  6285. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  6286. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  6287. .klen = 40,
  6288. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6289. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6290. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6291. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6292. .ilen = 16,
  6293. .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  6294. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  6295. .rlen = 16,
  6296. }, { /* LRW-32-AES 5 */
  6297. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  6298. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  6299. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  6300. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  6301. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  6302. .klen = 40,
  6303. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6304. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6305. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6306. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6307. .ilen = 16,
  6308. .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  6309. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  6310. .rlen = 16,
  6311. }, { /* LRW-32-AES 6 */
  6312. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  6313. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  6314. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  6315. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  6316. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  6317. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  6318. .klen = 48,
  6319. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6320. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6321. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6322. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6323. .ilen = 16,
  6324. .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  6325. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  6326. .rlen = 16,
  6327. }, { /* LRW-32-AES 7 */
  6328. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  6329. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  6330. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  6331. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  6332. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  6333. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  6334. .klen = 48,
  6335. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6336. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6337. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6338. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6339. .ilen = 16,
  6340. .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  6341. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  6342. .rlen = 16,
  6343. }, {
  6344. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  6345. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  6346. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  6347. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  6348. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  6349. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  6350. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  6351. .klen = 48,
  6352. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6353. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6354. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  6355. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  6356. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  6357. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  6358. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  6359. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  6360. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  6361. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  6362. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  6363. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  6364. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  6365. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  6366. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  6367. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  6368. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  6369. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  6370. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  6371. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  6372. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  6373. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  6374. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  6375. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  6376. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  6377. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  6378. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  6379. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  6380. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  6381. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  6382. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  6383. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  6384. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  6385. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  6386. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  6387. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  6388. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  6389. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  6390. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  6391. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  6392. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  6393. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  6394. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  6395. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  6396. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  6397. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  6398. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  6399. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  6400. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  6401. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  6402. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  6403. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  6404. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  6405. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  6406. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  6407. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  6408. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  6409. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  6410. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  6411. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  6412. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  6413. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  6414. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  6415. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  6416. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  6417. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  6418. .ilen = 512,
  6419. .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  6420. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  6421. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  6422. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  6423. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  6424. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  6425. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  6426. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  6427. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  6428. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  6429. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  6430. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  6431. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  6432. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  6433. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  6434. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  6435. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  6436. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  6437. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  6438. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  6439. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  6440. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  6441. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  6442. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  6443. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  6444. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  6445. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  6446. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  6447. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  6448. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  6449. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  6450. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  6451. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  6452. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  6453. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  6454. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  6455. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  6456. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  6457. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  6458. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  6459. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  6460. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  6461. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  6462. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  6463. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  6464. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  6465. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  6466. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  6467. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  6468. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  6469. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  6470. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  6471. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  6472. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  6473. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  6474. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  6475. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  6476. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  6477. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  6478. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  6479. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  6480. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  6481. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  6482. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  6483. .rlen = 512,
  6484. }
  6485. };
  6486. static struct cipher_testvec aes_lrw_dec_tv_template[] = {
  6487. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  6488. /* same as enc vectors with input and result reversed */
  6489. { /* LRW-32-AES 1 */
  6490. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  6491. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  6492. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  6493. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  6494. .klen = 32,
  6495. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6496. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6497. .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  6498. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  6499. .ilen = 16,
  6500. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6501. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6502. .rlen = 16,
  6503. }, { /* LRW-32-AES 2 */
  6504. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  6505. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  6506. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  6507. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  6508. .klen = 32,
  6509. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6510. "\x00\x00\x00\x00\x00\x00\x00\x02",
  6511. .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  6512. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  6513. .ilen = 16,
  6514. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6515. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6516. .rlen = 16,
  6517. }, { /* LRW-32-AES 3 */
  6518. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  6519. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  6520. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  6521. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  6522. .klen = 32,
  6523. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6524. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6525. .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  6526. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  6527. .ilen = 16,
  6528. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6529. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6530. .rlen = 16,
  6531. }, { /* LRW-32-AES 4 */
  6532. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  6533. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  6534. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  6535. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  6536. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  6537. .klen = 40,
  6538. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6539. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6540. .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  6541. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  6542. .ilen = 16,
  6543. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6544. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6545. .rlen = 16,
  6546. }, { /* LRW-32-AES 5 */
  6547. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  6548. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  6549. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  6550. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  6551. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  6552. .klen = 40,
  6553. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6554. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6555. .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  6556. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  6557. .ilen = 16,
  6558. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6559. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6560. .rlen = 16,
  6561. }, { /* LRW-32-AES 6 */
  6562. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  6563. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  6564. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  6565. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  6566. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  6567. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  6568. .klen = 48,
  6569. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6570. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6571. .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  6572. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  6573. .ilen = 16,
  6574. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6575. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6576. .rlen = 16,
  6577. }, { /* LRW-32-AES 7 */
  6578. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  6579. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  6580. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  6581. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  6582. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  6583. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  6584. .klen = 48,
  6585. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6586. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6587. .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  6588. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  6589. .ilen = 16,
  6590. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6591. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6592. .rlen = 16,
  6593. }, {
  6594. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  6595. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  6596. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  6597. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  6598. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  6599. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  6600. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  6601. .klen = 48,
  6602. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6603. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6604. .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  6605. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  6606. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  6607. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  6608. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  6609. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  6610. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  6611. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  6612. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  6613. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  6614. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  6615. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  6616. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  6617. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  6618. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  6619. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  6620. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  6621. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  6622. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  6623. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  6624. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  6625. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  6626. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  6627. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  6628. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  6629. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  6630. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  6631. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  6632. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  6633. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  6634. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  6635. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  6636. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  6637. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  6638. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  6639. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  6640. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  6641. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  6642. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  6643. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  6644. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  6645. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  6646. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  6647. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  6648. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  6649. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  6650. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  6651. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  6652. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  6653. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  6654. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  6655. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  6656. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  6657. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  6658. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  6659. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  6660. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  6661. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  6662. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  6663. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  6664. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  6665. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  6666. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  6667. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  6668. .ilen = 512,
  6669. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  6670. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  6671. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  6672. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  6673. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  6674. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  6675. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  6676. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  6677. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  6678. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  6679. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  6680. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  6681. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  6682. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  6683. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  6684. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  6685. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  6686. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  6687. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  6688. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  6689. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  6690. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  6691. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  6692. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  6693. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  6694. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  6695. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  6696. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  6697. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  6698. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  6699. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  6700. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  6701. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  6702. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  6703. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  6704. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  6705. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  6706. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  6707. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  6708. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  6709. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  6710. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  6711. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  6712. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  6713. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  6714. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  6715. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  6716. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  6717. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  6718. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  6719. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  6720. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  6721. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  6722. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  6723. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  6724. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  6725. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  6726. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  6727. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  6728. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  6729. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  6730. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  6731. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  6732. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  6733. .rlen = 512,
  6734. }
  6735. };
  6736. static struct cipher_testvec aes_xts_enc_tv_template[] = {
  6737. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  6738. { /* XTS-AES 1 */
  6739. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6740. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6741. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6742. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6743. .klen = 32,
  6744. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6745. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6746. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6747. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6748. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6749. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6750. .ilen = 32,
  6751. .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  6752. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  6753. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  6754. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  6755. .rlen = 32,
  6756. }, { /* XTS-AES 2 */
  6757. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  6758. "\x11\x11\x11\x11\x11\x11\x11\x11"
  6759. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6760. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6761. .klen = 32,
  6762. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6763. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6764. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6765. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6766. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6767. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6768. .ilen = 32,
  6769. .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  6770. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  6771. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  6772. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  6773. .rlen = 32,
  6774. }, { /* XTS-AES 3 */
  6775. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  6776. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  6777. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6778. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6779. .klen = 32,
  6780. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6781. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6782. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6783. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6784. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6785. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6786. .ilen = 32,
  6787. .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  6788. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  6789. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  6790. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  6791. .rlen = 32,
  6792. }, { /* XTS-AES 4 */
  6793. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6794. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6795. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6796. "\x23\x84\x62\x64\x33\x83\x27\x95",
  6797. .klen = 32,
  6798. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6799. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6800. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6801. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6802. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6803. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6804. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6805. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6806. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6807. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6808. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6809. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6810. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6811. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6812. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6813. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6814. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6815. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6816. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6817. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6818. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6819. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6820. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6821. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6822. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6823. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6824. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6825. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6826. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6827. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6828. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6829. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6830. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6831. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6832. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6833. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6834. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6835. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6836. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6837. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6838. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6839. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6840. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6841. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6842. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6843. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6844. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6845. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6846. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6847. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6848. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6849. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6850. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6851. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6852. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6853. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6854. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6855. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6856. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6857. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6858. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6859. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6860. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6861. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6862. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6863. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  6864. .ilen = 512,
  6865. .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  6866. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  6867. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  6868. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  6869. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  6870. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  6871. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  6872. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  6873. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  6874. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  6875. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  6876. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  6877. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  6878. "\x22\x97\x61\x46\xae\x20\xce\x84"
  6879. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  6880. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  6881. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  6882. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  6883. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  6884. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  6885. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  6886. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  6887. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  6888. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  6889. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  6890. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  6891. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  6892. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  6893. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  6894. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  6895. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  6896. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  6897. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  6898. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  6899. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  6900. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  6901. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  6902. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  6903. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  6904. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  6905. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  6906. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  6907. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  6908. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  6909. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  6910. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  6911. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  6912. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  6913. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  6914. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  6915. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  6916. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  6917. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  6918. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  6919. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  6920. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  6921. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  6922. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  6923. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  6924. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  6925. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  6926. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  6927. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  6928. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  6929. .rlen = 512,
  6930. }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
  6931. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6932. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6933. "\x62\x49\x77\x57\x24\x70\x93\x69"
  6934. "\x99\x59\x57\x49\x66\x96\x76\x27"
  6935. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6936. "\x23\x84\x62\x64\x33\x83\x27\x95"
  6937. "\x02\x88\x41\x97\x16\x93\x99\x37"
  6938. "\x51\x05\x82\x09\x74\x94\x45\x92",
  6939. .klen = 64,
  6940. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  6941. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6942. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6943. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6944. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6945. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6946. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6947. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6948. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6949. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6950. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6951. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6952. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6953. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6954. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6955. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6956. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6957. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6958. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6959. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6960. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6961. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6962. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6963. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6964. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6965. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6966. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6967. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6968. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6969. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6970. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6971. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6972. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6973. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6974. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6975. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6976. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6977. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6978. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6979. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6980. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6981. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6982. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6983. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6984. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6985. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6986. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6987. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6988. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6989. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6990. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6991. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6992. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6993. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6994. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6995. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6996. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6997. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6998. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6999. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7000. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7001. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7002. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7003. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7004. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7005. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7006. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7007. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7008. .ilen = 512,
  7009. .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
  7010. "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
  7011. "\xea\x00\x80\x3f\x5e\x48\x23\x57"
  7012. "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
  7013. "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
  7014. "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
  7015. "\x68\x0a\x86\xac\x35\xad\xfc\x33"
  7016. "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
  7017. "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
  7018. "\xb1\x08\xfd\x10\x98\xba\xec\x70"
  7019. "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
  7020. "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
  7021. "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
  7022. "\xae\xba\x12\x29\x61\xd0\x3a\x75"
  7023. "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
  7024. "\x00\x02\x08\x87\x89\x14\x29\xca"
  7025. "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
  7026. "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
  7027. "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
  7028. "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
  7029. "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
  7030. "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
  7031. "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
  7032. "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
  7033. "\x93\xec\x05\xc5\x2e\x04\x93\xef"
  7034. "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
  7035. "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
  7036. "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
  7037. "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
  7038. "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
  7039. "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
  7040. "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
  7041. "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
  7042. "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
  7043. "\xbc\x48\x14\x57\x77\x8f\x61\x60"
  7044. "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
  7045. "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
  7046. "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
  7047. "\xf4\xc3\x33\xec\x44\x23\x88\x51"
  7048. "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
  7049. "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
  7050. "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
  7051. "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
  7052. "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
  7053. "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
  7054. "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
  7055. "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
  7056. "\x92\x5f\xed\xc4\xae\x74\xff\xac"
  7057. "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
  7058. "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
  7059. "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
  7060. "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
  7061. "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
  7062. "\x94\x30\x54\xff\x84\x01\x14\x93"
  7063. "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
  7064. "\x53\x76\x44\x1a\x77\xed\x43\x85"
  7065. "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
  7066. "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
  7067. "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
  7068. "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
  7069. "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
  7070. "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
  7071. "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
  7072. "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
  7073. .rlen = 512,
  7074. }
  7075. };
  7076. static struct cipher_testvec aes_xts_dec_tv_template[] = {
  7077. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  7078. { /* XTS-AES 1 */
  7079. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7080. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7081. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7082. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7083. .klen = 32,
  7084. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7085. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7086. .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  7087. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  7088. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  7089. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  7090. .ilen = 32,
  7091. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7092. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7093. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7094. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7095. .rlen = 32,
  7096. }, { /* XTS-AES 2 */
  7097. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  7098. "\x11\x11\x11\x11\x11\x11\x11\x11"
  7099. "\x22\x22\x22\x22\x22\x22\x22\x22"
  7100. "\x22\x22\x22\x22\x22\x22\x22\x22",
  7101. .klen = 32,
  7102. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  7103. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7104. .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  7105. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  7106. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  7107. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  7108. .ilen = 32,
  7109. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  7110. "\x44\x44\x44\x44\x44\x44\x44\x44"
  7111. "\x44\x44\x44\x44\x44\x44\x44\x44"
  7112. "\x44\x44\x44\x44\x44\x44\x44\x44",
  7113. .rlen = 32,
  7114. }, { /* XTS-AES 3 */
  7115. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  7116. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  7117. "\x22\x22\x22\x22\x22\x22\x22\x22"
  7118. "\x22\x22\x22\x22\x22\x22\x22\x22",
  7119. .klen = 32,
  7120. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  7121. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7122. .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  7123. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  7124. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  7125. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  7126. .ilen = 32,
  7127. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  7128. "\x44\x44\x44\x44\x44\x44\x44\x44"
  7129. "\x44\x44\x44\x44\x44\x44\x44\x44"
  7130. "\x44\x44\x44\x44\x44\x44\x44\x44",
  7131. .rlen = 32,
  7132. }, { /* XTS-AES 4 */
  7133. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  7134. "\x23\x53\x60\x28\x74\x71\x35\x26"
  7135. "\x31\x41\x59\x26\x53\x58\x97\x93"
  7136. "\x23\x84\x62\x64\x33\x83\x27\x95",
  7137. .klen = 32,
  7138. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7139. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7140. .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  7141. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  7142. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  7143. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  7144. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  7145. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  7146. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  7147. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  7148. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  7149. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  7150. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  7151. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  7152. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  7153. "\x22\x97\x61\x46\xae\x20\xce\x84"
  7154. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  7155. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  7156. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  7157. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  7158. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  7159. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  7160. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  7161. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  7162. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  7163. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  7164. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  7165. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  7166. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  7167. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  7168. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  7169. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  7170. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  7171. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  7172. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  7173. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  7174. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  7175. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  7176. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  7177. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  7178. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  7179. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  7180. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  7181. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  7182. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  7183. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  7184. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  7185. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  7186. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  7187. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  7188. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  7189. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  7190. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  7191. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  7192. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  7193. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  7194. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  7195. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  7196. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  7197. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  7198. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  7199. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  7200. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  7201. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  7202. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  7203. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  7204. .ilen = 512,
  7205. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7206. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7207. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7208. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7209. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7210. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7211. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7212. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7213. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7214. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7215. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7216. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7217. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7218. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7219. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7220. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7221. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7222. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7223. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7224. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7225. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7226. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7227. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7228. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7229. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7230. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7231. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7232. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7233. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7234. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7235. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7236. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  7237. "\x00\x01\x02\x03\x04\x05\x06\x07"
  7238. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7239. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7240. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7241. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7242. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7243. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7244. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7245. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7246. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7247. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7248. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7249. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7250. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7251. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7252. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7253. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7254. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7255. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7256. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7257. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7258. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7259. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7260. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7261. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7262. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7263. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7264. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7265. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7266. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7267. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7268. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7269. .rlen = 512,
  7270. }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
  7271. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  7272. "\x23\x53\x60\x28\x74\x71\x35\x26"
  7273. "\x62\x49\x77\x57\x24\x70\x93\x69"
  7274. "\x99\x59\x57\x49\x66\x96\x76\x27"
  7275. "\x31\x41\x59\x26\x53\x58\x97\x93"
  7276. "\x23\x84\x62\x64\x33\x83\x27\x95"
  7277. "\x02\x88\x41\x97\x16\x93\x99\x37"
  7278. "\x51\x05\x82\x09\x74\x94\x45\x92",
  7279. .klen = 64,
  7280. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  7281. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7282. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7283. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7284. .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
  7285. "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
  7286. "\xea\x00\x80\x3f\x5e\x48\x23\x57"
  7287. "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
  7288. "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
  7289. "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
  7290. "\x68\x0a\x86\xac\x35\xad\xfc\x33"
  7291. "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
  7292. "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
  7293. "\xb1\x08\xfd\x10\x98\xba\xec\x70"
  7294. "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
  7295. "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
  7296. "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
  7297. "\xae\xba\x12\x29\x61\xd0\x3a\x75"
  7298. "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
  7299. "\x00\x02\x08\x87\x89\x14\x29\xca"
  7300. "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
  7301. "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
  7302. "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
  7303. "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
  7304. "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
  7305. "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
  7306. "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
  7307. "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
  7308. "\x93\xec\x05\xc5\x2e\x04\x93\xef"
  7309. "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
  7310. "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
  7311. "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
  7312. "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
  7313. "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
  7314. "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
  7315. "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
  7316. "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
  7317. "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
  7318. "\xbc\x48\x14\x57\x77\x8f\x61\x60"
  7319. "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
  7320. "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
  7321. "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
  7322. "\xf4\xc3\x33\xec\x44\x23\x88\x51"
  7323. "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
  7324. "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
  7325. "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
  7326. "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
  7327. "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
  7328. "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
  7329. "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
  7330. "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
  7331. "\x92\x5f\xed\xc4\xae\x74\xff\xac"
  7332. "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
  7333. "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
  7334. "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
  7335. "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
  7336. "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
  7337. "\x94\x30\x54\xff\x84\x01\x14\x93"
  7338. "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
  7339. "\x53\x76\x44\x1a\x77\xed\x43\x85"
  7340. "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
  7341. "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
  7342. "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
  7343. "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
  7344. "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
  7345. "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
  7346. "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
  7347. "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
  7348. .ilen = 512,
  7349. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7350. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7351. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7352. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7353. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7354. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7355. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7356. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7357. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7358. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7359. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7360. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7361. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7362. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7363. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7364. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7365. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7366. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7367. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7368. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7369. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7370. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7371. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7372. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7373. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7374. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7375. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7376. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7377. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7378. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7379. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7380. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  7381. "\x00\x01\x02\x03\x04\x05\x06\x07"
  7382. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7383. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7384. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7385. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7386. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7387. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7388. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7389. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7390. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7391. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7392. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7393. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7394. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7395. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7396. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7397. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7398. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7399. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7400. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7401. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7402. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7403. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7404. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7405. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7406. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7407. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7408. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7409. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7410. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7411. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7412. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7413. .rlen = 512,
  7414. }
  7415. };
  7416. static struct cipher_testvec aes_ctr_enc_tv_template[] = {
  7417. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  7418. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  7419. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  7420. .klen = 16,
  7421. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7422. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7423. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7424. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7425. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7426. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7427. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7428. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7429. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7430. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7431. .ilen = 64,
  7432. .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  7433. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  7434. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  7435. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  7436. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  7437. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  7438. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  7439. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  7440. .rlen = 64,
  7441. }, {
  7442. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  7443. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  7444. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  7445. .klen = 24,
  7446. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7447. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7448. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7449. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7450. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7451. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7452. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7453. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7454. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7455. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7456. .ilen = 64,
  7457. .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  7458. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  7459. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  7460. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  7461. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  7462. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  7463. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  7464. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  7465. .rlen = 64,
  7466. }, {
  7467. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  7468. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  7469. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  7470. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  7471. .klen = 32,
  7472. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7473. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7474. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7475. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7476. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7477. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7478. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7479. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7480. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7481. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7482. .ilen = 64,
  7483. .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  7484. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  7485. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  7486. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  7487. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  7488. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  7489. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  7490. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  7491. .rlen = 64,
  7492. }
  7493. };
  7494. static struct cipher_testvec aes_ctr_dec_tv_template[] = {
  7495. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  7496. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  7497. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  7498. .klen = 16,
  7499. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7500. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7501. .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  7502. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  7503. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  7504. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  7505. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  7506. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  7507. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  7508. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  7509. .ilen = 64,
  7510. .result = "\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. .rlen = 64,
  7519. }, {
  7520. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  7521. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  7522. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  7523. .klen = 24,
  7524. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7525. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7526. .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  7527. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  7528. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  7529. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  7530. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  7531. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  7532. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  7533. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  7534. .ilen = 64,
  7535. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7536. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7537. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7538. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7539. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7540. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7541. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7542. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7543. .rlen = 64,
  7544. }, {
  7545. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  7546. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  7547. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  7548. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  7549. .klen = 32,
  7550. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7551. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  7552. .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  7553. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  7554. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  7555. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  7556. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  7557. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  7558. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  7559. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  7560. .ilen = 64,
  7561. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7562. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7563. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7564. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7565. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7566. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7567. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7568. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7569. .rlen = 64,
  7570. }
  7571. };
  7572. static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
  7573. { /* From RFC 3686 */
  7574. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  7575. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  7576. "\x00\x00\x00\x30",
  7577. .klen = 20,
  7578. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7579. .input = "Single block msg",
  7580. .ilen = 16,
  7581. .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  7582. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  7583. .rlen = 16,
  7584. }, {
  7585. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  7586. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  7587. "\x00\x6c\xb6\xdb",
  7588. .klen = 20,
  7589. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  7590. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7591. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7592. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7593. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7594. .ilen = 32,
  7595. .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  7596. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  7597. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  7598. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  7599. .rlen = 32,
  7600. }, {
  7601. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  7602. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  7603. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  7604. "\x00\x00\x00\x48",
  7605. .klen = 28,
  7606. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  7607. .input = "Single block msg",
  7608. .ilen = 16,
  7609. .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  7610. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  7611. .rlen = 16,
  7612. }, {
  7613. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  7614. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  7615. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  7616. "\x00\x96\xb0\x3b",
  7617. .klen = 28,
  7618. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  7619. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7620. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7621. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7622. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7623. .ilen = 32,
  7624. .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  7625. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  7626. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  7627. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  7628. .rlen = 32,
  7629. }, {
  7630. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  7631. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  7632. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  7633. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  7634. "\x00\x00\x00\x60",
  7635. .klen = 36,
  7636. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  7637. .input = "Single block msg",
  7638. .ilen = 16,
  7639. .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  7640. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  7641. .rlen = 16,
  7642. }, {
  7643. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  7644. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  7645. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  7646. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  7647. "\x00\xfa\xac\x24",
  7648. .klen = 36,
  7649. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  7650. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7651. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7652. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7653. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7654. .ilen = 32,
  7655. .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  7656. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  7657. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  7658. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  7659. .rlen = 32,
  7660. }, {
  7661. // generated using Crypto++
  7662. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7663. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7664. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7665. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7666. "\x00\x00\x00\x00",
  7667. .klen = 32 + 4,
  7668. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7669. .input =
  7670. "\x00\x01\x02\x03\x04\x05\x06\x07"
  7671. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7672. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7673. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7674. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7675. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7676. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7677. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7678. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7679. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7680. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7681. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7682. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7683. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7684. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7685. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7686. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7687. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7688. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7689. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7690. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7691. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7692. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7693. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7694. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7695. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7696. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7697. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7698. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7699. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7700. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7701. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  7702. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  7703. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  7704. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  7705. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  7706. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  7707. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  7708. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  7709. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  7710. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  7711. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  7712. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  7713. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  7714. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  7715. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  7716. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  7717. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  7718. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  7719. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  7720. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  7721. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  7722. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  7723. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  7724. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  7725. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  7726. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  7727. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  7728. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  7729. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  7730. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  7731. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  7732. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  7733. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  7734. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  7735. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  7736. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  7737. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  7738. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  7739. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  7740. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  7741. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  7742. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  7743. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  7744. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  7745. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  7746. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  7747. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  7748. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  7749. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  7750. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  7751. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  7752. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  7753. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  7754. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  7755. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  7756. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  7757. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  7758. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  7759. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  7760. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  7761. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  7762. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  7763. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  7764. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  7765. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  7766. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  7767. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  7768. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  7769. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  7770. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  7771. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  7772. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  7773. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  7774. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  7775. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  7776. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  7777. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  7778. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  7779. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  7780. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  7781. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  7782. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  7783. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  7784. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  7785. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  7786. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  7787. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  7788. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  7789. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  7790. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  7791. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  7792. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  7793. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  7794. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  7795. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  7796. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  7797. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  7798. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  7799. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  7800. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  7801. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  7802. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  7803. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  7804. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  7805. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  7806. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  7807. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  7808. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  7809. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  7810. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  7811. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  7812. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  7813. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  7814. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  7815. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  7816. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  7817. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  7818. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  7819. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  7820. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  7821. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  7822. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  7823. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  7824. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  7825. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  7826. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  7827. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  7828. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  7829. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  7830. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  7831. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  7832. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  7833. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  7834. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  7835. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  7836. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  7837. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  7838. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  7839. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  7840. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  7841. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  7842. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  7843. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  7844. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  7845. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  7846. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  7847. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  7848. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  7849. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  7850. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  7851. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  7852. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  7853. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  7854. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  7855. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  7856. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  7857. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  7858. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  7859. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  7860. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  7861. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  7862. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  7863. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  7864. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  7865. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  7866. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  7867. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  7868. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  7869. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  7870. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  7871. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  7872. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  7873. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  7874. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  7875. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  7876. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  7877. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  7878. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  7879. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  7880. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  7881. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  7882. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  7883. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  7884. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  7885. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  7886. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  7887. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  7888. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  7889. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  7890. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  7891. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  7892. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  7893. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  7894. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  7895. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  7896. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  7897. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  7898. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  7899. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  7900. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  7901. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  7902. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  7903. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  7904. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  7905. "\x28\x37\x46\x55\x64\x73\x82\x91"
  7906. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  7907. "\x18\x27\x36\x45\x54\x63\x72\x81"
  7908. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  7909. "\x08\x17\x26\x35\x44\x53\x62\x71"
  7910. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  7911. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  7912. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  7913. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  7914. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  7915. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  7916. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  7917. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  7918. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  7919. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  7920. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  7921. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  7922. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  7923. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  7924. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  7925. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  7926. "\x00\x11\x22\x33\x44\x55\x66\x77"
  7927. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  7928. "\x10\x21\x32\x43\x54\x65\x76\x87"
  7929. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  7930. "\x20\x31\x42\x53\x64\x75\x86\x97"
  7931. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  7932. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  7933. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  7934. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  7935. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  7936. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  7937. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  7938. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  7939. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  7940. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  7941. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  7942. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  7943. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  7944. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  7945. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  7946. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  7947. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  7948. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  7949. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  7950. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  7951. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  7952. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  7953. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  7954. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  7955. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  7956. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  7957. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  7958. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  7959. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  7960. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  7961. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  7962. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  7963. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  7964. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  7965. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  7966. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  7967. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  7968. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  7969. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  7970. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  7971. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  7972. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  7973. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  7974. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  7975. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  7976. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  7977. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  7978. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  7979. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  7980. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  7981. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  7982. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  7983. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  7984. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  7985. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  7986. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  7987. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  7988. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  7989. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  7990. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  7991. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  7992. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  7993. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  7994. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  7995. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  7996. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  7997. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  7998. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  7999. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  8000. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  8001. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  8002. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  8003. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  8004. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  8005. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  8006. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  8007. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  8008. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  8009. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  8010. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  8011. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  8012. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  8013. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  8014. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  8015. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  8016. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  8017. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  8018. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  8019. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  8020. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  8021. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  8022. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  8023. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  8024. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  8025. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  8026. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  8027. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  8028. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  8029. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  8030. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  8031. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  8032. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  8033. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  8034. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  8035. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  8036. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  8037. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  8038. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  8039. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  8040. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  8041. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  8042. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  8043. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  8044. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  8045. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  8046. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  8047. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  8048. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  8049. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  8050. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  8051. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  8052. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  8053. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  8054. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  8055. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  8056. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  8057. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  8058. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  8059. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  8060. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  8061. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  8062. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  8063. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  8064. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  8065. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  8066. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  8067. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  8068. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  8069. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  8070. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  8071. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  8072. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  8073. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  8074. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  8075. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  8076. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  8077. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  8078. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  8079. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  8080. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  8081. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  8082. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  8083. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  8084. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  8085. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  8086. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  8087. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  8088. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  8089. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  8090. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  8091. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  8092. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  8093. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  8094. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  8095. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  8096. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  8097. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  8098. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  8099. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  8100. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  8101. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  8102. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  8103. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  8104. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  8105. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  8106. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  8107. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  8108. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  8109. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  8110. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  8111. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  8112. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  8113. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  8114. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  8115. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  8116. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  8117. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  8118. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  8119. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  8120. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  8121. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  8122. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  8123. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  8124. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  8125. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  8126. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  8127. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  8128. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  8129. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  8130. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  8131. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  8132. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  8133. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  8134. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  8135. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  8136. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  8137. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  8138. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  8139. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  8140. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  8141. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  8142. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  8143. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  8144. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  8145. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  8146. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  8147. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  8148. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  8149. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  8150. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  8151. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  8152. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  8153. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  8154. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  8155. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  8156. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  8157. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  8158. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  8159. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  8160. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  8161. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  8162. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  8163. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  8164. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  8165. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  8166. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  8167. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  8168. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  8169. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  8170. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  8171. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  8172. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  8173. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  8174. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  8175. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  8176. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  8177. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  8178. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  8179. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  8180. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  8181. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  8182. "\x00\x21\x42\x63",
  8183. .ilen = 4100,
  8184. .result =
  8185. "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
  8186. "\xae\xff\x91\x3a\x44\xcf\x38\x32"
  8187. "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
  8188. "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
  8189. "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
  8190. "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
  8191. "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
  8192. "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
  8193. "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
  8194. "\x18\xff\x75\x6d\x06\x2d\x00\xab"
  8195. "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
  8196. "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
  8197. "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
  8198. "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
  8199. "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
  8200. "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
  8201. "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
  8202. "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
  8203. "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
  8204. "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
  8205. "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
  8206. "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
  8207. "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
  8208. "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
  8209. "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
  8210. "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
  8211. "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
  8212. "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
  8213. "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
  8214. "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
  8215. "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
  8216. "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
  8217. "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
  8218. "\x6a\x25\x15\x33\x4e\x45\x08\xec"
  8219. "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
  8220. "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
  8221. "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
  8222. "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
  8223. "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
  8224. "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
  8225. "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
  8226. "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
  8227. "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
  8228. "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
  8229. "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
  8230. "\x04\x02\xef\xd3\x44\xde\x76\x31"
  8231. "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
  8232. "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
  8233. "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
  8234. "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
  8235. "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
  8236. "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
  8237. "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
  8238. "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
  8239. "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
  8240. "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
  8241. "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
  8242. "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
  8243. "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
  8244. "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
  8245. "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
  8246. "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
  8247. "\x32\x03\xed\xf0\x50\x1c\x56\x39"
  8248. "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
  8249. "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
  8250. "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
  8251. "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
  8252. "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
  8253. "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
  8254. "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
  8255. "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
  8256. "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
  8257. "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
  8258. "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
  8259. "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
  8260. "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
  8261. "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
  8262. "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
  8263. "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
  8264. "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
  8265. "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
  8266. "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
  8267. "\x69\x3a\x29\x23\xac\x86\x32\xa5"
  8268. "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
  8269. "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
  8270. "\x59\x6a\xd3\x50\x59\x43\x59\xde"
  8271. "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
  8272. "\x18\x34\x0d\x1a\x63\x33\xed\x10"
  8273. "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
  8274. "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
  8275. "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
  8276. "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
  8277. "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
  8278. "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
  8279. "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
  8280. "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
  8281. "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
  8282. "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
  8283. "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
  8284. "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
  8285. "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
  8286. "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
  8287. "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
  8288. "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
  8289. "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
  8290. "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
  8291. "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
  8292. "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
  8293. "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
  8294. "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
  8295. "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
  8296. "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
  8297. "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
  8298. "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
  8299. "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
  8300. "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
  8301. "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
  8302. "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
  8303. "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
  8304. "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
  8305. "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
  8306. "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
  8307. "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
  8308. "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
  8309. "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
  8310. "\x26\x39\x83\x94\xef\x27\xd8\x53"
  8311. "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
  8312. "\x43\x7c\x95\x0a\x53\xef\x66\xda"
  8313. "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
  8314. "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
  8315. "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
  8316. "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
  8317. "\x88\xee\x73\xcf\x66\x2f\x52\x56"
  8318. "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
  8319. "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
  8320. "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
  8321. "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
  8322. "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
  8323. "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
  8324. "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
  8325. "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
  8326. "\xba\x61\x34\x38\x7c\xda\x48\x3e"
  8327. "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
  8328. "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
  8329. "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
  8330. "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
  8331. "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
  8332. "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
  8333. "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
  8334. "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
  8335. "\x35\x12\xe3\x36\x28\x27\x36\x58"
  8336. "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
  8337. "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
  8338. "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
  8339. "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
  8340. "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
  8341. "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
  8342. "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
  8343. "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
  8344. "\x89\xf3\x78\x35\x44\x62\x78\x72"
  8345. "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
  8346. "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
  8347. "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
  8348. "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
  8349. "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
  8350. "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
  8351. "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
  8352. "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
  8353. "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
  8354. "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
  8355. "\xd2\x49\x77\x81\x6d\x90\x70\xae"
  8356. "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
  8357. "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
  8358. "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
  8359. "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
  8360. "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
  8361. "\x45\x42\x27\x75\x50\xe5\xee\xb8"
  8362. "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
  8363. "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
  8364. "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
  8365. "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
  8366. "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
  8367. "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
  8368. "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
  8369. "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
  8370. "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
  8371. "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
  8372. "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
  8373. "\xa9\x21\x2b\x92\x94\x87\x62\x57"
  8374. "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
  8375. "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
  8376. "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
  8377. "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
  8378. "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
  8379. "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
  8380. "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
  8381. "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
  8382. "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
  8383. "\x69\x34\x78\x61\x24\x21\x9c\x8a"
  8384. "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
  8385. "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
  8386. "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
  8387. "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
  8388. "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
  8389. "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
  8390. "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
  8391. "\xb1\x95\x28\x86\x20\xe9\x17\x49"
  8392. "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
  8393. "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
  8394. "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
  8395. "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
  8396. "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
  8397. "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
  8398. "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
  8399. "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
  8400. "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
  8401. "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
  8402. "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
  8403. "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
  8404. "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
  8405. "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
  8406. "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
  8407. "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
  8408. "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
  8409. "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
  8410. "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
  8411. "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
  8412. "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
  8413. "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
  8414. "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
  8415. "\x29\x90\x46\x30\x92\x69\x7d\x13"
  8416. "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
  8417. "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
  8418. "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
  8419. "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
  8420. "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
  8421. "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
  8422. "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
  8423. "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
  8424. "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
  8425. "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
  8426. "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
  8427. "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
  8428. "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
  8429. "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
  8430. "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
  8431. "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
  8432. "\x77\x65\x08\x60\x11\x76\x4c\x8d"
  8433. "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
  8434. "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
  8435. "\x03\xd1\x24\x95\xec\x6d\xab\x38"
  8436. "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
  8437. "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
  8438. "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
  8439. "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
  8440. "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
  8441. "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
  8442. "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
  8443. "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
  8444. "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
  8445. "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
  8446. "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
  8447. "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
  8448. "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
  8449. "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
  8450. "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
  8451. "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
  8452. "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
  8453. "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
  8454. "\xe5\x79\x81\x73\xcd\x43\x59\x68"
  8455. "\x73\x02\x3b\x78\x21\x72\x43\x00"
  8456. "\x49\x17\xf7\x00\xaf\x68\x24\x53"
  8457. "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
  8458. "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
  8459. "\x11\x94\x13\x69\x51\x09\x28\xde"
  8460. "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
  8461. "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
  8462. "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
  8463. "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
  8464. "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
  8465. "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
  8466. "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
  8467. "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
  8468. "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
  8469. "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
  8470. "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
  8471. "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
  8472. "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
  8473. "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
  8474. "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
  8475. "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
  8476. "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
  8477. "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
  8478. "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
  8479. "\x69\xdc\xab\x24\x57\x60\x47\xc1"
  8480. "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
  8481. "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
  8482. "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
  8483. "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
  8484. "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
  8485. "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
  8486. "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
  8487. "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
  8488. "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
  8489. "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
  8490. "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
  8491. "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
  8492. "\x85\x62\x82\x70\x18\xe2\x9a\x78"
  8493. "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
  8494. "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
  8495. "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
  8496. "\x35\xf3\x61\x06\x72\x84\xc4\x32"
  8497. "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
  8498. "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
  8499. "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
  8500. "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
  8501. "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
  8502. "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
  8503. "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
  8504. "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
  8505. "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
  8506. "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
  8507. "\x4f\x73\x38\x09\x75\x64\x48\xe0"
  8508. "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
  8509. "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
  8510. "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
  8511. "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
  8512. "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
  8513. "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
  8514. "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
  8515. "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
  8516. "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
  8517. "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
  8518. "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
  8519. "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
  8520. "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
  8521. "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
  8522. "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
  8523. "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
  8524. "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
  8525. "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
  8526. "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
  8527. "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
  8528. "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
  8529. "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
  8530. "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
  8531. "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
  8532. "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
  8533. "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
  8534. "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
  8535. "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
  8536. "\xce\x4d\x5f\x18\x60\xce\x87\x22"
  8537. "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
  8538. "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
  8539. "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
  8540. "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
  8541. "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
  8542. "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
  8543. "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
  8544. "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
  8545. "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
  8546. "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
  8547. "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
  8548. "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
  8549. "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
  8550. "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
  8551. "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
  8552. "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
  8553. "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
  8554. "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
  8555. "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
  8556. "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
  8557. "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
  8558. "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
  8559. "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
  8560. "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
  8561. "\xce\x54\xf9\x18\x58\xb5\xff\x44"
  8562. "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
  8563. "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
  8564. "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
  8565. "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
  8566. "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
  8567. "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
  8568. "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
  8569. "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
  8570. "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
  8571. "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
  8572. "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
  8573. "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
  8574. "\x0c\xd6\x04\x14\xde\x51\x74\x75"
  8575. "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
  8576. "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
  8577. "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
  8578. "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
  8579. "\x75\x46\x65\x4e\x07\x34\x37\xa3"
  8580. "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
  8581. "\x69\x24\x0e\x38\x67\x43\x8c\xde"
  8582. "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
  8583. "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
  8584. "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
  8585. "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
  8586. "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
  8587. "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
  8588. "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
  8589. "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
  8590. "\x91\x7d\x62\x64\x96\x72\xde\xfc"
  8591. "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
  8592. "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
  8593. "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
  8594. "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
  8595. "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
  8596. "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
  8597. "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
  8598. "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
  8599. "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
  8600. "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
  8601. "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
  8602. "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
  8603. "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
  8604. "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
  8605. "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
  8606. "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
  8607. "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
  8608. "\xae\xed\x39\x88\x42\x11\x3c\xed"
  8609. "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
  8610. "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
  8611. "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
  8612. "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
  8613. "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
  8614. "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
  8615. "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
  8616. "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
  8617. "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
  8618. "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
  8619. "\x34\x17\xde\xba\x47\xf1\x06\x18"
  8620. "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
  8621. "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
  8622. "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
  8623. "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
  8624. "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
  8625. "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
  8626. "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
  8627. "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
  8628. "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
  8629. "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
  8630. "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
  8631. "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
  8632. "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
  8633. "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
  8634. "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
  8635. "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
  8636. "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
  8637. "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
  8638. "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
  8639. "\x2c\x56\x39\x79\x0f\x69\x44\x75"
  8640. "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
  8641. "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
  8642. "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
  8643. "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
  8644. "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
  8645. "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
  8646. "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
  8647. "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
  8648. "\x63\x9b\xce\x61\x24\x79\xc0\x70"
  8649. "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
  8650. "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
  8651. "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
  8652. "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
  8653. "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
  8654. "\x74\x56\x58\x40\x02\x37\x52\x2c"
  8655. "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
  8656. "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
  8657. "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
  8658. "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
  8659. "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
  8660. "\xed\x38\x80\x36\x72\x43\x27\x49"
  8661. "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
  8662. "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
  8663. "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
  8664. "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
  8665. "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
  8666. "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
  8667. "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
  8668. "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
  8669. "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
  8670. "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
  8671. "\x12\xee\x30\xfe\xd8\x30\xef\x34"
  8672. "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
  8673. "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
  8674. "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
  8675. "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
  8676. "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
  8677. "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
  8678. "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
  8679. "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
  8680. "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
  8681. "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
  8682. "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
  8683. "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
  8684. "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
  8685. "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
  8686. "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
  8687. "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
  8688. "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
  8689. "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
  8690. "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
  8691. "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
  8692. "\x44\x12\xfb\x73\x77\xd4\x13\x39"
  8693. "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
  8694. "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
  8695. "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
  8696. "\x4b\xef\x31\x18\xea\xac\xb1\x84"
  8697. "\x21\xed\xda\x86",
  8698. .rlen = 4100,
  8699. .np = 2,
  8700. .tap = { 4064, 36 },
  8701. },
  8702. };
  8703. static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
  8704. { /* From RFC 3686 */
  8705. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  8706. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  8707. "\x00\x00\x00\x30",
  8708. .klen = 20,
  8709. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8710. .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  8711. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  8712. .ilen = 16,
  8713. .result = "Single block msg",
  8714. .rlen = 16,
  8715. }, {
  8716. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  8717. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  8718. "\x00\x6c\xb6\xdb",
  8719. .klen = 20,
  8720. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  8721. .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  8722. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  8723. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  8724. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  8725. .ilen = 32,
  8726. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8727. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8728. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8729. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8730. .rlen = 32,
  8731. }, {
  8732. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  8733. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  8734. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  8735. "\x00\x00\x00\x48",
  8736. .klen = 28,
  8737. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  8738. .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  8739. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  8740. .ilen = 16,
  8741. .result = "Single block msg",
  8742. .rlen = 16,
  8743. }, {
  8744. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  8745. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  8746. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  8747. "\x00\x96\xb0\x3b",
  8748. .klen = 28,
  8749. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  8750. .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  8751. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  8752. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  8753. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  8754. .ilen = 32,
  8755. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8756. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8757. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8758. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8759. .rlen = 32,
  8760. }, {
  8761. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  8762. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  8763. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  8764. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  8765. "\x00\x00\x00\x60",
  8766. .klen = 36,
  8767. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  8768. .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  8769. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  8770. .ilen = 16,
  8771. .result = "Single block msg",
  8772. .rlen = 16,
  8773. }, {
  8774. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  8775. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  8776. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  8777. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  8778. "\x00\xfa\xac\x24",
  8779. .klen = 36,
  8780. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  8781. .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  8782. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  8783. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  8784. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  8785. .ilen = 32,
  8786. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8787. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8788. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8789. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8790. .rlen = 32,
  8791. },
  8792. };
  8793. static struct cipher_testvec aes_ofb_enc_tv_template[] = {
  8794. /* From NIST Special Publication 800-38A, Appendix F.5 */
  8795. {
  8796. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  8797. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  8798. .klen = 16,
  8799. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
  8800. "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8801. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  8802. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  8803. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  8804. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  8805. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  8806. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  8807. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  8808. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  8809. .ilen = 64,
  8810. .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
  8811. "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
  8812. "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
  8813. "\x3c\x52\xda\xc5\x4e\xd8\x25"
  8814. "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
  8815. "\x44\xf7\xa8\x22\x60\xed\xcc"
  8816. "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
  8817. "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
  8818. .rlen = 64,
  8819. }
  8820. };
  8821. static struct cipher_testvec aes_ofb_dec_tv_template[] = {
  8822. /* From NIST Special Publication 800-38A, Appendix F.5 */
  8823. {
  8824. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  8825. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  8826. .klen = 16,
  8827. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
  8828. "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8829. .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
  8830. "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
  8831. "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
  8832. "\x3c\x52\xda\xc5\x4e\xd8\x25"
  8833. "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
  8834. "\x44\xf7\xa8\x22\x60\xed\xcc"
  8835. "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
  8836. "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
  8837. .ilen = 64,
  8838. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  8839. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  8840. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  8841. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  8842. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  8843. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  8844. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  8845. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  8846. .rlen = 64,
  8847. }
  8848. };
  8849. static struct aead_testvec aes_gcm_enc_tv_template[] = {
  8850. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  8851. .key = zeroed_string,
  8852. .klen = 16,
  8853. .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
  8854. "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
  8855. .rlen = 16,
  8856. }, {
  8857. .key = zeroed_string,
  8858. .klen = 16,
  8859. .input = zeroed_string,
  8860. .ilen = 16,
  8861. .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
  8862. "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
  8863. "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
  8864. "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
  8865. .rlen = 32,
  8866. }, {
  8867. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  8868. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  8869. .klen = 16,
  8870. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  8871. "\xde\xca\xf8\x88",
  8872. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  8873. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  8874. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  8875. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  8876. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  8877. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  8878. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  8879. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  8880. .ilen = 64,
  8881. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  8882. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  8883. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  8884. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  8885. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  8886. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  8887. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  8888. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  8889. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  8890. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  8891. .rlen = 80,
  8892. }, {
  8893. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  8894. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  8895. .klen = 16,
  8896. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  8897. "\xde\xca\xf8\x88",
  8898. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  8899. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  8900. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  8901. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  8902. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  8903. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  8904. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  8905. "\xba\x63\x7b\x39",
  8906. .ilen = 60,
  8907. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  8908. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  8909. "\xab\xad\xda\xd2",
  8910. .alen = 20,
  8911. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  8912. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  8913. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  8914. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  8915. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  8916. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  8917. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  8918. "\x3d\x58\xe0\x91"
  8919. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  8920. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  8921. .rlen = 76,
  8922. }, {
  8923. .key = zeroed_string,
  8924. .klen = 24,
  8925. .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
  8926. "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
  8927. .rlen = 16,
  8928. }, {
  8929. .key = zeroed_string,
  8930. .klen = 24,
  8931. .input = zeroed_string,
  8932. .ilen = 16,
  8933. .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  8934. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  8935. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  8936. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  8937. .rlen = 32,
  8938. }, {
  8939. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  8940. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  8941. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  8942. .klen = 24,
  8943. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  8944. "\xde\xca\xf8\x88",
  8945. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  8946. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  8947. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  8948. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  8949. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  8950. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  8951. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  8952. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  8953. .ilen = 64,
  8954. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  8955. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  8956. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  8957. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  8958. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  8959. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  8960. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  8961. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  8962. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  8963. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  8964. .rlen = 80,
  8965. }, {
  8966. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  8967. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  8968. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  8969. .klen = 24,
  8970. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  8971. "\xde\xca\xf8\x88",
  8972. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  8973. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  8974. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  8975. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  8976. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  8977. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  8978. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  8979. "\xba\x63\x7b\x39",
  8980. .ilen = 60,
  8981. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  8982. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  8983. "\xab\xad\xda\xd2",
  8984. .alen = 20,
  8985. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  8986. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  8987. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  8988. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  8989. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  8990. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  8991. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  8992. "\xcc\xda\x27\x10"
  8993. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  8994. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  8995. .rlen = 76,
  8996. .np = 2,
  8997. .tap = { 32, 28 },
  8998. .anp = 2,
  8999. .atap = { 8, 12 }
  9000. }, {
  9001. .key = zeroed_string,
  9002. .klen = 32,
  9003. .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
  9004. "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
  9005. .rlen = 16,
  9006. }
  9007. };
  9008. static struct aead_testvec aes_gcm_dec_tv_template[] = {
  9009. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  9010. .key = zeroed_string,
  9011. .klen = 32,
  9012. .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
  9013. "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
  9014. "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
  9015. "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
  9016. .ilen = 32,
  9017. .result = zeroed_string,
  9018. .rlen = 16,
  9019. }, {
  9020. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9021. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9022. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9023. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  9024. .klen = 32,
  9025. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9026. "\xde\xca\xf8\x88",
  9027. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  9028. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  9029. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  9030. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  9031. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  9032. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  9033. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  9034. "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
  9035. "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
  9036. "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
  9037. .ilen = 80,
  9038. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9039. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9040. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9041. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9042. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9043. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9044. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9045. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  9046. .rlen = 64,
  9047. }, {
  9048. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9049. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9050. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9051. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  9052. .klen = 32,
  9053. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9054. "\xde\xca\xf8\x88",
  9055. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  9056. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  9057. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  9058. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  9059. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  9060. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  9061. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  9062. "\xbc\xc9\xf6\x62"
  9063. "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
  9064. "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
  9065. .ilen = 76,
  9066. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9067. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9068. "\xab\xad\xda\xd2",
  9069. .alen = 20,
  9070. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9071. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9072. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9073. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9074. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9075. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9076. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9077. "\xba\x63\x7b\x39",
  9078. .rlen = 60,
  9079. .np = 2,
  9080. .tap = { 48, 28 },
  9081. .anp = 3,
  9082. .atap = { 8, 8, 4 }
  9083. }, {
  9084. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9085. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  9086. .klen = 16,
  9087. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9088. "\xde\xca\xf8\x88",
  9089. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  9090. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  9091. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  9092. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  9093. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  9094. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  9095. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  9096. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  9097. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  9098. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  9099. .ilen = 80,
  9100. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9101. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9102. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9103. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9104. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9105. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9106. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9107. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  9108. .rlen = 64,
  9109. }, {
  9110. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9111. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  9112. .klen = 16,
  9113. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9114. "\xde\xca\xf8\x88",
  9115. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  9116. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  9117. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  9118. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  9119. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  9120. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  9121. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  9122. "\x3d\x58\xe0\x91"
  9123. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  9124. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  9125. .ilen = 76,
  9126. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9127. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9128. "\xab\xad\xda\xd2",
  9129. .alen = 20,
  9130. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9131. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9132. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9133. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9134. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9135. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9136. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9137. "\xba\x63\x7b\x39",
  9138. .rlen = 60,
  9139. }, {
  9140. .key = zeroed_string,
  9141. .klen = 24,
  9142. .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  9143. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  9144. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  9145. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  9146. .ilen = 32,
  9147. .result = zeroed_string,
  9148. .rlen = 16,
  9149. }, {
  9150. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9151. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9152. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  9153. .klen = 24,
  9154. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9155. "\xde\xca\xf8\x88",
  9156. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  9157. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  9158. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  9159. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  9160. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  9161. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  9162. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  9163. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  9164. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  9165. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  9166. .ilen = 80,
  9167. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9168. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9169. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9170. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9171. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9172. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9173. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9174. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  9175. .rlen = 64,
  9176. }, {
  9177. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9178. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9179. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  9180. .klen = 24,
  9181. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  9182. "\xde\xca\xf8\x88",
  9183. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  9184. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  9185. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  9186. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  9187. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  9188. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  9189. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  9190. "\xcc\xda\x27\x10"
  9191. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  9192. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  9193. .ilen = 76,
  9194. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9195. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  9196. "\xab\xad\xda\xd2",
  9197. .alen = 20,
  9198. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  9199. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  9200. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  9201. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  9202. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  9203. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  9204. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  9205. "\xba\x63\x7b\x39",
  9206. .rlen = 60,
  9207. }
  9208. };
  9209. static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
  9210. { /* Generated using Crypto++ */
  9211. .key = zeroed_string,
  9212. .klen = 20,
  9213. .iv = zeroed_string,
  9214. .input = zeroed_string,
  9215. .ilen = 16,
  9216. .assoc = zeroed_string,
  9217. .alen = 8,
  9218. .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
  9219. "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
  9220. "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
  9221. "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
  9222. .rlen = 32,
  9223. },{
  9224. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9225. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9226. "\x00\x00\x00\x00",
  9227. .klen = 20,
  9228. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9229. "\x00\x00\x00\x00",
  9230. .input = zeroed_string,
  9231. .ilen = 16,
  9232. .assoc = zeroed_string,
  9233. .alen = 8,
  9234. .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
  9235. "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
  9236. "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
  9237. "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
  9238. .rlen = 32,
  9239. }, {
  9240. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9241. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9242. "\x00\x00\x00\x00",
  9243. .klen = 20,
  9244. .iv = zeroed_string,
  9245. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9246. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9247. .ilen = 16,
  9248. .assoc = zeroed_string,
  9249. .alen = 8,
  9250. .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  9251. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  9252. "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
  9253. "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
  9254. .rlen = 32,
  9255. }, {
  9256. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9257. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9258. "\x00\x00\x00\x00",
  9259. .klen = 20,
  9260. .iv = zeroed_string,
  9261. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9262. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9263. .ilen = 16,
  9264. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9265. .alen = 8,
  9266. .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  9267. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  9268. "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
  9269. "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
  9270. .rlen = 32,
  9271. }, {
  9272. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9273. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9274. "\x00\x00\x00\x00",
  9275. .klen = 20,
  9276. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9277. "\x00\x00\x00\x00",
  9278. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9279. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9280. .ilen = 16,
  9281. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9282. .alen = 8,
  9283. .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  9284. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  9285. "\x64\x50\xF9\x32\x13\xFB\x74\x61"
  9286. "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
  9287. .rlen = 32,
  9288. }, {
  9289. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9290. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9291. "\x00\x00\x00\x00",
  9292. .klen = 20,
  9293. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9294. "\x00\x00\x00\x00",
  9295. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9296. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9297. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9298. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9299. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9300. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9301. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9302. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9303. .ilen = 64,
  9304. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9305. .alen = 8,
  9306. .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  9307. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  9308. "\x98\x14\xA1\x42\x37\x80\xFD\x90"
  9309. "\x68\x12\x01\xA8\x91\x89\xB9\x83"
  9310. "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
  9311. "\x94\x5F\x18\x12\xBA\x27\x09\x39"
  9312. "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
  9313. "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
  9314. "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
  9315. "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
  9316. .rlen = 80,
  9317. }, {
  9318. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9319. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9320. "\x00\x00\x00\x00",
  9321. .klen = 20,
  9322. .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
  9323. "\x00\x00\x00\x00",
  9324. .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
  9325. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9326. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9327. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9328. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9329. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9330. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9331. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9332. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9333. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9334. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9335. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9336. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9337. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9338. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9339. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9340. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9341. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9342. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9343. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9344. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9345. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9346. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9347. "\xff\xff\xff\xff\xff\xff\xff\xff",
  9348. .ilen = 192,
  9349. .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  9350. "\xaa\xaa\xaa\xaa",
  9351. .alen = 12,
  9352. .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
  9353. "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
  9354. "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
  9355. "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
  9356. "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
  9357. "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
  9358. "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
  9359. "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
  9360. "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
  9361. "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
  9362. "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
  9363. "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
  9364. "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
  9365. "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
  9366. "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
  9367. "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
  9368. "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
  9369. "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
  9370. "\x7E\x13\x06\x82\x08\x17\xA4\x35"
  9371. "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
  9372. "\xA3\x05\x38\x95\x20\x1A\x47\x04"
  9373. "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
  9374. "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
  9375. "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
  9376. "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
  9377. "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
  9378. .rlen = 208,
  9379. }
  9380. };
  9381. static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
  9382. { /* Generated using Crypto++ */
  9383. .key = zeroed_string,
  9384. .klen = 20,
  9385. .iv = zeroed_string,
  9386. .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
  9387. "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
  9388. "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
  9389. "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
  9390. .ilen = 32,
  9391. .assoc = zeroed_string,
  9392. .alen = 8,
  9393. .result = zeroed_string,
  9394. .rlen = 16,
  9395. },{
  9396. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9397. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9398. "\x00\x00\x00\x00",
  9399. .klen = 20,
  9400. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9401. "\x00\x00\x00\x00",
  9402. .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
  9403. "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
  9404. "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
  9405. "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
  9406. .ilen = 32,
  9407. .assoc = zeroed_string,
  9408. .alen = 8,
  9409. .result = zeroed_string,
  9410. .rlen = 16,
  9411. }, {
  9412. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9413. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9414. "\x00\x00\x00\x00",
  9415. .klen = 20,
  9416. .iv = zeroed_string,
  9417. .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  9418. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  9419. "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
  9420. "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
  9421. .ilen = 32,
  9422. .assoc = zeroed_string,
  9423. .alen = 8,
  9424. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9425. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9426. .rlen = 16,
  9427. }, {
  9428. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9429. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9430. "\x00\x00\x00\x00",
  9431. .klen = 20,
  9432. .iv = zeroed_string,
  9433. .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  9434. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  9435. "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
  9436. "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
  9437. .ilen = 32,
  9438. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9439. .alen = 8,
  9440. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9441. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9442. .rlen = 16,
  9443. }, {
  9444. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9445. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9446. "\x00\x00\x00\x00",
  9447. .klen = 20,
  9448. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9449. "\x00\x00\x00\x00",
  9450. .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  9451. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  9452. "\x64\x50\xF9\x32\x13\xFB\x74\x61"
  9453. "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
  9454. .ilen = 32,
  9455. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9456. .alen = 8,
  9457. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9458. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9459. .rlen = 16,
  9460. }, {
  9461. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  9462. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  9463. "\x00\x00\x00\x00",
  9464. .klen = 20,
  9465. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  9466. "\x00\x00\x00\x00",
  9467. .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  9468. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  9469. "\x98\x14\xA1\x42\x37\x80\xFD\x90"
  9470. "\x68\x12\x01\xA8\x91\x89\xB9\x83"
  9471. "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
  9472. "\x94\x5F\x18\x12\xBA\x27\x09\x39"
  9473. "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
  9474. "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
  9475. "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
  9476. "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
  9477. .ilen = 80,
  9478. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  9479. .alen = 8,
  9480. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  9481. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9482. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9483. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9484. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9485. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9486. "\x01\x01\x01\x01\x01\x01\x01\x01"
  9487. "\x01\x01\x01\x01\x01\x01\x01\x01",
  9488. .rlen = 64,
  9489. }, {
  9490. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9491. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9492. "\x00\x00\x00\x00",
  9493. .klen = 20,
  9494. .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
  9495. "\x00\x00\x00\x00",
  9496. .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
  9497. "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
  9498. "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
  9499. "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
  9500. "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
  9501. "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
  9502. "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
  9503. "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
  9504. "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
  9505. "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
  9506. "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
  9507. "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
  9508. "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
  9509. "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
  9510. "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
  9511. "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
  9512. "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
  9513. "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
  9514. "\x7E\x13\x06\x82\x08\x17\xA4\x35"
  9515. "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
  9516. "\xA3\x05\x38\x95\x20\x1A\x47\x04"
  9517. "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
  9518. "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
  9519. "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
  9520. "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
  9521. "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
  9522. .ilen = 208,
  9523. .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  9524. "\xaa\xaa\xaa\xaa",
  9525. .alen = 12,
  9526. .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
  9527. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9528. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9529. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9530. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9531. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9532. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9533. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9534. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9535. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9536. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9537. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9538. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9539. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9540. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9541. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9542. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9543. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9544. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9545. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9546. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9547. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9548. "\xff\xff\xff\xff\xff\xff\xff\xff"
  9549. "\xff\xff\xff\xff\xff\xff\xff\xff",
  9550. .rlen = 192,
  9551. }
  9552. };
  9553. static struct aead_testvec aes_ccm_enc_tv_template[] = {
  9554. { /* From RFC 3610 */
  9555. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9556. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9557. .klen = 16,
  9558. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  9559. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9560. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  9561. .alen = 8,
  9562. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9563. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9564. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  9565. .ilen = 23,
  9566. .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  9567. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  9568. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  9569. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  9570. .rlen = 31,
  9571. }, {
  9572. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9573. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9574. .klen = 16,
  9575. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  9576. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9577. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9578. "\x08\x09\x0a\x0b",
  9579. .alen = 12,
  9580. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  9581. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  9582. "\x1c\x1d\x1e\x1f",
  9583. .ilen = 20,
  9584. .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  9585. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  9586. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  9587. "\x7d\x9c\x2d\x93",
  9588. .rlen = 28,
  9589. }, {
  9590. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9591. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9592. .klen = 16,
  9593. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  9594. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9595. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  9596. .alen = 8,
  9597. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9598. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9599. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  9600. "\x20",
  9601. .ilen = 25,
  9602. .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  9603. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  9604. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  9605. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  9606. "\x7e\x5f\x4e",
  9607. .rlen = 35,
  9608. }, {
  9609. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9610. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9611. .klen = 16,
  9612. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  9613. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9614. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9615. "\x08\x09\x0a\x0b",
  9616. .alen = 12,
  9617. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  9618. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  9619. "\x1c\x1d\x1e",
  9620. .ilen = 19,
  9621. .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
  9622. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  9623. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  9624. "\x4d\x99\x99\x88\xdd",
  9625. .rlen = 29,
  9626. }, {
  9627. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9628. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9629. .klen = 16,
  9630. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  9631. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9632. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  9633. .alen = 8,
  9634. .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  9635. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  9636. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  9637. .ilen = 24,
  9638. .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  9639. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  9640. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  9641. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  9642. .rlen = 32,
  9643. }, {
  9644. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9645. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9646. .klen = 16,
  9647. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  9648. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9649. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  9650. "\x20\xea\x60\xc0",
  9651. .alen = 12,
  9652. .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  9653. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  9654. "\x3a\x80\x3b\xa8\x7f",
  9655. .ilen = 21,
  9656. .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  9657. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  9658. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  9659. "\x5a\xe0\x70\x45\x51",
  9660. .rlen = 29,
  9661. }, {
  9662. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9663. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9664. .klen = 16,
  9665. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  9666. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9667. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  9668. .alen = 8,
  9669. .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  9670. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  9671. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  9672. .ilen = 23,
  9673. .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  9674. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  9675. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  9676. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  9677. "\xba",
  9678. .rlen = 33,
  9679. },
  9680. };
  9681. static struct aead_testvec aes_ccm_dec_tv_template[] = {
  9682. { /* From RFC 3610 */
  9683. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9684. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9685. .klen = 16,
  9686. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  9687. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9688. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  9689. .alen = 8,
  9690. .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  9691. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  9692. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  9693. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  9694. .ilen = 31,
  9695. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9696. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9697. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  9698. .rlen = 23,
  9699. }, {
  9700. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9701. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9702. .klen = 16,
  9703. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  9704. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9705. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9706. "\x08\x09\x0a\x0b",
  9707. .alen = 12,
  9708. .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  9709. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  9710. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  9711. "\x7d\x9c\x2d\x93",
  9712. .ilen = 28,
  9713. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  9714. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  9715. "\x1c\x1d\x1e\x1f",
  9716. .rlen = 20,
  9717. }, {
  9718. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9719. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9720. .klen = 16,
  9721. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  9722. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9723. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  9724. .alen = 8,
  9725. .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  9726. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  9727. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  9728. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  9729. "\x7e\x5f\x4e",
  9730. .ilen = 35,
  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\x1f"
  9734. "\x20",
  9735. .rlen = 25,
  9736. }, {
  9737. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9738. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  9739. .klen = 16,
  9740. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  9741. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  9742. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9743. "\x08\x09\x0a\x0b",
  9744. .alen = 12,
  9745. .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
  9746. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  9747. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  9748. "\x4d\x99\x99\x88\xdd",
  9749. .ilen = 29,
  9750. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  9751. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  9752. "\x1c\x1d\x1e",
  9753. .rlen = 19,
  9754. }, {
  9755. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9756. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9757. .klen = 16,
  9758. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  9759. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9760. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  9761. .alen = 8,
  9762. .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  9763. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  9764. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  9765. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  9766. .ilen = 32,
  9767. .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  9768. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  9769. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  9770. .rlen = 24,
  9771. }, {
  9772. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9773. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9774. .klen = 16,
  9775. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  9776. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9777. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  9778. "\x20\xea\x60\xc0",
  9779. .alen = 12,
  9780. .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  9781. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  9782. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  9783. "\x5a\xe0\x70\x45\x51",
  9784. .ilen = 29,
  9785. .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  9786. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  9787. "\x3a\x80\x3b\xa8\x7f",
  9788. .rlen = 21,
  9789. }, {
  9790. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  9791. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  9792. .klen = 16,
  9793. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  9794. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  9795. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  9796. .alen = 8,
  9797. .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  9798. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  9799. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  9800. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  9801. "\xba",
  9802. .ilen = 33,
  9803. .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  9804. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  9805. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  9806. .rlen = 23,
  9807. },
  9808. };
  9809. /*
  9810. * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
  9811. * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
  9812. * Special Publication 800-38C's test vectors also use nonce lengths our
  9813. * implementation doesn't support. The following are taken from fips cavs
  9814. * fax files on hand at Red Hat.
  9815. *
  9816. * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
  9817. * part of the nonce which combine w/the iv, but need to be input this way.
  9818. */
  9819. static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
  9820. {
  9821. .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
  9822. "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
  9823. "\x96\xac\x59",
  9824. .klen = 19,
  9825. .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
  9826. .alen = 0,
  9827. .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
  9828. "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
  9829. "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
  9830. "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
  9831. .ilen = 32,
  9832. .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
  9833. "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
  9834. "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
  9835. "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
  9836. "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
  9837. "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
  9838. .rlen = 48,
  9839. }, {
  9840. .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
  9841. "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
  9842. "\x4f\xa3\x19",
  9843. .klen = 19,
  9844. .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
  9845. .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
  9846. "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
  9847. "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
  9848. "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
  9849. .alen = 32,
  9850. .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
  9851. "\xa9\x28\x63\xba\x12\xa3\x14\x85"
  9852. "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
  9853. "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
  9854. .ilen = 32,
  9855. .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
  9856. "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
  9857. "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
  9858. "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
  9859. "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
  9860. "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
  9861. .rlen = 48,
  9862. }, {
  9863. .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
  9864. "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
  9865. "\x53\x14\x73\x66\x8d\x88\xf6\x80"
  9866. "\xa0\x20\x35",
  9867. .klen = 27,
  9868. .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
  9869. .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
  9870. "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
  9871. "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
  9872. "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
  9873. .alen = 32,
  9874. .ilen = 0,
  9875. .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
  9876. "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
  9877. .rlen = 16,
  9878. }, {
  9879. .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
  9880. "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
  9881. "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
  9882. "\xd6\x3c\x8c",
  9883. .klen = 27,
  9884. .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
  9885. .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
  9886. "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
  9887. "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
  9888. "\xe3\x00\x73\x69\x84\x69\x87\x79",
  9889. .alen = 32,
  9890. .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
  9891. "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
  9892. "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
  9893. "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
  9894. .ilen = 32,
  9895. .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
  9896. "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
  9897. "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
  9898. "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
  9899. "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
  9900. "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
  9901. .rlen = 48,
  9902. }, {
  9903. .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
  9904. "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
  9905. "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
  9906. "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
  9907. "\x1e\x29\x91",
  9908. .klen = 35,
  9909. .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
  9910. .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
  9911. "\x78\x2b\x94\x02\x29\x0f\x42\x27"
  9912. "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
  9913. "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
  9914. .alen = 32,
  9915. .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
  9916. "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
  9917. "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
  9918. "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
  9919. .ilen = 32,
  9920. .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
  9921. "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
  9922. "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
  9923. "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
  9924. "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
  9925. .rlen = 40,
  9926. }, {
  9927. .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
  9928. "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
  9929. "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
  9930. "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
  9931. "\xf9\xd9\x4e",
  9932. .klen = 35,
  9933. .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
  9934. .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
  9935. "\x13\x02\x01\x0c\x83\x4c\x96\x35"
  9936. "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
  9937. "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
  9938. .alen = 32,
  9939. .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
  9940. "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
  9941. "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
  9942. "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
  9943. .ilen = 32,
  9944. .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
  9945. "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
  9946. "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
  9947. "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
  9948. "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
  9949. "\x7b\x72\x8a\xf7",
  9950. .rlen = 44,
  9951. }, {
  9952. .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
  9953. "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
  9954. "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
  9955. "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
  9956. "\x24\xa7\x8b",
  9957. .klen = 35,
  9958. .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
  9959. .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
  9960. "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
  9961. "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
  9962. "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
  9963. .alen = 32,
  9964. .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
  9965. "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
  9966. "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
  9967. "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
  9968. .ilen = 32,
  9969. .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
  9970. "\xef\xbb\x80\x21\x04\x6c\x58\x09"
  9971. "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
  9972. "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
  9973. "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
  9974. "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
  9975. .rlen = 48,
  9976. },
  9977. };
  9978. static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
  9979. {
  9980. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  9981. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  9982. "\xc6\xfb\x7d",
  9983. .klen = 19,
  9984. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  9985. .alen = 0,
  9986. .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
  9987. .ilen = 8,
  9988. .result = "\x00",
  9989. .rlen = 0,
  9990. .novrfy = 1,
  9991. }, {
  9992. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  9993. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  9994. "\xaf\x94\x87",
  9995. .klen = 19,
  9996. .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
  9997. .alen = 0,
  9998. .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
  9999. .ilen = 8,
  10000. .result = "\x00",
  10001. .rlen = 0,
  10002. }, {
  10003. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  10004. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  10005. "\xc6\xfb\x7d",
  10006. .klen = 19,
  10007. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  10008. .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
  10009. "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
  10010. "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
  10011. "\xd8\x94\x99\x91\x81\x54\x62\x57",
  10012. .alen = 32,
  10013. .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
  10014. "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
  10015. "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
  10016. "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
  10017. "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
  10018. "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
  10019. .ilen = 48,
  10020. .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
  10021. "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
  10022. "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
  10023. "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
  10024. .rlen = 32,
  10025. .novrfy = 1,
  10026. }, {
  10027. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  10028. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  10029. "\x05\xe0\xc9",
  10030. .klen = 19,
  10031. .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
  10032. .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
  10033. "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
  10034. "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
  10035. "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
  10036. .alen = 32,
  10037. .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
  10038. "\xad\x83\x52\x6d\x71\x03\x25\x1c"
  10039. "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
  10040. "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
  10041. "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
  10042. "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
  10043. .ilen = 48,
  10044. .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
  10045. "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
  10046. "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
  10047. "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
  10048. .rlen = 32,
  10049. }, {
  10050. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  10051. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  10052. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  10053. "\xee\x49\x83",
  10054. .klen = 27,
  10055. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  10056. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  10057. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  10058. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  10059. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  10060. .alen = 32,
  10061. .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
  10062. .ilen = 8,
  10063. .result = "\x00",
  10064. .rlen = 0,
  10065. }, {
  10066. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  10067. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  10068. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  10069. "\xee\x49\x83",
  10070. .klen = 27,
  10071. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  10072. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  10073. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  10074. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  10075. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  10076. .alen = 32,
  10077. .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
  10078. "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
  10079. "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
  10080. "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
  10081. "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
  10082. .ilen = 40,
  10083. .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
  10084. "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
  10085. "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
  10086. "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
  10087. .rlen = 32,
  10088. }, {
  10089. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  10090. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  10091. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  10092. "\xd1\xfc\x57",
  10093. .klen = 27,
  10094. .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
  10095. .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
  10096. "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
  10097. "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
  10098. "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
  10099. .alen = 32,
  10100. .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
  10101. "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
  10102. "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
  10103. "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
  10104. "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
  10105. "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
  10106. .ilen = 48,
  10107. .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
  10108. "\x99\x2a\xa8\xca\x04\x25\x45\x90"
  10109. "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
  10110. "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
  10111. .rlen = 32,
  10112. .novrfy = 1,
  10113. }, {
  10114. .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
  10115. "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
  10116. "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
  10117. "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
  10118. "\xee\x49\x83",
  10119. .klen = 35,
  10120. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  10121. .alen = 0,
  10122. .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
  10123. .ilen = 8,
  10124. .result = "\x00",
  10125. .rlen = 0,
  10126. }, {
  10127. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  10128. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  10129. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  10130. "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
  10131. "\x85\x34\x66",
  10132. .klen = 35,
  10133. .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
  10134. .alen = 0,
  10135. .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
  10136. "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
  10137. "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
  10138. "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
  10139. "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
  10140. "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
  10141. .ilen = 48,
  10142. .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
  10143. "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
  10144. "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
  10145. "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
  10146. .rlen = 32,
  10147. .novrfy = 1,
  10148. }, {
  10149. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  10150. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  10151. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  10152. "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
  10153. "\xcf\x76\x3f",
  10154. .klen = 35,
  10155. .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
  10156. .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
  10157. "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
  10158. "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
  10159. "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
  10160. .alen = 32,
  10161. .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
  10162. "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
  10163. "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
  10164. "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
  10165. "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
  10166. "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
  10167. .ilen = 48,
  10168. .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
  10169. "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
  10170. "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
  10171. "\x04\x49\x3b\x19\x93\x57\x25\x5d",
  10172. .rlen = 32,
  10173. },
  10174. };
  10175. /*
  10176. * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
  10177. * test vectors, taken from Appendix B.2.9 and B.2.10:
  10178. * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
  10179. * Only AES-128 is supported at this time.
  10180. */
  10181. #define ANSI_CPRNG_AES_TEST_VECTORS 6
  10182. static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
  10183. {
  10184. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  10185. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  10186. .klen = 16,
  10187. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  10188. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
  10189. .dtlen = 16,
  10190. .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
  10191. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10192. .vlen = 16,
  10193. .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
  10194. "\x84\x79\x66\x85\xc1\x2f\x76\x41",
  10195. .rlen = 16,
  10196. .loops = 1,
  10197. }, {
  10198. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  10199. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  10200. .klen = 16,
  10201. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  10202. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
  10203. .dtlen = 16,
  10204. .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
  10205. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10206. .vlen = 16,
  10207. .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
  10208. "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
  10209. .rlen = 16,
  10210. .loops = 1,
  10211. }, {
  10212. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  10213. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  10214. .klen = 16,
  10215. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  10216. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
  10217. .dtlen = 16,
  10218. .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
  10219. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10220. .vlen = 16,
  10221. .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
  10222. "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
  10223. .rlen = 16,
  10224. .loops = 1,
  10225. }, {
  10226. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  10227. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  10228. .klen = 16,
  10229. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  10230. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
  10231. .dtlen = 16,
  10232. .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
  10233. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10234. .vlen = 16,
  10235. .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
  10236. "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
  10237. .rlen = 16,
  10238. .loops = 1,
  10239. }, {
  10240. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  10241. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  10242. .klen = 16,
  10243. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  10244. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
  10245. .dtlen = 16,
  10246. .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
  10247. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10248. .vlen = 16,
  10249. .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
  10250. "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
  10251. .rlen = 16,
  10252. .loops = 1,
  10253. }, { /* Monte Carlo Test */
  10254. .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
  10255. "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
  10256. .klen = 16,
  10257. .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
  10258. "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
  10259. .dtlen = 16,
  10260. .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
  10261. "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
  10262. .vlen = 16,
  10263. .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
  10264. "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
  10265. .rlen = 16,
  10266. .loops = 10000,
  10267. },
  10268. };
  10269. /* Cast5 test vectors from RFC 2144 */
  10270. #define CAST5_ENC_TEST_VECTORS 3
  10271. #define CAST5_DEC_TEST_VECTORS 3
  10272. static struct cipher_testvec cast5_enc_tv_template[] = {
  10273. {
  10274. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  10275. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  10276. .klen = 16,
  10277. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10278. .ilen = 8,
  10279. .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  10280. .rlen = 8,
  10281. }, {
  10282. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  10283. "\x23\x45",
  10284. .klen = 10,
  10285. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10286. .ilen = 8,
  10287. .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  10288. .rlen = 8,
  10289. }, {
  10290. .key = "\x01\x23\x45\x67\x12",
  10291. .klen = 5,
  10292. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10293. .ilen = 8,
  10294. .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  10295. .rlen = 8,
  10296. },
  10297. };
  10298. static struct cipher_testvec cast5_dec_tv_template[] = {
  10299. {
  10300. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  10301. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  10302. .klen = 16,
  10303. .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  10304. .ilen = 8,
  10305. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10306. .rlen = 8,
  10307. }, {
  10308. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  10309. "\x23\x45",
  10310. .klen = 10,
  10311. .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  10312. .ilen = 8,
  10313. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10314. .rlen = 8,
  10315. }, {
  10316. .key = "\x01\x23\x45\x67\x12",
  10317. .klen = 5,
  10318. .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  10319. .ilen = 8,
  10320. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10321. .rlen = 8,
  10322. },
  10323. };
  10324. /*
  10325. * ARC4 test vectors from OpenSSL
  10326. */
  10327. #define ARC4_ENC_TEST_VECTORS 7
  10328. #define ARC4_DEC_TEST_VECTORS 7
  10329. static struct cipher_testvec arc4_enc_tv_template[] = {
  10330. {
  10331. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10332. .klen = 8,
  10333. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10334. .ilen = 8,
  10335. .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  10336. .rlen = 8,
  10337. }, {
  10338. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10339. .klen = 8,
  10340. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10341. .ilen = 8,
  10342. .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  10343. .rlen = 8,
  10344. }, {
  10345. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10346. .klen = 8,
  10347. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10348. .ilen = 8,
  10349. .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  10350. .rlen = 8,
  10351. }, {
  10352. .key = "\xef\x01\x23\x45",
  10353. .klen = 4,
  10354. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  10355. "\x00\x00\x00\x00\x00\x00\x00\x00"
  10356. "\x00\x00\x00\x00",
  10357. .ilen = 20,
  10358. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  10359. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  10360. "\x36\xb6\x78\x58",
  10361. .rlen = 20,
  10362. }, {
  10363. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10364. .klen = 8,
  10365. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  10366. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  10367. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  10368. "\x12\x34\x56\x78",
  10369. .ilen = 28,
  10370. .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  10371. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  10372. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  10373. "\x40\x01\x1e\xcf",
  10374. .rlen = 28,
  10375. }, {
  10376. .key = "\xef\x01\x23\x45",
  10377. .klen = 4,
  10378. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  10379. "\x00\x00",
  10380. .ilen = 10,
  10381. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  10382. "\xbd\x61",
  10383. .rlen = 10,
  10384. }, {
  10385. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  10386. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10387. .klen = 16,
  10388. .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  10389. .ilen = 8,
  10390. .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  10391. .rlen = 8,
  10392. },
  10393. };
  10394. static struct cipher_testvec arc4_dec_tv_template[] = {
  10395. {
  10396. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10397. .klen = 8,
  10398. .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  10399. .ilen = 8,
  10400. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10401. .rlen = 8,
  10402. }, {
  10403. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10404. .klen = 8,
  10405. .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  10406. .ilen = 8,
  10407. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10408. .rlen = 8,
  10409. }, {
  10410. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10411. .klen = 8,
  10412. .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  10413. .ilen = 8,
  10414. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10415. .rlen = 8,
  10416. }, {
  10417. .key = "\xef\x01\x23\x45",
  10418. .klen = 4,
  10419. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  10420. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  10421. "\x36\xb6\x78\x58",
  10422. .ilen = 20,
  10423. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  10424. "\x00\x00\x00\x00\x00\x00\x00\x00"
  10425. "\x00\x00\x00\x00",
  10426. .rlen = 20,
  10427. }, {
  10428. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  10429. .klen = 8,
  10430. .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  10431. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  10432. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  10433. "\x40\x01\x1e\xcf",
  10434. .ilen = 28,
  10435. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  10436. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  10437. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  10438. "\x12\x34\x56\x78",
  10439. .rlen = 28,
  10440. }, {
  10441. .key = "\xef\x01\x23\x45",
  10442. .klen = 4,
  10443. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  10444. "\xbd\x61",
  10445. .ilen = 10,
  10446. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  10447. "\x00\x00",
  10448. .rlen = 10,
  10449. }, {
  10450. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  10451. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10452. .klen = 16,
  10453. .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  10454. .ilen = 8,
  10455. .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  10456. .rlen = 8,
  10457. },
  10458. };
  10459. /*
  10460. * TEA test vectors
  10461. */
  10462. #define TEA_ENC_TEST_VECTORS 4
  10463. #define TEA_DEC_TEST_VECTORS 4
  10464. static struct cipher_testvec tea_enc_tv_template[] = {
  10465. {
  10466. .key = zeroed_string,
  10467. .klen = 16,
  10468. .input = zeroed_string,
  10469. .ilen = 8,
  10470. .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  10471. .rlen = 8,
  10472. }, {
  10473. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  10474. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  10475. .klen = 16,
  10476. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  10477. .ilen = 8,
  10478. .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  10479. .rlen = 8,
  10480. }, {
  10481. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  10482. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  10483. .klen = 16,
  10484. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  10485. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  10486. .ilen = 16,
  10487. .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  10488. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  10489. .rlen = 16,
  10490. }, {
  10491. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  10492. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  10493. .klen = 16,
  10494. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  10495. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  10496. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  10497. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  10498. .ilen = 32,
  10499. .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  10500. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  10501. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  10502. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  10503. .rlen = 32,
  10504. }
  10505. };
  10506. static struct cipher_testvec tea_dec_tv_template[] = {
  10507. {
  10508. .key = zeroed_string,
  10509. .klen = 16,
  10510. .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  10511. .ilen = 8,
  10512. .result = zeroed_string,
  10513. .rlen = 8,
  10514. }, {
  10515. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  10516. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  10517. .klen = 16,
  10518. .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  10519. .ilen = 8,
  10520. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  10521. .rlen = 8,
  10522. }, {
  10523. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  10524. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  10525. .klen = 16,
  10526. .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  10527. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  10528. .ilen = 16,
  10529. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  10530. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  10531. .rlen = 16,
  10532. }, {
  10533. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  10534. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  10535. .klen = 16,
  10536. .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  10537. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  10538. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  10539. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  10540. .ilen = 32,
  10541. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  10542. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  10543. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  10544. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  10545. .rlen = 32,
  10546. }
  10547. };
  10548. /*
  10549. * XTEA test vectors
  10550. */
  10551. #define XTEA_ENC_TEST_VECTORS 4
  10552. #define XTEA_DEC_TEST_VECTORS 4
  10553. static struct cipher_testvec xtea_enc_tv_template[] = {
  10554. {
  10555. .key = zeroed_string,
  10556. .klen = 16,
  10557. .input = zeroed_string,
  10558. .ilen = 8,
  10559. .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  10560. .rlen = 8,
  10561. }, {
  10562. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  10563. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  10564. .klen = 16,
  10565. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  10566. .ilen = 8,
  10567. .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  10568. .rlen = 8,
  10569. }, {
  10570. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  10571. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  10572. .klen = 16,
  10573. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  10574. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  10575. .ilen = 16,
  10576. .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  10577. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  10578. .rlen = 16,
  10579. }, {
  10580. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  10581. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  10582. .klen = 16,
  10583. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  10584. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  10585. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  10586. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  10587. .ilen = 32,
  10588. .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  10589. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  10590. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  10591. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  10592. .rlen = 32,
  10593. }
  10594. };
  10595. static struct cipher_testvec xtea_dec_tv_template[] = {
  10596. {
  10597. .key = zeroed_string,
  10598. .klen = 16,
  10599. .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  10600. .ilen = 8,
  10601. .result = zeroed_string,
  10602. .rlen = 8,
  10603. }, {
  10604. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  10605. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  10606. .klen = 16,
  10607. .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  10608. .ilen = 8,
  10609. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  10610. .rlen = 8,
  10611. }, {
  10612. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  10613. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  10614. .klen = 16,
  10615. .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  10616. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  10617. .ilen = 16,
  10618. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  10619. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  10620. .rlen = 16,
  10621. }, {
  10622. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  10623. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  10624. .klen = 16,
  10625. .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  10626. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  10627. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  10628. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  10629. .ilen = 32,
  10630. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  10631. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  10632. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  10633. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  10634. .rlen = 32,
  10635. }
  10636. };
  10637. /*
  10638. * KHAZAD test vectors.
  10639. */
  10640. #define KHAZAD_ENC_TEST_VECTORS 5
  10641. #define KHAZAD_DEC_TEST_VECTORS 5
  10642. static struct cipher_testvec khazad_enc_tv_template[] = {
  10643. {
  10644. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  10645. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10646. .klen = 16,
  10647. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10648. .ilen = 8,
  10649. .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  10650. .rlen = 8,
  10651. }, {
  10652. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  10653. "\x38\x38\x38\x38\x38\x38\x38\x38",
  10654. .klen = 16,
  10655. .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
  10656. .ilen = 8,
  10657. .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  10658. .rlen = 8,
  10659. }, {
  10660. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  10661. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  10662. .klen = 16,
  10663. .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  10664. .ilen = 8,
  10665. .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  10666. .rlen = 8,
  10667. }, {
  10668. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  10669. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  10670. .klen = 16,
  10671. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  10672. .ilen = 8,
  10673. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  10674. .rlen = 8,
  10675. }, {
  10676. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  10677. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  10678. .klen = 16,
  10679. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  10680. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  10681. .ilen = 16,
  10682. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  10683. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  10684. .rlen = 16,
  10685. },
  10686. };
  10687. static struct cipher_testvec khazad_dec_tv_template[] = {
  10688. {
  10689. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  10690. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10691. .klen = 16,
  10692. .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  10693. .ilen = 8,
  10694. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10695. .rlen = 8,
  10696. }, {
  10697. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  10698. "\x38\x38\x38\x38\x38\x38\x38\x38",
  10699. .klen = 16,
  10700. .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  10701. .ilen = 8,
  10702. .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
  10703. .rlen = 8,
  10704. }, {
  10705. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  10706. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  10707. .klen = 16,
  10708. .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  10709. .ilen = 8,
  10710. .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  10711. .rlen = 8,
  10712. }, {
  10713. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  10714. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  10715. .klen = 16,
  10716. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  10717. .ilen = 8,
  10718. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  10719. .rlen = 8,
  10720. }, {
  10721. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  10722. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  10723. .klen = 16,
  10724. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  10725. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  10726. .ilen = 16,
  10727. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  10728. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  10729. .rlen = 16,
  10730. },
  10731. };
  10732. /*
  10733. * Anubis test vectors.
  10734. */
  10735. #define ANUBIS_ENC_TEST_VECTORS 5
  10736. #define ANUBIS_DEC_TEST_VECTORS 5
  10737. #define ANUBIS_CBC_ENC_TEST_VECTORS 2
  10738. #define ANUBIS_CBC_DEC_TEST_VECTORS 2
  10739. static struct cipher_testvec anubis_enc_tv_template[] = {
  10740. {
  10741. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10742. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  10743. .klen = 16,
  10744. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10745. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  10746. .ilen = 16,
  10747. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  10748. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  10749. .rlen = 16,
  10750. }, {
  10751. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  10752. "\x03\x03\x03\x03\x03\x03\x03\x03"
  10753. "\x03\x03\x03\x03",
  10754. .klen = 20,
  10755. .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
  10756. "\x03\x03\x03\x03\x03\x03\x03\x03",
  10757. .ilen = 16,
  10758. .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  10759. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  10760. .rlen = 16,
  10761. }, {
  10762. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  10763. "\x24\x24\x24\x24\x24\x24\x24\x24"
  10764. "\x24\x24\x24\x24\x24\x24\x24\x24"
  10765. "\x24\x24\x24\x24",
  10766. .klen = 28,
  10767. .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
  10768. "\x24\x24\x24\x24\x24\x24\x24\x24",
  10769. .ilen = 16,
  10770. .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  10771. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  10772. .rlen = 16,
  10773. }, {
  10774. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  10775. "\x25\x25\x25\x25\x25\x25\x25\x25"
  10776. "\x25\x25\x25\x25\x25\x25\x25\x25"
  10777. "\x25\x25\x25\x25\x25\x25\x25\x25",
  10778. .klen = 32,
  10779. .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
  10780. "\x25\x25\x25\x25\x25\x25\x25\x25",
  10781. .ilen = 16,
  10782. .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  10783. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  10784. .rlen = 16,
  10785. }, {
  10786. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  10787. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10788. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10789. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10790. "\x35\x35\x35\x35\x35\x35\x35\x35",
  10791. .klen = 40,
  10792. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  10793. "\x35\x35\x35\x35\x35\x35\x35\x35",
  10794. .ilen = 16,
  10795. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  10796. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  10797. .rlen = 16,
  10798. },
  10799. };
  10800. static struct cipher_testvec anubis_dec_tv_template[] = {
  10801. {
  10802. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10803. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  10804. .klen = 16,
  10805. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  10806. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  10807. .ilen = 16,
  10808. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10809. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  10810. .rlen = 16,
  10811. }, {
  10812. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  10813. "\x03\x03\x03\x03\x03\x03\x03\x03"
  10814. "\x03\x03\x03\x03",
  10815. .klen = 20,
  10816. .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  10817. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  10818. .ilen = 16,
  10819. .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
  10820. "\x03\x03\x03\x03\x03\x03\x03\x03",
  10821. .rlen = 16,
  10822. }, {
  10823. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  10824. "\x24\x24\x24\x24\x24\x24\x24\x24"
  10825. "\x24\x24\x24\x24\x24\x24\x24\x24"
  10826. "\x24\x24\x24\x24",
  10827. .klen = 28,
  10828. .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  10829. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  10830. .ilen = 16,
  10831. .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
  10832. "\x24\x24\x24\x24\x24\x24\x24\x24",
  10833. .rlen = 16,
  10834. }, {
  10835. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  10836. "\x25\x25\x25\x25\x25\x25\x25\x25"
  10837. "\x25\x25\x25\x25\x25\x25\x25\x25"
  10838. "\x25\x25\x25\x25\x25\x25\x25\x25",
  10839. .klen = 32,
  10840. .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  10841. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  10842. .ilen = 16,
  10843. .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
  10844. "\x25\x25\x25\x25\x25\x25\x25\x25",
  10845. .rlen = 16,
  10846. }, {
  10847. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  10848. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10849. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10850. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10851. "\x35\x35\x35\x35\x35\x35\x35\x35",
  10852. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  10853. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  10854. .klen = 40,
  10855. .ilen = 16,
  10856. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  10857. "\x35\x35\x35\x35\x35\x35\x35\x35",
  10858. .rlen = 16,
  10859. },
  10860. };
  10861. static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
  10862. {
  10863. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10864. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  10865. .klen = 16,
  10866. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10867. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10868. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10869. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  10870. .ilen = 32,
  10871. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  10872. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  10873. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  10874. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  10875. .rlen = 32,
  10876. }, {
  10877. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  10878. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10879. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10880. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10881. "\x35\x35\x35\x35\x35\x35\x35\x35",
  10882. .klen = 40,
  10883. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  10884. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10885. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10886. "\x35\x35\x35\x35\x35\x35\x35\x35",
  10887. .ilen = 32,
  10888. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  10889. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  10890. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  10891. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  10892. .rlen = 32,
  10893. },
  10894. };
  10895. static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
  10896. {
  10897. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10898. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  10899. .klen = 16,
  10900. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  10901. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  10902. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  10903. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  10904. .ilen = 32,
  10905. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10906. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10907. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  10908. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  10909. .rlen = 32,
  10910. }, {
  10911. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  10912. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10913. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10914. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10915. "\x35\x35\x35\x35\x35\x35\x35\x35",
  10916. .klen = 40,
  10917. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  10918. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  10919. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  10920. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  10921. .ilen = 32,
  10922. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  10923. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10924. "\x35\x35\x35\x35\x35\x35\x35\x35"
  10925. "\x35\x35\x35\x35\x35\x35\x35\x35",
  10926. .rlen = 32,
  10927. },
  10928. };
  10929. /*
  10930. * XETA test vectors
  10931. */
  10932. #define XETA_ENC_TEST_VECTORS 4
  10933. #define XETA_DEC_TEST_VECTORS 4
  10934. static struct cipher_testvec xeta_enc_tv_template[] = {
  10935. {
  10936. .key = zeroed_string,
  10937. .klen = 16,
  10938. .input = zeroed_string,
  10939. .ilen = 8,
  10940. .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  10941. .rlen = 8,
  10942. }, {
  10943. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  10944. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  10945. .klen = 16,
  10946. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  10947. .ilen = 8,
  10948. .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  10949. .rlen = 8,
  10950. }, {
  10951. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  10952. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  10953. .klen = 16,
  10954. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  10955. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  10956. .ilen = 16,
  10957. .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  10958. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  10959. .rlen = 16,
  10960. }, {
  10961. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  10962. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  10963. .klen = 16,
  10964. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  10965. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  10966. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  10967. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  10968. .ilen = 32,
  10969. .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  10970. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  10971. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  10972. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  10973. .rlen = 32,
  10974. }
  10975. };
  10976. static struct cipher_testvec xeta_dec_tv_template[] = {
  10977. {
  10978. .key = zeroed_string,
  10979. .klen = 16,
  10980. .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  10981. .ilen = 8,
  10982. .result = zeroed_string,
  10983. .rlen = 8,
  10984. }, {
  10985. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  10986. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  10987. .klen = 16,
  10988. .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  10989. .ilen = 8,
  10990. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  10991. .rlen = 8,
  10992. }, {
  10993. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  10994. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  10995. .klen = 16,
  10996. .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  10997. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  10998. .ilen = 16,
  10999. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  11000. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  11001. .rlen = 16,
  11002. }, {
  11003. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  11004. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  11005. .klen = 16,
  11006. .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  11007. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  11008. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  11009. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  11010. .ilen = 32,
  11011. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  11012. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  11013. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  11014. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  11015. .rlen = 32,
  11016. }
  11017. };
  11018. /*
  11019. * FCrypt test vectors
  11020. */
  11021. #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
  11022. #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
  11023. static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
  11024. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  11025. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11026. .klen = 8,
  11027. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11028. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11029. .ilen = 8,
  11030. .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  11031. .rlen = 8,
  11032. }, {
  11033. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  11034. .klen = 8,
  11035. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11036. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  11037. .ilen = 8,
  11038. .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  11039. .rlen = 8,
  11040. }, { /* From Arla */
  11041. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11042. .klen = 8,
  11043. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11044. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  11045. .ilen = 48,
  11046. .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  11047. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  11048. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  11049. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  11050. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  11051. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  11052. .rlen = 48,
  11053. }, {
  11054. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11055. .klen = 8,
  11056. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11057. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  11058. .ilen = 48,
  11059. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  11060. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  11061. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  11062. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  11063. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  11064. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  11065. .rlen = 48,
  11066. }, { /* split-page version */
  11067. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11068. .klen = 8,
  11069. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11070. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  11071. .ilen = 48,
  11072. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  11073. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  11074. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  11075. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  11076. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  11077. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  11078. .rlen = 48,
  11079. .np = 2,
  11080. .tap = { 20, 28 },
  11081. }
  11082. };
  11083. static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
  11084. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  11085. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11086. .klen = 8,
  11087. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11088. .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  11089. .ilen = 8,
  11090. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11091. .rlen = 8,
  11092. }, {
  11093. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  11094. .klen = 8,
  11095. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11096. .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  11097. .ilen = 8,
  11098. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  11099. .rlen = 8,
  11100. }, { /* From Arla */
  11101. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11102. .klen = 8,
  11103. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11104. .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  11105. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  11106. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  11107. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  11108. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  11109. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  11110. .ilen = 48,
  11111. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  11112. .rlen = 48,
  11113. }, {
  11114. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11115. .klen = 8,
  11116. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11117. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  11118. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  11119. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  11120. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  11121. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  11122. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  11123. .ilen = 48,
  11124. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  11125. .rlen = 48,
  11126. }, { /* split-page version */
  11127. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11128. .klen = 8,
  11129. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  11130. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  11131. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  11132. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  11133. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  11134. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  11135. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  11136. .ilen = 48,
  11137. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  11138. .rlen = 48,
  11139. .np = 2,
  11140. .tap = { 20, 28 },
  11141. }
  11142. };
  11143. /*
  11144. * CAMELLIA test vectors.
  11145. */
  11146. #define CAMELLIA_ENC_TEST_VECTORS 4
  11147. #define CAMELLIA_DEC_TEST_VECTORS 4
  11148. #define CAMELLIA_CBC_ENC_TEST_VECTORS 3
  11149. #define CAMELLIA_CBC_DEC_TEST_VECTORS 3
  11150. #define CAMELLIA_CTR_ENC_TEST_VECTORS 2
  11151. #define CAMELLIA_CTR_DEC_TEST_VECTORS 2
  11152. #define CAMELLIA_LRW_ENC_TEST_VECTORS 8
  11153. #define CAMELLIA_LRW_DEC_TEST_VECTORS 8
  11154. #define CAMELLIA_XTS_ENC_TEST_VECTORS 5
  11155. #define CAMELLIA_XTS_DEC_TEST_VECTORS 5
  11156. static struct cipher_testvec camellia_enc_tv_template[] = {
  11157. {
  11158. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11159. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11160. .klen = 16,
  11161. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11162. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11163. .ilen = 16,
  11164. .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
  11165. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  11166. .rlen = 16,
  11167. }, {
  11168. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11169. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  11170. "\x00\x11\x22\x33\x44\x55\x66\x77",
  11171. .klen = 24,
  11172. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11173. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11174. .ilen = 16,
  11175. .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  11176. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  11177. .rlen = 16,
  11178. }, {
  11179. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11180. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  11181. "\x00\x11\x22\x33\x44\x55\x66\x77"
  11182. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  11183. .klen = 32,
  11184. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11185. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11186. .ilen = 16,
  11187. .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  11188. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  11189. .rlen = 16,
  11190. },
  11191. { /* Generated with Crypto++ */
  11192. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  11193. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  11194. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  11195. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  11196. .klen = 32,
  11197. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  11198. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  11199. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  11200. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  11201. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  11202. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  11203. .ilen = 48,
  11204. .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
  11205. "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
  11206. "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
  11207. "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
  11208. "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
  11209. "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
  11210. .rlen = 48,
  11211. },
  11212. };
  11213. static struct cipher_testvec camellia_dec_tv_template[] = {
  11214. {
  11215. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11216. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11217. .klen = 16,
  11218. .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
  11219. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  11220. .ilen = 16,
  11221. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11222. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11223. .rlen = 16,
  11224. }, {
  11225. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11226. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  11227. "\x00\x11\x22\x33\x44\x55\x66\x77",
  11228. .klen = 24,
  11229. .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  11230. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  11231. .ilen = 16,
  11232. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11233. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11234. .rlen = 16,
  11235. }, {
  11236. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11237. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  11238. "\x00\x11\x22\x33\x44\x55\x66\x77"
  11239. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  11240. .klen = 32,
  11241. .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  11242. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  11243. .ilen = 16,
  11244. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  11245. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  11246. .rlen = 16,
  11247. },
  11248. { /* Generated with Crypto++ */
  11249. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  11250. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  11251. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  11252. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  11253. .klen = 32,
  11254. .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
  11255. "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
  11256. "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
  11257. "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
  11258. "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
  11259. "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
  11260. .ilen = 48,
  11261. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  11262. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  11263. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  11264. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  11265. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  11266. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  11267. .rlen = 48,
  11268. },
  11269. };
  11270. static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
  11271. {
  11272. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  11273. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  11274. .klen = 16,
  11275. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  11276. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  11277. .input = "Single block msg",
  11278. .ilen = 16,
  11279. .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  11280. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  11281. .rlen = 16,
  11282. }, {
  11283. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  11284. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  11285. .klen = 16,
  11286. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  11287. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  11288. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  11289. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  11290. "\x10\x11\x12\x13\x14\x15\x16\x17"
  11291. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  11292. .ilen = 32,
  11293. .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  11294. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  11295. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  11296. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  11297. .rlen = 32,
  11298. },
  11299. { /* Generated with Crypto++ */
  11300. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  11301. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  11302. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  11303. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  11304. .klen = 32,
  11305. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  11306. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  11307. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  11308. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  11309. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  11310. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  11311. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  11312. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  11313. .ilen = 48,
  11314. .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
  11315. "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
  11316. "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
  11317. "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
  11318. "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
  11319. "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
  11320. .rlen = 48,
  11321. },
  11322. };
  11323. static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
  11324. {
  11325. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  11326. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  11327. .klen = 16,
  11328. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  11329. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  11330. .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  11331. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  11332. .ilen = 16,
  11333. .result = "Single block msg",
  11334. .rlen = 16,
  11335. }, {
  11336. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  11337. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  11338. .klen = 16,
  11339. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  11340. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  11341. .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  11342. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  11343. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  11344. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  11345. .ilen = 32,
  11346. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  11347. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  11348. "\x10\x11\x12\x13\x14\x15\x16\x17"
  11349. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  11350. .rlen = 32,
  11351. },
  11352. { /* Generated with Crypto++ */
  11353. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  11354. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  11355. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  11356. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  11357. .klen = 32,
  11358. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  11359. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  11360. .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
  11361. "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
  11362. "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
  11363. "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
  11364. "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
  11365. "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
  11366. .ilen = 48,
  11367. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  11368. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  11369. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  11370. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  11371. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  11372. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  11373. .rlen = 48,
  11374. },
  11375. };
  11376. static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
  11377. { /* Generated with Crypto++ */
  11378. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  11379. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  11380. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  11381. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  11382. .klen = 32,
  11383. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  11384. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  11385. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  11386. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  11387. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  11388. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  11389. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  11390. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  11391. .ilen = 48,
  11392. .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  11393. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  11394. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  11395. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  11396. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  11397. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
  11398. .rlen = 48,
  11399. },
  11400. { /* Generated with Crypto++ */
  11401. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  11402. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  11403. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  11404. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  11405. .klen = 32,
  11406. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  11407. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  11408. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  11409. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  11410. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  11411. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  11412. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  11413. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  11414. "\xDF\x76\x0D",
  11415. .ilen = 51,
  11416. .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  11417. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  11418. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  11419. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  11420. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  11421. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
  11422. "\x1E\x43\xEF",
  11423. .rlen = 51,
  11424. },
  11425. };
  11426. static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
  11427. { /* Generated with Crypto++ */
  11428. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  11429. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  11430. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  11431. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  11432. .klen = 32,
  11433. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  11434. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  11435. .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  11436. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  11437. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  11438. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  11439. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  11440. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
  11441. .ilen = 48,
  11442. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  11443. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  11444. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  11445. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  11446. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  11447. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  11448. .rlen = 48,
  11449. },
  11450. { /* Generated with Crypto++ */
  11451. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  11452. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  11453. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  11454. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  11455. .klen = 32,
  11456. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  11457. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  11458. .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  11459. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  11460. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  11461. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  11462. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  11463. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
  11464. "\x1E\x43\xEF",
  11465. .ilen = 51,
  11466. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  11467. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  11468. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  11469. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  11470. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  11471. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  11472. "\xDF\x76\x0D",
  11473. .rlen = 51,
  11474. },
  11475. };
  11476. static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
  11477. /* Generated from AES-LRW test vectors */
  11478. {
  11479. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  11480. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  11481. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  11482. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  11483. .klen = 32,
  11484. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11485. "\x00\x00\x00\x00\x00\x00\x00\x01",
  11486. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11487. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11488. .ilen = 16,
  11489. .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
  11490. "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
  11491. .rlen = 16,
  11492. }, {
  11493. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  11494. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  11495. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  11496. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  11497. .klen = 32,
  11498. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11499. "\x00\x00\x00\x00\x00\x00\x00\x02",
  11500. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11501. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11502. .ilen = 16,
  11503. .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
  11504. "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
  11505. .rlen = 16,
  11506. }, {
  11507. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  11508. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  11509. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  11510. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  11511. .klen = 32,
  11512. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11513. "\x00\x00\x00\x02\x00\x00\x00\x00",
  11514. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11515. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11516. .ilen = 16,
  11517. .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
  11518. "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
  11519. .rlen = 16,
  11520. }, {
  11521. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  11522. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  11523. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  11524. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  11525. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  11526. .klen = 40,
  11527. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11528. "\x00\x00\x00\x00\x00\x00\x00\x01",
  11529. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11530. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11531. .ilen = 16,
  11532. .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
  11533. "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
  11534. .rlen = 16,
  11535. }, {
  11536. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  11537. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  11538. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  11539. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  11540. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  11541. .klen = 40,
  11542. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11543. "\x00\x00\x00\x02\x00\x00\x00\x00",
  11544. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11545. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11546. .ilen = 16,
  11547. .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
  11548. "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
  11549. .rlen = 16,
  11550. }, {
  11551. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  11552. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  11553. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  11554. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  11555. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  11556. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  11557. .klen = 48,
  11558. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11559. "\x00\x00\x00\x00\x00\x00\x00\x01",
  11560. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11561. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11562. .ilen = 16,
  11563. .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
  11564. "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
  11565. .rlen = 16,
  11566. }, {
  11567. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  11568. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  11569. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  11570. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  11571. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  11572. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  11573. .klen = 48,
  11574. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11575. "\x00\x00\x00\x02\x00\x00\x00\x00",
  11576. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11577. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11578. .ilen = 16,
  11579. .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
  11580. "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
  11581. .rlen = 16,
  11582. }, {
  11583. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  11584. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  11585. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  11586. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  11587. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  11588. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  11589. .klen = 48,
  11590. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11591. "\x00\x00\x00\x00\x00\x00\x00\x01",
  11592. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  11593. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  11594. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  11595. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  11596. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  11597. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  11598. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  11599. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  11600. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  11601. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  11602. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  11603. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  11604. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  11605. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  11606. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  11607. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  11608. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  11609. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  11610. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  11611. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  11612. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  11613. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  11614. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  11615. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  11616. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  11617. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  11618. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  11619. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  11620. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  11621. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  11622. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  11623. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  11624. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  11625. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  11626. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  11627. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  11628. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  11629. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  11630. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  11631. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  11632. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  11633. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  11634. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  11635. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  11636. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  11637. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  11638. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  11639. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  11640. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  11641. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  11642. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  11643. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  11644. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  11645. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  11646. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  11647. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  11648. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  11649. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  11650. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  11651. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  11652. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  11653. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  11654. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  11655. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  11656. .ilen = 512,
  11657. .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
  11658. "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
  11659. "\x67\x76\xac\x2c\xd2\x63\x18\x93"
  11660. "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
  11661. "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
  11662. "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
  11663. "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
  11664. "\x62\xdd\x78\x81\xea\x1d\xef\x04"
  11665. "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
  11666. "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
  11667. "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
  11668. "\x40\x41\x69\xaa\x71\xc0\x37\xec"
  11669. "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
  11670. "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
  11671. "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
  11672. "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
  11673. "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
  11674. "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
  11675. "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
  11676. "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
  11677. "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
  11678. "\x42\x08\x40\x82\x06\x1c\x2d\x55"
  11679. "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
  11680. "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
  11681. "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
  11682. "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
  11683. "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
  11684. "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
  11685. "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
  11686. "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
  11687. "\xed\x14\xa9\x57\x19\x63\x40\x04"
  11688. "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
  11689. "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
  11690. "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
  11691. "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
  11692. "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
  11693. "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
  11694. "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
  11695. "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
  11696. "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
  11697. "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
  11698. "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
  11699. "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
  11700. "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
  11701. "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
  11702. "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
  11703. "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
  11704. "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
  11705. "\x35\xa5\x83\x04\x84\x01\x99\x56"
  11706. "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
  11707. "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
  11708. "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
  11709. "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
  11710. "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
  11711. "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
  11712. "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
  11713. "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
  11714. "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
  11715. "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
  11716. "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
  11717. "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
  11718. "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
  11719. "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
  11720. "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
  11721. .rlen = 512,
  11722. },
  11723. };
  11724. static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
  11725. /* Generated from AES-LRW test vectors */
  11726. /* same as enc vectors with input and result reversed */
  11727. {
  11728. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  11729. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  11730. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  11731. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  11732. .klen = 32,
  11733. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11734. "\x00\x00\x00\x00\x00\x00\x00\x01",
  11735. .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
  11736. "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
  11737. .ilen = 16,
  11738. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11739. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11740. .rlen = 16,
  11741. }, {
  11742. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  11743. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  11744. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  11745. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  11746. .klen = 32,
  11747. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11748. "\x00\x00\x00\x00\x00\x00\x00\x02",
  11749. .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
  11750. "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
  11751. .ilen = 16,
  11752. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11753. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11754. .rlen = 16,
  11755. }, {
  11756. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  11757. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  11758. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  11759. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  11760. .klen = 32,
  11761. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11762. "\x00\x00\x00\x02\x00\x00\x00\x00",
  11763. .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
  11764. "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
  11765. .ilen = 16,
  11766. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11767. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11768. .rlen = 16,
  11769. }, {
  11770. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  11771. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  11772. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  11773. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  11774. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  11775. .klen = 40,
  11776. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11777. "\x00\x00\x00\x00\x00\x00\x00\x01",
  11778. .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
  11779. "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
  11780. .ilen = 16,
  11781. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11782. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11783. .rlen = 16,
  11784. }, {
  11785. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  11786. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  11787. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  11788. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  11789. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  11790. .klen = 40,
  11791. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11792. "\x00\x00\x00\x02\x00\x00\x00\x00",
  11793. .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
  11794. "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
  11795. .ilen = 16,
  11796. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11797. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11798. .rlen = 16,
  11799. }, {
  11800. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  11801. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  11802. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  11803. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  11804. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  11805. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  11806. .klen = 48,
  11807. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11808. "\x00\x00\x00\x00\x00\x00\x00\x01",
  11809. .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
  11810. "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
  11811. .ilen = 16,
  11812. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11813. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11814. .rlen = 16,
  11815. }, {
  11816. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  11817. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  11818. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  11819. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  11820. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  11821. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  11822. .klen = 48,
  11823. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11824. "\x00\x00\x00\x02\x00\x00\x00\x00",
  11825. .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
  11826. "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
  11827. .ilen = 16,
  11828. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  11829. "\x38\x39\x41\x42\x43\x44\x45\x46",
  11830. .rlen = 16,
  11831. }, {
  11832. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  11833. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  11834. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  11835. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  11836. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  11837. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  11838. .klen = 48,
  11839. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11840. "\x00\x00\x00\x00\x00\x00\x00\x01",
  11841. .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
  11842. "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
  11843. "\x67\x76\xac\x2c\xd2\x63\x18\x93"
  11844. "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
  11845. "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
  11846. "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
  11847. "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
  11848. "\x62\xdd\x78\x81\xea\x1d\xef\x04"
  11849. "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
  11850. "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
  11851. "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
  11852. "\x40\x41\x69\xaa\x71\xc0\x37\xec"
  11853. "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
  11854. "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
  11855. "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
  11856. "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
  11857. "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
  11858. "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
  11859. "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
  11860. "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
  11861. "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
  11862. "\x42\x08\x40\x82\x06\x1c\x2d\x55"
  11863. "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
  11864. "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
  11865. "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
  11866. "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
  11867. "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
  11868. "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
  11869. "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
  11870. "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
  11871. "\xed\x14\xa9\x57\x19\x63\x40\x04"
  11872. "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
  11873. "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
  11874. "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
  11875. "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
  11876. "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
  11877. "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
  11878. "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
  11879. "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
  11880. "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
  11881. "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
  11882. "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
  11883. "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
  11884. "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
  11885. "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
  11886. "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
  11887. "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
  11888. "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
  11889. "\x35\xa5\x83\x04\x84\x01\x99\x56"
  11890. "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
  11891. "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
  11892. "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
  11893. "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
  11894. "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
  11895. "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
  11896. "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
  11897. "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
  11898. "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
  11899. "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
  11900. "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
  11901. "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
  11902. "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
  11903. "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
  11904. "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
  11905. .ilen = 512,
  11906. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  11907. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  11908. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  11909. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  11910. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  11911. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  11912. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  11913. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  11914. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  11915. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  11916. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  11917. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  11918. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  11919. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  11920. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  11921. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  11922. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  11923. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  11924. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  11925. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  11926. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  11927. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  11928. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  11929. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  11930. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  11931. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  11932. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  11933. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  11934. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  11935. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  11936. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  11937. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  11938. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  11939. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  11940. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  11941. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  11942. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  11943. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  11944. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  11945. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  11946. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  11947. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  11948. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  11949. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  11950. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  11951. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  11952. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  11953. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  11954. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  11955. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  11956. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  11957. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  11958. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  11959. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  11960. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  11961. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  11962. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  11963. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  11964. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  11965. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  11966. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  11967. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  11968. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  11969. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  11970. .rlen = 512,
  11971. },
  11972. };
  11973. static struct cipher_testvec camellia_xts_enc_tv_template[] = {
  11974. /* Generated from AES-XTS test vectors */
  11975. {
  11976. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11977. "\x00\x00\x00\x00\x00\x00\x00\x00"
  11978. "\x00\x00\x00\x00\x00\x00\x00\x00"
  11979. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11980. .klen = 32,
  11981. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11982. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11983. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  11984. "\x00\x00\x00\x00\x00\x00\x00\x00"
  11985. "\x00\x00\x00\x00\x00\x00\x00\x00"
  11986. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11987. .ilen = 32,
  11988. .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
  11989. "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
  11990. "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
  11991. "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
  11992. .rlen = 32,
  11993. }, {
  11994. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  11995. "\x11\x11\x11\x11\x11\x11\x11\x11"
  11996. "\x22\x22\x22\x22\x22\x22\x22\x22"
  11997. "\x22\x22\x22\x22\x22\x22\x22\x22",
  11998. .klen = 32,
  11999. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  12000. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12001. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  12002. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12003. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12004. "\x44\x44\x44\x44\x44\x44\x44\x44",
  12005. .ilen = 32,
  12006. .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
  12007. "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
  12008. "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
  12009. "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
  12010. .rlen = 32,
  12011. }, {
  12012. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  12013. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  12014. "\x22\x22\x22\x22\x22\x22\x22\x22"
  12015. "\x22\x22\x22\x22\x22\x22\x22\x22",
  12016. .klen = 32,
  12017. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  12018. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12019. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  12020. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12021. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12022. "\x44\x44\x44\x44\x44\x44\x44\x44",
  12023. .ilen = 32,
  12024. .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
  12025. "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
  12026. "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
  12027. "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
  12028. .rlen = 32,
  12029. }, {
  12030. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  12031. "\x23\x53\x60\x28\x74\x71\x35\x26"
  12032. "\x31\x41\x59\x26\x53\x58\x97\x93"
  12033. "\x23\x84\x62\x64\x33\x83\x27\x95",
  12034. .klen = 32,
  12035. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12036. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12037. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12038. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12039. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12040. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12041. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12042. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12043. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12044. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12045. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12046. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12047. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12048. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12049. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12050. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12051. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12052. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12053. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12054. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12055. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12056. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12057. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12058. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12059. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12060. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12061. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12062. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12063. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12064. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12065. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12066. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12067. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12068. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  12069. "\x00\x01\x02\x03\x04\x05\x06\x07"
  12070. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12071. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12072. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12073. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12074. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12075. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12076. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12077. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12078. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12079. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12080. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12081. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12082. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12083. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12084. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12085. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12086. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12087. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12088. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12089. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12090. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12091. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12092. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12093. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12094. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12095. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12096. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12097. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12098. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12099. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12100. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  12101. .ilen = 512,
  12102. .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
  12103. "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
  12104. "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
  12105. "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
  12106. "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
  12107. "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
  12108. "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
  12109. "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
  12110. "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
  12111. "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
  12112. "\x08\xda\x76\x00\x65\xcf\x7b\x31"
  12113. "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
  12114. "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
  12115. "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
  12116. "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
  12117. "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
  12118. "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
  12119. "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
  12120. "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
  12121. "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
  12122. "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
  12123. "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
  12124. "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
  12125. "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
  12126. "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
  12127. "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
  12128. "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
  12129. "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
  12130. "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
  12131. "\x16\x31\xb2\x47\x91\x67\xaa\x28"
  12132. "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
  12133. "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
  12134. "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
  12135. "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
  12136. "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
  12137. "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
  12138. "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
  12139. "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
  12140. "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
  12141. "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
  12142. "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
  12143. "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
  12144. "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
  12145. "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
  12146. "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
  12147. "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
  12148. "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
  12149. "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
  12150. "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
  12151. "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
  12152. "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
  12153. "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
  12154. "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
  12155. "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
  12156. "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
  12157. "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
  12158. "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
  12159. "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
  12160. "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
  12161. "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
  12162. "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
  12163. "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
  12164. "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
  12165. "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
  12166. .rlen = 512,
  12167. }, {
  12168. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  12169. "\x23\x53\x60\x28\x74\x71\x35\x26"
  12170. "\x62\x49\x77\x57\x24\x70\x93\x69"
  12171. "\x99\x59\x57\x49\x66\x96\x76\x27"
  12172. "\x31\x41\x59\x26\x53\x58\x97\x93"
  12173. "\x23\x84\x62\x64\x33\x83\x27\x95"
  12174. "\x02\x88\x41\x97\x16\x93\x99\x37"
  12175. "\x51\x05\x82\x09\x74\x94\x45\x92",
  12176. .klen = 64,
  12177. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  12178. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12179. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12180. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12181. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12182. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12183. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12184. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12185. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12186. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12187. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12188. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12189. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12190. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12191. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12192. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12193. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12194. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12195. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12196. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12197. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12198. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12199. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12200. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12201. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12202. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12203. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12204. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12205. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12206. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12207. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12208. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12209. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12210. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  12211. "\x00\x01\x02\x03\x04\x05\x06\x07"
  12212. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12213. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12214. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12215. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12216. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12217. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12218. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12219. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12220. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12221. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12222. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12223. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12224. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12225. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12226. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12227. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12228. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12229. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12230. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12231. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12232. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12233. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12234. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12235. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12236. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12237. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12238. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12239. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12240. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12241. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12242. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  12243. .ilen = 512,
  12244. .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
  12245. "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
  12246. "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
  12247. "\xf1\x74\xac\x96\x05\x7b\x32\xca"
  12248. "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
  12249. "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
  12250. "\x97\x07\x82\xf0\x07\x12\x38\x0a"
  12251. "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
  12252. "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
  12253. "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
  12254. "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
  12255. "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
  12256. "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
  12257. "\x41\x82\x0c\x45\x39\x35\xa8\x75"
  12258. "\x03\x29\x01\x84\x8c\xab\x48\xbe"
  12259. "\x11\x56\x22\x67\xb7\x67\x1a\x09"
  12260. "\xa1\x72\x25\x41\x3c\x39\x65\x80"
  12261. "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
  12262. "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
  12263. "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
  12264. "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
  12265. "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
  12266. "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
  12267. "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
  12268. "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
  12269. "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
  12270. "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
  12271. "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
  12272. "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
  12273. "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
  12274. "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
  12275. "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
  12276. "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
  12277. "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
  12278. "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
  12279. "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
  12280. "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
  12281. "\xef\x38\x52\x18\x0e\x29\x7e\xef"
  12282. "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
  12283. "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
  12284. "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
  12285. "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
  12286. "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
  12287. "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
  12288. "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
  12289. "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
  12290. "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
  12291. "\x21\x17\xf8\x59\x15\x24\x64\x22"
  12292. "\x57\x48\x80\xd5\x3d\x92\x30\x07"
  12293. "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
  12294. "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
  12295. "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
  12296. "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
  12297. "\x6b\x84\xf3\x00\xba\x52\x05\x02"
  12298. "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
  12299. "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
  12300. "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
  12301. "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
  12302. "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
  12303. "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
  12304. "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
  12305. "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
  12306. "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
  12307. "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
  12308. .rlen = 512,
  12309. },
  12310. };
  12311. static struct cipher_testvec camellia_xts_dec_tv_template[] = {
  12312. /* Generated from AES-XTS test vectors */
  12313. /* same as enc vectors with input and result reversed */
  12314. {
  12315. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12316. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12317. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12318. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12319. .klen = 32,
  12320. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12321. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12322. .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
  12323. "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
  12324. "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
  12325. "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
  12326. .ilen = 32,
  12327. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12328. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12329. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12330. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12331. .rlen = 32,
  12332. }, {
  12333. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  12334. "\x11\x11\x11\x11\x11\x11\x11\x11"
  12335. "\x22\x22\x22\x22\x22\x22\x22\x22"
  12336. "\x22\x22\x22\x22\x22\x22\x22\x22",
  12337. .klen = 32,
  12338. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  12339. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12340. .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
  12341. "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
  12342. "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
  12343. "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
  12344. .ilen = 32,
  12345. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  12346. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12347. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12348. "\x44\x44\x44\x44\x44\x44\x44\x44",
  12349. .rlen = 32,
  12350. }, {
  12351. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  12352. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  12353. "\x22\x22\x22\x22\x22\x22\x22\x22"
  12354. "\x22\x22\x22\x22\x22\x22\x22\x22",
  12355. .klen = 32,
  12356. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  12357. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12358. .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
  12359. "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
  12360. "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
  12361. "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
  12362. .ilen = 32,
  12363. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  12364. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12365. "\x44\x44\x44\x44\x44\x44\x44\x44"
  12366. "\x44\x44\x44\x44\x44\x44\x44\x44",
  12367. .rlen = 32,
  12368. }, {
  12369. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  12370. "\x23\x53\x60\x28\x74\x71\x35\x26"
  12371. "\x31\x41\x59\x26\x53\x58\x97\x93"
  12372. "\x23\x84\x62\x64\x33\x83\x27\x95",
  12373. .klen = 32,
  12374. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12375. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12376. .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
  12377. "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
  12378. "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
  12379. "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
  12380. "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
  12381. "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
  12382. "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
  12383. "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
  12384. "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
  12385. "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
  12386. "\x08\xda\x76\x00\x65\xcf\x7b\x31"
  12387. "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
  12388. "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
  12389. "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
  12390. "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
  12391. "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
  12392. "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
  12393. "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
  12394. "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
  12395. "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
  12396. "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
  12397. "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
  12398. "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
  12399. "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
  12400. "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
  12401. "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
  12402. "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
  12403. "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
  12404. "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
  12405. "\x16\x31\xb2\x47\x91\x67\xaa\x28"
  12406. "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
  12407. "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
  12408. "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
  12409. "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
  12410. "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
  12411. "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
  12412. "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
  12413. "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
  12414. "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
  12415. "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
  12416. "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
  12417. "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
  12418. "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
  12419. "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
  12420. "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
  12421. "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
  12422. "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
  12423. "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
  12424. "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
  12425. "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
  12426. "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
  12427. "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
  12428. "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
  12429. "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
  12430. "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
  12431. "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
  12432. "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
  12433. "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
  12434. "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
  12435. "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
  12436. "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
  12437. "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
  12438. "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
  12439. "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
  12440. .ilen = 512,
  12441. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12442. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12443. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12444. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12445. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12446. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12447. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12448. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12449. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12450. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12451. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12452. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12453. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12454. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12455. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12456. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12457. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12458. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12459. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12460. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12461. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12462. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12463. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12464. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12465. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12466. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12467. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12468. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12469. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12470. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12471. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12472. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  12473. "\x00\x01\x02\x03\x04\x05\x06\x07"
  12474. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12475. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12476. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12477. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12478. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12479. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12480. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12481. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12482. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12483. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12484. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12485. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12486. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12487. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12488. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12489. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12490. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12491. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12492. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12493. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12494. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12495. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12496. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12497. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12498. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12499. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12500. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12501. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12502. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12503. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12504. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  12505. .rlen = 512,
  12506. }, {
  12507. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  12508. "\x23\x53\x60\x28\x74\x71\x35\x26"
  12509. "\x62\x49\x77\x57\x24\x70\x93\x69"
  12510. "\x99\x59\x57\x49\x66\x96\x76\x27"
  12511. "\x31\x41\x59\x26\x53\x58\x97\x93"
  12512. "\x23\x84\x62\x64\x33\x83\x27\x95"
  12513. "\x02\x88\x41\x97\x16\x93\x99\x37"
  12514. "\x51\x05\x82\x09\x74\x94\x45\x92",
  12515. .klen = 64,
  12516. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  12517. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12518. .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
  12519. "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
  12520. "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
  12521. "\xf1\x74\xac\x96\x05\x7b\x32\xca"
  12522. "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
  12523. "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
  12524. "\x97\x07\x82\xf0\x07\x12\x38\x0a"
  12525. "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
  12526. "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
  12527. "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
  12528. "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
  12529. "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
  12530. "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
  12531. "\x41\x82\x0c\x45\x39\x35\xa8\x75"
  12532. "\x03\x29\x01\x84\x8c\xab\x48\xbe"
  12533. "\x11\x56\x22\x67\xb7\x67\x1a\x09"
  12534. "\xa1\x72\x25\x41\x3c\x39\x65\x80"
  12535. "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
  12536. "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
  12537. "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
  12538. "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
  12539. "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
  12540. "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
  12541. "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
  12542. "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
  12543. "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
  12544. "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
  12545. "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
  12546. "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
  12547. "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
  12548. "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
  12549. "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
  12550. "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
  12551. "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
  12552. "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
  12553. "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
  12554. "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
  12555. "\xef\x38\x52\x18\x0e\x29\x7e\xef"
  12556. "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
  12557. "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
  12558. "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
  12559. "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
  12560. "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
  12561. "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
  12562. "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
  12563. "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
  12564. "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
  12565. "\x21\x17\xf8\x59\x15\x24\x64\x22"
  12566. "\x57\x48\x80\xd5\x3d\x92\x30\x07"
  12567. "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
  12568. "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
  12569. "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
  12570. "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
  12571. "\x6b\x84\xf3\x00\xba\x52\x05\x02"
  12572. "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
  12573. "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
  12574. "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
  12575. "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
  12576. "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
  12577. "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
  12578. "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
  12579. "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
  12580. "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
  12581. "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
  12582. .ilen = 512,
  12583. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12584. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12585. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12586. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12587. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12588. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12589. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12590. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12591. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12592. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12593. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12594. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12595. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12596. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12597. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12598. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12599. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12600. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12601. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12602. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12603. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12604. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12605. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12606. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12607. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12608. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12609. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12610. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12611. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12612. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12613. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12614. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  12615. "\x00\x01\x02\x03\x04\x05\x06\x07"
  12616. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12617. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12618. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12619. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12620. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12621. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12622. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12623. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12624. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12625. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12626. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12627. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12628. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12629. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12630. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12631. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12632. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12633. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12634. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12635. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12636. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12637. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12638. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12639. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12640. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12641. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12642. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12643. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12644. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12645. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12646. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  12647. .rlen = 512,
  12648. },
  12649. };
  12650. /*
  12651. * SEED test vectors
  12652. */
  12653. #define SEED_ENC_TEST_VECTORS 4
  12654. #define SEED_DEC_TEST_VECTORS 4
  12655. static struct cipher_testvec seed_enc_tv_template[] = {
  12656. {
  12657. .key = zeroed_string,
  12658. .klen = 16,
  12659. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12660. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  12661. .ilen = 16,
  12662. .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  12663. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  12664. .rlen = 16,
  12665. }, {
  12666. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12667. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  12668. .klen = 16,
  12669. .input = zeroed_string,
  12670. .ilen = 16,
  12671. .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  12672. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  12673. .rlen = 16,
  12674. }, {
  12675. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  12676. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  12677. .klen = 16,
  12678. .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  12679. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  12680. .ilen = 16,
  12681. .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  12682. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  12683. .rlen = 16,
  12684. }, {
  12685. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  12686. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  12687. .klen = 16,
  12688. .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  12689. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  12690. .ilen = 16,
  12691. .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  12692. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  12693. .rlen = 16,
  12694. }
  12695. };
  12696. static struct cipher_testvec seed_dec_tv_template[] = {
  12697. {
  12698. .key = zeroed_string,
  12699. .klen = 16,
  12700. .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  12701. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  12702. .ilen = 16,
  12703. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12704. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  12705. .rlen = 16,
  12706. }, {
  12707. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12708. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  12709. .klen = 16,
  12710. .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  12711. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  12712. .ilen = 16,
  12713. .result = zeroed_string,
  12714. .rlen = 16,
  12715. }, {
  12716. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  12717. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  12718. .klen = 16,
  12719. .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  12720. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  12721. .ilen = 16,
  12722. .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  12723. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  12724. .rlen = 16,
  12725. }, {
  12726. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  12727. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  12728. .klen = 16,
  12729. .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  12730. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  12731. .ilen = 16,
  12732. .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  12733. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  12734. .rlen = 16,
  12735. }
  12736. };
  12737. #define SALSA20_STREAM_ENC_TEST_VECTORS 5
  12738. static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
  12739. /*
  12740. * Testvectors from verified.test-vectors submitted to ECRYPT.
  12741. * They are truncated to size 39, 64, 111, 129 to test a variety
  12742. * of input length.
  12743. */
  12744. { /* Set 3, vector 0 */
  12745. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12746. "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
  12747. .klen = 16,
  12748. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  12749. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12750. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12751. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12752. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12753. "\x00\x00\x00\x00\x00\x00\x00",
  12754. .ilen = 39,
  12755. .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
  12756. "\x68\x02\x41\x0C\x68\x86\x88\x89"
  12757. "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
  12758. "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
  12759. "\x58\x3F\x52\x79\x70\xEB\xC1",
  12760. .rlen = 39,
  12761. }, { /* Set 5, vector 0 */
  12762. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12763. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12764. .klen = 16,
  12765. .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
  12766. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12767. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12768. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12769. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12770. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12771. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12772. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12773. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12774. .ilen = 64,
  12775. .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
  12776. "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
  12777. "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
  12778. "\x46\x26\xBF\x44\x3F\x21\x97\x76"
  12779. "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
  12780. "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
  12781. "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
  12782. "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
  12783. .rlen = 64,
  12784. }, { /* Set 3, vector 27 */
  12785. .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
  12786. "\x23\x24\x25\x26\x27\x28\x29\x2A"
  12787. "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
  12788. "\x33\x34\x35\x36\x37\x38\x39\x3A",
  12789. .klen = 32,
  12790. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  12791. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12792. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12793. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12794. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12795. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12796. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12797. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12798. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12799. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12800. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12801. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12802. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12803. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12804. "\x00\x00\x00\x00\x00\x00\x00",
  12805. .ilen = 111,
  12806. .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
  12807. "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
  12808. "\x87\xD9\x47\xF8\x28\x91\x35\x98"
  12809. "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
  12810. "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
  12811. "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
  12812. "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
  12813. "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
  12814. "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
  12815. "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
  12816. "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
  12817. "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
  12818. "\x95\x46\x45\x54\xE9\x75\x03\x08"
  12819. "\x44\xAF\xE5\x8A\x81\x12\x09",
  12820. .rlen = 111,
  12821. }, { /* Set 5, vector 27 */
  12822. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12823. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12824. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12825. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12826. .klen = 32,
  12827. .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
  12828. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12829. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12830. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12831. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12832. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12833. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12834. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12835. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12836. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12837. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12838. "\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. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12843. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12844. "\x00",
  12845. .ilen = 129,
  12846. .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
  12847. "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
  12848. "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
  12849. "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
  12850. "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
  12851. "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
  12852. "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
  12853. "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
  12854. "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
  12855. "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
  12856. "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
  12857. "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
  12858. "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
  12859. "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
  12860. "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
  12861. "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
  12862. "\x5A",
  12863. .rlen = 129,
  12864. }, { /* large test vector generated using Crypto++ */
  12865. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12866. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12867. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12868. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  12869. .klen = 32,
  12870. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12871. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12872. .input =
  12873. "\x00\x01\x02\x03\x04\x05\x06\x07"
  12874. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12875. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12876. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12877. "\x20\x21\x22\x23\x24\x25\x26\x27"
  12878. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  12879. "\x30\x31\x32\x33\x34\x35\x36\x37"
  12880. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  12881. "\x40\x41\x42\x43\x44\x45\x46\x47"
  12882. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  12883. "\x50\x51\x52\x53\x54\x55\x56\x57"
  12884. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  12885. "\x60\x61\x62\x63\x64\x65\x66\x67"
  12886. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  12887. "\x70\x71\x72\x73\x74\x75\x76\x77"
  12888. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  12889. "\x80\x81\x82\x83\x84\x85\x86\x87"
  12890. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  12891. "\x90\x91\x92\x93\x94\x95\x96\x97"
  12892. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  12893. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  12894. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  12895. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  12896. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  12897. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12898. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  12899. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  12900. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  12901. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  12902. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  12903. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  12904. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  12905. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  12906. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  12907. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  12908. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  12909. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  12910. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  12911. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  12912. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  12913. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  12914. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  12915. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  12916. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  12917. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  12918. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  12919. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  12920. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  12921. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  12922. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  12923. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  12924. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  12925. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  12926. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  12927. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  12928. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  12929. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  12930. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  12931. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  12932. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  12933. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  12934. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  12935. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  12936. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  12937. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  12938. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  12939. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  12940. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  12941. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  12942. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  12943. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  12944. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  12945. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  12946. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  12947. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  12948. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  12949. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  12950. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  12951. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  12952. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  12953. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  12954. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  12955. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  12956. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  12957. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  12958. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  12959. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  12960. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  12961. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  12962. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  12963. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  12964. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  12965. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  12966. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  12967. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  12968. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  12969. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  12970. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  12971. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  12972. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  12973. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  12974. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  12975. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  12976. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  12977. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  12978. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  12979. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  12980. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  12981. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  12982. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  12983. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  12984. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  12985. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  12986. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  12987. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  12988. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  12989. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  12990. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  12991. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  12992. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  12993. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  12994. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  12995. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  12996. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  12997. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  12998. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  12999. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  13000. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  13001. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  13002. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  13003. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  13004. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  13005. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  13006. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  13007. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  13008. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  13009. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  13010. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  13011. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  13012. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  13013. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  13014. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  13015. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  13016. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  13017. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  13018. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  13019. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  13020. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  13021. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  13022. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  13023. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  13024. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  13025. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  13026. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  13027. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  13028. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  13029. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  13030. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  13031. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  13032. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  13033. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  13034. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  13035. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  13036. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  13037. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  13038. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  13039. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  13040. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  13041. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  13042. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  13043. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  13044. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  13045. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  13046. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  13047. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  13048. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  13049. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  13050. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  13051. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  13052. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  13053. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  13054. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  13055. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  13056. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  13057. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  13058. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  13059. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  13060. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  13061. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  13062. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  13063. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  13064. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  13065. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  13066. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  13067. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  13068. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  13069. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  13070. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  13071. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  13072. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  13073. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  13074. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  13075. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  13076. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  13077. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  13078. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  13079. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  13080. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  13081. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  13082. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  13083. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  13084. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  13085. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  13086. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  13087. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  13088. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  13089. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  13090. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  13091. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  13092. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  13093. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  13094. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  13095. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  13096. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  13097. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  13098. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  13099. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  13100. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  13101. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  13102. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  13103. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  13104. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  13105. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  13106. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  13107. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  13108. "\x28\x37\x46\x55\x64\x73\x82\x91"
  13109. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  13110. "\x18\x27\x36\x45\x54\x63\x72\x81"
  13111. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  13112. "\x08\x17\x26\x35\x44\x53\x62\x71"
  13113. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  13114. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  13115. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  13116. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  13117. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  13118. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  13119. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  13120. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  13121. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  13122. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  13123. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  13124. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  13125. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  13126. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  13127. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  13128. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  13129. "\x00\x11\x22\x33\x44\x55\x66\x77"
  13130. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  13131. "\x10\x21\x32\x43\x54\x65\x76\x87"
  13132. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  13133. "\x20\x31\x42\x53\x64\x75\x86\x97"
  13134. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  13135. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  13136. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  13137. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  13138. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  13139. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  13140. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  13141. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  13142. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  13143. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  13144. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  13145. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  13146. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  13147. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  13148. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  13149. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  13150. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  13151. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  13152. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  13153. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  13154. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  13155. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  13156. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  13157. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  13158. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  13159. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  13160. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  13161. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  13162. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  13163. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  13164. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  13165. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  13166. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  13167. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  13168. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  13169. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  13170. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  13171. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  13172. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  13173. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  13174. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  13175. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  13176. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  13177. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  13178. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  13179. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  13180. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  13181. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  13182. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  13183. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  13184. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  13185. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  13186. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  13187. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  13188. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  13189. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  13190. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  13191. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  13192. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  13193. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  13194. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  13195. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  13196. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  13197. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  13198. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  13199. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  13200. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  13201. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  13202. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  13203. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  13204. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  13205. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  13206. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  13207. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  13208. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  13209. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  13210. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  13211. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  13212. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  13213. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  13214. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  13215. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  13216. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  13217. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  13218. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  13219. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  13220. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  13221. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  13222. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  13223. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  13224. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  13225. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  13226. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  13227. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  13228. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  13229. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  13230. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  13231. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  13232. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  13233. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  13234. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  13235. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  13236. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  13237. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  13238. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  13239. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  13240. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  13241. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  13242. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  13243. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  13244. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  13245. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  13246. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  13247. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  13248. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  13249. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  13250. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  13251. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  13252. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  13253. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  13254. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  13255. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  13256. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  13257. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  13258. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  13259. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  13260. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  13261. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  13262. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  13263. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  13264. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  13265. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  13266. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  13267. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  13268. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  13269. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  13270. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  13271. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  13272. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  13273. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  13274. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  13275. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  13276. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  13277. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  13278. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  13279. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  13280. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  13281. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  13282. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  13283. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  13284. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  13285. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  13286. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  13287. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  13288. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  13289. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  13290. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  13291. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  13292. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  13293. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  13294. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  13295. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  13296. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  13297. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  13298. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  13299. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  13300. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  13301. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  13302. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  13303. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  13304. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  13305. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  13306. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  13307. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  13308. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  13309. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  13310. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  13311. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  13312. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  13313. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  13314. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  13315. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  13316. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  13317. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  13318. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  13319. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  13320. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  13321. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  13322. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  13323. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  13324. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  13325. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  13326. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  13327. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  13328. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  13329. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  13330. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  13331. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  13332. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  13333. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  13334. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  13335. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  13336. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  13337. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  13338. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  13339. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  13340. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  13341. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  13342. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  13343. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  13344. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  13345. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  13346. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  13347. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  13348. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  13349. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  13350. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  13351. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  13352. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  13353. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  13354. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  13355. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  13356. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  13357. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  13358. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  13359. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  13360. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  13361. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  13362. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  13363. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  13364. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  13365. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  13366. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  13367. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  13368. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  13369. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  13370. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  13371. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  13372. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  13373. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  13374. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  13375. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  13376. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  13377. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  13378. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  13379. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  13380. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  13381. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  13382. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  13383. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  13384. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  13385. "\x00\x21\x42\x63",
  13386. .ilen = 4100,
  13387. .result =
  13388. "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
  13389. "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
  13390. "\x29\x01\xce\x98\x55\x53\xf9\x0c"
  13391. "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
  13392. "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
  13393. "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
  13394. "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
  13395. "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
  13396. "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
  13397. "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
  13398. "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
  13399. "\xbb\xde\x56\x86\xab\x65\x21\x30"
  13400. "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
  13401. "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
  13402. "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
  13403. "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
  13404. "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
  13405. "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
  13406. "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
  13407. "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
  13408. "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
  13409. "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
  13410. "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
  13411. "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
  13412. "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
  13413. "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
  13414. "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
  13415. "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
  13416. "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
  13417. "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
  13418. "\x45\xff\x3f\xce\x55\xf6\x95\x10"
  13419. "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
  13420. "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
  13421. "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
  13422. "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
  13423. "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
  13424. "\x62\x08\x18\x7a\x25\x49\x28\xac"
  13425. "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
  13426. "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
  13427. "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
  13428. "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
  13429. "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
  13430. "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
  13431. "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
  13432. "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
  13433. "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
  13434. "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
  13435. "\x33\xee\x14\x19\x22\x52\x89\xa7"
  13436. "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
  13437. "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
  13438. "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
  13439. "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
  13440. "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
  13441. "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
  13442. "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
  13443. "\x04\x07\x08\x52\xe6\xc0\xda\x93"
  13444. "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
  13445. "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
  13446. "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
  13447. "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
  13448. "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
  13449. "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
  13450. "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
  13451. "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
  13452. "\x5a\x90\xae\x75\x0a\x74\x18\x89"
  13453. "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
  13454. "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
  13455. "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
  13456. "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
  13457. "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
  13458. "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
  13459. "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
  13460. "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
  13461. "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
  13462. "\x49\x97\x33\xab\x36\x14\x0a\x70"
  13463. "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
  13464. "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
  13465. "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
  13466. "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
  13467. "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
  13468. "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
  13469. "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
  13470. "\x47\x13\x28\x73\x3c\xbb\x00\x90"
  13471. "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
  13472. "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
  13473. "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
  13474. "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
  13475. "\xad\x04\x07\xae\x22\x90\x4a\x93"
  13476. "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
  13477. "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
  13478. "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
  13479. "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
  13480. "\x53\xf9\x80\x10\xde\x80\xa2\x41"
  13481. "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
  13482. "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
  13483. "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
  13484. "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
  13485. "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
  13486. "\xde\xff\x07\x44\xdd\x56\x1b\xad"
  13487. "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
  13488. "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
  13489. "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
  13490. "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
  13491. "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
  13492. "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
  13493. "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
  13494. "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
  13495. "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
  13496. "\x23\xf8\x66\x18\x14\x28\x34\x0f"
  13497. "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
  13498. "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
  13499. "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
  13500. "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
  13501. "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
  13502. "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
  13503. "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
  13504. "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
  13505. "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
  13506. "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
  13507. "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
  13508. "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
  13509. "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
  13510. "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
  13511. "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
  13512. "\xca\x8e\x61\x87\xde\xad\x80\xd2"
  13513. "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
  13514. "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
  13515. "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
  13516. "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
  13517. "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
  13518. "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
  13519. "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
  13520. "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
  13521. "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
  13522. "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
  13523. "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
  13524. "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
  13525. "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
  13526. "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
  13527. "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
  13528. "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
  13529. "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
  13530. "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
  13531. "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
  13532. "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
  13533. "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
  13534. "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
  13535. "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
  13536. "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
  13537. "\x54\xda\x24\x6a\xc4\x41\x65\x46"
  13538. "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
  13539. "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
  13540. "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
  13541. "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
  13542. "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
  13543. "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
  13544. "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
  13545. "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
  13546. "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
  13547. "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
  13548. "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
  13549. "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
  13550. "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
  13551. "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
  13552. "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
  13553. "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
  13554. "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
  13555. "\xef\xcc\xa7\xec\xab\x43\x09\x18"
  13556. "\xd3\xab\x68\xd1\x07\x99\x44\x47"
  13557. "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
  13558. "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
  13559. "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
  13560. "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
  13561. "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
  13562. "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
  13563. "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
  13564. "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
  13565. "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
  13566. "\x71\x6e\x9f\x58\x15\x67\x72\x87"
  13567. "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
  13568. "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
  13569. "\xba\x41\x54\xac\xf0\xfc\x59\x12"
  13570. "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
  13571. "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
  13572. "\x2e\x53\x49\x97\x94\x33\xae\x40"
  13573. "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
  13574. "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
  13575. "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
  13576. "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
  13577. "\xce\x87\xad\xcc\x72\x05\x00\x29"
  13578. "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
  13579. "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
  13580. "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
  13581. "\xac\xc0\x79\x50\x69\xca\x59\x32"
  13582. "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
  13583. "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
  13584. "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
  13585. "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
  13586. "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
  13587. "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
  13588. "\x05\x68\x6b\xab\xe3\x41\x49\xed"
  13589. "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
  13590. "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
  13591. "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
  13592. "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
  13593. "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
  13594. "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
  13595. "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
  13596. "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
  13597. "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
  13598. "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
  13599. "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
  13600. "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
  13601. "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
  13602. "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
  13603. "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
  13604. "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
  13605. "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
  13606. "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
  13607. "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
  13608. "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
  13609. "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
  13610. "\x85\x75\xe6\x43\xf6\x87\x08\x68"
  13611. "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
  13612. "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
  13613. "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
  13614. "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
  13615. "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
  13616. "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
  13617. "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
  13618. "\xaf\x55\xeb\x22\xac\x93\x68\x32"
  13619. "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
  13620. "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
  13621. "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
  13622. "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
  13623. "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
  13624. "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
  13625. "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
  13626. "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
  13627. "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
  13628. "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
  13629. "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
  13630. "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
  13631. "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
  13632. "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
  13633. "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
  13634. "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
  13635. "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
  13636. "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
  13637. "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
  13638. "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
  13639. "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
  13640. "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
  13641. "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
  13642. "\x38\x55\xab\x33\x26\xef\x9f\x43"
  13643. "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
  13644. "\x58\x09\x09\x1b\xc3\x65\x46\x46"
  13645. "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
  13646. "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
  13647. "\x63\x86\xf2\x03\x67\x45\xd2\x72"
  13648. "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
  13649. "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
  13650. "\x2b\x82\x39\xbd\x69\x54\xed\x62"
  13651. "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
  13652. "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
  13653. "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
  13654. "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
  13655. "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
  13656. "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
  13657. "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
  13658. "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
  13659. "\x55\xad\xa4\xd1\x22\x54\x70\x94"
  13660. "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
  13661. "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
  13662. "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
  13663. "\x62\x36\x43\xb2\x82\x15\x75\x50"
  13664. "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
  13665. "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
  13666. "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
  13667. "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
  13668. "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
  13669. "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
  13670. "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
  13671. "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
  13672. "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
  13673. "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
  13674. "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
  13675. "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
  13676. "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
  13677. "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
  13678. "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
  13679. "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
  13680. "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
  13681. "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
  13682. "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
  13683. "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
  13684. "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
  13685. "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
  13686. "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
  13687. "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
  13688. "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
  13689. "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
  13690. "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
  13691. "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
  13692. "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
  13693. "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
  13694. "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
  13695. "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
  13696. "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
  13697. "\x42\x19\x23\x7d\xc8\x73\xee\x25"
  13698. "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
  13699. "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
  13700. "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
  13701. "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
  13702. "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
  13703. "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
  13704. "\xdb\x87\xee\xef\x55\x89\x2a\x59"
  13705. "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
  13706. "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
  13707. "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
  13708. "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
  13709. "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
  13710. "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
  13711. "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
  13712. "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
  13713. "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
  13714. "\xae\xab\x86\x09\x89\xc9\xc2\x40"
  13715. "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
  13716. "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
  13717. "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
  13718. "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
  13719. "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
  13720. "\x95\xd9\x34\x34\x86\xc6\x41\x94"
  13721. "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
  13722. "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
  13723. "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
  13724. "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
  13725. "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
  13726. "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
  13727. "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
  13728. "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
  13729. "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
  13730. "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
  13731. "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
  13732. "\xa7\x33\x34\x86\xca\xe4\x96\x23"
  13733. "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
  13734. "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
  13735. "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
  13736. "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
  13737. "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
  13738. "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
  13739. "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
  13740. "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
  13741. "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
  13742. "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
  13743. "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
  13744. "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
  13745. "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
  13746. "\x68\xc8\x7f\x51\x22\x42\xef\x49"
  13747. "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
  13748. "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
  13749. "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
  13750. "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
  13751. "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
  13752. "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
  13753. "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
  13754. "\x73\x2e\x71\x79\x16\x06\x63\x28"
  13755. "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
  13756. "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
  13757. "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
  13758. "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
  13759. "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
  13760. "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
  13761. "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
  13762. "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
  13763. "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
  13764. "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
  13765. "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
  13766. "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
  13767. "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
  13768. "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
  13769. "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
  13770. "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
  13771. "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
  13772. "\x19\x07\xaf\x90\x62\x5c\x68\x98"
  13773. "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
  13774. "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
  13775. "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
  13776. "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
  13777. "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
  13778. "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
  13779. "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
  13780. "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
  13781. "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
  13782. "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
  13783. "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
  13784. "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
  13785. "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
  13786. "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
  13787. "\x21\x33\x44\xfe\x7f\x35\x32\x93"
  13788. "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
  13789. "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
  13790. "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
  13791. "\x64\xf0\x48\xe5\x57\x99\xee\x75"
  13792. "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
  13793. "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
  13794. "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
  13795. "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
  13796. "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
  13797. "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
  13798. "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
  13799. "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
  13800. "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
  13801. "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
  13802. "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
  13803. "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
  13804. "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
  13805. "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
  13806. "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
  13807. "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
  13808. "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
  13809. "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
  13810. "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
  13811. "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
  13812. "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
  13813. "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
  13814. "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
  13815. "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
  13816. "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
  13817. "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
  13818. "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
  13819. "\x56\xf5\x4e\x01\x35\x27\x45\x77"
  13820. "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
  13821. "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
  13822. "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
  13823. "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
  13824. "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
  13825. "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
  13826. "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
  13827. "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
  13828. "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
  13829. "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
  13830. "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
  13831. "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
  13832. "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
  13833. "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
  13834. "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
  13835. "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
  13836. "\x87\x8f\x03\x21\x28\x95\x0c\x89"
  13837. "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
  13838. "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
  13839. "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
  13840. "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
  13841. "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
  13842. "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
  13843. "\x85\x73\x78\x45\x20\x7f\xae\x13"
  13844. "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
  13845. "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
  13846. "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
  13847. "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
  13848. "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
  13849. "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
  13850. "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
  13851. "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
  13852. "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
  13853. "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
  13854. "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
  13855. "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
  13856. "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
  13857. "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
  13858. "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
  13859. "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
  13860. "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
  13861. "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
  13862. "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
  13863. "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
  13864. "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
  13865. "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
  13866. "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
  13867. "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
  13868. "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
  13869. "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
  13870. "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
  13871. "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
  13872. "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
  13873. "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
  13874. "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
  13875. "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
  13876. "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
  13877. "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
  13878. "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
  13879. "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
  13880. "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
  13881. "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
  13882. "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
  13883. "\x6e\x12\x17\x72\x63\x57\xc7\xba"
  13884. "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
  13885. "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
  13886. "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
  13887. "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
  13888. "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
  13889. "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
  13890. "\x0c\x24\x43\x31\x40\x57\xf1\x72"
  13891. "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
  13892. "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
  13893. "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
  13894. "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
  13895. "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
  13896. "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
  13897. "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
  13898. "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
  13899. "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
  13900. "\xaf\xdf\x11\x95",
  13901. .rlen = 4100,
  13902. .np = 2,
  13903. .tap = { 4064, 36 },
  13904. },
  13905. };
  13906. /*
  13907. * CTS (Cipher Text Stealing) mode tests
  13908. */
  13909. #define CTS_MODE_ENC_TEST_VECTORS 6
  13910. #define CTS_MODE_DEC_TEST_VECTORS 6
  13911. static struct cipher_testvec cts_mode_enc_tv_template[] = {
  13912. { /* from rfc3962 */
  13913. .klen = 16,
  13914. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  13915. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  13916. .ilen = 17,
  13917. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  13918. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  13919. "\x20",
  13920. .rlen = 17,
  13921. .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  13922. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  13923. "\x97",
  13924. }, {
  13925. .klen = 16,
  13926. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  13927. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  13928. .ilen = 31,
  13929. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  13930. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  13931. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  13932. "\x20\x47\x61\x75\x27\x73\x20",
  13933. .rlen = 31,
  13934. .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  13935. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  13936. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  13937. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  13938. }, {
  13939. .klen = 16,
  13940. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  13941. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  13942. .ilen = 32,
  13943. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  13944. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  13945. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  13946. "\x20\x47\x61\x75\x27\x73\x20\x43",
  13947. .rlen = 32,
  13948. .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  13949. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  13950. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  13951. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  13952. }, {
  13953. .klen = 16,
  13954. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  13955. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  13956. .ilen = 47,
  13957. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  13958. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  13959. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  13960. "\x20\x47\x61\x75\x27\x73\x20\x43"
  13961. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  13962. "\x70\x6c\x65\x61\x73\x65\x2c",
  13963. .rlen = 47,
  13964. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  13965. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  13966. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  13967. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  13968. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  13969. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  13970. }, {
  13971. .klen = 16,
  13972. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  13973. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  13974. .ilen = 48,
  13975. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  13976. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  13977. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  13978. "\x20\x47\x61\x75\x27\x73\x20\x43"
  13979. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  13980. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  13981. .rlen = 48,
  13982. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  13983. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  13984. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  13985. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  13986. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  13987. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  13988. }, {
  13989. .klen = 16,
  13990. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  13991. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  13992. .ilen = 64,
  13993. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  13994. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  13995. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  13996. "\x20\x47\x61\x75\x27\x73\x20\x43"
  13997. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  13998. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  13999. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  14000. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  14001. .rlen = 64,
  14002. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14003. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  14004. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14005. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  14006. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  14007. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  14008. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  14009. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  14010. }
  14011. };
  14012. static struct cipher_testvec cts_mode_dec_tv_template[] = {
  14013. { /* from rfc3962 */
  14014. .klen = 16,
  14015. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14016. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14017. .rlen = 17,
  14018. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14019. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14020. "\x20",
  14021. .ilen = 17,
  14022. .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  14023. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  14024. "\x97",
  14025. }, {
  14026. .klen = 16,
  14027. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14028. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14029. .rlen = 31,
  14030. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14031. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14032. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14033. "\x20\x47\x61\x75\x27\x73\x20",
  14034. .ilen = 31,
  14035. .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  14036. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  14037. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14038. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  14039. }, {
  14040. .klen = 16,
  14041. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14042. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14043. .rlen = 32,
  14044. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14045. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14046. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14047. "\x20\x47\x61\x75\x27\x73\x20\x43",
  14048. .ilen = 32,
  14049. .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14050. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  14051. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14052. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  14053. }, {
  14054. .klen = 16,
  14055. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14056. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14057. .rlen = 47,
  14058. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14059. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14060. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14061. "\x20\x47\x61\x75\x27\x73\x20\x43"
  14062. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  14063. "\x70\x6c\x65\x61\x73\x65\x2c",
  14064. .ilen = 47,
  14065. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14066. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  14067. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  14068. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  14069. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14070. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  14071. }, {
  14072. .klen = 16,
  14073. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14074. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14075. .rlen = 48,
  14076. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14077. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14078. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14079. "\x20\x47\x61\x75\x27\x73\x20\x43"
  14080. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  14081. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  14082. .ilen = 48,
  14083. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14084. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  14085. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  14086. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  14087. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14088. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  14089. }, {
  14090. .klen = 16,
  14091. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  14092. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  14093. .rlen = 64,
  14094. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  14095. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  14096. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  14097. "\x20\x47\x61\x75\x27\x73\x20\x43"
  14098. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  14099. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  14100. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  14101. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  14102. .ilen = 64,
  14103. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  14104. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  14105. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  14106. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  14107. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  14108. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  14109. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  14110. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  14111. }
  14112. };
  14113. /*
  14114. * Compression stuff.
  14115. */
  14116. #define COMP_BUF_SIZE 512
  14117. struct comp_testvec {
  14118. int inlen, outlen;
  14119. char input[COMP_BUF_SIZE];
  14120. char output[COMP_BUF_SIZE];
  14121. };
  14122. struct pcomp_testvec {
  14123. void *params;
  14124. unsigned int paramsize;
  14125. int inlen, outlen;
  14126. char input[COMP_BUF_SIZE];
  14127. char output[COMP_BUF_SIZE];
  14128. };
  14129. /*
  14130. * Deflate test vectors (null-terminated strings).
  14131. * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
  14132. */
  14133. #define DEFLATE_COMP_TEST_VECTORS 2
  14134. #define DEFLATE_DECOMP_TEST_VECTORS 2
  14135. static struct comp_testvec deflate_comp_tv_template[] = {
  14136. {
  14137. .inlen = 70,
  14138. .outlen = 38,
  14139. .input = "Join us now and share the software "
  14140. "Join us now and share the software ",
  14141. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  14142. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  14143. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  14144. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  14145. "\x71\xbc\x08\x2b\x01\x00",
  14146. }, {
  14147. .inlen = 191,
  14148. .outlen = 122,
  14149. .input = "This document describes a compression method based on the DEFLATE"
  14150. "compression algorithm. This document defines the application of "
  14151. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  14152. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  14153. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  14154. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  14155. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  14156. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  14157. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  14158. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  14159. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  14160. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  14161. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  14162. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  14163. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  14164. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  14165. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  14166. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  14167. "\xfa\x02",
  14168. },
  14169. };
  14170. static struct comp_testvec deflate_decomp_tv_template[] = {
  14171. {
  14172. .inlen = 122,
  14173. .outlen = 191,
  14174. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  14175. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  14176. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  14177. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  14178. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  14179. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  14180. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  14181. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  14182. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  14183. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  14184. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  14185. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  14186. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  14187. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  14188. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  14189. "\xfa\x02",
  14190. .output = "This document describes a compression method based on the DEFLATE"
  14191. "compression algorithm. This document defines the application of "
  14192. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  14193. }, {
  14194. .inlen = 38,
  14195. .outlen = 70,
  14196. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  14197. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  14198. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  14199. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  14200. "\x71\xbc\x08\x2b\x01\x00",
  14201. .output = "Join us now and share the software "
  14202. "Join us now and share the software ",
  14203. },
  14204. };
  14205. #define ZLIB_COMP_TEST_VECTORS 2
  14206. #define ZLIB_DECOMP_TEST_VECTORS 2
  14207. static const struct {
  14208. struct nlattr nla;
  14209. int val;
  14210. } deflate_comp_params[] = {
  14211. {
  14212. .nla = {
  14213. .nla_len = NLA_HDRLEN + sizeof(int),
  14214. .nla_type = ZLIB_COMP_LEVEL,
  14215. },
  14216. .val = Z_DEFAULT_COMPRESSION,
  14217. }, {
  14218. .nla = {
  14219. .nla_len = NLA_HDRLEN + sizeof(int),
  14220. .nla_type = ZLIB_COMP_METHOD,
  14221. },
  14222. .val = Z_DEFLATED,
  14223. }, {
  14224. .nla = {
  14225. .nla_len = NLA_HDRLEN + sizeof(int),
  14226. .nla_type = ZLIB_COMP_WINDOWBITS,
  14227. },
  14228. .val = -11,
  14229. }, {
  14230. .nla = {
  14231. .nla_len = NLA_HDRLEN + sizeof(int),
  14232. .nla_type = ZLIB_COMP_MEMLEVEL,
  14233. },
  14234. .val = MAX_MEM_LEVEL,
  14235. }, {
  14236. .nla = {
  14237. .nla_len = NLA_HDRLEN + sizeof(int),
  14238. .nla_type = ZLIB_COMP_STRATEGY,
  14239. },
  14240. .val = Z_DEFAULT_STRATEGY,
  14241. }
  14242. };
  14243. static const struct {
  14244. struct nlattr nla;
  14245. int val;
  14246. } deflate_decomp_params[] = {
  14247. {
  14248. .nla = {
  14249. .nla_len = NLA_HDRLEN + sizeof(int),
  14250. .nla_type = ZLIB_DECOMP_WINDOWBITS,
  14251. },
  14252. .val = -11,
  14253. }
  14254. };
  14255. static struct pcomp_testvec zlib_comp_tv_template[] = {
  14256. {
  14257. .params = &deflate_comp_params,
  14258. .paramsize = sizeof(deflate_comp_params),
  14259. .inlen = 70,
  14260. .outlen = 38,
  14261. .input = "Join us now and share the software "
  14262. "Join us now and share the software ",
  14263. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  14264. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  14265. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  14266. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  14267. "\x71\xbc\x08\x2b\x01\x00",
  14268. }, {
  14269. .params = &deflate_comp_params,
  14270. .paramsize = sizeof(deflate_comp_params),
  14271. .inlen = 191,
  14272. .outlen = 122,
  14273. .input = "This document describes a compression method based on the DEFLATE"
  14274. "compression algorithm. This document defines the application of "
  14275. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  14276. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  14277. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  14278. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  14279. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  14280. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  14281. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  14282. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  14283. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  14284. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  14285. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  14286. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  14287. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  14288. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  14289. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  14290. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  14291. "\xfa\x02",
  14292. },
  14293. };
  14294. static struct pcomp_testvec zlib_decomp_tv_template[] = {
  14295. {
  14296. .params = &deflate_decomp_params,
  14297. .paramsize = sizeof(deflate_decomp_params),
  14298. .inlen = 122,
  14299. .outlen = 191,
  14300. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  14301. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  14302. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  14303. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  14304. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  14305. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  14306. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  14307. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  14308. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  14309. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  14310. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  14311. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  14312. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  14313. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  14314. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  14315. "\xfa\x02",
  14316. .output = "This document describes a compression method based on the DEFLATE"
  14317. "compression algorithm. This document defines the application of "
  14318. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  14319. }, {
  14320. .params = &deflate_decomp_params,
  14321. .paramsize = sizeof(deflate_decomp_params),
  14322. .inlen = 38,
  14323. .outlen = 70,
  14324. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  14325. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  14326. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  14327. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  14328. "\x71\xbc\x08\x2b\x01\x00",
  14329. .output = "Join us now and share the software "
  14330. "Join us now and share the software ",
  14331. },
  14332. };
  14333. /*
  14334. * LZO test vectors (null-terminated strings).
  14335. */
  14336. #define LZO_COMP_TEST_VECTORS 2
  14337. #define LZO_DECOMP_TEST_VECTORS 2
  14338. static struct comp_testvec lzo_comp_tv_template[] = {
  14339. {
  14340. .inlen = 70,
  14341. .outlen = 46,
  14342. .input = "Join us now and share the software "
  14343. "Join us now and share the software ",
  14344. .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  14345. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  14346. "\x64\x20\x73\x68\x61\x72\x65\x20"
  14347. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  14348. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  14349. "\x3d\x88\x00\x11\x00\x00",
  14350. }, {
  14351. .inlen = 159,
  14352. .outlen = 133,
  14353. .input = "This document describes a compression method based on the LZO "
  14354. "compression algorithm. This document defines the application of "
  14355. "the LZO algorithm used in UBIFS.",
  14356. .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  14357. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  14358. "\x64\x65\x73\x63\x72\x69\x62\x65"
  14359. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  14360. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  14361. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  14362. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  14363. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  14364. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  14365. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  14366. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  14367. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  14368. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  14369. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  14370. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  14371. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  14372. "\x53\x2e\x11\x00\x00",
  14373. },
  14374. };
  14375. static struct comp_testvec lzo_decomp_tv_template[] = {
  14376. {
  14377. .inlen = 133,
  14378. .outlen = 159,
  14379. .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  14380. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  14381. "\x64\x65\x73\x63\x72\x69\x62\x65"
  14382. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  14383. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  14384. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  14385. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  14386. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  14387. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  14388. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  14389. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  14390. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  14391. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  14392. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  14393. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  14394. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  14395. "\x53\x2e\x11\x00\x00",
  14396. .output = "This document describes a compression method based on the LZO "
  14397. "compression algorithm. This document defines the application of "
  14398. "the LZO algorithm used in UBIFS.",
  14399. }, {
  14400. .inlen = 46,
  14401. .outlen = 70,
  14402. .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  14403. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  14404. "\x64\x20\x73\x68\x61\x72\x65\x20"
  14405. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  14406. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  14407. "\x3d\x88\x00\x11\x00\x00",
  14408. .output = "Join us now and share the software "
  14409. "Join us now and share the software ",
  14410. },
  14411. };
  14412. /*
  14413. * Michael MIC test vectors from IEEE 802.11i
  14414. */
  14415. #define MICHAEL_MIC_TEST_VECTORS 6
  14416. static struct hash_testvec michael_mic_tv_template[] = {
  14417. {
  14418. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  14419. .ksize = 8,
  14420. .plaintext = zeroed_string,
  14421. .psize = 0,
  14422. .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  14423. },
  14424. {
  14425. .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  14426. .ksize = 8,
  14427. .plaintext = "M",
  14428. .psize = 1,
  14429. .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  14430. },
  14431. {
  14432. .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  14433. .ksize = 8,
  14434. .plaintext = "Mi",
  14435. .psize = 2,
  14436. .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  14437. },
  14438. {
  14439. .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  14440. .ksize = 8,
  14441. .plaintext = "Mic",
  14442. .psize = 3,
  14443. .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  14444. },
  14445. {
  14446. .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  14447. .ksize = 8,
  14448. .plaintext = "Mich",
  14449. .psize = 4,
  14450. .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  14451. },
  14452. {
  14453. .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  14454. .ksize = 8,
  14455. .plaintext = "Michael",
  14456. .psize = 7,
  14457. .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
  14458. }
  14459. };
  14460. /*
  14461. * CRC32C test vectors
  14462. */
  14463. #define CRC32C_TEST_VECTORS 14
  14464. static struct hash_testvec crc32c_tv_template[] = {
  14465. {
  14466. .psize = 0,
  14467. .digest = "\x00\x00\x00\x00",
  14468. },
  14469. {
  14470. .key = "\x87\xa9\xcb\xed",
  14471. .ksize = 4,
  14472. .psize = 0,
  14473. .digest = "\x78\x56\x34\x12",
  14474. },
  14475. {
  14476. .key = "\xff\xff\xff\xff",
  14477. .ksize = 4,
  14478. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  14479. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  14480. "\x11\x12\x13\x14\x15\x16\x17\x18"
  14481. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  14482. "\x21\x22\x23\x24\x25\x26\x27\x28",
  14483. .psize = 40,
  14484. .digest = "\x7f\x15\x2c\x0e",
  14485. },
  14486. {
  14487. .key = "\xff\xff\xff\xff",
  14488. .ksize = 4,
  14489. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  14490. "\x31\x32\x33\x34\x35\x36\x37\x38"
  14491. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  14492. "\x41\x42\x43\x44\x45\x46\x47\x48"
  14493. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  14494. .psize = 40,
  14495. .digest = "\xf6\xeb\x80\xe9",
  14496. },
  14497. {
  14498. .key = "\xff\xff\xff\xff",
  14499. .ksize = 4,
  14500. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  14501. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  14502. "\x61\x62\x63\x64\x65\x66\x67\x68"
  14503. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  14504. "\x71\x72\x73\x74\x75\x76\x77\x78",
  14505. .psize = 40,
  14506. .digest = "\xed\xbd\x74\xde",
  14507. },
  14508. {
  14509. .key = "\xff\xff\xff\xff",
  14510. .ksize = 4,
  14511. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  14512. "\x81\x82\x83\x84\x85\x86\x87\x88"
  14513. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  14514. "\x91\x92\x93\x94\x95\x96\x97\x98"
  14515. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  14516. .psize = 40,
  14517. .digest = "\x62\xc8\x79\xd5",
  14518. },
  14519. {
  14520. .key = "\xff\xff\xff\xff",
  14521. .ksize = 4,
  14522. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  14523. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  14524. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  14525. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  14526. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  14527. .psize = 40,
  14528. .digest = "\xd0\x9a\x97\xba",
  14529. },
  14530. {
  14531. .key = "\xff\xff\xff\xff",
  14532. .ksize = 4,
  14533. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  14534. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  14535. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  14536. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  14537. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  14538. .psize = 40,
  14539. .digest = "\x13\xd9\x29\x2b",
  14540. },
  14541. {
  14542. .key = "\x80\xea\xd3\xf1",
  14543. .ksize = 4,
  14544. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  14545. "\x31\x32\x33\x34\x35\x36\x37\x38"
  14546. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  14547. "\x41\x42\x43\x44\x45\x46\x47\x48"
  14548. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  14549. .psize = 40,
  14550. .digest = "\x0c\xb5\xe2\xa2",
  14551. },
  14552. {
  14553. .key = "\xf3\x4a\x1d\x5d",
  14554. .ksize = 4,
  14555. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  14556. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  14557. "\x61\x62\x63\x64\x65\x66\x67\x68"
  14558. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  14559. "\x71\x72\x73\x74\x75\x76\x77\x78",
  14560. .psize = 40,
  14561. .digest = "\xd1\x7f\xfb\xa6",
  14562. },
  14563. {
  14564. .key = "\x2e\x80\x04\x59",
  14565. .ksize = 4,
  14566. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  14567. "\x81\x82\x83\x84\x85\x86\x87\x88"
  14568. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  14569. "\x91\x92\x93\x94\x95\x96\x97\x98"
  14570. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  14571. .psize = 40,
  14572. .digest = "\x59\x33\xe6\x7a",
  14573. },
  14574. {
  14575. .key = "\xa6\xcc\x19\x85",
  14576. .ksize = 4,
  14577. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  14578. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  14579. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  14580. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  14581. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  14582. .psize = 40,
  14583. .digest = "\xbe\x03\x01\xd2",
  14584. },
  14585. {
  14586. .key = "\x41\xfc\xfe\x2d",
  14587. .ksize = 4,
  14588. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  14589. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  14590. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  14591. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  14592. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  14593. .psize = 40,
  14594. .digest = "\x75\xd3\xc5\x24",
  14595. },
  14596. {
  14597. .key = "\xff\xff\xff\xff",
  14598. .ksize = 4,
  14599. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  14600. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  14601. "\x11\x12\x13\x14\x15\x16\x17\x18"
  14602. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  14603. "\x21\x22\x23\x24\x25\x26\x27\x28"
  14604. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  14605. "\x31\x32\x33\x34\x35\x36\x37\x38"
  14606. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  14607. "\x41\x42\x43\x44\x45\x46\x47\x48"
  14608. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  14609. "\x51\x52\x53\x54\x55\x56\x57\x58"
  14610. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  14611. "\x61\x62\x63\x64\x65\x66\x67\x68"
  14612. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  14613. "\x71\x72\x73\x74\x75\x76\x77\x78"
  14614. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  14615. "\x81\x82\x83\x84\x85\x86\x87\x88"
  14616. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  14617. "\x91\x92\x93\x94\x95\x96\x97\x98"
  14618. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  14619. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  14620. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  14621. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  14622. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  14623. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  14624. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  14625. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  14626. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  14627. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  14628. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  14629. .psize = 240,
  14630. .digest = "\x75\xd3\xc5\x24",
  14631. .np = 2,
  14632. .tap = { 31, 209 }
  14633. },
  14634. };
  14635. #endif /* _CRYPTO_TESTMGR_H */