testmgr.h 603 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455
  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. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  2674. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  2675. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  2676. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  2677. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  2678. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  2679. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  2680. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  2681. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  2682. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  2683. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  2684. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  2685. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  2686. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  2687. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  2688. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  2689. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  2690. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  2691. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  2692. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  2693. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  2694. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  2695. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  2696. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  2697. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  2698. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  2699. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  2700. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  2701. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  2702. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  2703. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  2704. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  2705. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  2706. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  2707. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  2708. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  2709. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  2710. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  2711. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  2712. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  2713. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  2714. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  2715. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  2716. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  2717. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  2718. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  2719. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  2720. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  2721. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  2722. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  2723. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  2724. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  2725. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  2726. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  2727. .ilen = 496,
  2728. .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
  2729. "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
  2730. "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
  2731. "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
  2732. "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
  2733. "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
  2734. "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
  2735. "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
  2736. "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
  2737. "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
  2738. "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
  2739. "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
  2740. "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
  2741. "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
  2742. "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
  2743. "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
  2744. "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
  2745. "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
  2746. "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
  2747. "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
  2748. "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
  2749. "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
  2750. "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
  2751. "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
  2752. "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
  2753. "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
  2754. "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
  2755. "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
  2756. "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
  2757. "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
  2758. "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
  2759. "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
  2760. "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
  2761. "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
  2762. "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
  2763. "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
  2764. "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
  2765. "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
  2766. "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
  2767. "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
  2768. "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
  2769. "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
  2770. "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
  2771. "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
  2772. "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
  2773. "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
  2774. "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
  2775. "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
  2776. "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
  2777. "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
  2778. "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
  2779. "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
  2780. "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
  2781. "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
  2782. "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
  2783. "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
  2784. "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
  2785. "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
  2786. "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
  2787. "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
  2788. "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
  2789. "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
  2790. .rlen = 496,
  2791. },
  2792. };
  2793. static struct cipher_testvec tf_dec_tv_template[] = {
  2794. {
  2795. .key = zeroed_string,
  2796. .klen = 16,
  2797. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2798. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2799. .ilen = 16,
  2800. .result = zeroed_string,
  2801. .rlen = 16,
  2802. }, {
  2803. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2804. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2805. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2806. .klen = 24,
  2807. .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2808. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2809. .ilen = 16,
  2810. .result = zeroed_string,
  2811. .rlen = 16,
  2812. }, {
  2813. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2814. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2815. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2816. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2817. .klen = 32,
  2818. .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2819. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2820. .ilen = 16,
  2821. .result = zeroed_string,
  2822. .rlen = 16,
  2823. }, { /* Generated with Crypto++ */
  2824. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  2825. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  2826. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  2827. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  2828. .klen = 32,
  2829. .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
  2830. "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
  2831. "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
  2832. "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
  2833. "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
  2834. "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
  2835. "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
  2836. "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
  2837. "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
  2838. "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
  2839. "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
  2840. "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
  2841. "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
  2842. "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
  2843. "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
  2844. "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
  2845. "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
  2846. "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
  2847. "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
  2848. "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
  2849. "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
  2850. "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
  2851. "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
  2852. "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
  2853. "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
  2854. "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
  2855. "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
  2856. "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
  2857. "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
  2858. "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
  2859. "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
  2860. "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
  2861. "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
  2862. "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
  2863. "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
  2864. "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
  2865. "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
  2866. "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
  2867. "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
  2868. "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
  2869. "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
  2870. "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
  2871. "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
  2872. "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
  2873. "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
  2874. "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
  2875. "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
  2876. "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
  2877. "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
  2878. "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
  2879. "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
  2880. "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
  2881. "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
  2882. "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
  2883. "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
  2884. "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
  2885. "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
  2886. "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
  2887. "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
  2888. "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
  2889. "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
  2890. "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
  2891. .ilen = 496,
  2892. .result = "\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. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  2901. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  2902. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  2903. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  2904. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  2905. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  2906. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  2907. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  2908. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  2909. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  2910. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  2911. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  2912. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  2913. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  2914. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  2915. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  2916. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  2917. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  2918. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  2919. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  2920. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  2921. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  2922. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  2923. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  2924. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  2925. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  2926. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  2927. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  2928. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  2929. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  2930. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  2931. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  2932. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  2933. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  2934. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  2935. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  2936. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  2937. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  2938. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  2939. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  2940. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  2941. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  2942. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  2943. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  2944. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  2945. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  2946. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  2947. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  2948. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  2949. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  2950. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  2951. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  2952. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  2953. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  2954. .rlen = 496,
  2955. },
  2956. };
  2957. static struct cipher_testvec tf_cbc_enc_tv_template[] = {
  2958. { /* Generated with Nettle */
  2959. .key = zeroed_string,
  2960. .klen = 16,
  2961. .iv = zeroed_string,
  2962. .input = zeroed_string,
  2963. .ilen = 16,
  2964. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2965. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2966. .rlen = 16,
  2967. }, {
  2968. .key = zeroed_string,
  2969. .klen = 16,
  2970. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2971. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2972. .input = zeroed_string,
  2973. .ilen = 16,
  2974. .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2975. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2976. .rlen = 16,
  2977. }, {
  2978. .key = zeroed_string,
  2979. .klen = 16,
  2980. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2981. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2982. .input = zeroed_string,
  2983. .ilen = 16,
  2984. .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2985. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2986. .rlen = 16,
  2987. }, {
  2988. .key = zeroed_string,
  2989. .klen = 16,
  2990. .iv = zeroed_string,
  2991. .input = zeroed_string,
  2992. .ilen = 48,
  2993. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2994. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2995. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2996. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2997. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2998. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2999. .rlen = 48,
  3000. }, { /* Generated with Crypto++ */
  3001. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3002. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3003. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3004. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3005. .klen = 32,
  3006. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3007. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3008. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3009. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3010. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3011. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3012. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3013. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3014. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3015. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3016. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3017. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3018. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3019. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3020. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3021. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3022. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3023. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3024. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3025. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3026. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3027. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3028. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3029. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3030. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3031. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3032. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3033. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3034. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3035. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3036. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3037. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3038. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3039. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3040. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3041. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3042. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3043. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3044. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3045. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3046. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3047. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3048. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3049. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3050. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3051. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3052. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3053. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3054. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3055. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3056. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3057. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3058. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3059. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3060. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3061. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3062. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3063. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3064. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3065. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3066. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3067. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3068. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3069. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  3070. .ilen = 496,
  3071. .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
  3072. "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
  3073. "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
  3074. "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
  3075. "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
  3076. "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
  3077. "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
  3078. "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
  3079. "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
  3080. "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
  3081. "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
  3082. "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
  3083. "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
  3084. "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
  3085. "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
  3086. "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
  3087. "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
  3088. "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
  3089. "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
  3090. "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
  3091. "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
  3092. "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
  3093. "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
  3094. "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
  3095. "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
  3096. "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
  3097. "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
  3098. "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
  3099. "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
  3100. "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
  3101. "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
  3102. "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
  3103. "\x75\x42\x62\x04\x31\x1F\x95\x7C"
  3104. "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
  3105. "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
  3106. "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
  3107. "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
  3108. "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
  3109. "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
  3110. "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
  3111. "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
  3112. "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
  3113. "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
  3114. "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
  3115. "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
  3116. "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
  3117. "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
  3118. "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
  3119. "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
  3120. "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
  3121. "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
  3122. "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
  3123. "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
  3124. "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
  3125. "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
  3126. "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
  3127. "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
  3128. "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
  3129. "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
  3130. "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
  3131. "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
  3132. "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
  3133. .rlen = 496,
  3134. },
  3135. };
  3136. static struct cipher_testvec tf_cbc_dec_tv_template[] = {
  3137. { /* Reverse of the first four above */
  3138. .key = zeroed_string,
  3139. .klen = 16,
  3140. .iv = zeroed_string,
  3141. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  3142. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  3143. .ilen = 16,
  3144. .result = zeroed_string,
  3145. .rlen = 16,
  3146. }, {
  3147. .key = zeroed_string,
  3148. .klen = 16,
  3149. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  3150. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  3151. .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  3152. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  3153. .ilen = 16,
  3154. .result = zeroed_string,
  3155. .rlen = 16,
  3156. }, {
  3157. .key = zeroed_string,
  3158. .klen = 16,
  3159. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  3160. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  3161. .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  3162. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  3163. .ilen = 16,
  3164. .result = zeroed_string,
  3165. .rlen = 16,
  3166. }, {
  3167. .key = zeroed_string,
  3168. .klen = 16,
  3169. .iv = zeroed_string,
  3170. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  3171. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  3172. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  3173. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  3174. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  3175. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  3176. .ilen = 48,
  3177. .result = zeroed_string,
  3178. .rlen = 48,
  3179. }, { /* Generated with Crypto++ */
  3180. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3181. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3182. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3183. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3184. .klen = 32,
  3185. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3186. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3187. .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
  3188. "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
  3189. "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
  3190. "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
  3191. "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
  3192. "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
  3193. "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
  3194. "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
  3195. "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
  3196. "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
  3197. "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
  3198. "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
  3199. "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
  3200. "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
  3201. "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
  3202. "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
  3203. "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
  3204. "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
  3205. "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
  3206. "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
  3207. "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
  3208. "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
  3209. "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
  3210. "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
  3211. "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
  3212. "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
  3213. "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
  3214. "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
  3215. "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
  3216. "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
  3217. "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
  3218. "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
  3219. "\x75\x42\x62\x04\x31\x1F\x95\x7C"
  3220. "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
  3221. "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
  3222. "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
  3223. "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
  3224. "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
  3225. "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
  3226. "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
  3227. "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
  3228. "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
  3229. "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
  3230. "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
  3231. "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
  3232. "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
  3233. "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
  3234. "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
  3235. "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
  3236. "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
  3237. "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
  3238. "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
  3239. "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
  3240. "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
  3241. "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
  3242. "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
  3243. "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
  3244. "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
  3245. "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
  3246. "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
  3247. "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
  3248. "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
  3249. .ilen = 496,
  3250. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3251. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3252. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3253. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3254. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3255. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3256. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3257. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3258. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3259. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3260. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3261. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3262. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3263. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3264. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3265. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3266. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3267. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3268. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3269. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3270. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3271. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3272. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3273. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3274. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3275. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3276. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3277. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3278. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3279. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3280. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3281. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3282. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3283. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3284. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3285. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3286. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3287. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3288. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3289. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3290. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3291. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3292. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3293. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3294. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3295. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3296. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3297. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3298. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3299. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3300. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3301. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3302. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3303. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3304. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3305. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3306. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3307. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3308. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3309. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3310. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3311. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  3312. .rlen = 496,
  3313. },
  3314. };
  3315. static struct cipher_testvec tf_ctr_enc_tv_template[] = {
  3316. { /* Generated with Crypto++ */
  3317. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3318. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3319. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3320. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3321. .klen = 32,
  3322. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3323. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3324. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3325. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3326. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3327. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3328. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3329. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3330. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3331. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3332. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3333. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3334. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3335. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3336. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3337. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3338. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3339. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3340. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3341. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3342. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3343. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3344. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3345. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3346. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3347. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3348. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3349. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3350. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3351. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3352. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3353. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3354. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3355. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3356. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3357. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3358. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3359. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3360. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3361. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3362. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3363. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3364. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3365. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3366. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3367. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3368. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3369. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3370. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3371. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3372. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3373. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3374. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3375. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3376. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3377. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3378. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3379. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3380. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3381. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3382. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3383. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3384. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3385. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  3386. .ilen = 496,
  3387. .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  3388. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  3389. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  3390. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  3391. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  3392. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  3393. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  3394. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  3395. "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
  3396. "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
  3397. "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
  3398. "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
  3399. "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
  3400. "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
  3401. "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
  3402. "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
  3403. "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
  3404. "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
  3405. "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
  3406. "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
  3407. "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
  3408. "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
  3409. "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
  3410. "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
  3411. "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
  3412. "\x23\x61\x48\xEA\x80\x04\x27\xAA"
  3413. "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
  3414. "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
  3415. "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
  3416. "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
  3417. "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
  3418. "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
  3419. "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
  3420. "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
  3421. "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
  3422. "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
  3423. "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
  3424. "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
  3425. "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
  3426. "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
  3427. "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
  3428. "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
  3429. "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
  3430. "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
  3431. "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
  3432. "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
  3433. "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
  3434. "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
  3435. "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
  3436. "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
  3437. "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
  3438. "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
  3439. "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
  3440. "\x11\xE9\x43\x83\x76\xAA\x53\x37"
  3441. "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
  3442. "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
  3443. "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
  3444. "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
  3445. "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
  3446. "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
  3447. "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
  3448. "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
  3449. .rlen = 496,
  3450. }, { /* Generated with Crypto++ */
  3451. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3452. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3453. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3454. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3455. .klen = 32,
  3456. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3457. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3458. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3459. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3460. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3461. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3462. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3463. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3464. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3465. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3466. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3467. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3468. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3469. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3470. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3471. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3472. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3473. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3474. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3475. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3476. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3477. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3478. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3479. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3480. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3481. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3482. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3483. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3484. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3485. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3486. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3487. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3488. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3489. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3490. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3491. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3492. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3493. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3494. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3495. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3496. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3497. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3498. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3499. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3500. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3501. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3502. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3503. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3504. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3505. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3506. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3507. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3508. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3509. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3510. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3511. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3512. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3513. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3514. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3515. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3516. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3517. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3518. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3519. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
  3520. "\x2B\xC2\x59",
  3521. .ilen = 499,
  3522. .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  3523. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  3524. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  3525. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  3526. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  3527. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  3528. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  3529. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  3530. "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
  3531. "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
  3532. "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
  3533. "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
  3534. "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
  3535. "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
  3536. "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
  3537. "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
  3538. "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
  3539. "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
  3540. "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
  3541. "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
  3542. "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
  3543. "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
  3544. "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
  3545. "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
  3546. "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
  3547. "\x23\x61\x48\xEA\x80\x04\x27\xAA"
  3548. "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
  3549. "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
  3550. "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
  3551. "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
  3552. "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
  3553. "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
  3554. "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
  3555. "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
  3556. "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
  3557. "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
  3558. "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
  3559. "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
  3560. "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
  3561. "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
  3562. "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
  3563. "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
  3564. "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
  3565. "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
  3566. "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
  3567. "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
  3568. "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
  3569. "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
  3570. "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
  3571. "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
  3572. "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
  3573. "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
  3574. "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
  3575. "\x11\xE9\x43\x83\x76\xAA\x53\x37"
  3576. "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
  3577. "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
  3578. "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
  3579. "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
  3580. "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
  3581. "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
  3582. "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
  3583. "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
  3584. "\x6C\x82\x9D",
  3585. .rlen = 499,
  3586. },
  3587. };
  3588. static struct cipher_testvec tf_ctr_dec_tv_template[] = {
  3589. { /* Generated with Crypto++ */
  3590. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3591. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3592. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3593. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3594. .klen = 32,
  3595. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3596. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3597. .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  3598. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  3599. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  3600. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  3601. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  3602. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  3603. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  3604. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  3605. "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
  3606. "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
  3607. "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
  3608. "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
  3609. "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
  3610. "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
  3611. "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
  3612. "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
  3613. "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
  3614. "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
  3615. "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
  3616. "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
  3617. "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
  3618. "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
  3619. "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
  3620. "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
  3621. "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
  3622. "\x23\x61\x48\xEA\x80\x04\x27\xAA"
  3623. "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
  3624. "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
  3625. "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
  3626. "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
  3627. "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
  3628. "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
  3629. "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
  3630. "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
  3631. "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
  3632. "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
  3633. "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
  3634. "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
  3635. "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
  3636. "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
  3637. "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
  3638. "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
  3639. "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
  3640. "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
  3641. "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
  3642. "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
  3643. "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
  3644. "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
  3645. "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
  3646. "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
  3647. "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
  3648. "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
  3649. "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
  3650. "\x11\xE9\x43\x83\x76\xAA\x53\x37"
  3651. "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
  3652. "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
  3653. "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
  3654. "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
  3655. "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
  3656. "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
  3657. "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
  3658. "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
  3659. .ilen = 496,
  3660. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3661. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3662. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3663. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3664. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3665. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3666. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3667. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3668. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3669. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3670. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3671. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3672. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3673. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3674. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3675. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3676. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3677. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3678. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3679. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3680. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3681. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3682. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3683. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3684. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3685. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3686. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3687. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3688. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3689. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3690. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3691. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3692. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3693. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3694. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3695. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3696. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3697. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3698. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3699. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3700. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3701. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3702. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3703. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3704. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3705. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3706. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3707. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3708. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3709. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3710. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3711. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3712. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3713. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3714. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3715. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3716. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3717. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3718. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3719. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3720. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3721. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  3722. .rlen = 496,
  3723. }, { /* Generated with Crypto++ */
  3724. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3725. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3726. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3727. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3728. .klen = 32,
  3729. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3730. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3731. .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  3732. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  3733. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  3734. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  3735. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  3736. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  3737. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  3738. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  3739. "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
  3740. "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
  3741. "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
  3742. "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
  3743. "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
  3744. "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
  3745. "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
  3746. "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
  3747. "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
  3748. "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
  3749. "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
  3750. "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
  3751. "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
  3752. "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
  3753. "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
  3754. "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
  3755. "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
  3756. "\x23\x61\x48\xEA\x80\x04\x27\xAA"
  3757. "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
  3758. "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
  3759. "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
  3760. "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
  3761. "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
  3762. "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
  3763. "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
  3764. "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
  3765. "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
  3766. "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
  3767. "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
  3768. "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
  3769. "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
  3770. "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
  3771. "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
  3772. "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
  3773. "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
  3774. "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
  3775. "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
  3776. "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
  3777. "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
  3778. "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
  3779. "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
  3780. "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
  3781. "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
  3782. "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
  3783. "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
  3784. "\x11\xE9\x43\x83\x76\xAA\x53\x37"
  3785. "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
  3786. "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
  3787. "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
  3788. "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
  3789. "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
  3790. "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
  3791. "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
  3792. "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
  3793. "\x6C\x82\x9D",
  3794. .ilen = 499,
  3795. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3796. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3797. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3798. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3799. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3800. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3801. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3802. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3803. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3804. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3805. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3806. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3807. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3808. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3809. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3810. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3811. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3812. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3813. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3814. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3815. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3816. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3817. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3818. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3819. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3820. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3821. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3822. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3823. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3824. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3825. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3826. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3827. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3828. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3829. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3830. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3831. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3832. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3833. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3834. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3835. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3836. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3837. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3838. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3839. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3840. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3841. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3842. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3843. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3844. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3845. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3846. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3847. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3848. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3849. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3850. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3851. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3852. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3853. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3854. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3855. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3856. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
  3857. "\x2B\xC2\x59",
  3858. .rlen = 499,
  3859. },
  3860. };
  3861. static struct cipher_testvec tf_lrw_enc_tv_template[] = {
  3862. /* Generated from AES-LRW test vectors */
  3863. {
  3864. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3865. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3866. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3867. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3868. .klen = 32,
  3869. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3870. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3871. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3872. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3873. .ilen = 16,
  3874. .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
  3875. "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
  3876. .rlen = 16,
  3877. }, {
  3878. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3879. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3880. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3881. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3882. .klen = 32,
  3883. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3884. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3885. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3886. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3887. .ilen = 16,
  3888. .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
  3889. "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
  3890. .rlen = 16,
  3891. }, {
  3892. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3893. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3894. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3895. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3896. .klen = 32,
  3897. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3898. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3899. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3900. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3901. .ilen = 16,
  3902. .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
  3903. "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
  3904. .rlen = 16,
  3905. }, {
  3906. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3907. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3908. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3909. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3910. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3911. .klen = 40,
  3912. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3913. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3914. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3915. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3916. .ilen = 16,
  3917. .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
  3918. "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
  3919. .rlen = 16,
  3920. }, {
  3921. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3922. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3923. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3924. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3925. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3926. .klen = 40,
  3927. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3928. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3929. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3930. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3931. .ilen = 16,
  3932. .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
  3933. "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
  3934. .rlen = 16,
  3935. }, {
  3936. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3937. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3938. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3939. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3940. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3941. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3942. .klen = 48,
  3943. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3944. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3945. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3946. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3947. .ilen = 16,
  3948. .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
  3949. "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
  3950. .rlen = 16,
  3951. }, {
  3952. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3953. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3954. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3955. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3956. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3957. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3958. .klen = 48,
  3959. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3960. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3961. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3962. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3963. .ilen = 16,
  3964. .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
  3965. "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
  3966. .rlen = 16,
  3967. }, {
  3968. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3969. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3970. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3971. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3972. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3973. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3974. .klen = 48,
  3975. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3976. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3977. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3978. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3979. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3980. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3981. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3982. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3983. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3984. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3985. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3986. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3987. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3988. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3989. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3990. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3991. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3992. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3993. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3994. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3995. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3996. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3997. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3998. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3999. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  4000. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  4001. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  4002. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  4003. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  4004. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  4005. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  4006. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  4007. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  4008. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  4009. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  4010. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  4011. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  4012. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  4013. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  4014. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  4015. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  4016. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  4017. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  4018. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  4019. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  4020. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  4021. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  4022. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  4023. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  4024. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  4025. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  4026. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  4027. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  4028. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  4029. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  4030. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  4031. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  4032. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  4033. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  4034. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  4035. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  4036. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  4037. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  4038. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  4039. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  4040. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  4041. .ilen = 512,
  4042. .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
  4043. "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
  4044. "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
  4045. "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
  4046. "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
  4047. "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
  4048. "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
  4049. "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
  4050. "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
  4051. "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
  4052. "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
  4053. "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
  4054. "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
  4055. "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
  4056. "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
  4057. "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
  4058. "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
  4059. "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
  4060. "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
  4061. "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
  4062. "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
  4063. "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
  4064. "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
  4065. "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
  4066. "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
  4067. "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
  4068. "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
  4069. "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
  4070. "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
  4071. "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
  4072. "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
  4073. "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
  4074. "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
  4075. "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
  4076. "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
  4077. "\x3e\xae\x71\x90\x07\x70\x1c\x38"
  4078. "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
  4079. "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
  4080. "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
  4081. "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
  4082. "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
  4083. "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
  4084. "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
  4085. "\x93\x51\x1d\x3d\x62\x59\x83\x82"
  4086. "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
  4087. "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
  4088. "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
  4089. "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
  4090. "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
  4091. "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
  4092. "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
  4093. "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
  4094. "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
  4095. "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
  4096. "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
  4097. "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
  4098. "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
  4099. "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
  4100. "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
  4101. "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
  4102. "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
  4103. "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
  4104. "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
  4105. "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
  4106. .rlen = 512,
  4107. },
  4108. };
  4109. static struct cipher_testvec tf_lrw_dec_tv_template[] = {
  4110. /* Generated from AES-LRW test vectors */
  4111. /* same as enc vectors with input and result reversed */
  4112. {
  4113. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  4114. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  4115. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  4116. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  4117. .klen = 32,
  4118. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4119. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4120. .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
  4121. "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
  4122. .ilen = 16,
  4123. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4124. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4125. .rlen = 16,
  4126. }, {
  4127. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  4128. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  4129. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  4130. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  4131. .klen = 32,
  4132. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4133. "\x00\x00\x00\x00\x00\x00\x00\x02",
  4134. .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
  4135. "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
  4136. .ilen = 16,
  4137. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4138. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4139. .rlen = 16,
  4140. }, {
  4141. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  4142. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  4143. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  4144. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  4145. .klen = 32,
  4146. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4147. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4148. .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
  4149. "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
  4150. .ilen = 16,
  4151. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4152. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4153. .rlen = 16,
  4154. }, {
  4155. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  4156. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  4157. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  4158. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  4159. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  4160. .klen = 40,
  4161. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4162. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4163. .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
  4164. "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
  4165. .ilen = 16,
  4166. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4167. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4168. .rlen = 16,
  4169. }, {
  4170. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  4171. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  4172. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  4173. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  4174. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  4175. .klen = 40,
  4176. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4177. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4178. .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
  4179. "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
  4180. .ilen = 16,
  4181. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4182. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4183. .rlen = 16,
  4184. }, {
  4185. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  4186. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  4187. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  4188. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  4189. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  4190. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  4191. .klen = 48,
  4192. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4193. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4194. .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
  4195. "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
  4196. .ilen = 16,
  4197. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4198. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4199. .rlen = 16,
  4200. }, {
  4201. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  4202. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  4203. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  4204. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  4205. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  4206. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  4207. .klen = 48,
  4208. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4209. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4210. .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
  4211. "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
  4212. .ilen = 16,
  4213. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4214. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4215. .rlen = 16,
  4216. }, {
  4217. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  4218. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  4219. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  4220. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  4221. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  4222. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  4223. .klen = 48,
  4224. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4225. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4226. .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
  4227. "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
  4228. "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
  4229. "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
  4230. "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
  4231. "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
  4232. "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
  4233. "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
  4234. "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
  4235. "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
  4236. "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
  4237. "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
  4238. "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
  4239. "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
  4240. "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
  4241. "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
  4242. "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
  4243. "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
  4244. "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
  4245. "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
  4246. "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
  4247. "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
  4248. "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
  4249. "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
  4250. "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
  4251. "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
  4252. "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
  4253. "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
  4254. "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
  4255. "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
  4256. "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
  4257. "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
  4258. "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
  4259. "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
  4260. "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
  4261. "\x3e\xae\x71\x90\x07\x70\x1c\x38"
  4262. "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
  4263. "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
  4264. "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
  4265. "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
  4266. "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
  4267. "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
  4268. "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
  4269. "\x93\x51\x1d\x3d\x62\x59\x83\x82"
  4270. "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
  4271. "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
  4272. "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
  4273. "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
  4274. "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
  4275. "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
  4276. "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
  4277. "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
  4278. "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
  4279. "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
  4280. "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
  4281. "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
  4282. "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
  4283. "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
  4284. "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
  4285. "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
  4286. "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
  4287. "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
  4288. "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
  4289. "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
  4290. .ilen = 512,
  4291. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  4292. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  4293. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  4294. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  4295. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  4296. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  4297. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  4298. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  4299. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  4300. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  4301. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  4302. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  4303. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  4304. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  4305. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  4306. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  4307. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  4308. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  4309. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  4310. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  4311. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  4312. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  4313. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  4314. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  4315. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  4316. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  4317. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  4318. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  4319. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  4320. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  4321. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  4322. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  4323. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  4324. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  4325. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  4326. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  4327. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  4328. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  4329. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  4330. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  4331. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  4332. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  4333. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  4334. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  4335. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  4336. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  4337. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  4338. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  4339. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  4340. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  4341. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  4342. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  4343. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  4344. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  4345. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  4346. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  4347. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  4348. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  4349. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  4350. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  4351. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  4352. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  4353. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  4354. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  4355. .rlen = 512,
  4356. },
  4357. };
  4358. static struct cipher_testvec tf_xts_enc_tv_template[] = {
  4359. /* Generated from AES-XTS test vectors */
  4360. {
  4361. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4362. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4363. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4364. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4365. .klen = 32,
  4366. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4367. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4368. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4369. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4370. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4371. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4372. .ilen = 32,
  4373. .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
  4374. "\x30\x74\xe4\x44\x52\x77\x97\x43"
  4375. "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
  4376. "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
  4377. .rlen = 32,
  4378. }, {
  4379. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  4380. "\x11\x11\x11\x11\x11\x11\x11\x11"
  4381. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4382. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4383. .klen = 32,
  4384. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4385. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4386. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4387. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4388. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4389. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4390. .ilen = 32,
  4391. .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
  4392. "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
  4393. "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
  4394. "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
  4395. .rlen = 32,
  4396. }, {
  4397. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  4398. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  4399. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4400. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4401. .klen = 32,
  4402. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4403. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4404. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4405. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4406. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4407. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4408. .ilen = 32,
  4409. .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
  4410. "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
  4411. "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
  4412. "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
  4413. .rlen = 32,
  4414. }, {
  4415. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4416. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4417. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4418. "\x23\x84\x62\x64\x33\x83\x27\x95",
  4419. .klen = 32,
  4420. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4421. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4422. .input = "\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. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4427. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4428. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4429. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4430. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4431. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4432. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4433. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4434. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4435. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4436. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4437. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4438. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4439. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4440. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4441. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4442. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4443. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4444. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4445. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4446. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4447. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4448. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4449. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4450. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4451. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4452. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4453. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4454. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4455. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4456. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4457. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4458. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4459. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4460. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4461. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4462. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4463. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4464. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4465. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4466. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4467. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4468. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4469. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4470. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4471. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4472. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4473. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4474. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4475. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4476. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4477. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4478. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4479. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4480. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4481. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4482. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4483. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4484. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4485. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4486. .ilen = 512,
  4487. .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
  4488. "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
  4489. "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
  4490. "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
  4491. "\xea\x35\x35\x8c\xb2\x46\x61\x06"
  4492. "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
  4493. "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
  4494. "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
  4495. "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
  4496. "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
  4497. "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
  4498. "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
  4499. "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
  4500. "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
  4501. "\x01\x73\x68\x32\x25\x19\xfa\xfb"
  4502. "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
  4503. "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
  4504. "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
  4505. "\x39\x80\x39\x09\x97\x65\xf2\x83"
  4506. "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
  4507. "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
  4508. "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
  4509. "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
  4510. "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
  4511. "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
  4512. "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
  4513. "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
  4514. "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
  4515. "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
  4516. "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
  4517. "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
  4518. "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
  4519. "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
  4520. "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
  4521. "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
  4522. "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
  4523. "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
  4524. "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
  4525. "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
  4526. "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
  4527. "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
  4528. "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
  4529. "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
  4530. "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
  4531. "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
  4532. "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
  4533. "\x04\x39\x73\x32\xb2\x86\x79\xe7"
  4534. "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
  4535. "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
  4536. "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
  4537. "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
  4538. "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
  4539. "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
  4540. "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
  4541. "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
  4542. "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
  4543. "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
  4544. "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
  4545. "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
  4546. "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
  4547. "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
  4548. "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
  4549. "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
  4550. "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
  4551. .rlen = 512,
  4552. }, {
  4553. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4554. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4555. "\x62\x49\x77\x57\x24\x70\x93\x69"
  4556. "\x99\x59\x57\x49\x66\x96\x76\x27"
  4557. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4558. "\x23\x84\x62\x64\x33\x83\x27\x95"
  4559. "\x02\x88\x41\x97\x16\x93\x99\x37"
  4560. "\x51\x05\x82\x09\x74\x94\x45\x92",
  4561. .klen = 64,
  4562. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  4563. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4564. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4565. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4566. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4567. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4568. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4569. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4570. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4571. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4572. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4573. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4574. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4575. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4576. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4577. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4578. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4579. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4580. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4581. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4582. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4583. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4584. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4585. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4586. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4587. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4588. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4589. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4590. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4591. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4592. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4593. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4594. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4595. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4596. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4597. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4598. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4599. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4600. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4601. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4602. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4603. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4604. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4605. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4606. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4607. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4608. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4609. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4610. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4611. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4612. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4613. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4614. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4615. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4616. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4617. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4618. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4619. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4620. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4621. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4622. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4623. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4624. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4625. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4626. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4627. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4628. .ilen = 512,
  4629. .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
  4630. "\x35\x39\x71\x88\x76\x1e\xc9\xea"
  4631. "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
  4632. "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
  4633. "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
  4634. "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
  4635. "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
  4636. "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
  4637. "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
  4638. "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
  4639. "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
  4640. "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
  4641. "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
  4642. "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
  4643. "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
  4644. "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
  4645. "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
  4646. "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
  4647. "\x69\x35\x61\x86\xf8\x86\xb9\x89"
  4648. "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
  4649. "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
  4650. "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
  4651. "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
  4652. "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
  4653. "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
  4654. "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
  4655. "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
  4656. "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
  4657. "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
  4658. "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
  4659. "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
  4660. "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
  4661. "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
  4662. "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
  4663. "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
  4664. "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
  4665. "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
  4666. "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
  4667. "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
  4668. "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
  4669. "\xad\x12\x32\x31\x03\xf7\x21\xbe"
  4670. "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
  4671. "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
  4672. "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
  4673. "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
  4674. "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
  4675. "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
  4676. "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
  4677. "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
  4678. "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
  4679. "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
  4680. "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
  4681. "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
  4682. "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
  4683. "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
  4684. "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
  4685. "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
  4686. "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
  4687. "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
  4688. "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
  4689. "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
  4690. "\xf3\xea\x67\x52\x78\xc2\xce\x70"
  4691. "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
  4692. "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
  4693. .rlen = 512,
  4694. },
  4695. };
  4696. static struct cipher_testvec tf_xts_dec_tv_template[] = {
  4697. /* Generated from AES-XTS test vectors */
  4698. /* same as enc vectors with input and result reversed */
  4699. {
  4700. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4701. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4702. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4703. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4704. .klen = 32,
  4705. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4706. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4707. .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
  4708. "\x30\x74\xe4\x44\x52\x77\x97\x43"
  4709. "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
  4710. "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
  4711. .ilen = 32,
  4712. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4713. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4714. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4715. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4716. .rlen = 32,
  4717. }, {
  4718. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  4719. "\x11\x11\x11\x11\x11\x11\x11\x11"
  4720. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4721. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4722. .klen = 32,
  4723. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4724. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4725. .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
  4726. "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
  4727. "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
  4728. "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
  4729. .ilen = 32,
  4730. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4731. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4732. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4733. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4734. .rlen = 32,
  4735. }, {
  4736. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  4737. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  4738. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4739. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4740. .klen = 32,
  4741. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4742. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4743. .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
  4744. "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
  4745. "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
  4746. "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
  4747. .ilen = 32,
  4748. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4749. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4750. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4751. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4752. .rlen = 32,
  4753. }, {
  4754. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4755. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4756. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4757. "\x23\x84\x62\x64\x33\x83\x27\x95",
  4758. .klen = 32,
  4759. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4760. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4761. .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
  4762. "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
  4763. "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
  4764. "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
  4765. "\xea\x35\x35\x8c\xb2\x46\x61\x06"
  4766. "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
  4767. "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
  4768. "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
  4769. "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
  4770. "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
  4771. "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
  4772. "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
  4773. "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
  4774. "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
  4775. "\x01\x73\x68\x32\x25\x19\xfa\xfb"
  4776. "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
  4777. "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
  4778. "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
  4779. "\x39\x80\x39\x09\x97\x65\xf2\x83"
  4780. "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
  4781. "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
  4782. "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
  4783. "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
  4784. "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
  4785. "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
  4786. "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
  4787. "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
  4788. "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
  4789. "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
  4790. "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
  4791. "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
  4792. "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
  4793. "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
  4794. "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
  4795. "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
  4796. "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
  4797. "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
  4798. "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
  4799. "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
  4800. "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
  4801. "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
  4802. "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
  4803. "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
  4804. "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
  4805. "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
  4806. "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
  4807. "\x04\x39\x73\x32\xb2\x86\x79\xe7"
  4808. "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
  4809. "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
  4810. "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
  4811. "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
  4812. "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
  4813. "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
  4814. "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
  4815. "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
  4816. "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
  4817. "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
  4818. "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
  4819. "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
  4820. "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
  4821. "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
  4822. "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
  4823. "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
  4824. "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
  4825. .ilen = 512,
  4826. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4827. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4828. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4829. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4830. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4831. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4832. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4833. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4834. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4835. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4836. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4837. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4838. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4839. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4840. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4841. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4842. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4843. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4844. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4845. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4846. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4847. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4848. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4849. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4850. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4851. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4852. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4853. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4854. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4855. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4856. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4857. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4858. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4859. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4860. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4861. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4862. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4863. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4864. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4865. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4866. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4867. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4868. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4869. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4870. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4871. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4872. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4873. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4874. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4875. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4876. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4877. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4878. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4879. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4880. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4881. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4882. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4883. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4884. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4885. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4886. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4887. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4888. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4889. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4890. .rlen = 512,
  4891. }, {
  4892. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4893. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4894. "\x62\x49\x77\x57\x24\x70\x93\x69"
  4895. "\x99\x59\x57\x49\x66\x96\x76\x27"
  4896. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4897. "\x23\x84\x62\x64\x33\x83\x27\x95"
  4898. "\x02\x88\x41\x97\x16\x93\x99\x37"
  4899. "\x51\x05\x82\x09\x74\x94\x45\x92",
  4900. .klen = 64,
  4901. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  4902. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4903. .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
  4904. "\x35\x39\x71\x88\x76\x1e\xc9\xea"
  4905. "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
  4906. "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
  4907. "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
  4908. "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
  4909. "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
  4910. "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
  4911. "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
  4912. "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
  4913. "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
  4914. "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
  4915. "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
  4916. "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
  4917. "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
  4918. "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
  4919. "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
  4920. "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
  4921. "\x69\x35\x61\x86\xf8\x86\xb9\x89"
  4922. "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
  4923. "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
  4924. "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
  4925. "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
  4926. "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
  4927. "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
  4928. "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
  4929. "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
  4930. "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
  4931. "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
  4932. "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
  4933. "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
  4934. "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
  4935. "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
  4936. "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
  4937. "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
  4938. "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
  4939. "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
  4940. "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
  4941. "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
  4942. "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
  4943. "\xad\x12\x32\x31\x03\xf7\x21\xbe"
  4944. "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
  4945. "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
  4946. "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
  4947. "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
  4948. "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
  4949. "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
  4950. "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
  4951. "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
  4952. "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
  4953. "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
  4954. "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
  4955. "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
  4956. "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
  4957. "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
  4958. "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
  4959. "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
  4960. "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
  4961. "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
  4962. "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
  4963. "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
  4964. "\xf3\xea\x67\x52\x78\xc2\xce\x70"
  4965. "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
  4966. "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
  4967. .ilen = 512,
  4968. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4969. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4970. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4971. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4972. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4973. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4974. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4975. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4976. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4977. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4978. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4979. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4980. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4981. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4982. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4983. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4984. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4985. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4986. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4987. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4988. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4989. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4990. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4991. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4992. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4993. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4994. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4995. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4996. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4997. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4998. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4999. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  5000. "\x00\x01\x02\x03\x04\x05\x06\x07"
  5001. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5002. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5003. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5004. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5005. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5006. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5007. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5008. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5009. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5010. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5011. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5012. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5013. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5014. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5015. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5016. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5017. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5018. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5019. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5020. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5021. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5022. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5023. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5024. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5025. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5026. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5027. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5028. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5029. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5030. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5031. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  5032. .rlen = 512,
  5033. },
  5034. };
  5035. /*
  5036. * Serpent test vectors. These are backwards because Serpent writes
  5037. * octet sequences in right-to-left mode.
  5038. */
  5039. #define SERPENT_ENC_TEST_VECTORS 5
  5040. #define SERPENT_DEC_TEST_VECTORS 5
  5041. #define TNEPRES_ENC_TEST_VECTORS 4
  5042. #define TNEPRES_DEC_TEST_VECTORS 4
  5043. #define SERPENT_CBC_ENC_TEST_VECTORS 1
  5044. #define SERPENT_CBC_DEC_TEST_VECTORS 1
  5045. #define SERPENT_CTR_ENC_TEST_VECTORS 2
  5046. #define SERPENT_CTR_DEC_TEST_VECTORS 2
  5047. #define SERPENT_LRW_ENC_TEST_VECTORS 8
  5048. #define SERPENT_LRW_DEC_TEST_VECTORS 8
  5049. #define SERPENT_XTS_ENC_TEST_VECTORS 5
  5050. #define SERPENT_XTS_DEC_TEST_VECTORS 5
  5051. static struct cipher_testvec serpent_enc_tv_template[] = {
  5052. {
  5053. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5054. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5055. .ilen = 16,
  5056. .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  5057. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  5058. .rlen = 16,
  5059. }, {
  5060. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5061. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5062. .klen = 16,
  5063. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5064. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5065. .ilen = 16,
  5066. .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  5067. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  5068. .rlen = 16,
  5069. }, {
  5070. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5071. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5072. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5073. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5074. .klen = 32,
  5075. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5076. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5077. .ilen = 16,
  5078. .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  5079. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  5080. .rlen = 16,
  5081. }, {
  5082. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  5083. .klen = 16,
  5084. .input = zeroed_string,
  5085. .ilen = 16,
  5086. .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  5087. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  5088. .rlen = 16,
  5089. }, { /* Generated with Crypto++ */
  5090. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5091. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5092. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5093. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5094. .klen = 32,
  5095. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5096. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5097. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5098. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5099. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5100. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5101. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5102. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5103. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5104. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5105. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5106. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5107. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5108. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5109. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5110. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5111. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5112. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5113. .ilen = 144,
  5114. .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
  5115. "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
  5116. "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
  5117. "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
  5118. "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
  5119. "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
  5120. "\x99\x34\x89\x5B\x54\xE9\x12\x13"
  5121. "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
  5122. "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
  5123. "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
  5124. "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
  5125. "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
  5126. "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
  5127. "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
  5128. "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
  5129. "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
  5130. "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
  5131. "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
  5132. .rlen = 144,
  5133. },
  5134. };
  5135. static struct cipher_testvec tnepres_enc_tv_template[] = {
  5136. { /* KeySize=128, PT=0, I=1 */
  5137. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5138. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5139. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  5140. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5141. .klen = 16,
  5142. .ilen = 16,
  5143. .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
  5144. "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
  5145. .rlen = 16,
  5146. }, { /* KeySize=192, PT=0, I=1 */
  5147. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  5148. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5149. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5150. .klen = 24,
  5151. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5152. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5153. .ilen = 16,
  5154. .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
  5155. "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
  5156. .rlen = 16,
  5157. }, { /* KeySize=256, PT=0, I=1 */
  5158. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  5159. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5160. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5161. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5162. .klen = 32,
  5163. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5164. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5165. .ilen = 16,
  5166. .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
  5167. "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
  5168. .rlen = 16,
  5169. }, { /* KeySize=256, I=257 */
  5170. .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
  5171. "\x17\x16\x15\x14\x13\x12\x11\x10"
  5172. "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  5173. "\x07\x06\x05\x04\x03\x02\x01\x00",
  5174. .klen = 32,
  5175. .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  5176. "\x07\x06\x05\x04\x03\x02\x01\x00",
  5177. .ilen = 16,
  5178. .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
  5179. "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
  5180. .rlen = 16,
  5181. },
  5182. };
  5183. static struct cipher_testvec serpent_dec_tv_template[] = {
  5184. {
  5185. .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  5186. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  5187. .ilen = 16,
  5188. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5189. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5190. .rlen = 16,
  5191. }, {
  5192. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5193. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5194. .klen = 16,
  5195. .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  5196. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  5197. .ilen = 16,
  5198. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5199. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5200. .rlen = 16,
  5201. }, {
  5202. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5203. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5204. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5205. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5206. .klen = 32,
  5207. .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  5208. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  5209. .ilen = 16,
  5210. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5211. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5212. .rlen = 16,
  5213. }, {
  5214. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  5215. .klen = 16,
  5216. .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  5217. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  5218. .ilen = 16,
  5219. .result = zeroed_string,
  5220. .rlen = 16,
  5221. }, { /* Generated with Crypto++ */
  5222. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5223. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5224. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5225. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5226. .klen = 32,
  5227. .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
  5228. "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
  5229. "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
  5230. "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
  5231. "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
  5232. "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
  5233. "\x99\x34\x89\x5B\x54\xE9\x12\x13"
  5234. "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
  5235. "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
  5236. "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
  5237. "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
  5238. "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
  5239. "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
  5240. "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
  5241. "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
  5242. "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
  5243. "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
  5244. "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
  5245. .ilen = 144,
  5246. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5247. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5248. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5249. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5250. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5251. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5252. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5253. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5254. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5255. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5256. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5257. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5258. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5259. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5260. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5261. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5262. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5263. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5264. .rlen = 144,
  5265. },
  5266. };
  5267. static struct cipher_testvec tnepres_dec_tv_template[] = {
  5268. {
  5269. .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
  5270. "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
  5271. .ilen = 16,
  5272. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5273. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5274. .rlen = 16,
  5275. }, {
  5276. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5277. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5278. .klen = 16,
  5279. .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
  5280. "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
  5281. .ilen = 16,
  5282. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5283. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5284. .rlen = 16,
  5285. }, {
  5286. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5287. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5288. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5289. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5290. .klen = 32,
  5291. .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
  5292. "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
  5293. .ilen = 16,
  5294. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5295. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5296. .rlen = 16,
  5297. }, { /* KeySize=128, I=121 */
  5298. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  5299. .klen = 16,
  5300. .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
  5301. "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
  5302. .ilen = 16,
  5303. .result = zeroed_string,
  5304. .rlen = 16,
  5305. },
  5306. };
  5307. static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
  5308. { /* Generated with Crypto++ */
  5309. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5310. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5311. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5312. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5313. .klen = 32,
  5314. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5315. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5316. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5317. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5318. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5319. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5320. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5321. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5322. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5323. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5324. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5325. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5326. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5327. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5328. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5329. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5330. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5331. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5332. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5333. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5334. .ilen = 144,
  5335. .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
  5336. "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
  5337. "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
  5338. "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
  5339. "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
  5340. "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
  5341. "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
  5342. "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
  5343. "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
  5344. "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
  5345. "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
  5346. "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
  5347. "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
  5348. "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
  5349. "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
  5350. "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
  5351. "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
  5352. "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
  5353. .rlen = 144,
  5354. },
  5355. };
  5356. static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
  5357. { /* Generated with Crypto++ */
  5358. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5359. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5360. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5361. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5362. .klen = 32,
  5363. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5364. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5365. .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
  5366. "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
  5367. "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
  5368. "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
  5369. "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
  5370. "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
  5371. "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
  5372. "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
  5373. "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
  5374. "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
  5375. "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
  5376. "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
  5377. "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
  5378. "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
  5379. "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
  5380. "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
  5381. "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
  5382. "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
  5383. .ilen = 144,
  5384. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5385. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5386. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5387. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5388. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5389. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5390. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5391. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5392. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5393. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5394. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5395. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5396. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5397. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5398. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5399. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5400. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5401. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5402. .rlen = 144,
  5403. },
  5404. };
  5405. static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
  5406. { /* Generated with Crypto++ */
  5407. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5408. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5409. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5410. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5411. .klen = 32,
  5412. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5413. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5414. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5415. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5416. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5417. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5418. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5419. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5420. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5421. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5422. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5423. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5424. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5425. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5426. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5427. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5428. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5429. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5430. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5431. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5432. .ilen = 144,
  5433. .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  5434. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  5435. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  5436. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  5437. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  5438. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  5439. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  5440. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  5441. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  5442. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  5443. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  5444. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  5445. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  5446. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  5447. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  5448. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  5449. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  5450. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
  5451. .rlen = 144,
  5452. }, { /* Generated with Crypto++ */
  5453. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5454. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5455. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5456. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5457. .klen = 32,
  5458. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5459. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5460. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5461. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5462. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5463. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5464. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5465. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5466. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5467. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5468. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5469. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5470. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5471. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5472. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5473. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5474. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5475. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5476. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5477. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  5478. "\xF1\x65\xFC",
  5479. .ilen = 147,
  5480. .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  5481. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  5482. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  5483. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  5484. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  5485. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  5486. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  5487. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  5488. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  5489. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  5490. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  5491. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  5492. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  5493. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  5494. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  5495. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  5496. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  5497. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
  5498. "\xE6\xD0\x97",
  5499. .rlen = 147,
  5500. },
  5501. };
  5502. static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
  5503. { /* Generated with Crypto++ */
  5504. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5505. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5506. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5507. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5508. .klen = 32,
  5509. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5510. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5511. .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  5512. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  5513. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  5514. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  5515. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  5516. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  5517. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  5518. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  5519. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  5520. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  5521. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  5522. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  5523. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  5524. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  5525. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  5526. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  5527. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  5528. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
  5529. .ilen = 144,
  5530. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5531. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5532. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5533. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5534. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5535. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5536. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5537. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5538. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5539. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5540. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5541. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5542. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5543. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5544. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5545. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5546. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5547. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5548. .rlen = 144,
  5549. }, { /* Generated with Crypto++ */
  5550. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5551. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5552. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5553. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5554. .klen = 32,
  5555. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5556. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5557. .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  5558. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  5559. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  5560. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  5561. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  5562. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  5563. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  5564. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  5565. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  5566. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  5567. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  5568. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  5569. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  5570. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  5571. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  5572. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  5573. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  5574. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
  5575. "\xE6\xD0\x97",
  5576. .ilen = 147,
  5577. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5578. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5579. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5580. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5581. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5582. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5583. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5584. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5585. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5586. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5587. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5588. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5589. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5590. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5591. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5592. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5593. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5594. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  5595. "\xF1\x65\xFC",
  5596. .rlen = 147,
  5597. },
  5598. };
  5599. static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
  5600. /* Generated from AES-LRW test vectors */
  5601. {
  5602. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  5603. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  5604. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  5605. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  5606. .klen = 32,
  5607. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5608. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5609. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5610. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5611. .ilen = 16,
  5612. .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
  5613. "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
  5614. .rlen = 16,
  5615. }, {
  5616. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  5617. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  5618. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  5619. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  5620. .klen = 32,
  5621. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5622. "\x00\x00\x00\x00\x00\x00\x00\x02",
  5623. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5624. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5625. .ilen = 16,
  5626. .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
  5627. "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
  5628. .rlen = 16,
  5629. }, {
  5630. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  5631. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  5632. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  5633. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  5634. .klen = 32,
  5635. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5636. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5637. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5638. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5639. .ilen = 16,
  5640. .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
  5641. "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
  5642. .rlen = 16,
  5643. }, {
  5644. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  5645. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  5646. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  5647. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  5648. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  5649. .klen = 40,
  5650. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5651. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5652. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5653. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5654. .ilen = 16,
  5655. .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
  5656. "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
  5657. .rlen = 16,
  5658. }, {
  5659. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  5660. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  5661. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  5662. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  5663. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  5664. .klen = 40,
  5665. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5666. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5667. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5668. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5669. .ilen = 16,
  5670. .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
  5671. "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
  5672. .rlen = 16,
  5673. }, {
  5674. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  5675. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  5676. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  5677. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  5678. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  5679. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  5680. .klen = 48,
  5681. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5682. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5683. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5684. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5685. .ilen = 16,
  5686. .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
  5687. "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
  5688. .rlen = 16,
  5689. }, {
  5690. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  5691. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  5692. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  5693. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  5694. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  5695. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  5696. .klen = 48,
  5697. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5698. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5699. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5700. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5701. .ilen = 16,
  5702. .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
  5703. "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
  5704. .rlen = 16,
  5705. }, {
  5706. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  5707. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  5708. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  5709. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  5710. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  5711. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  5712. .klen = 48,
  5713. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5714. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5715. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  5716. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  5717. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  5718. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  5719. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  5720. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  5721. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  5722. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  5723. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  5724. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  5725. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  5726. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  5727. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  5728. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  5729. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  5730. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  5731. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  5732. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  5733. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  5734. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  5735. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  5736. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  5737. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  5738. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  5739. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  5740. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  5741. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  5742. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  5743. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  5744. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  5745. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  5746. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  5747. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  5748. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  5749. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  5750. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  5751. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  5752. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  5753. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  5754. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  5755. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  5756. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  5757. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  5758. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  5759. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  5760. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  5761. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  5762. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  5763. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  5764. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  5765. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  5766. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  5767. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  5768. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  5769. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  5770. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  5771. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  5772. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  5773. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  5774. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  5775. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  5776. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  5777. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  5778. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  5779. .ilen = 512,
  5780. .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
  5781. "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
  5782. "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
  5783. "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
  5784. "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
  5785. "\xce\xab\xda\x33\x30\x20\x12\xfa"
  5786. "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
  5787. "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
  5788. "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
  5789. "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
  5790. "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
  5791. "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
  5792. "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
  5793. "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
  5794. "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
  5795. "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
  5796. "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
  5797. "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
  5798. "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
  5799. "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
  5800. "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
  5801. "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
  5802. "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
  5803. "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
  5804. "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
  5805. "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
  5806. "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
  5807. "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
  5808. "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
  5809. "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
  5810. "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
  5811. "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
  5812. "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
  5813. "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
  5814. "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
  5815. "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
  5816. "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
  5817. "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
  5818. "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
  5819. "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
  5820. "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
  5821. "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
  5822. "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
  5823. "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
  5824. "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
  5825. "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
  5826. "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
  5827. "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
  5828. "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
  5829. "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
  5830. "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
  5831. "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
  5832. "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
  5833. "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
  5834. "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
  5835. "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
  5836. "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
  5837. "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
  5838. "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
  5839. "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
  5840. "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
  5841. "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
  5842. "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
  5843. "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
  5844. .rlen = 512,
  5845. },
  5846. };
  5847. static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
  5848. /* Generated from AES-LRW test vectors */
  5849. /* same as enc vectors with input and result reversed */
  5850. {
  5851. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  5852. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  5853. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  5854. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  5855. .klen = 32,
  5856. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5857. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5858. .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
  5859. "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
  5860. .ilen = 16,
  5861. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5862. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5863. .rlen = 16,
  5864. }, {
  5865. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  5866. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  5867. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  5868. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  5869. .klen = 32,
  5870. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5871. "\x00\x00\x00\x00\x00\x00\x00\x02",
  5872. .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
  5873. "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
  5874. .ilen = 16,
  5875. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5876. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5877. .rlen = 16,
  5878. }, {
  5879. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  5880. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  5881. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  5882. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  5883. .klen = 32,
  5884. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5885. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5886. .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
  5887. "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
  5888. .ilen = 16,
  5889. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5890. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5891. .rlen = 16,
  5892. }, {
  5893. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  5894. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  5895. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  5896. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  5897. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  5898. .klen = 40,
  5899. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5900. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5901. .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
  5902. "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
  5903. .ilen = 16,
  5904. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5905. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5906. .rlen = 16,
  5907. }, {
  5908. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  5909. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  5910. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  5911. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  5912. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  5913. .klen = 40,
  5914. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5915. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5916. .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
  5917. "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
  5918. .ilen = 16,
  5919. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5920. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5921. .rlen = 16,
  5922. }, {
  5923. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  5924. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  5925. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  5926. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  5927. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  5928. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  5929. .klen = 48,
  5930. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5931. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5932. .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
  5933. "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
  5934. .ilen = 16,
  5935. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5936. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5937. .rlen = 16,
  5938. }, {
  5939. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  5940. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  5941. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  5942. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  5943. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  5944. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  5945. .klen = 48,
  5946. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5947. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5948. .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
  5949. "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
  5950. .ilen = 16,
  5951. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5952. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5953. .rlen = 16,
  5954. }, {
  5955. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  5956. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  5957. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  5958. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  5959. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  5960. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  5961. .klen = 48,
  5962. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5963. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5964. .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
  5965. "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
  5966. "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
  5967. "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
  5968. "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
  5969. "\xce\xab\xda\x33\x30\x20\x12\xfa"
  5970. "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
  5971. "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
  5972. "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
  5973. "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
  5974. "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
  5975. "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
  5976. "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
  5977. "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
  5978. "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
  5979. "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
  5980. "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
  5981. "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
  5982. "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
  5983. "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
  5984. "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
  5985. "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
  5986. "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
  5987. "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
  5988. "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
  5989. "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
  5990. "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
  5991. "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
  5992. "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
  5993. "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
  5994. "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
  5995. "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
  5996. "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
  5997. "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
  5998. "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
  5999. "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
  6000. "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
  6001. "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
  6002. "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
  6003. "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
  6004. "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
  6005. "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
  6006. "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
  6007. "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
  6008. "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
  6009. "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
  6010. "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
  6011. "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
  6012. "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
  6013. "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
  6014. "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
  6015. "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
  6016. "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
  6017. "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
  6018. "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
  6019. "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
  6020. "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
  6021. "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
  6022. "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
  6023. "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
  6024. "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
  6025. "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
  6026. "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
  6027. "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
  6028. .ilen = 512,
  6029. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  6030. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  6031. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  6032. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  6033. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  6034. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  6035. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  6036. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  6037. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  6038. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  6039. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  6040. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  6041. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  6042. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  6043. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  6044. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  6045. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  6046. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  6047. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  6048. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  6049. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  6050. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  6051. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  6052. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  6053. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  6054. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  6055. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  6056. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  6057. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  6058. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  6059. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  6060. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  6061. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  6062. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  6063. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  6064. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  6065. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  6066. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  6067. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  6068. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  6069. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  6070. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  6071. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  6072. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  6073. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  6074. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  6075. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  6076. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  6077. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  6078. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  6079. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  6080. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  6081. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  6082. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  6083. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  6084. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  6085. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  6086. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  6087. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  6088. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  6089. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  6090. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  6091. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  6092. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  6093. .rlen = 512,
  6094. },
  6095. };
  6096. static struct cipher_testvec serpent_xts_enc_tv_template[] = {
  6097. /* Generated from AES-XTS test vectors */
  6098. {
  6099. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6100. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6101. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6102. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6103. .klen = 32,
  6104. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6105. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6106. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6107. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6108. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6109. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6110. .ilen = 32,
  6111. .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
  6112. "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
  6113. "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
  6114. "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
  6115. .rlen = 32,
  6116. }, {
  6117. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  6118. "\x11\x11\x11\x11\x11\x11\x11\x11"
  6119. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6120. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6121. .klen = 32,
  6122. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6123. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6124. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6125. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6126. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6127. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6128. .ilen = 32,
  6129. .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
  6130. "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
  6131. "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
  6132. "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
  6133. .rlen = 32,
  6134. }, {
  6135. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  6136. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  6137. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6138. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6139. .klen = 32,
  6140. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6141. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6142. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6143. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6144. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6145. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6146. .ilen = 32,
  6147. .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
  6148. "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
  6149. "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
  6150. "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
  6151. .rlen = 32,
  6152. }, {
  6153. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6154. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6155. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6156. "\x23\x84\x62\x64\x33\x83\x27\x95",
  6157. .klen = 32,
  6158. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6159. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6160. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6161. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6162. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6163. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6164. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6165. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6166. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6167. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6168. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6169. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6170. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6171. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6172. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6173. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6174. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6175. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6176. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6177. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6178. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6179. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6180. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6181. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6182. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6183. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6184. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6185. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6186. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6187. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6188. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6189. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6190. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6191. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6192. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6193. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6194. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6195. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6196. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6197. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6198. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6199. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6200. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6201. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6202. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6203. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6204. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6205. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6206. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6207. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6208. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6209. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6210. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6211. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6212. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6213. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6214. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6215. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6216. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6217. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6218. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6219. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6220. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6221. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6222. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6223. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  6224. .ilen = 512,
  6225. .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
  6226. "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
  6227. "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
  6228. "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
  6229. "\x00\x5c\x75\x14\x06\xd6\x25\x82"
  6230. "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
  6231. "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
  6232. "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
  6233. "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
  6234. "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
  6235. "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
  6236. "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
  6237. "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
  6238. "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
  6239. "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
  6240. "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
  6241. "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
  6242. "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
  6243. "\x58\xfa\x43\x91\x16\x85\x40\xbb"
  6244. "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
  6245. "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
  6246. "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
  6247. "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
  6248. "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
  6249. "\x6e\x29\x60\xbd\x10\x14\x84\x82"
  6250. "\x83\x82\x0c\x63\x73\x92\x02\x7c"
  6251. "\x55\x37\x20\x80\x17\x51\xc8\xbc"
  6252. "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
  6253. "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
  6254. "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
  6255. "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
  6256. "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
  6257. "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
  6258. "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
  6259. "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
  6260. "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
  6261. "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
  6262. "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
  6263. "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
  6264. "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
  6265. "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
  6266. "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
  6267. "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
  6268. "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
  6269. "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
  6270. "\x43\x42\x35\xd0\xcf\xec\x77\x67"
  6271. "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
  6272. "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
  6273. "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
  6274. "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
  6275. "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
  6276. "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
  6277. "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
  6278. "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
  6279. "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
  6280. "\x03\x57\xe6\x98\x52\x2f\x61\x62"
  6281. "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
  6282. "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
  6283. "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
  6284. "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
  6285. "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
  6286. "\xef\x91\x64\x1d\x18\x07\x4e\x31"
  6287. "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
  6288. "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
  6289. .rlen = 512,
  6290. }, {
  6291. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6292. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6293. "\x62\x49\x77\x57\x24\x70\x93\x69"
  6294. "\x99\x59\x57\x49\x66\x96\x76\x27"
  6295. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6296. "\x23\x84\x62\x64\x33\x83\x27\x95"
  6297. "\x02\x88\x41\x97\x16\x93\x99\x37"
  6298. "\x51\x05\x82\x09\x74\x94\x45\x92",
  6299. .klen = 64,
  6300. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  6301. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6302. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6303. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6304. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6305. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6306. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6307. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6308. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6309. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6310. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6311. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6312. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6313. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6314. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6315. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6316. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6317. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6318. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6319. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6320. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6321. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6322. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6323. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6324. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6325. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6326. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6327. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6328. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6329. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6330. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6331. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6332. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6333. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6334. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6335. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6336. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6337. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6338. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6339. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6340. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6341. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6342. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6343. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6344. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6345. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6346. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6347. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6348. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6349. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6350. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6351. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6352. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6353. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6354. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6355. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6356. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6357. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6358. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6359. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6360. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6361. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6362. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6363. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6364. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6365. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  6366. .ilen = 512,
  6367. .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
  6368. "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
  6369. "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
  6370. "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
  6371. "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
  6372. "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
  6373. "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
  6374. "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
  6375. "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
  6376. "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
  6377. "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
  6378. "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
  6379. "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
  6380. "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
  6381. "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
  6382. "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
  6383. "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
  6384. "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
  6385. "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
  6386. "\xec\x9a\xda\x64\x96\xb5\x61\xff"
  6387. "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
  6388. "\x81\x85\x14\xa8\x59\xac\x8c\x94"
  6389. "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
  6390. "\x82\xc6\x4d\xca\x86\xea\x53\x28"
  6391. "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
  6392. "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
  6393. "\x05\xca\x81\x7b\xda\xa2\xde\x63"
  6394. "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
  6395. "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
  6396. "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
  6397. "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
  6398. "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
  6399. "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
  6400. "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
  6401. "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
  6402. "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
  6403. "\xfd\x43\x7d\xda\x42\x51\x87\x43"
  6404. "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
  6405. "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
  6406. "\x27\x5f\x11\xac\x71\xc7\x48\x46"
  6407. "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
  6408. "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
  6409. "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
  6410. "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
  6411. "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
  6412. "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
  6413. "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
  6414. "\x50\x88\x97\x40\x69\xb1\x37\xf5"
  6415. "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
  6416. "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
  6417. "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
  6418. "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
  6419. "\xc1\x16\x73\x50\x77\xba\xa6\x65"
  6420. "\x20\x2d\xb0\x02\x27\x89\xda\x99"
  6421. "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
  6422. "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
  6423. "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
  6424. "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
  6425. "\xa3\x0e\x33\x74\x40\x18\x39\x72"
  6426. "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
  6427. "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
  6428. "\x30\x05\xc8\x92\x98\x80\xff\x7a"
  6429. "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
  6430. "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
  6431. .rlen = 512,
  6432. },
  6433. };
  6434. static struct cipher_testvec serpent_xts_dec_tv_template[] = {
  6435. /* Generated from AES-XTS test vectors */
  6436. /* same as enc vectors with input and result reversed */
  6437. {
  6438. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6439. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6440. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6441. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6442. .klen = 32,
  6443. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6444. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6445. .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
  6446. "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
  6447. "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
  6448. "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
  6449. .ilen = 32,
  6450. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6451. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6452. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6453. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6454. .rlen = 32,
  6455. }, {
  6456. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  6457. "\x11\x11\x11\x11\x11\x11\x11\x11"
  6458. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6459. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6460. .klen = 32,
  6461. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6462. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6463. .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
  6464. "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
  6465. "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
  6466. "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
  6467. .ilen = 32,
  6468. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6469. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6470. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6471. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6472. .rlen = 32,
  6473. }, {
  6474. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  6475. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  6476. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6477. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6478. .klen = 32,
  6479. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6480. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6481. .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
  6482. "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
  6483. "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
  6484. "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
  6485. .ilen = 32,
  6486. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6487. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6488. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6489. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6490. .rlen = 32,
  6491. }, {
  6492. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6493. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6494. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6495. "\x23\x84\x62\x64\x33\x83\x27\x95",
  6496. .klen = 32,
  6497. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6498. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6499. .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
  6500. "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
  6501. "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
  6502. "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
  6503. "\x00\x5c\x75\x14\x06\xd6\x25\x82"
  6504. "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
  6505. "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
  6506. "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
  6507. "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
  6508. "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
  6509. "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
  6510. "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
  6511. "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
  6512. "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
  6513. "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
  6514. "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
  6515. "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
  6516. "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
  6517. "\x58\xfa\x43\x91\x16\x85\x40\xbb"
  6518. "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
  6519. "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
  6520. "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
  6521. "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
  6522. "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
  6523. "\x6e\x29\x60\xbd\x10\x14\x84\x82"
  6524. "\x83\x82\x0c\x63\x73\x92\x02\x7c"
  6525. "\x55\x37\x20\x80\x17\x51\xc8\xbc"
  6526. "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
  6527. "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
  6528. "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
  6529. "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
  6530. "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
  6531. "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
  6532. "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
  6533. "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
  6534. "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
  6535. "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
  6536. "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
  6537. "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
  6538. "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
  6539. "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
  6540. "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
  6541. "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
  6542. "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
  6543. "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
  6544. "\x43\x42\x35\xd0\xcf\xec\x77\x67"
  6545. "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
  6546. "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
  6547. "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
  6548. "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
  6549. "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
  6550. "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
  6551. "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
  6552. "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
  6553. "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
  6554. "\x03\x57\xe6\x98\x52\x2f\x61\x62"
  6555. "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
  6556. "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
  6557. "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
  6558. "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
  6559. "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
  6560. "\xef\x91\x64\x1d\x18\x07\x4e\x31"
  6561. "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
  6562. "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
  6563. .ilen = 512,
  6564. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6565. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6566. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6567. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6568. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6569. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6570. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6571. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6572. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6573. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6574. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6575. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6576. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6577. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6578. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6579. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6580. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6581. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6582. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6583. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6584. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6585. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6586. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6587. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6588. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6589. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6590. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6591. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6592. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6593. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6594. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6595. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6596. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6597. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6598. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6599. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6600. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6601. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6602. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6603. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6604. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6605. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6606. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6607. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6608. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6609. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6610. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6611. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6612. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6613. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6614. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6615. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6616. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6617. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6618. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6619. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6620. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6621. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6622. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6623. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6624. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6625. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6626. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6627. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  6628. .rlen = 512,
  6629. }, {
  6630. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6631. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6632. "\x62\x49\x77\x57\x24\x70\x93\x69"
  6633. "\x99\x59\x57\x49\x66\x96\x76\x27"
  6634. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6635. "\x23\x84\x62\x64\x33\x83\x27\x95"
  6636. "\x02\x88\x41\x97\x16\x93\x99\x37"
  6637. "\x51\x05\x82\x09\x74\x94\x45\x92",
  6638. .klen = 64,
  6639. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  6640. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6641. .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
  6642. "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
  6643. "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
  6644. "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
  6645. "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
  6646. "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
  6647. "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
  6648. "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
  6649. "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
  6650. "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
  6651. "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
  6652. "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
  6653. "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
  6654. "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
  6655. "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
  6656. "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
  6657. "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
  6658. "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
  6659. "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
  6660. "\xec\x9a\xda\x64\x96\xb5\x61\xff"
  6661. "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
  6662. "\x81\x85\x14\xa8\x59\xac\x8c\x94"
  6663. "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
  6664. "\x82\xc6\x4d\xca\x86\xea\x53\x28"
  6665. "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
  6666. "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
  6667. "\x05\xca\x81\x7b\xda\xa2\xde\x63"
  6668. "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
  6669. "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
  6670. "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
  6671. "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
  6672. "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
  6673. "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
  6674. "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
  6675. "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
  6676. "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
  6677. "\xfd\x43\x7d\xda\x42\x51\x87\x43"
  6678. "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
  6679. "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
  6680. "\x27\x5f\x11\xac\x71\xc7\x48\x46"
  6681. "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
  6682. "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
  6683. "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
  6684. "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
  6685. "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
  6686. "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
  6687. "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
  6688. "\x50\x88\x97\x40\x69\xb1\x37\xf5"
  6689. "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
  6690. "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
  6691. "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
  6692. "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
  6693. "\xc1\x16\x73\x50\x77\xba\xa6\x65"
  6694. "\x20\x2d\xb0\x02\x27\x89\xda\x99"
  6695. "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
  6696. "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
  6697. "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
  6698. "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
  6699. "\xa3\x0e\x33\x74\x40\x18\x39\x72"
  6700. "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
  6701. "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
  6702. "\x30\x05\xc8\x92\x98\x80\xff\x7a"
  6703. "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
  6704. "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
  6705. .ilen = 512,
  6706. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6707. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6708. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6709. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6710. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6711. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6712. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6713. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6714. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6715. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6716. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6717. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6718. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6719. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6720. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6721. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6722. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6723. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6724. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6725. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6726. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6727. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6728. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6729. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6730. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6731. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6732. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6733. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6734. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6735. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6736. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6737. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6738. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6739. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6740. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6741. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6742. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6743. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6744. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6745. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6746. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6747. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6748. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6749. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6750. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6751. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6752. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6753. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6754. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6755. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6756. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6757. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6758. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6759. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6760. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6761. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6762. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6763. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6764. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6765. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6766. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6767. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6768. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6769. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  6770. .rlen = 512,
  6771. },
  6772. };
  6773. /* Cast6 test vectors from RFC 2612 */
  6774. #define CAST6_ENC_TEST_VECTORS 3
  6775. #define CAST6_DEC_TEST_VECTORS 3
  6776. static struct cipher_testvec cast6_enc_tv_template[] = {
  6777. {
  6778. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  6779. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  6780. .klen = 16,
  6781. .input = zeroed_string,
  6782. .ilen = 16,
  6783. .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  6784. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  6785. .rlen = 16,
  6786. }, {
  6787. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  6788. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  6789. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  6790. .klen = 24,
  6791. .input = zeroed_string,
  6792. .ilen = 16,
  6793. .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  6794. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  6795. .rlen = 16,
  6796. }, {
  6797. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  6798. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  6799. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  6800. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  6801. .klen = 32,
  6802. .input = zeroed_string,
  6803. .ilen = 16,
  6804. .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  6805. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  6806. .rlen = 16,
  6807. },
  6808. };
  6809. static struct cipher_testvec cast6_dec_tv_template[] = {
  6810. {
  6811. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  6812. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  6813. .klen = 16,
  6814. .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  6815. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  6816. .ilen = 16,
  6817. .result = zeroed_string,
  6818. .rlen = 16,
  6819. }, {
  6820. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  6821. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  6822. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  6823. .klen = 24,
  6824. .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  6825. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  6826. .ilen = 16,
  6827. .result = zeroed_string,
  6828. .rlen = 16,
  6829. }, {
  6830. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  6831. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  6832. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  6833. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  6834. .klen = 32,
  6835. .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  6836. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  6837. .ilen = 16,
  6838. .result = zeroed_string,
  6839. .rlen = 16,
  6840. },
  6841. };
  6842. /*
  6843. * AES test vectors.
  6844. */
  6845. #define AES_ENC_TEST_VECTORS 3
  6846. #define AES_DEC_TEST_VECTORS 3
  6847. #define AES_CBC_ENC_TEST_VECTORS 4
  6848. #define AES_CBC_DEC_TEST_VECTORS 4
  6849. #define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7
  6850. #define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7
  6851. #define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7
  6852. #define AES_LRW_ENC_TEST_VECTORS 8
  6853. #define AES_LRW_DEC_TEST_VECTORS 8
  6854. #define AES_XTS_ENC_TEST_VECTORS 5
  6855. #define AES_XTS_DEC_TEST_VECTORS 5
  6856. #define AES_CTR_ENC_TEST_VECTORS 3
  6857. #define AES_CTR_DEC_TEST_VECTORS 3
  6858. #define AES_OFB_ENC_TEST_VECTORS 1
  6859. #define AES_OFB_DEC_TEST_VECTORS 1
  6860. #define AES_CTR_3686_ENC_TEST_VECTORS 7
  6861. #define AES_CTR_3686_DEC_TEST_VECTORS 6
  6862. #define AES_GCM_ENC_TEST_VECTORS 9
  6863. #define AES_GCM_DEC_TEST_VECTORS 8
  6864. #define AES_GCM_4106_ENC_TEST_VECTORS 7
  6865. #define AES_GCM_4106_DEC_TEST_VECTORS 7
  6866. #define AES_CCM_ENC_TEST_VECTORS 7
  6867. #define AES_CCM_DEC_TEST_VECTORS 7
  6868. #define AES_CCM_4309_ENC_TEST_VECTORS 7
  6869. #define AES_CCM_4309_DEC_TEST_VECTORS 10
  6870. static struct cipher_testvec aes_enc_tv_template[] = {
  6871. { /* From FIPS-197 */
  6872. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6873. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6874. .klen = 16,
  6875. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6876. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6877. .ilen = 16,
  6878. .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  6879. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  6880. .rlen = 16,
  6881. }, {
  6882. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6883. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6884. "\x10\x11\x12\x13\x14\x15\x16\x17",
  6885. .klen = 24,
  6886. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6887. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6888. .ilen = 16,
  6889. .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  6890. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  6891. .rlen = 16,
  6892. }, {
  6893. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6894. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6895. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6896. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6897. .klen = 32,
  6898. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6899. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6900. .ilen = 16,
  6901. .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  6902. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  6903. .rlen = 16,
  6904. },
  6905. };
  6906. static struct cipher_testvec aes_dec_tv_template[] = {
  6907. { /* From FIPS-197 */
  6908. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6909. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6910. .klen = 16,
  6911. .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  6912. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  6913. .ilen = 16,
  6914. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6915. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6916. .rlen = 16,
  6917. }, {
  6918. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6919. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6920. "\x10\x11\x12\x13\x14\x15\x16\x17",
  6921. .klen = 24,
  6922. .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  6923. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  6924. .ilen = 16,
  6925. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6926. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6927. .rlen = 16,
  6928. }, {
  6929. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6930. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6931. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6932. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6933. .klen = 32,
  6934. .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  6935. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  6936. .ilen = 16,
  6937. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  6938. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6939. .rlen = 16,
  6940. },
  6941. };
  6942. static struct cipher_testvec aes_cbc_enc_tv_template[] = {
  6943. { /* From RFC 3602 */
  6944. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  6945. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  6946. .klen = 16,
  6947. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  6948. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  6949. .input = "Single block msg",
  6950. .ilen = 16,
  6951. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  6952. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  6953. .rlen = 16,
  6954. }, {
  6955. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  6956. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  6957. .klen = 16,
  6958. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  6959. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  6960. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6961. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6962. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6963. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  6964. .ilen = 32,
  6965. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  6966. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  6967. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  6968. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  6969. .rlen = 32,
  6970. }, { /* From NIST SP800-38A */
  6971. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  6972. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  6973. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  6974. .klen = 24,
  6975. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6976. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  6977. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  6978. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  6979. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  6980. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  6981. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  6982. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  6983. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  6984. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  6985. .ilen = 64,
  6986. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  6987. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  6988. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  6989. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  6990. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  6991. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  6992. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  6993. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  6994. .rlen = 64,
  6995. }, {
  6996. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  6997. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  6998. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  6999. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  7000. .klen = 32,
  7001. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7002. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7003. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7004. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7005. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7006. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7007. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7008. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7009. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7010. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7011. .ilen = 64,
  7012. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  7013. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  7014. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  7015. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  7016. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  7017. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  7018. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  7019. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  7020. .rlen = 64,
  7021. },
  7022. };
  7023. static struct cipher_testvec aes_cbc_dec_tv_template[] = {
  7024. { /* From RFC 3602 */
  7025. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  7026. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  7027. .klen = 16,
  7028. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  7029. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  7030. .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  7031. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  7032. .ilen = 16,
  7033. .result = "Single block msg",
  7034. .rlen = 16,
  7035. }, {
  7036. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  7037. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  7038. .klen = 16,
  7039. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  7040. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  7041. .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  7042. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  7043. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  7044. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  7045. .ilen = 32,
  7046. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7047. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7048. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7049. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7050. .rlen = 32,
  7051. }, { /* From NIST SP800-38A */
  7052. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  7053. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  7054. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  7055. .klen = 24,
  7056. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7057. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7058. .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  7059. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  7060. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  7061. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  7062. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  7063. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  7064. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  7065. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  7066. .ilen = 64,
  7067. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7068. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7069. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7070. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7071. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7072. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7073. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7074. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7075. .rlen = 64,
  7076. }, {
  7077. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  7078. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  7079. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  7080. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  7081. .klen = 32,
  7082. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7083. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7084. .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  7085. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  7086. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  7087. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  7088. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  7089. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  7090. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  7091. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  7092. .ilen = 64,
  7093. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7094. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7095. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7096. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7097. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7098. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7099. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7100. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7101. .rlen = 64,
  7102. },
  7103. };
  7104. static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = {
  7105. { /* RFC 3602 Case 1 */
  7106. #ifdef __LITTLE_ENDIAN
  7107. .key = "\x08\x00" /* rta length */
  7108. "\x01\x00" /* rta type */
  7109. #else
  7110. .key = "\x00\x08" /* rta length */
  7111. "\x00\x01" /* rta type */
  7112. #endif
  7113. "\x00\x00\x00\x10" /* enc key length */
  7114. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7115. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7116. "\x00\x00\x00\x00"
  7117. "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  7118. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  7119. .klen = 8 + 20 + 16,
  7120. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  7121. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  7122. .input = "Single block msg",
  7123. .ilen = 16,
  7124. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  7125. "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
  7126. "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
  7127. "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
  7128. "\x03\x71\xa2\x06",
  7129. .rlen = 16 + 20,
  7130. }, { /* RFC 3602 Case 2 */
  7131. #ifdef __LITTLE_ENDIAN
  7132. .key = "\x08\x00" /* rta length */
  7133. "\x01\x00" /* rta type */
  7134. #else
  7135. .key = "\x00\x08" /* rta length */
  7136. "\x00\x01" /* rta type */
  7137. #endif
  7138. "\x00\x00\x00\x10" /* enc key length */
  7139. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7140. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7141. "\x30\x31\x32\x33"
  7142. "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  7143. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  7144. .klen = 8 + 20 + 16,
  7145. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  7146. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  7147. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7148. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7149. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7150. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7151. .ilen = 32,
  7152. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  7153. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  7154. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  7155. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
  7156. "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
  7157. "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
  7158. "\x65\x39\xf8\xde",
  7159. .rlen = 32 + 20,
  7160. }, { /* RFC 3602 Case 3 */
  7161. #ifdef __LITTLE_ENDIAN
  7162. .key = "\x08\x00" /* rta length */
  7163. "\x01\x00" /* rta type */
  7164. #else
  7165. .key = "\x00\x08" /* rta length */
  7166. "\x00\x01" /* rta type */
  7167. #endif
  7168. "\x00\x00\x00\x10" /* enc key length */
  7169. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7170. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7171. "\x22\x33\x44\x55"
  7172. "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
  7173. "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
  7174. .klen = 8 + 20 + 16,
  7175. .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
  7176. "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
  7177. .input = "This is a 48-byte message (exactly 3 AES blocks)",
  7178. .ilen = 48,
  7179. .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
  7180. "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
  7181. "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
  7182. "\x50\x69\x39\x27\x67\x72\xf8\xd5"
  7183. "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
  7184. "\x85\x79\x69\x5d\x83\xba\x26\x84"
  7185. "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
  7186. "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
  7187. "\x8d\x62\xf2\x1e",
  7188. .rlen = 48 + 20,
  7189. }, { /* RFC 3602 Case 4 */
  7190. #ifdef __LITTLE_ENDIAN
  7191. .key = "\x08\x00" /* rta length */
  7192. "\x01\x00" /* rta type */
  7193. #else
  7194. .key = "\x00\x08" /* rta length */
  7195. "\x00\x01" /* rta type */
  7196. #endif
  7197. "\x00\x00\x00\x10" /* enc key length */
  7198. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7199. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7200. "\x22\x33\x44\x55"
  7201. "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
  7202. "\xbc\x46\x90\x3d\xba\x29\x03\x49",
  7203. .klen = 8 + 20 + 16,
  7204. .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
  7205. "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
  7206. .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7207. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7208. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7209. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7210. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7211. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7212. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7213. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
  7214. .ilen = 64,
  7215. .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
  7216. "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
  7217. "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
  7218. "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
  7219. "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
  7220. "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
  7221. "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
  7222. "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
  7223. "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
  7224. "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
  7225. "\x1d\xbe\xc6\xe9",
  7226. .rlen = 64 + 20,
  7227. }, { /* RFC 3602 Case 5 */
  7228. #ifdef __LITTLE_ENDIAN
  7229. .key = "\x08\x00" /* rta length */
  7230. "\x01\x00" /* rta type */
  7231. #else
  7232. .key = "\x00\x08" /* rta length */
  7233. "\x00\x01" /* rta type */
  7234. #endif
  7235. "\x00\x00\x00\x10" /* enc key length */
  7236. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7237. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7238. "\x22\x33\x44\x55"
  7239. "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
  7240. "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
  7241. .klen = 8 + 20 + 16,
  7242. .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
  7243. "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
  7244. .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
  7245. .alen = 8,
  7246. .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
  7247. "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
  7248. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7249. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7250. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7251. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7252. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7253. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7254. "\x01\x02\x03\x04\x05\x06\x07\x08"
  7255. "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
  7256. .ilen = 80,
  7257. .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
  7258. "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
  7259. "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
  7260. "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
  7261. "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
  7262. "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
  7263. "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
  7264. "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
  7265. "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
  7266. "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
  7267. "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
  7268. "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
  7269. "\x85\xe1\x59\xf7",
  7270. .rlen = 80 + 20,
  7271. }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
  7272. #ifdef __LITTLE_ENDIAN
  7273. .key = "\x08\x00" /* rta length */
  7274. "\x01\x00" /* rta type */
  7275. #else
  7276. .key = "\x00\x08" /* rta length */
  7277. "\x00\x01" /* rta type */
  7278. #endif
  7279. "\x00\x00\x00\x18" /* enc key length */
  7280. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7281. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7282. "\x22\x33\x44\x55"
  7283. "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  7284. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  7285. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  7286. .klen = 8 + 20 + 24,
  7287. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7288. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7289. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7290. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7291. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7292. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7293. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7294. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7295. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7296. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7297. .ilen = 64,
  7298. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  7299. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  7300. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  7301. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  7302. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  7303. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  7304. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  7305. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
  7306. "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
  7307. "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
  7308. "\x47\x4c\xfc\x36",
  7309. .rlen = 64 + 20,
  7310. }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
  7311. #ifdef __LITTLE_ENDIAN
  7312. .key = "\x08\x00" /* rta length */
  7313. "\x01\x00" /* rta type */
  7314. #else
  7315. .key = "\x00\x08" /* rta length */
  7316. "\x00\x01" /* rta type */
  7317. #endif
  7318. "\x00\x00\x00\x20" /* enc key length */
  7319. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7320. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7321. "\x22\x33\x44\x55"
  7322. "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  7323. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  7324. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  7325. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  7326. .klen = 8 + 20 + 32,
  7327. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7328. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7329. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7330. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7331. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7332. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7333. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7334. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7335. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7336. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7337. .ilen = 64,
  7338. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  7339. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  7340. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  7341. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  7342. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  7343. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  7344. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  7345. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
  7346. "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
  7347. "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
  7348. "\x51\xee\xd6\x4e",
  7349. .rlen = 64 + 20,
  7350. },
  7351. };
  7352. static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = {
  7353. { /* RFC 3602 Case 1 */
  7354. #ifdef __LITTLE_ENDIAN
  7355. .key = "\x08\x00" /* rta length */
  7356. "\x01\x00" /* rta type */
  7357. #else
  7358. .key = "\x00\x08" /* rta length */
  7359. "\x00\x01" /* rta type */
  7360. #endif
  7361. "\x00\x00\x00\x10" /* enc key length */
  7362. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7363. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7364. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7365. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7366. "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  7367. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  7368. .klen = 8 + 32 + 16,
  7369. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  7370. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  7371. .input = "Single block msg",
  7372. .ilen = 16,
  7373. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  7374. "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
  7375. "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
  7376. "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
  7377. "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
  7378. "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
  7379. .rlen = 16 + 32,
  7380. }, { /* RFC 3602 Case 2 */
  7381. #ifdef __LITTLE_ENDIAN
  7382. .key = "\x08\x00" /* rta length */
  7383. "\x01\x00" /* rta type */
  7384. #else
  7385. .key = "\x00\x08" /* rta length */
  7386. "\x00\x01" /* rta type */
  7387. #endif
  7388. "\x00\x00\x00\x10" /* enc key length */
  7389. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7390. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7391. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7392. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7393. "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  7394. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  7395. .klen = 8 + 32 + 16,
  7396. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  7397. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  7398. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7399. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7400. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7401. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7402. .ilen = 32,
  7403. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  7404. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  7405. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  7406. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
  7407. "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
  7408. "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
  7409. "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
  7410. "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
  7411. .rlen = 32 + 32,
  7412. }, { /* RFC 3602 Case 3 */
  7413. #ifdef __LITTLE_ENDIAN
  7414. .key = "\x08\x00" /* rta length */
  7415. "\x01\x00" /* rta type */
  7416. #else
  7417. .key = "\x00\x08" /* rta length */
  7418. "\x00\x01" /* rta type */
  7419. #endif
  7420. "\x00\x00\x00\x10" /* enc key length */
  7421. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7422. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7423. "\x22\x33\x44\x55\x66\x77\x88\x99"
  7424. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  7425. "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
  7426. "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
  7427. .klen = 8 + 32 + 16,
  7428. .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
  7429. "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
  7430. .input = "This is a 48-byte message (exactly 3 AES blocks)",
  7431. .ilen = 48,
  7432. .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
  7433. "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
  7434. "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
  7435. "\x50\x69\x39\x27\x67\x72\xf8\xd5"
  7436. "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
  7437. "\x85\x79\x69\x5d\x83\xba\x26\x84"
  7438. "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
  7439. "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
  7440. "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
  7441. "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
  7442. .rlen = 48 + 32,
  7443. }, { /* RFC 3602 Case 4 */
  7444. #ifdef __LITTLE_ENDIAN
  7445. .key = "\x08\x00" /* rta length */
  7446. "\x01\x00" /* rta type */
  7447. #else
  7448. .key = "\x00\x08" /* rta length */
  7449. "\x00\x01" /* rta type */
  7450. #endif
  7451. "\x00\x00\x00\x10" /* enc key length */
  7452. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7453. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7454. "\x22\x33\x44\x55\x66\x77\x88\x99"
  7455. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  7456. "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
  7457. "\xbc\x46\x90\x3d\xba\x29\x03\x49",
  7458. .klen = 8 + 32 + 16,
  7459. .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
  7460. "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
  7461. .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7462. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7463. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7464. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7465. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7466. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7467. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7468. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
  7469. .ilen = 64,
  7470. .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
  7471. "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
  7472. "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
  7473. "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
  7474. "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
  7475. "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
  7476. "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
  7477. "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
  7478. "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
  7479. "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
  7480. "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
  7481. "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
  7482. .rlen = 64 + 32,
  7483. }, { /* RFC 3602 Case 5 */
  7484. #ifdef __LITTLE_ENDIAN
  7485. .key = "\x08\x00" /* rta length */
  7486. "\x01\x00" /* rta type */
  7487. #else
  7488. .key = "\x00\x08" /* rta length */
  7489. "\x00\x01" /* rta type */
  7490. #endif
  7491. "\x00\x00\x00\x10" /* enc key length */
  7492. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7493. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7494. "\x22\x33\x44\x55\x66\x77\x88\x99"
  7495. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  7496. "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
  7497. "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
  7498. .klen = 8 + 32 + 16,
  7499. .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
  7500. "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
  7501. .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
  7502. .alen = 8,
  7503. .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
  7504. "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
  7505. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7506. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7507. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7508. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7509. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7510. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7511. "\x01\x02\x03\x04\x05\x06\x07\x08"
  7512. "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
  7513. .ilen = 80,
  7514. .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
  7515. "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
  7516. "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
  7517. "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
  7518. "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
  7519. "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
  7520. "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
  7521. "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
  7522. "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
  7523. "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
  7524. "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
  7525. "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
  7526. "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
  7527. "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
  7528. .rlen = 80 + 32,
  7529. }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
  7530. #ifdef __LITTLE_ENDIAN
  7531. .key = "\x08\x00" /* rta length */
  7532. "\x01\x00" /* rta type */
  7533. #else
  7534. .key = "\x00\x08" /* rta length */
  7535. "\x00\x01" /* rta type */
  7536. #endif
  7537. "\x00\x00\x00\x18" /* enc key length */
  7538. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7539. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7540. "\x22\x33\x44\x55\x66\x77\x88\x99"
  7541. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  7542. "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  7543. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  7544. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  7545. .klen = 8 + 32 + 24,
  7546. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7547. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7548. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7549. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7550. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7551. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7552. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7553. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7554. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7555. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7556. .ilen = 64,
  7557. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  7558. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  7559. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  7560. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  7561. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  7562. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  7563. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  7564. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
  7565. "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
  7566. "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
  7567. "\xca\x71\x85\x93\xf7\x85\x55\x8b"
  7568. "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
  7569. .rlen = 64 + 32,
  7570. }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
  7571. #ifdef __LITTLE_ENDIAN
  7572. .key = "\x08\x00" /* rta length */
  7573. "\x01\x00" /* rta type */
  7574. #else
  7575. .key = "\x00\x08" /* rta length */
  7576. "\x00\x01" /* rta type */
  7577. #endif
  7578. "\x00\x00\x00\x20" /* enc key length */
  7579. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7580. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7581. "\x22\x33\x44\x55\x66\x77\x88\x99"
  7582. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  7583. "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  7584. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  7585. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  7586. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  7587. .klen = 8 + 32 + 32,
  7588. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7589. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7590. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7591. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7592. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7593. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7594. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7595. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7596. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7597. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7598. .ilen = 64,
  7599. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  7600. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  7601. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  7602. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  7603. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  7604. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  7605. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  7606. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
  7607. "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
  7608. "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
  7609. "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
  7610. "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
  7611. .rlen = 64 + 32,
  7612. },
  7613. };
  7614. static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = {
  7615. { /* RFC 3602 Case 1 */
  7616. #ifdef __LITTLE_ENDIAN
  7617. .key = "\x08\x00" /* rta length */
  7618. "\x01\x00" /* rta type */
  7619. #else
  7620. .key = "\x00\x08" /* rta length */
  7621. "\x00\x01" /* rta type */
  7622. #endif
  7623. "\x00\x00\x00\x10" /* enc key length */
  7624. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7625. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7626. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7627. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7628. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7629. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7630. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7631. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7632. "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  7633. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  7634. .klen = 8 + 64 + 16,
  7635. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  7636. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  7637. .input = "Single block msg",
  7638. .ilen = 16,
  7639. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  7640. "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
  7641. "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
  7642. "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
  7643. "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
  7644. "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
  7645. "\xec\xbd\x50\x08\x07\x64\x1a\x49"
  7646. "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
  7647. "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
  7648. "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
  7649. .rlen = 16 + 64,
  7650. }, { /* RFC 3602 Case 2 */
  7651. #ifdef __LITTLE_ENDIAN
  7652. .key = "\x08\x00" /* rta length */
  7653. "\x01\x00" /* rta type */
  7654. #else
  7655. .key = "\x00\x08" /* rta length */
  7656. "\x00\x01" /* rta type */
  7657. #endif
  7658. "\x00\x00\x00\x10" /* enc key length */
  7659. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7660. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7661. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7662. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7663. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7664. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7665. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7666. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7667. "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  7668. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  7669. .klen = 8 + 64 + 16,
  7670. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  7671. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  7672. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7673. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7674. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7675. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7676. .ilen = 32,
  7677. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  7678. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  7679. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  7680. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
  7681. "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
  7682. "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
  7683. "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
  7684. "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
  7685. "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
  7686. "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
  7687. "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
  7688. "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
  7689. .rlen = 32 + 64,
  7690. }, { /* RFC 3602 Case 3 */
  7691. #ifdef __LITTLE_ENDIAN
  7692. .key = "\x08\x00" /* rta length */
  7693. "\x01\x00" /* rta type */
  7694. #else
  7695. .key = "\x00\x08" /* rta length */
  7696. "\x00\x01" /* rta type */
  7697. #endif
  7698. "\x00\x00\x00\x10" /* enc key length */
  7699. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7700. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7701. "\x22\x33\x44\x55\x66\x77\x88\x99"
  7702. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  7703. "\x33\x44\x55\x66\x77\x88\x99\xaa"
  7704. "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
  7705. "\x44\x55\x66\x77\x88\x99\xaa\xbb"
  7706. "\xcc\xdd\xee\xff\x11\x22\x33\x44"
  7707. "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
  7708. "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
  7709. .klen = 8 + 64 + 16,
  7710. .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
  7711. "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
  7712. .input = "This is a 48-byte message (exactly 3 AES blocks)",
  7713. .ilen = 48,
  7714. .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
  7715. "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
  7716. "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
  7717. "\x50\x69\x39\x27\x67\x72\xf8\xd5"
  7718. "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
  7719. "\x85\x79\x69\x5d\x83\xba\x26\x84"
  7720. "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
  7721. "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
  7722. "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
  7723. "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
  7724. "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
  7725. "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
  7726. "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
  7727. "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
  7728. .rlen = 48 + 64,
  7729. }, { /* RFC 3602 Case 4 */
  7730. #ifdef __LITTLE_ENDIAN
  7731. .key = "\x08\x00" /* rta length */
  7732. "\x01\x00" /* rta type */
  7733. #else
  7734. .key = "\x00\x08" /* rta length */
  7735. "\x00\x01" /* rta type */
  7736. #endif
  7737. "\x00\x00\x00\x10" /* enc key length */
  7738. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7739. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7740. "\x22\x33\x44\x55\x66\x77\x88\x99"
  7741. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  7742. "\x33\x44\x55\x66\x77\x88\x99\xaa"
  7743. "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
  7744. "\x44\x55\x66\x77\x88\x99\xaa\xbb"
  7745. "\xcc\xdd\xee\xff\x11\x22\x33\x44"
  7746. "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
  7747. "\xbc\x46\x90\x3d\xba\x29\x03\x49",
  7748. .klen = 8 + 64 + 16,
  7749. .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
  7750. "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
  7751. .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7752. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7753. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7754. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7755. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7756. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7757. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7758. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
  7759. .ilen = 64,
  7760. .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
  7761. "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
  7762. "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
  7763. "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
  7764. "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
  7765. "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
  7766. "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
  7767. "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
  7768. "\x82\xcd\x42\x28\x21\x20\x15\xcc"
  7769. "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
  7770. "\x61\x32\x82\x85\xcf\x27\xed\xb4"
  7771. "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
  7772. "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
  7773. "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
  7774. "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
  7775. "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
  7776. .rlen = 64 + 64,
  7777. }, { /* RFC 3602 Case 5 */
  7778. #ifdef __LITTLE_ENDIAN
  7779. .key = "\x08\x00" /* rta length */
  7780. "\x01\x00" /* rta type */
  7781. #else
  7782. .key = "\x00\x08" /* rta length */
  7783. "\x00\x01" /* rta type */
  7784. #endif
  7785. "\x00\x00\x00\x10" /* enc key length */
  7786. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7787. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7788. "\x22\x33\x44\x55\x66\x77\x88\x99"
  7789. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  7790. "\x33\x44\x55\x66\x77\x88\x99\xaa"
  7791. "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
  7792. "\x44\x55\x66\x77\x88\x99\xaa\xbb"
  7793. "\xcc\xdd\xee\xff\x11\x22\x33\x44"
  7794. "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
  7795. "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
  7796. .klen = 8 + 64 + 16,
  7797. .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
  7798. "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
  7799. .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
  7800. .alen = 8,
  7801. .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
  7802. "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
  7803. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7804. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7805. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7806. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7807. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7808. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7809. "\x01\x02\x03\x04\x05\x06\x07\x08"
  7810. "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
  7811. .ilen = 80,
  7812. .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
  7813. "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
  7814. "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
  7815. "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
  7816. "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
  7817. "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
  7818. "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
  7819. "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
  7820. "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
  7821. "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
  7822. "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
  7823. "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
  7824. "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
  7825. "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
  7826. "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
  7827. "\x92\x26\xc1\x76\x20\x11\xeb\xba"
  7828. "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
  7829. "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
  7830. .rlen = 80 + 64,
  7831. }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
  7832. #ifdef __LITTLE_ENDIAN
  7833. .key = "\x08\x00" /* rta length */
  7834. "\x01\x00" /* rta type */
  7835. #else
  7836. .key = "\x00\x08" /* rta length */
  7837. "\x00\x01" /* rta type */
  7838. #endif
  7839. "\x00\x00\x00\x18" /* enc key length */
  7840. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7841. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7842. "\x22\x33\x44\x55\x66\x77\x88\x99"
  7843. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  7844. "\x33\x44\x55\x66\x77\x88\x99\xaa"
  7845. "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
  7846. "\x44\x55\x66\x77\x88\x99\xaa\xbb"
  7847. "\xcc\xdd\xee\xff\x11\x22\x33\x44"
  7848. "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  7849. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  7850. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  7851. .klen = 8 + 64 + 24,
  7852. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7853. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7854. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7855. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7856. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7857. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7858. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7859. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7860. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7861. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7862. .ilen = 64,
  7863. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  7864. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  7865. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  7866. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  7867. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  7868. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  7869. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  7870. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
  7871. "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
  7872. "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
  7873. "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
  7874. "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
  7875. "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
  7876. "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
  7877. "\x8d\x43\x98\xa7\x94\x16\x07\x02"
  7878. "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
  7879. .rlen = 64 + 64,
  7880. }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
  7881. #ifdef __LITTLE_ENDIAN
  7882. .key = "\x08\x00" /* rta length */
  7883. "\x01\x00" /* rta type */
  7884. #else
  7885. .key = "\x00\x08" /* rta length */
  7886. "\x00\x01" /* rta type */
  7887. #endif
  7888. "\x00\x00\x00\x20" /* enc key length */
  7889. "\x11\x22\x33\x44\x55\x66\x77\x88"
  7890. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  7891. "\x22\x33\x44\x55\x66\x77\x88\x99"
  7892. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  7893. "\x33\x44\x55\x66\x77\x88\x99\xaa"
  7894. "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
  7895. "\x44\x55\x66\x77\x88\x99\xaa\xbb"
  7896. "\xcc\xdd\xee\xff\x11\x22\x33\x44"
  7897. "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  7898. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  7899. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  7900. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  7901. .klen = 8 + 64 + 32,
  7902. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7903. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7904. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  7905. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  7906. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  7907. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  7908. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  7909. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  7910. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  7911. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  7912. .ilen = 64,
  7913. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  7914. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  7915. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  7916. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  7917. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  7918. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  7919. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  7920. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
  7921. "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
  7922. "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
  7923. "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
  7924. "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
  7925. "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
  7926. "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
  7927. "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
  7928. "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
  7929. .rlen = 64 + 64,
  7930. },
  7931. };
  7932. static struct cipher_testvec aes_lrw_enc_tv_template[] = {
  7933. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  7934. { /* LRW-32-AES 1 */
  7935. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  7936. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  7937. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  7938. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  7939. .klen = 32,
  7940. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7941. "\x00\x00\x00\x00\x00\x00\x00\x01",
  7942. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  7943. "\x38\x39\x41\x42\x43\x44\x45\x46",
  7944. .ilen = 16,
  7945. .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  7946. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  7947. .rlen = 16,
  7948. }, { /* LRW-32-AES 2 */
  7949. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  7950. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  7951. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  7952. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  7953. .klen = 32,
  7954. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7955. "\x00\x00\x00\x00\x00\x00\x00\x02",
  7956. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  7957. "\x38\x39\x41\x42\x43\x44\x45\x46",
  7958. .ilen = 16,
  7959. .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  7960. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  7961. .rlen = 16,
  7962. }, { /* LRW-32-AES 3 */
  7963. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  7964. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  7965. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  7966. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  7967. .klen = 32,
  7968. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7969. "\x00\x00\x00\x02\x00\x00\x00\x00",
  7970. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  7971. "\x38\x39\x41\x42\x43\x44\x45\x46",
  7972. .ilen = 16,
  7973. .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  7974. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  7975. .rlen = 16,
  7976. }, { /* LRW-32-AES 4 */
  7977. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  7978. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  7979. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  7980. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  7981. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  7982. .klen = 40,
  7983. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7984. "\x00\x00\x00\x00\x00\x00\x00\x01",
  7985. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  7986. "\x38\x39\x41\x42\x43\x44\x45\x46",
  7987. .ilen = 16,
  7988. .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  7989. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  7990. .rlen = 16,
  7991. }, { /* LRW-32-AES 5 */
  7992. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  7993. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  7994. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  7995. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  7996. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  7997. .klen = 40,
  7998. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7999. "\x00\x00\x00\x02\x00\x00\x00\x00",
  8000. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  8001. "\x38\x39\x41\x42\x43\x44\x45\x46",
  8002. .ilen = 16,
  8003. .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  8004. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  8005. .rlen = 16,
  8006. }, { /* LRW-32-AES 6 */
  8007. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  8008. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  8009. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  8010. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  8011. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  8012. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  8013. .klen = 48,
  8014. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8015. "\x00\x00\x00\x00\x00\x00\x00\x01",
  8016. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  8017. "\x38\x39\x41\x42\x43\x44\x45\x46",
  8018. .ilen = 16,
  8019. .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  8020. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  8021. .rlen = 16,
  8022. }, { /* LRW-32-AES 7 */
  8023. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  8024. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  8025. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  8026. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  8027. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  8028. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  8029. .klen = 48,
  8030. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8031. "\x00\x00\x00\x02\x00\x00\x00\x00",
  8032. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  8033. "\x38\x39\x41\x42\x43\x44\x45\x46",
  8034. .ilen = 16,
  8035. .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  8036. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  8037. .rlen = 16,
  8038. }, {
  8039. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  8040. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  8041. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  8042. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  8043. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  8044. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  8045. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  8046. .klen = 48,
  8047. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8048. "\x00\x00\x00\x00\x00\x00\x00\x01",
  8049. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  8050. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  8051. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  8052. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  8053. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  8054. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  8055. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  8056. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  8057. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  8058. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  8059. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  8060. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  8061. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  8062. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  8063. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  8064. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  8065. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  8066. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  8067. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  8068. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  8069. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  8070. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  8071. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  8072. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  8073. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  8074. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  8075. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  8076. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  8077. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  8078. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  8079. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  8080. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  8081. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  8082. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  8083. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  8084. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  8085. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  8086. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  8087. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  8088. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  8089. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  8090. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  8091. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  8092. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  8093. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  8094. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  8095. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  8096. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  8097. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  8098. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  8099. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  8100. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  8101. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  8102. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  8103. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  8104. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  8105. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  8106. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  8107. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  8108. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  8109. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  8110. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  8111. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  8112. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  8113. .ilen = 512,
  8114. .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  8115. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  8116. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  8117. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  8118. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  8119. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  8120. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  8121. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  8122. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  8123. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  8124. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  8125. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  8126. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  8127. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  8128. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  8129. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  8130. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  8131. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  8132. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  8133. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  8134. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  8135. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  8136. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  8137. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  8138. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  8139. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  8140. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  8141. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  8142. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  8143. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  8144. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  8145. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  8146. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  8147. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  8148. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  8149. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  8150. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  8151. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  8152. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  8153. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  8154. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  8155. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  8156. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  8157. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  8158. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  8159. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  8160. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  8161. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  8162. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  8163. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  8164. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  8165. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  8166. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  8167. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  8168. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  8169. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  8170. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  8171. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  8172. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  8173. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  8174. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  8175. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  8176. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  8177. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  8178. .rlen = 512,
  8179. }
  8180. };
  8181. static struct cipher_testvec aes_lrw_dec_tv_template[] = {
  8182. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  8183. /* same as enc vectors with input and result reversed */
  8184. { /* LRW-32-AES 1 */
  8185. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  8186. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  8187. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  8188. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  8189. .klen = 32,
  8190. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8191. "\x00\x00\x00\x00\x00\x00\x00\x01",
  8192. .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  8193. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  8194. .ilen = 16,
  8195. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  8196. "\x38\x39\x41\x42\x43\x44\x45\x46",
  8197. .rlen = 16,
  8198. }, { /* LRW-32-AES 2 */
  8199. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  8200. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  8201. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  8202. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  8203. .klen = 32,
  8204. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8205. "\x00\x00\x00\x00\x00\x00\x00\x02",
  8206. .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  8207. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  8208. .ilen = 16,
  8209. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  8210. "\x38\x39\x41\x42\x43\x44\x45\x46",
  8211. .rlen = 16,
  8212. }, { /* LRW-32-AES 3 */
  8213. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  8214. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  8215. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  8216. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  8217. .klen = 32,
  8218. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8219. "\x00\x00\x00\x02\x00\x00\x00\x00",
  8220. .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  8221. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  8222. .ilen = 16,
  8223. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  8224. "\x38\x39\x41\x42\x43\x44\x45\x46",
  8225. .rlen = 16,
  8226. }, { /* LRW-32-AES 4 */
  8227. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  8228. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  8229. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  8230. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  8231. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  8232. .klen = 40,
  8233. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8234. "\x00\x00\x00\x00\x00\x00\x00\x01",
  8235. .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  8236. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  8237. .ilen = 16,
  8238. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  8239. "\x38\x39\x41\x42\x43\x44\x45\x46",
  8240. .rlen = 16,
  8241. }, { /* LRW-32-AES 5 */
  8242. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  8243. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  8244. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  8245. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  8246. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  8247. .klen = 40,
  8248. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8249. "\x00\x00\x00\x02\x00\x00\x00\x00",
  8250. .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  8251. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  8252. .ilen = 16,
  8253. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  8254. "\x38\x39\x41\x42\x43\x44\x45\x46",
  8255. .rlen = 16,
  8256. }, { /* LRW-32-AES 6 */
  8257. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  8258. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  8259. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  8260. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  8261. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  8262. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  8263. .klen = 48,
  8264. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8265. "\x00\x00\x00\x00\x00\x00\x00\x01",
  8266. .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  8267. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  8268. .ilen = 16,
  8269. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  8270. "\x38\x39\x41\x42\x43\x44\x45\x46",
  8271. .rlen = 16,
  8272. }, { /* LRW-32-AES 7 */
  8273. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  8274. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  8275. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  8276. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  8277. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  8278. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  8279. .klen = 48,
  8280. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8281. "\x00\x00\x00\x02\x00\x00\x00\x00",
  8282. .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  8283. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  8284. .ilen = 16,
  8285. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  8286. "\x38\x39\x41\x42\x43\x44\x45\x46",
  8287. .rlen = 16,
  8288. }, {
  8289. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  8290. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  8291. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  8292. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  8293. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  8294. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  8295. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  8296. .klen = 48,
  8297. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8298. "\x00\x00\x00\x00\x00\x00\x00\x01",
  8299. .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  8300. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  8301. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  8302. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  8303. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  8304. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  8305. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  8306. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  8307. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  8308. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  8309. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  8310. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  8311. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  8312. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  8313. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  8314. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  8315. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  8316. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  8317. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  8318. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  8319. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  8320. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  8321. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  8322. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  8323. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  8324. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  8325. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  8326. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  8327. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  8328. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  8329. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  8330. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  8331. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  8332. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  8333. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  8334. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  8335. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  8336. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  8337. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  8338. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  8339. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  8340. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  8341. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  8342. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  8343. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  8344. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  8345. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  8346. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  8347. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  8348. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  8349. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  8350. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  8351. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  8352. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  8353. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  8354. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  8355. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  8356. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  8357. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  8358. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  8359. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  8360. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  8361. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  8362. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  8363. .ilen = 512,
  8364. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  8365. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  8366. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  8367. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  8368. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  8369. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  8370. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  8371. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  8372. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  8373. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  8374. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  8375. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  8376. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  8377. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  8378. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  8379. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  8380. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  8381. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  8382. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  8383. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  8384. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  8385. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  8386. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  8387. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  8388. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  8389. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  8390. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  8391. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  8392. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  8393. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  8394. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  8395. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  8396. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  8397. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  8398. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  8399. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  8400. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  8401. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  8402. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  8403. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  8404. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  8405. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  8406. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  8407. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  8408. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  8409. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  8410. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  8411. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  8412. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  8413. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  8414. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  8415. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  8416. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  8417. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  8418. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  8419. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  8420. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  8421. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  8422. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  8423. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  8424. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  8425. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  8426. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  8427. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  8428. .rlen = 512,
  8429. }
  8430. };
  8431. static struct cipher_testvec aes_xts_enc_tv_template[] = {
  8432. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  8433. { /* XTS-AES 1 */
  8434. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8435. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8436. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8437. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8438. .klen = 32,
  8439. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8440. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8441. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8442. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8443. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8444. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8445. .ilen = 32,
  8446. .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  8447. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  8448. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  8449. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  8450. .rlen = 32,
  8451. }, { /* XTS-AES 2 */
  8452. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  8453. "\x11\x11\x11\x11\x11\x11\x11\x11"
  8454. "\x22\x22\x22\x22\x22\x22\x22\x22"
  8455. "\x22\x22\x22\x22\x22\x22\x22\x22",
  8456. .klen = 32,
  8457. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  8458. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8459. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  8460. "\x44\x44\x44\x44\x44\x44\x44\x44"
  8461. "\x44\x44\x44\x44\x44\x44\x44\x44"
  8462. "\x44\x44\x44\x44\x44\x44\x44\x44",
  8463. .ilen = 32,
  8464. .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  8465. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  8466. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  8467. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  8468. .rlen = 32,
  8469. }, { /* XTS-AES 3 */
  8470. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  8471. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  8472. "\x22\x22\x22\x22\x22\x22\x22\x22"
  8473. "\x22\x22\x22\x22\x22\x22\x22\x22",
  8474. .klen = 32,
  8475. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  8476. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8477. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  8478. "\x44\x44\x44\x44\x44\x44\x44\x44"
  8479. "\x44\x44\x44\x44\x44\x44\x44\x44"
  8480. "\x44\x44\x44\x44\x44\x44\x44\x44",
  8481. .ilen = 32,
  8482. .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  8483. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  8484. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  8485. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  8486. .rlen = 32,
  8487. }, { /* XTS-AES 4 */
  8488. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  8489. "\x23\x53\x60\x28\x74\x71\x35\x26"
  8490. "\x31\x41\x59\x26\x53\x58\x97\x93"
  8491. "\x23\x84\x62\x64\x33\x83\x27\x95",
  8492. .klen = 32,
  8493. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8494. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8495. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8496. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8497. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8498. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8499. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8500. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8501. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8502. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8503. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8504. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8505. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8506. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8507. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8508. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8509. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8510. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8511. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8512. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8513. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8514. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8515. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8516. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8517. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8518. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8519. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8520. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8521. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8522. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8523. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8524. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8525. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8526. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  8527. "\x00\x01\x02\x03\x04\x05\x06\x07"
  8528. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8529. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8530. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8531. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8532. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8533. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8534. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8535. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8536. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8537. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8538. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8539. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8540. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8541. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8542. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8543. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8544. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8545. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8546. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8547. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8548. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8549. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8550. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8551. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8552. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8553. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8554. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8555. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8556. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8557. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8558. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  8559. .ilen = 512,
  8560. .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  8561. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  8562. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  8563. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  8564. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  8565. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  8566. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  8567. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  8568. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  8569. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  8570. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  8571. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  8572. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  8573. "\x22\x97\x61\x46\xae\x20\xce\x84"
  8574. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  8575. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  8576. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  8577. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  8578. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  8579. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  8580. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  8581. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  8582. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  8583. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  8584. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  8585. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  8586. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  8587. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  8588. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  8589. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  8590. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  8591. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  8592. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  8593. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  8594. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  8595. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  8596. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  8597. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  8598. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  8599. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  8600. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  8601. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  8602. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  8603. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  8604. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  8605. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  8606. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  8607. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  8608. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  8609. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  8610. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  8611. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  8612. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  8613. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  8614. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  8615. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  8616. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  8617. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  8618. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  8619. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  8620. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  8621. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  8622. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  8623. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  8624. .rlen = 512,
  8625. }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
  8626. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  8627. "\x23\x53\x60\x28\x74\x71\x35\x26"
  8628. "\x62\x49\x77\x57\x24\x70\x93\x69"
  8629. "\x99\x59\x57\x49\x66\x96\x76\x27"
  8630. "\x31\x41\x59\x26\x53\x58\x97\x93"
  8631. "\x23\x84\x62\x64\x33\x83\x27\x95"
  8632. "\x02\x88\x41\x97\x16\x93\x99\x37"
  8633. "\x51\x05\x82\x09\x74\x94\x45\x92",
  8634. .klen = 64,
  8635. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  8636. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8637. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8638. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8639. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8640. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8641. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8642. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8643. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8644. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8645. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8646. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8647. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8648. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8649. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8650. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8651. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8652. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8653. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8654. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8655. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8656. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8657. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8658. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8659. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8660. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8661. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8662. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8663. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8664. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8665. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8666. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8667. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8668. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8669. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8670. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  8671. "\x00\x01\x02\x03\x04\x05\x06\x07"
  8672. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8673. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8674. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8675. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8676. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8677. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8678. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8679. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8680. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8681. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8682. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8683. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8684. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8685. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8686. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8687. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8688. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8689. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8690. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8691. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8692. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8693. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8694. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8695. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8696. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8697. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8698. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8699. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8700. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8701. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8702. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  8703. .ilen = 512,
  8704. .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
  8705. "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
  8706. "\xea\x00\x80\x3f\x5e\x48\x23\x57"
  8707. "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
  8708. "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
  8709. "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
  8710. "\x68\x0a\x86\xac\x35\xad\xfc\x33"
  8711. "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
  8712. "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
  8713. "\xb1\x08\xfd\x10\x98\xba\xec\x70"
  8714. "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
  8715. "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
  8716. "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
  8717. "\xae\xba\x12\x29\x61\xd0\x3a\x75"
  8718. "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
  8719. "\x00\x02\x08\x87\x89\x14\x29\xca"
  8720. "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
  8721. "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
  8722. "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
  8723. "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
  8724. "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
  8725. "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
  8726. "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
  8727. "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
  8728. "\x93\xec\x05\xc5\x2e\x04\x93\xef"
  8729. "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
  8730. "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
  8731. "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
  8732. "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
  8733. "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
  8734. "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
  8735. "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
  8736. "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
  8737. "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
  8738. "\xbc\x48\x14\x57\x77\x8f\x61\x60"
  8739. "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
  8740. "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
  8741. "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
  8742. "\xf4\xc3\x33\xec\x44\x23\x88\x51"
  8743. "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
  8744. "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
  8745. "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
  8746. "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
  8747. "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
  8748. "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
  8749. "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
  8750. "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
  8751. "\x92\x5f\xed\xc4\xae\x74\xff\xac"
  8752. "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
  8753. "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
  8754. "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
  8755. "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
  8756. "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
  8757. "\x94\x30\x54\xff\x84\x01\x14\x93"
  8758. "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
  8759. "\x53\x76\x44\x1a\x77\xed\x43\x85"
  8760. "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
  8761. "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
  8762. "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
  8763. "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
  8764. "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
  8765. "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
  8766. "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
  8767. "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
  8768. .rlen = 512,
  8769. }
  8770. };
  8771. static struct cipher_testvec aes_xts_dec_tv_template[] = {
  8772. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  8773. { /* XTS-AES 1 */
  8774. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8775. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8776. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8777. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8778. .klen = 32,
  8779. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8780. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8781. .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  8782. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  8783. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  8784. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  8785. .ilen = 32,
  8786. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8787. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8788. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8789. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8790. .rlen = 32,
  8791. }, { /* XTS-AES 2 */
  8792. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  8793. "\x11\x11\x11\x11\x11\x11\x11\x11"
  8794. "\x22\x22\x22\x22\x22\x22\x22\x22"
  8795. "\x22\x22\x22\x22\x22\x22\x22\x22",
  8796. .klen = 32,
  8797. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  8798. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8799. .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  8800. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  8801. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  8802. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  8803. .ilen = 32,
  8804. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  8805. "\x44\x44\x44\x44\x44\x44\x44\x44"
  8806. "\x44\x44\x44\x44\x44\x44\x44\x44"
  8807. "\x44\x44\x44\x44\x44\x44\x44\x44",
  8808. .rlen = 32,
  8809. }, { /* XTS-AES 3 */
  8810. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  8811. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  8812. "\x22\x22\x22\x22\x22\x22\x22\x22"
  8813. "\x22\x22\x22\x22\x22\x22\x22\x22",
  8814. .klen = 32,
  8815. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  8816. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8817. .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  8818. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  8819. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  8820. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  8821. .ilen = 32,
  8822. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  8823. "\x44\x44\x44\x44\x44\x44\x44\x44"
  8824. "\x44\x44\x44\x44\x44\x44\x44\x44"
  8825. "\x44\x44\x44\x44\x44\x44\x44\x44",
  8826. .rlen = 32,
  8827. }, { /* XTS-AES 4 */
  8828. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  8829. "\x23\x53\x60\x28\x74\x71\x35\x26"
  8830. "\x31\x41\x59\x26\x53\x58\x97\x93"
  8831. "\x23\x84\x62\x64\x33\x83\x27\x95",
  8832. .klen = 32,
  8833. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  8834. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8835. .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  8836. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  8837. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  8838. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  8839. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  8840. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  8841. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  8842. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  8843. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  8844. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  8845. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  8846. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  8847. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  8848. "\x22\x97\x61\x46\xae\x20\xce\x84"
  8849. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  8850. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  8851. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  8852. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  8853. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  8854. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  8855. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  8856. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  8857. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  8858. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  8859. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  8860. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  8861. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  8862. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  8863. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  8864. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  8865. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  8866. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  8867. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  8868. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  8869. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  8870. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  8871. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  8872. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  8873. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  8874. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  8875. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  8876. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  8877. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  8878. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  8879. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  8880. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  8881. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  8882. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  8883. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  8884. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  8885. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  8886. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  8887. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  8888. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  8889. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  8890. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  8891. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  8892. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  8893. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  8894. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  8895. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  8896. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  8897. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  8898. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  8899. .ilen = 512,
  8900. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8901. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8902. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8903. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8904. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8905. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8906. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8907. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8908. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8909. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8910. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8911. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8912. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8913. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8914. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8915. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8916. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8917. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8918. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8919. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8920. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8921. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8922. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8923. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8924. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8925. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8926. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8927. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8928. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8929. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8930. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8931. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  8932. "\x00\x01\x02\x03\x04\x05\x06\x07"
  8933. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8934. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8935. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8936. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8937. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8938. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8939. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8940. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8941. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8942. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8943. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8944. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8945. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8946. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8947. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8948. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8949. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8950. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8951. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8952. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8953. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8954. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8955. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8956. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8957. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8958. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8959. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8960. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8961. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8962. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8963. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  8964. .rlen = 512,
  8965. }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
  8966. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  8967. "\x23\x53\x60\x28\x74\x71\x35\x26"
  8968. "\x62\x49\x77\x57\x24\x70\x93\x69"
  8969. "\x99\x59\x57\x49\x66\x96\x76\x27"
  8970. "\x31\x41\x59\x26\x53\x58\x97\x93"
  8971. "\x23\x84\x62\x64\x33\x83\x27\x95"
  8972. "\x02\x88\x41\x97\x16\x93\x99\x37"
  8973. "\x51\x05\x82\x09\x74\x94\x45\x92",
  8974. .klen = 64,
  8975. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  8976. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8977. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8978. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8979. .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
  8980. "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
  8981. "\xea\x00\x80\x3f\x5e\x48\x23\x57"
  8982. "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
  8983. "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
  8984. "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
  8985. "\x68\x0a\x86\xac\x35\xad\xfc\x33"
  8986. "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
  8987. "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
  8988. "\xb1\x08\xfd\x10\x98\xba\xec\x70"
  8989. "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
  8990. "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
  8991. "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
  8992. "\xae\xba\x12\x29\x61\xd0\x3a\x75"
  8993. "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
  8994. "\x00\x02\x08\x87\x89\x14\x29\xca"
  8995. "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
  8996. "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
  8997. "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
  8998. "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
  8999. "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
  9000. "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
  9001. "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
  9002. "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
  9003. "\x93\xec\x05\xc5\x2e\x04\x93\xef"
  9004. "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
  9005. "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
  9006. "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
  9007. "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
  9008. "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
  9009. "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
  9010. "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
  9011. "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
  9012. "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
  9013. "\xbc\x48\x14\x57\x77\x8f\x61\x60"
  9014. "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
  9015. "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
  9016. "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
  9017. "\xf4\xc3\x33\xec\x44\x23\x88\x51"
  9018. "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
  9019. "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
  9020. "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
  9021. "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
  9022. "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
  9023. "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
  9024. "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
  9025. "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
  9026. "\x92\x5f\xed\xc4\xae\x74\xff\xac"
  9027. "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
  9028. "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
  9029. "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
  9030. "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
  9031. "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
  9032. "\x94\x30\x54\xff\x84\x01\x14\x93"
  9033. "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
  9034. "\x53\x76\x44\x1a\x77\xed\x43\x85"
  9035. "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
  9036. "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
  9037. "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
  9038. "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
  9039. "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
  9040. "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
  9041. "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
  9042. "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
  9043. .ilen = 512,
  9044. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9045. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9046. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9047. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  9048. "\x20\x21\x22\x23\x24\x25\x26\x27"
  9049. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  9050. "\x30\x31\x32\x33\x34\x35\x36\x37"
  9051. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  9052. "\x40\x41\x42\x43\x44\x45\x46\x47"
  9053. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  9054. "\x50\x51\x52\x53\x54\x55\x56\x57"
  9055. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  9056. "\x60\x61\x62\x63\x64\x65\x66\x67"
  9057. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  9058. "\x70\x71\x72\x73\x74\x75\x76\x77"
  9059. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  9060. "\x80\x81\x82\x83\x84\x85\x86\x87"
  9061. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  9062. "\x90\x91\x92\x93\x94\x95\x96\x97"
  9063. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  9064. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  9065. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  9066. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  9067. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  9068. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9069. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  9070. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  9071. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  9072. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  9073. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  9074. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  9075. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  9076. "\x00\x01\x02\x03\x04\x05\x06\x07"
  9077. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9078. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9079. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  9080. "\x20\x21\x22\x23\x24\x25\x26\x27"
  9081. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  9082. "\x30\x31\x32\x33\x34\x35\x36\x37"
  9083. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  9084. "\x40\x41\x42\x43\x44\x45\x46\x47"
  9085. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  9086. "\x50\x51\x52\x53\x54\x55\x56\x57"
  9087. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  9088. "\x60\x61\x62\x63\x64\x65\x66\x67"
  9089. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  9090. "\x70\x71\x72\x73\x74\x75\x76\x77"
  9091. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  9092. "\x80\x81\x82\x83\x84\x85\x86\x87"
  9093. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  9094. "\x90\x91\x92\x93\x94\x95\x96\x97"
  9095. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  9096. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  9097. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  9098. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  9099. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  9100. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9101. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  9102. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  9103. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  9104. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  9105. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  9106. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  9107. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  9108. .rlen = 512,
  9109. }
  9110. };
  9111. static struct cipher_testvec aes_ctr_enc_tv_template[] = {
  9112. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  9113. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  9114. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  9115. .klen = 16,
  9116. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  9117. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  9118. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  9119. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  9120. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  9121. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  9122. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  9123. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  9124. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  9125. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  9126. .ilen = 64,
  9127. .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  9128. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  9129. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  9130. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  9131. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  9132. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  9133. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  9134. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  9135. .rlen = 64,
  9136. }, {
  9137. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  9138. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  9139. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  9140. .klen = 24,
  9141. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  9142. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  9143. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  9144. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  9145. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  9146. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  9147. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  9148. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  9149. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  9150. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  9151. .ilen = 64,
  9152. .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  9153. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  9154. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  9155. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  9156. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  9157. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  9158. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  9159. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  9160. .rlen = 64,
  9161. }, {
  9162. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  9163. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  9164. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  9165. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  9166. .klen = 32,
  9167. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  9168. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  9169. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  9170. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  9171. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  9172. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  9173. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  9174. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  9175. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  9176. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  9177. .ilen = 64,
  9178. .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  9179. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  9180. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  9181. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  9182. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  9183. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  9184. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  9185. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  9186. .rlen = 64,
  9187. }
  9188. };
  9189. static struct cipher_testvec aes_ctr_dec_tv_template[] = {
  9190. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  9191. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  9192. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  9193. .klen = 16,
  9194. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  9195. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  9196. .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  9197. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  9198. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  9199. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  9200. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  9201. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  9202. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  9203. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  9204. .ilen = 64,
  9205. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  9206. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  9207. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  9208. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  9209. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  9210. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  9211. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  9212. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  9213. .rlen = 64,
  9214. }, {
  9215. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  9216. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  9217. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  9218. .klen = 24,
  9219. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  9220. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  9221. .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  9222. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  9223. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  9224. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  9225. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  9226. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  9227. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  9228. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  9229. .ilen = 64,
  9230. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  9231. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  9232. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  9233. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  9234. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  9235. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  9236. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  9237. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  9238. .rlen = 64,
  9239. }, {
  9240. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  9241. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  9242. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  9243. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  9244. .klen = 32,
  9245. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  9246. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  9247. .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  9248. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  9249. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  9250. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  9251. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  9252. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  9253. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  9254. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  9255. .ilen = 64,
  9256. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  9257. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  9258. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  9259. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  9260. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  9261. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  9262. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  9263. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  9264. .rlen = 64,
  9265. }
  9266. };
  9267. static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
  9268. { /* From RFC 3686 */
  9269. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  9270. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  9271. "\x00\x00\x00\x30",
  9272. .klen = 20,
  9273. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  9274. .input = "Single block msg",
  9275. .ilen = 16,
  9276. .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  9277. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  9278. .rlen = 16,
  9279. }, {
  9280. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  9281. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  9282. "\x00\x6c\xb6\xdb",
  9283. .klen = 20,
  9284. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  9285. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9286. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9287. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9288. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  9289. .ilen = 32,
  9290. .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  9291. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  9292. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  9293. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  9294. .rlen = 32,
  9295. }, {
  9296. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  9297. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  9298. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  9299. "\x00\x00\x00\x48",
  9300. .klen = 28,
  9301. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  9302. .input = "Single block msg",
  9303. .ilen = 16,
  9304. .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  9305. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  9306. .rlen = 16,
  9307. }, {
  9308. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  9309. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  9310. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  9311. "\x00\x96\xb0\x3b",
  9312. .klen = 28,
  9313. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  9314. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9315. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9316. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9317. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  9318. .ilen = 32,
  9319. .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  9320. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  9321. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  9322. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  9323. .rlen = 32,
  9324. }, {
  9325. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  9326. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  9327. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  9328. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  9329. "\x00\x00\x00\x60",
  9330. .klen = 36,
  9331. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  9332. .input = "Single block msg",
  9333. .ilen = 16,
  9334. .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  9335. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  9336. .rlen = 16,
  9337. }, {
  9338. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  9339. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  9340. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  9341. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  9342. "\x00\xfa\xac\x24",
  9343. .klen = 36,
  9344. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  9345. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9346. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9347. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9348. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  9349. .ilen = 32,
  9350. .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  9351. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  9352. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  9353. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  9354. .rlen = 32,
  9355. }, {
  9356. // generated using Crypto++
  9357. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9358. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9359. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9360. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  9361. "\x00\x00\x00\x00",
  9362. .klen = 32 + 4,
  9363. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  9364. .input =
  9365. "\x00\x01\x02\x03\x04\x05\x06\x07"
  9366. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9367. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9368. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  9369. "\x20\x21\x22\x23\x24\x25\x26\x27"
  9370. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  9371. "\x30\x31\x32\x33\x34\x35\x36\x37"
  9372. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  9373. "\x40\x41\x42\x43\x44\x45\x46\x47"
  9374. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  9375. "\x50\x51\x52\x53\x54\x55\x56\x57"
  9376. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  9377. "\x60\x61\x62\x63\x64\x65\x66\x67"
  9378. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  9379. "\x70\x71\x72\x73\x74\x75\x76\x77"
  9380. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  9381. "\x80\x81\x82\x83\x84\x85\x86\x87"
  9382. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  9383. "\x90\x91\x92\x93\x94\x95\x96\x97"
  9384. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  9385. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  9386. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  9387. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  9388. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  9389. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9390. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  9391. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  9392. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  9393. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  9394. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  9395. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  9396. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  9397. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  9398. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  9399. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  9400. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  9401. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  9402. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  9403. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  9404. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  9405. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  9406. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  9407. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  9408. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  9409. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  9410. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  9411. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  9412. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  9413. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  9414. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  9415. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  9416. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  9417. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  9418. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  9419. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  9420. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  9421. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  9422. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  9423. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  9424. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  9425. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  9426. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  9427. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  9428. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  9429. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  9430. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  9431. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  9432. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  9433. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  9434. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  9435. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  9436. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  9437. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  9438. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  9439. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  9440. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  9441. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  9442. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  9443. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  9444. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  9445. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  9446. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  9447. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  9448. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  9449. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  9450. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  9451. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  9452. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  9453. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  9454. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  9455. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  9456. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  9457. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  9458. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  9459. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  9460. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  9461. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  9462. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  9463. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  9464. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  9465. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  9466. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  9467. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  9468. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  9469. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  9470. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  9471. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  9472. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  9473. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  9474. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  9475. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  9476. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  9477. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  9478. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  9479. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  9480. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  9481. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  9482. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  9483. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  9484. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  9485. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  9486. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  9487. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  9488. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  9489. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  9490. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  9491. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  9492. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  9493. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  9494. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  9495. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  9496. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  9497. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  9498. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  9499. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  9500. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  9501. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  9502. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  9503. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  9504. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  9505. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  9506. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  9507. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  9508. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  9509. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  9510. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  9511. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  9512. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  9513. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  9514. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  9515. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  9516. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  9517. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  9518. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  9519. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  9520. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  9521. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  9522. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  9523. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  9524. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  9525. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  9526. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  9527. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  9528. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  9529. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  9530. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  9531. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  9532. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  9533. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  9534. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  9535. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  9536. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  9537. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  9538. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  9539. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  9540. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  9541. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  9542. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  9543. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  9544. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  9545. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  9546. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  9547. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  9548. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  9549. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  9550. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  9551. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  9552. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  9553. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  9554. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  9555. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  9556. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  9557. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  9558. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  9559. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  9560. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  9561. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  9562. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  9563. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  9564. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  9565. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  9566. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  9567. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  9568. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  9569. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  9570. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  9571. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  9572. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  9573. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  9574. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  9575. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  9576. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  9577. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  9578. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  9579. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  9580. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  9581. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  9582. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  9583. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  9584. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  9585. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  9586. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  9587. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  9588. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  9589. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  9590. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  9591. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  9592. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  9593. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  9594. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  9595. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  9596. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  9597. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  9598. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  9599. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  9600. "\x28\x37\x46\x55\x64\x73\x82\x91"
  9601. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  9602. "\x18\x27\x36\x45\x54\x63\x72\x81"
  9603. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  9604. "\x08\x17\x26\x35\x44\x53\x62\x71"
  9605. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  9606. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  9607. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  9608. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  9609. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  9610. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  9611. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  9612. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  9613. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  9614. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  9615. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  9616. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  9617. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  9618. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  9619. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  9620. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  9621. "\x00\x11\x22\x33\x44\x55\x66\x77"
  9622. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  9623. "\x10\x21\x32\x43\x54\x65\x76\x87"
  9624. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  9625. "\x20\x31\x42\x53\x64\x75\x86\x97"
  9626. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  9627. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  9628. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  9629. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  9630. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  9631. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  9632. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  9633. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  9634. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  9635. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  9636. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  9637. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  9638. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  9639. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  9640. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  9641. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  9642. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  9643. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  9644. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  9645. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  9646. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  9647. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  9648. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  9649. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  9650. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  9651. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  9652. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  9653. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  9654. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  9655. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  9656. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  9657. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  9658. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  9659. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  9660. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  9661. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  9662. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  9663. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  9664. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  9665. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  9666. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  9667. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  9668. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  9669. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  9670. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  9671. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  9672. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  9673. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  9674. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  9675. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  9676. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  9677. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  9678. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  9679. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  9680. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  9681. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  9682. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  9683. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  9684. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  9685. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  9686. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  9687. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  9688. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  9689. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  9690. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  9691. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  9692. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  9693. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  9694. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  9695. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  9696. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  9697. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  9698. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  9699. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  9700. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  9701. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  9702. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  9703. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  9704. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  9705. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  9706. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  9707. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  9708. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  9709. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  9710. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  9711. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  9712. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  9713. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  9714. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  9715. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  9716. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  9717. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  9718. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  9719. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  9720. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  9721. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  9722. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  9723. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  9724. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  9725. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  9726. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  9727. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  9728. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  9729. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  9730. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  9731. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  9732. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  9733. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  9734. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  9735. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  9736. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  9737. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  9738. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  9739. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  9740. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  9741. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  9742. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  9743. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  9744. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  9745. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  9746. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  9747. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  9748. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  9749. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  9750. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  9751. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  9752. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  9753. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  9754. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  9755. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  9756. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  9757. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  9758. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  9759. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  9760. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  9761. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  9762. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  9763. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  9764. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  9765. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  9766. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  9767. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  9768. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  9769. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  9770. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  9771. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  9772. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  9773. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  9774. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  9775. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  9776. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  9777. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  9778. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  9779. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  9780. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  9781. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  9782. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  9783. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  9784. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  9785. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  9786. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  9787. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  9788. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  9789. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  9790. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  9791. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  9792. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  9793. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  9794. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  9795. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  9796. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  9797. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  9798. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  9799. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  9800. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  9801. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  9802. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  9803. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  9804. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  9805. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  9806. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  9807. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  9808. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  9809. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  9810. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  9811. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  9812. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  9813. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  9814. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  9815. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  9816. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  9817. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  9818. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  9819. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  9820. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  9821. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  9822. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  9823. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  9824. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  9825. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  9826. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  9827. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  9828. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  9829. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  9830. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  9831. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  9832. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  9833. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  9834. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  9835. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  9836. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  9837. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  9838. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  9839. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  9840. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  9841. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  9842. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  9843. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  9844. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  9845. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  9846. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  9847. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  9848. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  9849. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  9850. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  9851. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  9852. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  9853. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  9854. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  9855. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  9856. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  9857. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  9858. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  9859. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  9860. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  9861. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  9862. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  9863. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  9864. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  9865. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  9866. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  9867. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  9868. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  9869. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  9870. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  9871. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  9872. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  9873. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  9874. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  9875. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  9876. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  9877. "\x00\x21\x42\x63",
  9878. .ilen = 4100,
  9879. .result =
  9880. "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
  9881. "\xae\xff\x91\x3a\x44\xcf\x38\x32"
  9882. "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
  9883. "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
  9884. "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
  9885. "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
  9886. "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
  9887. "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
  9888. "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
  9889. "\x18\xff\x75\x6d\x06\x2d\x00\xab"
  9890. "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
  9891. "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
  9892. "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
  9893. "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
  9894. "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
  9895. "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
  9896. "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
  9897. "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
  9898. "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
  9899. "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
  9900. "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
  9901. "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
  9902. "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
  9903. "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
  9904. "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
  9905. "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
  9906. "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
  9907. "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
  9908. "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
  9909. "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
  9910. "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
  9911. "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
  9912. "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
  9913. "\x6a\x25\x15\x33\x4e\x45\x08\xec"
  9914. "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
  9915. "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
  9916. "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
  9917. "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
  9918. "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
  9919. "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
  9920. "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
  9921. "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
  9922. "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
  9923. "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
  9924. "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
  9925. "\x04\x02\xef\xd3\x44\xde\x76\x31"
  9926. "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
  9927. "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
  9928. "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
  9929. "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
  9930. "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
  9931. "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
  9932. "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
  9933. "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
  9934. "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
  9935. "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
  9936. "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
  9937. "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
  9938. "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
  9939. "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
  9940. "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
  9941. "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
  9942. "\x32\x03\xed\xf0\x50\x1c\x56\x39"
  9943. "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
  9944. "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
  9945. "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
  9946. "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
  9947. "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
  9948. "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
  9949. "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
  9950. "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
  9951. "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
  9952. "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
  9953. "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
  9954. "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
  9955. "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
  9956. "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
  9957. "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
  9958. "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
  9959. "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
  9960. "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
  9961. "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
  9962. "\x69\x3a\x29\x23\xac\x86\x32\xa5"
  9963. "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
  9964. "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
  9965. "\x59\x6a\xd3\x50\x59\x43\x59\xde"
  9966. "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
  9967. "\x18\x34\x0d\x1a\x63\x33\xed\x10"
  9968. "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
  9969. "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
  9970. "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
  9971. "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
  9972. "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
  9973. "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
  9974. "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
  9975. "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
  9976. "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
  9977. "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
  9978. "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
  9979. "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
  9980. "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
  9981. "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
  9982. "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
  9983. "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
  9984. "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
  9985. "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
  9986. "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
  9987. "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
  9988. "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
  9989. "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
  9990. "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
  9991. "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
  9992. "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
  9993. "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
  9994. "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
  9995. "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
  9996. "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
  9997. "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
  9998. "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
  9999. "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
  10000. "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
  10001. "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
  10002. "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
  10003. "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
  10004. "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
  10005. "\x26\x39\x83\x94\xef\x27\xd8\x53"
  10006. "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
  10007. "\x43\x7c\x95\x0a\x53\xef\x66\xda"
  10008. "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
  10009. "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
  10010. "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
  10011. "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
  10012. "\x88\xee\x73\xcf\x66\x2f\x52\x56"
  10013. "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
  10014. "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
  10015. "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
  10016. "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
  10017. "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
  10018. "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
  10019. "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
  10020. "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
  10021. "\xba\x61\x34\x38\x7c\xda\x48\x3e"
  10022. "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
  10023. "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
  10024. "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
  10025. "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
  10026. "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
  10027. "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
  10028. "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
  10029. "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
  10030. "\x35\x12\xe3\x36\x28\x27\x36\x58"
  10031. "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
  10032. "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
  10033. "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
  10034. "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
  10035. "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
  10036. "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
  10037. "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
  10038. "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
  10039. "\x89\xf3\x78\x35\x44\x62\x78\x72"
  10040. "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
  10041. "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
  10042. "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
  10043. "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
  10044. "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
  10045. "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
  10046. "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
  10047. "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
  10048. "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
  10049. "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
  10050. "\xd2\x49\x77\x81\x6d\x90\x70\xae"
  10051. "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
  10052. "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
  10053. "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
  10054. "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
  10055. "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
  10056. "\x45\x42\x27\x75\x50\xe5\xee\xb8"
  10057. "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
  10058. "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
  10059. "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
  10060. "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
  10061. "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
  10062. "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
  10063. "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
  10064. "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
  10065. "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
  10066. "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
  10067. "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
  10068. "\xa9\x21\x2b\x92\x94\x87\x62\x57"
  10069. "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
  10070. "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
  10071. "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
  10072. "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
  10073. "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
  10074. "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
  10075. "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
  10076. "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
  10077. "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
  10078. "\x69\x34\x78\x61\x24\x21\x9c\x8a"
  10079. "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
  10080. "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
  10081. "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
  10082. "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
  10083. "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
  10084. "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
  10085. "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
  10086. "\xb1\x95\x28\x86\x20\xe9\x17\x49"
  10087. "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
  10088. "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
  10089. "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
  10090. "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
  10091. "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
  10092. "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
  10093. "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
  10094. "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
  10095. "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
  10096. "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
  10097. "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
  10098. "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
  10099. "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
  10100. "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
  10101. "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
  10102. "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
  10103. "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
  10104. "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
  10105. "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
  10106. "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
  10107. "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
  10108. "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
  10109. "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
  10110. "\x29\x90\x46\x30\x92\x69\x7d\x13"
  10111. "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
  10112. "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
  10113. "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
  10114. "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
  10115. "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
  10116. "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
  10117. "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
  10118. "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
  10119. "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
  10120. "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
  10121. "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
  10122. "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
  10123. "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
  10124. "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
  10125. "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
  10126. "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
  10127. "\x77\x65\x08\x60\x11\x76\x4c\x8d"
  10128. "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
  10129. "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
  10130. "\x03\xd1\x24\x95\xec\x6d\xab\x38"
  10131. "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
  10132. "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
  10133. "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
  10134. "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
  10135. "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
  10136. "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
  10137. "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
  10138. "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
  10139. "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
  10140. "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
  10141. "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
  10142. "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
  10143. "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
  10144. "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
  10145. "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
  10146. "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
  10147. "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
  10148. "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
  10149. "\xe5\x79\x81\x73\xcd\x43\x59\x68"
  10150. "\x73\x02\x3b\x78\x21\x72\x43\x00"
  10151. "\x49\x17\xf7\x00\xaf\x68\x24\x53"
  10152. "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
  10153. "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
  10154. "\x11\x94\x13\x69\x51\x09\x28\xde"
  10155. "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
  10156. "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
  10157. "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
  10158. "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
  10159. "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
  10160. "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
  10161. "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
  10162. "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
  10163. "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
  10164. "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
  10165. "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
  10166. "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
  10167. "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
  10168. "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
  10169. "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
  10170. "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
  10171. "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
  10172. "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
  10173. "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
  10174. "\x69\xdc\xab\x24\x57\x60\x47\xc1"
  10175. "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
  10176. "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
  10177. "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
  10178. "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
  10179. "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
  10180. "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
  10181. "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
  10182. "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
  10183. "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
  10184. "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
  10185. "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
  10186. "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
  10187. "\x85\x62\x82\x70\x18\xe2\x9a\x78"
  10188. "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
  10189. "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
  10190. "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
  10191. "\x35\xf3\x61\x06\x72\x84\xc4\x32"
  10192. "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
  10193. "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
  10194. "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
  10195. "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
  10196. "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
  10197. "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
  10198. "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
  10199. "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
  10200. "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
  10201. "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
  10202. "\x4f\x73\x38\x09\x75\x64\x48\xe0"
  10203. "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
  10204. "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
  10205. "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
  10206. "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
  10207. "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
  10208. "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
  10209. "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
  10210. "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
  10211. "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
  10212. "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
  10213. "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
  10214. "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
  10215. "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
  10216. "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
  10217. "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
  10218. "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
  10219. "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
  10220. "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
  10221. "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
  10222. "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
  10223. "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
  10224. "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
  10225. "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
  10226. "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
  10227. "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
  10228. "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
  10229. "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
  10230. "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
  10231. "\xce\x4d\x5f\x18\x60\xce\x87\x22"
  10232. "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
  10233. "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
  10234. "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
  10235. "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
  10236. "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
  10237. "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
  10238. "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
  10239. "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
  10240. "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
  10241. "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
  10242. "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
  10243. "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
  10244. "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
  10245. "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
  10246. "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
  10247. "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
  10248. "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
  10249. "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
  10250. "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
  10251. "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
  10252. "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
  10253. "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
  10254. "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
  10255. "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
  10256. "\xce\x54\xf9\x18\x58\xb5\xff\x44"
  10257. "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
  10258. "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
  10259. "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
  10260. "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
  10261. "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
  10262. "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
  10263. "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
  10264. "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
  10265. "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
  10266. "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
  10267. "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
  10268. "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
  10269. "\x0c\xd6\x04\x14\xde\x51\x74\x75"
  10270. "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
  10271. "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
  10272. "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
  10273. "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
  10274. "\x75\x46\x65\x4e\x07\x34\x37\xa3"
  10275. "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
  10276. "\x69\x24\x0e\x38\x67\x43\x8c\xde"
  10277. "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
  10278. "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
  10279. "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
  10280. "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
  10281. "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
  10282. "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
  10283. "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
  10284. "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
  10285. "\x91\x7d\x62\x64\x96\x72\xde\xfc"
  10286. "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
  10287. "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
  10288. "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
  10289. "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
  10290. "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
  10291. "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
  10292. "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
  10293. "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
  10294. "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
  10295. "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
  10296. "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
  10297. "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
  10298. "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
  10299. "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
  10300. "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
  10301. "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
  10302. "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
  10303. "\xae\xed\x39\x88\x42\x11\x3c\xed"
  10304. "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
  10305. "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
  10306. "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
  10307. "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
  10308. "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
  10309. "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
  10310. "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
  10311. "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
  10312. "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
  10313. "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
  10314. "\x34\x17\xde\xba\x47\xf1\x06\x18"
  10315. "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
  10316. "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
  10317. "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
  10318. "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
  10319. "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
  10320. "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
  10321. "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
  10322. "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
  10323. "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
  10324. "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
  10325. "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
  10326. "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
  10327. "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
  10328. "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
  10329. "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
  10330. "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
  10331. "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
  10332. "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
  10333. "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
  10334. "\x2c\x56\x39\x79\x0f\x69\x44\x75"
  10335. "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
  10336. "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
  10337. "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
  10338. "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
  10339. "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
  10340. "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
  10341. "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
  10342. "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
  10343. "\x63\x9b\xce\x61\x24\x79\xc0\x70"
  10344. "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
  10345. "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
  10346. "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
  10347. "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
  10348. "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
  10349. "\x74\x56\x58\x40\x02\x37\x52\x2c"
  10350. "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
  10351. "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
  10352. "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
  10353. "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
  10354. "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
  10355. "\xed\x38\x80\x36\x72\x43\x27\x49"
  10356. "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
  10357. "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
  10358. "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
  10359. "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
  10360. "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
  10361. "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
  10362. "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
  10363. "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
  10364. "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
  10365. "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
  10366. "\x12\xee\x30\xfe\xd8\x30\xef\x34"
  10367. "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
  10368. "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
  10369. "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
  10370. "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
  10371. "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
  10372. "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
  10373. "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
  10374. "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
  10375. "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
  10376. "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
  10377. "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
  10378. "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
  10379. "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
  10380. "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
  10381. "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
  10382. "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
  10383. "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
  10384. "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
  10385. "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
  10386. "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
  10387. "\x44\x12\xfb\x73\x77\xd4\x13\x39"
  10388. "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
  10389. "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
  10390. "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
  10391. "\x4b\xef\x31\x18\xea\xac\xb1\x84"
  10392. "\x21\xed\xda\x86",
  10393. .rlen = 4100,
  10394. .np = 2,
  10395. .tap = { 4064, 36 },
  10396. },
  10397. };
  10398. static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
  10399. { /* From RFC 3686 */
  10400. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  10401. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  10402. "\x00\x00\x00\x30",
  10403. .klen = 20,
  10404. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10405. .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  10406. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  10407. .ilen = 16,
  10408. .result = "Single block msg",
  10409. .rlen = 16,
  10410. }, {
  10411. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  10412. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  10413. "\x00\x6c\xb6\xdb",
  10414. .klen = 20,
  10415. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  10416. .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  10417. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  10418. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  10419. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  10420. .ilen = 32,
  10421. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  10422. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10423. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10424. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  10425. .rlen = 32,
  10426. }, {
  10427. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  10428. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  10429. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  10430. "\x00\x00\x00\x48",
  10431. .klen = 28,
  10432. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  10433. .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  10434. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  10435. .ilen = 16,
  10436. .result = "Single block msg",
  10437. .rlen = 16,
  10438. }, {
  10439. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  10440. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  10441. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  10442. "\x00\x96\xb0\x3b",
  10443. .klen = 28,
  10444. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  10445. .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  10446. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  10447. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  10448. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  10449. .ilen = 32,
  10450. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  10451. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10452. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10453. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  10454. .rlen = 32,
  10455. }, {
  10456. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  10457. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  10458. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  10459. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  10460. "\x00\x00\x00\x60",
  10461. .klen = 36,
  10462. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  10463. .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  10464. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  10465. .ilen = 16,
  10466. .result = "Single block msg",
  10467. .rlen = 16,
  10468. }, {
  10469. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  10470. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  10471. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  10472. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  10473. "\x00\xfa\xac\x24",
  10474. .klen = 36,
  10475. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  10476. .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  10477. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  10478. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  10479. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  10480. .ilen = 32,
  10481. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  10482. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10483. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10484. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  10485. .rlen = 32,
  10486. },
  10487. };
  10488. static struct cipher_testvec aes_ofb_enc_tv_template[] = {
  10489. /* From NIST Special Publication 800-38A, Appendix F.5 */
  10490. {
  10491. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  10492. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  10493. .klen = 16,
  10494. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
  10495. "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  10496. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  10497. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  10498. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  10499. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  10500. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  10501. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  10502. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  10503. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  10504. .ilen = 64,
  10505. .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
  10506. "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
  10507. "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
  10508. "\x3c\x52\xda\xc5\x4e\xd8\x25"
  10509. "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
  10510. "\x44\xf7\xa8\x22\x60\xed\xcc"
  10511. "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
  10512. "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
  10513. .rlen = 64,
  10514. }
  10515. };
  10516. static struct cipher_testvec aes_ofb_dec_tv_template[] = {
  10517. /* From NIST Special Publication 800-38A, Appendix F.5 */
  10518. {
  10519. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  10520. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  10521. .klen = 16,
  10522. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
  10523. "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  10524. .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
  10525. "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
  10526. "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
  10527. "\x3c\x52\xda\xc5\x4e\xd8\x25"
  10528. "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
  10529. "\x44\xf7\xa8\x22\x60\xed\xcc"
  10530. "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
  10531. "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
  10532. .ilen = 64,
  10533. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  10534. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  10535. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  10536. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  10537. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  10538. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  10539. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  10540. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  10541. .rlen = 64,
  10542. }
  10543. };
  10544. static struct aead_testvec aes_gcm_enc_tv_template[] = {
  10545. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  10546. .key = zeroed_string,
  10547. .klen = 16,
  10548. .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
  10549. "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
  10550. .rlen = 16,
  10551. }, {
  10552. .key = zeroed_string,
  10553. .klen = 16,
  10554. .input = zeroed_string,
  10555. .ilen = 16,
  10556. .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
  10557. "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
  10558. "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
  10559. "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
  10560. .rlen = 32,
  10561. }, {
  10562. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10563. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  10564. .klen = 16,
  10565. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  10566. "\xde\xca\xf8\x88",
  10567. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  10568. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  10569. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  10570. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  10571. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  10572. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  10573. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  10574. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  10575. .ilen = 64,
  10576. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  10577. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  10578. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  10579. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  10580. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  10581. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  10582. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  10583. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  10584. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  10585. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  10586. .rlen = 80,
  10587. }, {
  10588. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10589. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  10590. .klen = 16,
  10591. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  10592. "\xde\xca\xf8\x88",
  10593. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  10594. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  10595. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  10596. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  10597. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  10598. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  10599. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  10600. "\xba\x63\x7b\x39",
  10601. .ilen = 60,
  10602. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  10603. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  10604. "\xab\xad\xda\xd2",
  10605. .alen = 20,
  10606. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  10607. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  10608. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  10609. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  10610. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  10611. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  10612. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  10613. "\x3d\x58\xe0\x91"
  10614. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  10615. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  10616. .rlen = 76,
  10617. }, {
  10618. .key = zeroed_string,
  10619. .klen = 24,
  10620. .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
  10621. "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
  10622. .rlen = 16,
  10623. }, {
  10624. .key = zeroed_string,
  10625. .klen = 24,
  10626. .input = zeroed_string,
  10627. .ilen = 16,
  10628. .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  10629. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  10630. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  10631. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  10632. .rlen = 32,
  10633. }, {
  10634. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10635. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10636. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  10637. .klen = 24,
  10638. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  10639. "\xde\xca\xf8\x88",
  10640. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  10641. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  10642. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  10643. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  10644. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  10645. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  10646. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  10647. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  10648. .ilen = 64,
  10649. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  10650. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  10651. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  10652. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  10653. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  10654. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  10655. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  10656. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  10657. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  10658. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  10659. .rlen = 80,
  10660. }, {
  10661. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10662. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10663. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  10664. .klen = 24,
  10665. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  10666. "\xde\xca\xf8\x88",
  10667. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  10668. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  10669. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  10670. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  10671. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  10672. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  10673. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  10674. "\xba\x63\x7b\x39",
  10675. .ilen = 60,
  10676. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  10677. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  10678. "\xab\xad\xda\xd2",
  10679. .alen = 20,
  10680. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  10681. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  10682. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  10683. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  10684. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  10685. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  10686. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  10687. "\xcc\xda\x27\x10"
  10688. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  10689. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  10690. .rlen = 76,
  10691. .np = 2,
  10692. .tap = { 32, 28 },
  10693. .anp = 2,
  10694. .atap = { 8, 12 }
  10695. }, {
  10696. .key = zeroed_string,
  10697. .klen = 32,
  10698. .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
  10699. "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
  10700. .rlen = 16,
  10701. }
  10702. };
  10703. static struct aead_testvec aes_gcm_dec_tv_template[] = {
  10704. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  10705. .key = zeroed_string,
  10706. .klen = 32,
  10707. .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
  10708. "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
  10709. "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
  10710. "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
  10711. .ilen = 32,
  10712. .result = zeroed_string,
  10713. .rlen = 16,
  10714. }, {
  10715. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10716. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10717. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10718. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  10719. .klen = 32,
  10720. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  10721. "\xde\xca\xf8\x88",
  10722. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  10723. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  10724. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  10725. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  10726. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  10727. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  10728. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  10729. "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
  10730. "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
  10731. "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
  10732. .ilen = 80,
  10733. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  10734. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  10735. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  10736. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  10737. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  10738. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  10739. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  10740. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  10741. .rlen = 64,
  10742. }, {
  10743. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10744. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10745. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10746. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  10747. .klen = 32,
  10748. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  10749. "\xde\xca\xf8\x88",
  10750. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  10751. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  10752. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  10753. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  10754. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  10755. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  10756. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  10757. "\xbc\xc9\xf6\x62"
  10758. "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
  10759. "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
  10760. .ilen = 76,
  10761. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  10762. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  10763. "\xab\xad\xda\xd2",
  10764. .alen = 20,
  10765. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  10766. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  10767. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  10768. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  10769. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  10770. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  10771. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  10772. "\xba\x63\x7b\x39",
  10773. .rlen = 60,
  10774. .np = 2,
  10775. .tap = { 48, 28 },
  10776. .anp = 3,
  10777. .atap = { 8, 8, 4 }
  10778. }, {
  10779. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10780. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  10781. .klen = 16,
  10782. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  10783. "\xde\xca\xf8\x88",
  10784. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  10785. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  10786. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  10787. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  10788. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  10789. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  10790. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  10791. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  10792. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  10793. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  10794. .ilen = 80,
  10795. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  10796. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  10797. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  10798. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  10799. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  10800. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  10801. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  10802. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  10803. .rlen = 64,
  10804. }, {
  10805. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10806. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  10807. .klen = 16,
  10808. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  10809. "\xde\xca\xf8\x88",
  10810. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  10811. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  10812. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  10813. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  10814. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  10815. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  10816. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  10817. "\x3d\x58\xe0\x91"
  10818. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  10819. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  10820. .ilen = 76,
  10821. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  10822. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  10823. "\xab\xad\xda\xd2",
  10824. .alen = 20,
  10825. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  10826. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  10827. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  10828. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  10829. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  10830. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  10831. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  10832. "\xba\x63\x7b\x39",
  10833. .rlen = 60,
  10834. }, {
  10835. .key = zeroed_string,
  10836. .klen = 24,
  10837. .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  10838. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  10839. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  10840. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  10841. .ilen = 32,
  10842. .result = zeroed_string,
  10843. .rlen = 16,
  10844. }, {
  10845. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10846. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10847. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  10848. .klen = 24,
  10849. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  10850. "\xde\xca\xf8\x88",
  10851. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  10852. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  10853. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  10854. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  10855. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  10856. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  10857. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  10858. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  10859. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  10860. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  10861. .ilen = 80,
  10862. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  10863. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  10864. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  10865. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  10866. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  10867. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  10868. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  10869. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  10870. .rlen = 64,
  10871. }, {
  10872. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10873. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10874. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  10875. .klen = 24,
  10876. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  10877. "\xde\xca\xf8\x88",
  10878. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  10879. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  10880. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  10881. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  10882. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  10883. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  10884. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  10885. "\xcc\xda\x27\x10"
  10886. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  10887. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  10888. .ilen = 76,
  10889. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  10890. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  10891. "\xab\xad\xda\xd2",
  10892. .alen = 20,
  10893. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  10894. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  10895. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  10896. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  10897. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  10898. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  10899. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  10900. "\xba\x63\x7b\x39",
  10901. .rlen = 60,
  10902. }
  10903. };
  10904. static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
  10905. { /* Generated using Crypto++ */
  10906. .key = zeroed_string,
  10907. .klen = 20,
  10908. .iv = zeroed_string,
  10909. .input = zeroed_string,
  10910. .ilen = 16,
  10911. .assoc = zeroed_string,
  10912. .alen = 8,
  10913. .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
  10914. "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
  10915. "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
  10916. "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
  10917. .rlen = 32,
  10918. },{
  10919. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10920. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10921. "\x00\x00\x00\x00",
  10922. .klen = 20,
  10923. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  10924. "\x00\x00\x00\x00",
  10925. .input = zeroed_string,
  10926. .ilen = 16,
  10927. .assoc = zeroed_string,
  10928. .alen = 8,
  10929. .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
  10930. "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
  10931. "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
  10932. "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
  10933. .rlen = 32,
  10934. }, {
  10935. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10936. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10937. "\x00\x00\x00\x00",
  10938. .klen = 20,
  10939. .iv = zeroed_string,
  10940. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  10941. "\x01\x01\x01\x01\x01\x01\x01\x01",
  10942. .ilen = 16,
  10943. .assoc = zeroed_string,
  10944. .alen = 8,
  10945. .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  10946. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  10947. "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
  10948. "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
  10949. .rlen = 32,
  10950. }, {
  10951. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10952. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10953. "\x00\x00\x00\x00",
  10954. .klen = 20,
  10955. .iv = zeroed_string,
  10956. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  10957. "\x01\x01\x01\x01\x01\x01\x01\x01",
  10958. .ilen = 16,
  10959. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  10960. .alen = 8,
  10961. .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  10962. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  10963. "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
  10964. "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
  10965. .rlen = 32,
  10966. }, {
  10967. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10968. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10969. "\x00\x00\x00\x00",
  10970. .klen = 20,
  10971. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  10972. "\x00\x00\x00\x00",
  10973. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  10974. "\x01\x01\x01\x01\x01\x01\x01\x01",
  10975. .ilen = 16,
  10976. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  10977. .alen = 8,
  10978. .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  10979. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  10980. "\x64\x50\xF9\x32\x13\xFB\x74\x61"
  10981. "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
  10982. .rlen = 32,
  10983. }, {
  10984. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  10985. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  10986. "\x00\x00\x00\x00",
  10987. .klen = 20,
  10988. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  10989. "\x00\x00\x00\x00",
  10990. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  10991. "\x01\x01\x01\x01\x01\x01\x01\x01"
  10992. "\x01\x01\x01\x01\x01\x01\x01\x01"
  10993. "\x01\x01\x01\x01\x01\x01\x01\x01"
  10994. "\x01\x01\x01\x01\x01\x01\x01\x01"
  10995. "\x01\x01\x01\x01\x01\x01\x01\x01"
  10996. "\x01\x01\x01\x01\x01\x01\x01\x01"
  10997. "\x01\x01\x01\x01\x01\x01\x01\x01",
  10998. .ilen = 64,
  10999. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  11000. .alen = 8,
  11001. .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  11002. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  11003. "\x98\x14\xA1\x42\x37\x80\xFD\x90"
  11004. "\x68\x12\x01\xA8\x91\x89\xB9\x83"
  11005. "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
  11006. "\x94\x5F\x18\x12\xBA\x27\x09\x39"
  11007. "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
  11008. "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
  11009. "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
  11010. "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
  11011. .rlen = 80,
  11012. }, {
  11013. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  11014. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  11015. "\x00\x00\x00\x00",
  11016. .klen = 20,
  11017. .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
  11018. "\x00\x00\x00\x00",
  11019. .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
  11020. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11021. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11022. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11023. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11024. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11025. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11026. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11027. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11028. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11029. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11030. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11031. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11032. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11033. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11034. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11035. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11036. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11037. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11038. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11039. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11040. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11041. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11042. "\xff\xff\xff\xff\xff\xff\xff\xff",
  11043. .ilen = 192,
  11044. .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  11045. "\xaa\xaa\xaa\xaa",
  11046. .alen = 12,
  11047. .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
  11048. "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
  11049. "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
  11050. "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
  11051. "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
  11052. "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
  11053. "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
  11054. "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
  11055. "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
  11056. "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
  11057. "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
  11058. "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
  11059. "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
  11060. "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
  11061. "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
  11062. "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
  11063. "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
  11064. "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
  11065. "\x7E\x13\x06\x82\x08\x17\xA4\x35"
  11066. "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
  11067. "\xA3\x05\x38\x95\x20\x1A\x47\x04"
  11068. "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
  11069. "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
  11070. "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
  11071. "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
  11072. "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
  11073. .rlen = 208,
  11074. }
  11075. };
  11076. static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
  11077. { /* Generated using Crypto++ */
  11078. .key = zeroed_string,
  11079. .klen = 20,
  11080. .iv = zeroed_string,
  11081. .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
  11082. "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
  11083. "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
  11084. "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
  11085. .ilen = 32,
  11086. .assoc = zeroed_string,
  11087. .alen = 8,
  11088. .result = zeroed_string,
  11089. .rlen = 16,
  11090. },{
  11091. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  11092. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  11093. "\x00\x00\x00\x00",
  11094. .klen = 20,
  11095. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  11096. "\x00\x00\x00\x00",
  11097. .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
  11098. "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
  11099. "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
  11100. "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
  11101. .ilen = 32,
  11102. .assoc = zeroed_string,
  11103. .alen = 8,
  11104. .result = zeroed_string,
  11105. .rlen = 16,
  11106. }, {
  11107. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  11108. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  11109. "\x00\x00\x00\x00",
  11110. .klen = 20,
  11111. .iv = zeroed_string,
  11112. .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  11113. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  11114. "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
  11115. "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
  11116. .ilen = 32,
  11117. .assoc = zeroed_string,
  11118. .alen = 8,
  11119. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  11120. "\x01\x01\x01\x01\x01\x01\x01\x01",
  11121. .rlen = 16,
  11122. }, {
  11123. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  11124. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  11125. "\x00\x00\x00\x00",
  11126. .klen = 20,
  11127. .iv = zeroed_string,
  11128. .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  11129. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  11130. "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
  11131. "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
  11132. .ilen = 32,
  11133. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  11134. .alen = 8,
  11135. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  11136. "\x01\x01\x01\x01\x01\x01\x01\x01",
  11137. .rlen = 16,
  11138. }, {
  11139. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  11140. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  11141. "\x00\x00\x00\x00",
  11142. .klen = 20,
  11143. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  11144. "\x00\x00\x00\x00",
  11145. .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  11146. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  11147. "\x64\x50\xF9\x32\x13\xFB\x74\x61"
  11148. "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
  11149. .ilen = 32,
  11150. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  11151. .alen = 8,
  11152. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  11153. "\x01\x01\x01\x01\x01\x01\x01\x01",
  11154. .rlen = 16,
  11155. }, {
  11156. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  11157. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  11158. "\x00\x00\x00\x00",
  11159. .klen = 20,
  11160. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  11161. "\x00\x00\x00\x00",
  11162. .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  11163. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  11164. "\x98\x14\xA1\x42\x37\x80\xFD\x90"
  11165. "\x68\x12\x01\xA8\x91\x89\xB9\x83"
  11166. "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
  11167. "\x94\x5F\x18\x12\xBA\x27\x09\x39"
  11168. "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
  11169. "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
  11170. "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
  11171. "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
  11172. .ilen = 80,
  11173. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  11174. .alen = 8,
  11175. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  11176. "\x01\x01\x01\x01\x01\x01\x01\x01"
  11177. "\x01\x01\x01\x01\x01\x01\x01\x01"
  11178. "\x01\x01\x01\x01\x01\x01\x01\x01"
  11179. "\x01\x01\x01\x01\x01\x01\x01\x01"
  11180. "\x01\x01\x01\x01\x01\x01\x01\x01"
  11181. "\x01\x01\x01\x01\x01\x01\x01\x01"
  11182. "\x01\x01\x01\x01\x01\x01\x01\x01",
  11183. .rlen = 64,
  11184. }, {
  11185. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  11186. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  11187. "\x00\x00\x00\x00",
  11188. .klen = 20,
  11189. .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
  11190. "\x00\x00\x00\x00",
  11191. .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
  11192. "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
  11193. "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
  11194. "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
  11195. "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
  11196. "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
  11197. "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
  11198. "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
  11199. "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
  11200. "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
  11201. "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
  11202. "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
  11203. "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
  11204. "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
  11205. "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
  11206. "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
  11207. "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
  11208. "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
  11209. "\x7E\x13\x06\x82\x08\x17\xA4\x35"
  11210. "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
  11211. "\xA3\x05\x38\x95\x20\x1A\x47\x04"
  11212. "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
  11213. "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
  11214. "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
  11215. "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
  11216. "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
  11217. .ilen = 208,
  11218. .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  11219. "\xaa\xaa\xaa\xaa",
  11220. .alen = 12,
  11221. .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
  11222. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11223. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11224. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11225. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11226. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11227. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11228. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11229. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11230. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11231. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11232. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11233. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11234. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11235. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11236. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11237. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11238. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11239. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11240. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11241. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11242. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11243. "\xff\xff\xff\xff\xff\xff\xff\xff"
  11244. "\xff\xff\xff\xff\xff\xff\xff\xff",
  11245. .rlen = 192,
  11246. }
  11247. };
  11248. static struct aead_testvec aes_ccm_enc_tv_template[] = {
  11249. { /* From RFC 3610 */
  11250. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  11251. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  11252. .klen = 16,
  11253. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  11254. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  11255. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  11256. .alen = 8,
  11257. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  11258. "\x10\x11\x12\x13\x14\x15\x16\x17"
  11259. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  11260. .ilen = 23,
  11261. .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  11262. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  11263. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  11264. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  11265. .rlen = 31,
  11266. }, {
  11267. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  11268. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  11269. .klen = 16,
  11270. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  11271. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  11272. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  11273. "\x08\x09\x0a\x0b",
  11274. .alen = 12,
  11275. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  11276. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  11277. "\x1c\x1d\x1e\x1f",
  11278. .ilen = 20,
  11279. .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  11280. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  11281. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  11282. "\x7d\x9c\x2d\x93",
  11283. .rlen = 28,
  11284. }, {
  11285. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  11286. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  11287. .klen = 16,
  11288. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  11289. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  11290. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  11291. .alen = 8,
  11292. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  11293. "\x10\x11\x12\x13\x14\x15\x16\x17"
  11294. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  11295. "\x20",
  11296. .ilen = 25,
  11297. .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  11298. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  11299. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  11300. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  11301. "\x7e\x5f\x4e",
  11302. .rlen = 35,
  11303. }, {
  11304. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  11305. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  11306. .klen = 16,
  11307. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  11308. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  11309. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  11310. "\x08\x09\x0a\x0b",
  11311. .alen = 12,
  11312. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  11313. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  11314. "\x1c\x1d\x1e",
  11315. .ilen = 19,
  11316. .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
  11317. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  11318. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  11319. "\x4d\x99\x99\x88\xdd",
  11320. .rlen = 29,
  11321. }, {
  11322. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  11323. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  11324. .klen = 16,
  11325. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  11326. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  11327. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  11328. .alen = 8,
  11329. .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  11330. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  11331. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  11332. .ilen = 24,
  11333. .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  11334. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  11335. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  11336. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  11337. .rlen = 32,
  11338. }, {
  11339. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  11340. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  11341. .klen = 16,
  11342. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  11343. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  11344. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  11345. "\x20\xea\x60\xc0",
  11346. .alen = 12,
  11347. .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  11348. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  11349. "\x3a\x80\x3b\xa8\x7f",
  11350. .ilen = 21,
  11351. .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  11352. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  11353. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  11354. "\x5a\xe0\x70\x45\x51",
  11355. .rlen = 29,
  11356. }, {
  11357. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  11358. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  11359. .klen = 16,
  11360. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  11361. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  11362. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  11363. .alen = 8,
  11364. .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  11365. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  11366. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  11367. .ilen = 23,
  11368. .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  11369. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  11370. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  11371. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  11372. "\xba",
  11373. .rlen = 33,
  11374. },
  11375. };
  11376. static struct aead_testvec aes_ccm_dec_tv_template[] = {
  11377. { /* From RFC 3610 */
  11378. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  11379. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  11380. .klen = 16,
  11381. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  11382. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  11383. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  11384. .alen = 8,
  11385. .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  11386. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  11387. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  11388. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  11389. .ilen = 31,
  11390. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  11391. "\x10\x11\x12\x13\x14\x15\x16\x17"
  11392. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  11393. .rlen = 23,
  11394. }, {
  11395. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  11396. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  11397. .klen = 16,
  11398. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  11399. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  11400. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  11401. "\x08\x09\x0a\x0b",
  11402. .alen = 12,
  11403. .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  11404. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  11405. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  11406. "\x7d\x9c\x2d\x93",
  11407. .ilen = 28,
  11408. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  11409. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  11410. "\x1c\x1d\x1e\x1f",
  11411. .rlen = 20,
  11412. }, {
  11413. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  11414. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  11415. .klen = 16,
  11416. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  11417. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  11418. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  11419. .alen = 8,
  11420. .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  11421. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  11422. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  11423. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  11424. "\x7e\x5f\x4e",
  11425. .ilen = 35,
  11426. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  11427. "\x10\x11\x12\x13\x14\x15\x16\x17"
  11428. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  11429. "\x20",
  11430. .rlen = 25,
  11431. }, {
  11432. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  11433. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  11434. .klen = 16,
  11435. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  11436. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  11437. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  11438. "\x08\x09\x0a\x0b",
  11439. .alen = 12,
  11440. .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
  11441. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  11442. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  11443. "\x4d\x99\x99\x88\xdd",
  11444. .ilen = 29,
  11445. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  11446. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  11447. "\x1c\x1d\x1e",
  11448. .rlen = 19,
  11449. }, {
  11450. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  11451. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  11452. .klen = 16,
  11453. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  11454. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  11455. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  11456. .alen = 8,
  11457. .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  11458. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  11459. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  11460. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  11461. .ilen = 32,
  11462. .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  11463. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  11464. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  11465. .rlen = 24,
  11466. }, {
  11467. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  11468. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  11469. .klen = 16,
  11470. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  11471. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  11472. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  11473. "\x20\xea\x60\xc0",
  11474. .alen = 12,
  11475. .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  11476. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  11477. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  11478. "\x5a\xe0\x70\x45\x51",
  11479. .ilen = 29,
  11480. .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  11481. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  11482. "\x3a\x80\x3b\xa8\x7f",
  11483. .rlen = 21,
  11484. }, {
  11485. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  11486. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  11487. .klen = 16,
  11488. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  11489. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  11490. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  11491. .alen = 8,
  11492. .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  11493. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  11494. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  11495. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  11496. "\xba",
  11497. .ilen = 33,
  11498. .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  11499. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  11500. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  11501. .rlen = 23,
  11502. },
  11503. };
  11504. /*
  11505. * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
  11506. * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
  11507. * Special Publication 800-38C's test vectors also use nonce lengths our
  11508. * implementation doesn't support. The following are taken from fips cavs
  11509. * fax files on hand at Red Hat.
  11510. *
  11511. * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
  11512. * part of the nonce which combine w/the iv, but need to be input this way.
  11513. */
  11514. static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
  11515. {
  11516. .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
  11517. "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
  11518. "\x96\xac\x59",
  11519. .klen = 19,
  11520. .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
  11521. .alen = 0,
  11522. .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
  11523. "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
  11524. "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
  11525. "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
  11526. .ilen = 32,
  11527. .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
  11528. "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
  11529. "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
  11530. "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
  11531. "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
  11532. "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
  11533. .rlen = 48,
  11534. }, {
  11535. .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
  11536. "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
  11537. "\x4f\xa3\x19",
  11538. .klen = 19,
  11539. .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
  11540. .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
  11541. "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
  11542. "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
  11543. "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
  11544. .alen = 32,
  11545. .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
  11546. "\xa9\x28\x63\xba\x12\xa3\x14\x85"
  11547. "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
  11548. "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
  11549. .ilen = 32,
  11550. .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
  11551. "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
  11552. "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
  11553. "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
  11554. "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
  11555. "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
  11556. .rlen = 48,
  11557. }, {
  11558. .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
  11559. "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
  11560. "\x53\x14\x73\x66\x8d\x88\xf6\x80"
  11561. "\xa0\x20\x35",
  11562. .klen = 27,
  11563. .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
  11564. .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
  11565. "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
  11566. "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
  11567. "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
  11568. .alen = 32,
  11569. .ilen = 0,
  11570. .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
  11571. "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
  11572. .rlen = 16,
  11573. }, {
  11574. .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
  11575. "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
  11576. "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
  11577. "\xd6\x3c\x8c",
  11578. .klen = 27,
  11579. .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
  11580. .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
  11581. "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
  11582. "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
  11583. "\xe3\x00\x73\x69\x84\x69\x87\x79",
  11584. .alen = 32,
  11585. .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
  11586. "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
  11587. "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
  11588. "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
  11589. .ilen = 32,
  11590. .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
  11591. "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
  11592. "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
  11593. "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
  11594. "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
  11595. "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
  11596. .rlen = 48,
  11597. }, {
  11598. .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
  11599. "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
  11600. "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
  11601. "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
  11602. "\x1e\x29\x91",
  11603. .klen = 35,
  11604. .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
  11605. .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
  11606. "\x78\x2b\x94\x02\x29\x0f\x42\x27"
  11607. "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
  11608. "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
  11609. .alen = 32,
  11610. .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
  11611. "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
  11612. "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
  11613. "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
  11614. .ilen = 32,
  11615. .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
  11616. "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
  11617. "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
  11618. "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
  11619. "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
  11620. .rlen = 40,
  11621. }, {
  11622. .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
  11623. "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
  11624. "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
  11625. "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
  11626. "\xf9\xd9\x4e",
  11627. .klen = 35,
  11628. .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
  11629. .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
  11630. "\x13\x02\x01\x0c\x83\x4c\x96\x35"
  11631. "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
  11632. "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
  11633. .alen = 32,
  11634. .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
  11635. "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
  11636. "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
  11637. "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
  11638. .ilen = 32,
  11639. .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
  11640. "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
  11641. "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
  11642. "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
  11643. "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
  11644. "\x7b\x72\x8a\xf7",
  11645. .rlen = 44,
  11646. }, {
  11647. .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
  11648. "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
  11649. "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
  11650. "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
  11651. "\x24\xa7\x8b",
  11652. .klen = 35,
  11653. .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
  11654. .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
  11655. "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
  11656. "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
  11657. "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
  11658. .alen = 32,
  11659. .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
  11660. "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
  11661. "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
  11662. "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
  11663. .ilen = 32,
  11664. .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
  11665. "\xef\xbb\x80\x21\x04\x6c\x58\x09"
  11666. "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
  11667. "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
  11668. "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
  11669. "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
  11670. .rlen = 48,
  11671. },
  11672. };
  11673. static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
  11674. {
  11675. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  11676. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  11677. "\xc6\xfb\x7d",
  11678. .klen = 19,
  11679. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  11680. .alen = 0,
  11681. .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
  11682. .ilen = 8,
  11683. .result = "\x00",
  11684. .rlen = 0,
  11685. .novrfy = 1,
  11686. }, {
  11687. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  11688. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  11689. "\xaf\x94\x87",
  11690. .klen = 19,
  11691. .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
  11692. .alen = 0,
  11693. .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
  11694. .ilen = 8,
  11695. .result = "\x00",
  11696. .rlen = 0,
  11697. }, {
  11698. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  11699. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  11700. "\xc6\xfb\x7d",
  11701. .klen = 19,
  11702. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  11703. .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
  11704. "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
  11705. "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
  11706. "\xd8\x94\x99\x91\x81\x54\x62\x57",
  11707. .alen = 32,
  11708. .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
  11709. "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
  11710. "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
  11711. "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
  11712. "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
  11713. "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
  11714. .ilen = 48,
  11715. .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
  11716. "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
  11717. "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
  11718. "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
  11719. .rlen = 32,
  11720. .novrfy = 1,
  11721. }, {
  11722. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  11723. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  11724. "\x05\xe0\xc9",
  11725. .klen = 19,
  11726. .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
  11727. .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
  11728. "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
  11729. "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
  11730. "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
  11731. .alen = 32,
  11732. .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
  11733. "\xad\x83\x52\x6d\x71\x03\x25\x1c"
  11734. "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
  11735. "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
  11736. "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
  11737. "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
  11738. .ilen = 48,
  11739. .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
  11740. "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
  11741. "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
  11742. "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
  11743. .rlen = 32,
  11744. }, {
  11745. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  11746. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  11747. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  11748. "\xee\x49\x83",
  11749. .klen = 27,
  11750. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  11751. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  11752. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  11753. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  11754. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  11755. .alen = 32,
  11756. .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
  11757. .ilen = 8,
  11758. .result = "\x00",
  11759. .rlen = 0,
  11760. }, {
  11761. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  11762. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  11763. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  11764. "\xee\x49\x83",
  11765. .klen = 27,
  11766. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  11767. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  11768. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  11769. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  11770. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  11771. .alen = 32,
  11772. .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
  11773. "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
  11774. "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
  11775. "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
  11776. "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
  11777. .ilen = 40,
  11778. .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
  11779. "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
  11780. "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
  11781. "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
  11782. .rlen = 32,
  11783. }, {
  11784. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  11785. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  11786. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  11787. "\xd1\xfc\x57",
  11788. .klen = 27,
  11789. .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
  11790. .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
  11791. "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
  11792. "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
  11793. "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
  11794. .alen = 32,
  11795. .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
  11796. "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
  11797. "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
  11798. "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
  11799. "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
  11800. "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
  11801. .ilen = 48,
  11802. .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
  11803. "\x99\x2a\xa8\xca\x04\x25\x45\x90"
  11804. "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
  11805. "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
  11806. .rlen = 32,
  11807. .novrfy = 1,
  11808. }, {
  11809. .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
  11810. "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
  11811. "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
  11812. "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
  11813. "\xee\x49\x83",
  11814. .klen = 35,
  11815. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  11816. .alen = 0,
  11817. .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
  11818. .ilen = 8,
  11819. .result = "\x00",
  11820. .rlen = 0,
  11821. }, {
  11822. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  11823. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  11824. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  11825. "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
  11826. "\x85\x34\x66",
  11827. .klen = 35,
  11828. .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
  11829. .alen = 0,
  11830. .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
  11831. "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
  11832. "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
  11833. "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
  11834. "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
  11835. "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
  11836. .ilen = 48,
  11837. .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
  11838. "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
  11839. "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
  11840. "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
  11841. .rlen = 32,
  11842. .novrfy = 1,
  11843. }, {
  11844. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  11845. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  11846. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  11847. "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
  11848. "\xcf\x76\x3f",
  11849. .klen = 35,
  11850. .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
  11851. .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
  11852. "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
  11853. "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
  11854. "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
  11855. .alen = 32,
  11856. .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
  11857. "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
  11858. "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
  11859. "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
  11860. "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
  11861. "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
  11862. .ilen = 48,
  11863. .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
  11864. "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
  11865. "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
  11866. "\x04\x49\x3b\x19\x93\x57\x25\x5d",
  11867. .rlen = 32,
  11868. },
  11869. };
  11870. /*
  11871. * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
  11872. * test vectors, taken from Appendix B.2.9 and B.2.10:
  11873. * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
  11874. * Only AES-128 is supported at this time.
  11875. */
  11876. #define ANSI_CPRNG_AES_TEST_VECTORS 6
  11877. static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
  11878. {
  11879. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  11880. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  11881. .klen = 16,
  11882. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  11883. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
  11884. .dtlen = 16,
  11885. .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
  11886. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11887. .vlen = 16,
  11888. .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
  11889. "\x84\x79\x66\x85\xc1\x2f\x76\x41",
  11890. .rlen = 16,
  11891. .loops = 1,
  11892. }, {
  11893. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  11894. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  11895. .klen = 16,
  11896. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  11897. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
  11898. .dtlen = 16,
  11899. .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
  11900. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11901. .vlen = 16,
  11902. .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
  11903. "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
  11904. .rlen = 16,
  11905. .loops = 1,
  11906. }, {
  11907. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  11908. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  11909. .klen = 16,
  11910. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  11911. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
  11912. .dtlen = 16,
  11913. .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
  11914. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11915. .vlen = 16,
  11916. .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
  11917. "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
  11918. .rlen = 16,
  11919. .loops = 1,
  11920. }, {
  11921. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  11922. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  11923. .klen = 16,
  11924. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  11925. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
  11926. .dtlen = 16,
  11927. .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
  11928. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11929. .vlen = 16,
  11930. .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
  11931. "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
  11932. .rlen = 16,
  11933. .loops = 1,
  11934. }, {
  11935. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  11936. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  11937. .klen = 16,
  11938. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  11939. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
  11940. .dtlen = 16,
  11941. .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
  11942. "\x00\x00\x00\x00\x00\x00\x00\x00",
  11943. .vlen = 16,
  11944. .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
  11945. "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
  11946. .rlen = 16,
  11947. .loops = 1,
  11948. }, { /* Monte Carlo Test */
  11949. .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
  11950. "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
  11951. .klen = 16,
  11952. .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
  11953. "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
  11954. .dtlen = 16,
  11955. .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
  11956. "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
  11957. .vlen = 16,
  11958. .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
  11959. "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
  11960. .rlen = 16,
  11961. .loops = 10000,
  11962. },
  11963. };
  11964. /* Cast5 test vectors from RFC 2144 */
  11965. #define CAST5_ENC_TEST_VECTORS 4
  11966. #define CAST5_DEC_TEST_VECTORS 4
  11967. #define CAST5_CBC_ENC_TEST_VECTORS 1
  11968. #define CAST5_CBC_DEC_TEST_VECTORS 1
  11969. #define CAST5_CTR_ENC_TEST_VECTORS 1
  11970. #define CAST5_CTR_DEC_TEST_VECTORS 1
  11971. static struct cipher_testvec cast5_enc_tv_template[] = {
  11972. {
  11973. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  11974. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  11975. .klen = 16,
  11976. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11977. .ilen = 8,
  11978. .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  11979. .rlen = 8,
  11980. }, {
  11981. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  11982. "\x23\x45",
  11983. .klen = 10,
  11984. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11985. .ilen = 8,
  11986. .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  11987. .rlen = 8,
  11988. }, {
  11989. .key = "\x01\x23\x45\x67\x12",
  11990. .klen = 5,
  11991. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  11992. .ilen = 8,
  11993. .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  11994. .rlen = 8,
  11995. }, { /* Generated from TF test vectors */
  11996. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  11997. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  11998. .klen = 16,
  11999. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  12000. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12001. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12002. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12003. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12004. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12005. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  12006. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  12007. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  12008. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  12009. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  12010. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  12011. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  12012. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  12013. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  12014. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  12015. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  12016. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  12017. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  12018. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  12019. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  12020. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  12021. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  12022. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  12023. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  12024. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  12025. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  12026. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  12027. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  12028. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  12029. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  12030. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  12031. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  12032. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  12033. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  12034. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  12035. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  12036. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  12037. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  12038. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  12039. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  12040. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  12041. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  12042. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  12043. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  12044. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  12045. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  12046. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  12047. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  12048. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  12049. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  12050. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  12051. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  12052. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  12053. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  12054. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  12055. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  12056. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  12057. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  12058. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  12059. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  12060. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  12061. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  12062. .ilen = 496,
  12063. .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
  12064. "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
  12065. "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
  12066. "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
  12067. "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
  12068. "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
  12069. "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
  12070. "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
  12071. "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
  12072. "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
  12073. "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
  12074. "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
  12075. "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
  12076. "\xED\x34\x35\x78\x6B\x91\xC9\x32"
  12077. "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
  12078. "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
  12079. "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
  12080. "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
  12081. "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
  12082. "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
  12083. "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
  12084. "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
  12085. "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
  12086. "\x78\x75\x37\x55\xC1\xF5\x90\x40"
  12087. "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
  12088. "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
  12089. "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
  12090. "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
  12091. "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
  12092. "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
  12093. "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
  12094. "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
  12095. "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
  12096. "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
  12097. "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
  12098. "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
  12099. "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
  12100. "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
  12101. "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
  12102. "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
  12103. "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
  12104. "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
  12105. "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
  12106. "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
  12107. "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
  12108. "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
  12109. "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
  12110. "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
  12111. "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
  12112. "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
  12113. "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
  12114. "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
  12115. "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
  12116. "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
  12117. "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
  12118. "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
  12119. "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
  12120. "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
  12121. "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
  12122. "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
  12123. "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
  12124. "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
  12125. .rlen = 496,
  12126. },
  12127. };
  12128. static struct cipher_testvec cast5_dec_tv_template[] = {
  12129. {
  12130. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  12131. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  12132. .klen = 16,
  12133. .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  12134. .ilen = 8,
  12135. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12136. .rlen = 8,
  12137. }, {
  12138. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  12139. "\x23\x45",
  12140. .klen = 10,
  12141. .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  12142. .ilen = 8,
  12143. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12144. .rlen = 8,
  12145. }, {
  12146. .key = "\x01\x23\x45\x67\x12",
  12147. .klen = 5,
  12148. .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  12149. .ilen = 8,
  12150. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12151. .rlen = 8,
  12152. }, { /* Generated from TF test vectors */
  12153. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12154. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  12155. .klen = 16,
  12156. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  12157. .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
  12158. "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
  12159. "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
  12160. "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
  12161. "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
  12162. "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
  12163. "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
  12164. "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
  12165. "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
  12166. "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
  12167. "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
  12168. "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
  12169. "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
  12170. "\xED\x34\x35\x78\x6B\x91\xC9\x32"
  12171. "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
  12172. "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
  12173. "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
  12174. "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
  12175. "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
  12176. "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
  12177. "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
  12178. "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
  12179. "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
  12180. "\x78\x75\x37\x55\xC1\xF5\x90\x40"
  12181. "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
  12182. "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
  12183. "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
  12184. "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
  12185. "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
  12186. "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
  12187. "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
  12188. "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
  12189. "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
  12190. "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
  12191. "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
  12192. "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
  12193. "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
  12194. "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
  12195. "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
  12196. "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
  12197. "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
  12198. "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
  12199. "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
  12200. "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
  12201. "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
  12202. "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
  12203. "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
  12204. "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
  12205. "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
  12206. "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
  12207. "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
  12208. "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
  12209. "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
  12210. "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
  12211. "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
  12212. "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
  12213. "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
  12214. "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
  12215. "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
  12216. "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
  12217. "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
  12218. "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
  12219. .ilen = 496,
  12220. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12221. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12222. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12223. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12224. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12225. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  12226. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  12227. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  12228. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  12229. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  12230. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  12231. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  12232. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  12233. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  12234. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  12235. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  12236. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  12237. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  12238. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  12239. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  12240. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  12241. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  12242. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  12243. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  12244. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  12245. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  12246. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  12247. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  12248. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  12249. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  12250. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  12251. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  12252. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  12253. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  12254. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  12255. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  12256. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  12257. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  12258. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  12259. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  12260. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  12261. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  12262. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  12263. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  12264. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  12265. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  12266. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  12267. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  12268. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  12269. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  12270. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  12271. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  12272. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  12273. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  12274. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  12275. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  12276. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  12277. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  12278. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  12279. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  12280. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  12281. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  12282. .rlen = 496,
  12283. },
  12284. };
  12285. static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
  12286. { /* Generated from TF test vectors */
  12287. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12288. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  12289. .klen = 16,
  12290. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  12291. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12292. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12293. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12294. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12295. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12296. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  12297. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  12298. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  12299. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  12300. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  12301. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  12302. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  12303. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  12304. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  12305. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  12306. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  12307. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  12308. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  12309. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  12310. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  12311. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  12312. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  12313. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  12314. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  12315. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  12316. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  12317. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  12318. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  12319. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  12320. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  12321. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  12322. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  12323. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  12324. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  12325. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  12326. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  12327. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  12328. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  12329. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  12330. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  12331. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  12332. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  12333. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  12334. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  12335. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  12336. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  12337. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  12338. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  12339. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  12340. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  12341. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  12342. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  12343. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  12344. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  12345. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  12346. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  12347. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  12348. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  12349. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  12350. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  12351. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  12352. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  12353. .ilen = 496,
  12354. .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
  12355. "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
  12356. "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
  12357. "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
  12358. "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
  12359. "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
  12360. "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
  12361. "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
  12362. "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
  12363. "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
  12364. "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
  12365. "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
  12366. "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
  12367. "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
  12368. "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
  12369. "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
  12370. "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
  12371. "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
  12372. "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
  12373. "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
  12374. "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
  12375. "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
  12376. "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
  12377. "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
  12378. "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
  12379. "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
  12380. "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
  12381. "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
  12382. "\x90\x12\x37\x49\x27\x98\x69\x18"
  12383. "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
  12384. "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
  12385. "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
  12386. "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
  12387. "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
  12388. "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
  12389. "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
  12390. "\x03\x55\x0E\x02\x41\x4A\x45\x06"
  12391. "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
  12392. "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
  12393. "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
  12394. "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
  12395. "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
  12396. "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
  12397. "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
  12398. "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
  12399. "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
  12400. "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
  12401. "\x11\xB4\x18\x17\x1A\x65\x92\x56"
  12402. "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
  12403. "\x1A\x01\x22\x45\x17\x62\x52\x6C"
  12404. "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
  12405. "\x32\x66\x6F\x23\x7F\x94\x36\x88"
  12406. "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
  12407. "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
  12408. "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
  12409. "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
  12410. "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
  12411. "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
  12412. "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
  12413. "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
  12414. "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
  12415. "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
  12416. .rlen = 496,
  12417. },
  12418. };
  12419. static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
  12420. { /* Generated from TF test vectors */
  12421. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12422. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  12423. .klen = 16,
  12424. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  12425. .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
  12426. "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
  12427. "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
  12428. "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
  12429. "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
  12430. "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
  12431. "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
  12432. "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
  12433. "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
  12434. "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
  12435. "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
  12436. "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
  12437. "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
  12438. "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
  12439. "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
  12440. "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
  12441. "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
  12442. "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
  12443. "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
  12444. "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
  12445. "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
  12446. "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
  12447. "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
  12448. "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
  12449. "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
  12450. "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
  12451. "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
  12452. "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
  12453. "\x90\x12\x37\x49\x27\x98\x69\x18"
  12454. "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
  12455. "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
  12456. "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
  12457. "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
  12458. "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
  12459. "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
  12460. "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
  12461. "\x03\x55\x0E\x02\x41\x4A\x45\x06"
  12462. "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
  12463. "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
  12464. "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
  12465. "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
  12466. "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
  12467. "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
  12468. "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
  12469. "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
  12470. "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
  12471. "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
  12472. "\x11\xB4\x18\x17\x1A\x65\x92\x56"
  12473. "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
  12474. "\x1A\x01\x22\x45\x17\x62\x52\x6C"
  12475. "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
  12476. "\x32\x66\x6F\x23\x7F\x94\x36\x88"
  12477. "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
  12478. "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
  12479. "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
  12480. "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
  12481. "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
  12482. "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
  12483. "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
  12484. "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
  12485. "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
  12486. "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
  12487. .ilen = 496,
  12488. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12489. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12490. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12491. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12492. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12493. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  12494. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  12495. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  12496. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  12497. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  12498. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  12499. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  12500. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  12501. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  12502. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  12503. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  12504. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  12505. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  12506. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  12507. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  12508. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  12509. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  12510. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  12511. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  12512. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  12513. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  12514. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  12515. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  12516. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  12517. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  12518. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  12519. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  12520. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  12521. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  12522. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  12523. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  12524. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  12525. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  12526. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  12527. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  12528. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  12529. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  12530. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  12531. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  12532. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  12533. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  12534. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  12535. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  12536. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  12537. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  12538. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  12539. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  12540. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  12541. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  12542. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  12543. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  12544. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  12545. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  12546. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  12547. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  12548. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  12549. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  12550. .rlen = 496,
  12551. },
  12552. };
  12553. static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
  12554. { /* Generated from TF test vectors */
  12555. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12556. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  12557. .klen = 16,
  12558. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  12559. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12560. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12561. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12562. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12563. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12564. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  12565. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  12566. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  12567. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  12568. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  12569. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  12570. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  12571. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  12572. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  12573. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  12574. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  12575. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  12576. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  12577. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  12578. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  12579. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  12580. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  12581. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  12582. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  12583. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  12584. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  12585. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  12586. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  12587. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  12588. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  12589. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  12590. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  12591. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  12592. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  12593. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  12594. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  12595. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  12596. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  12597. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  12598. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  12599. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  12600. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  12601. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  12602. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  12603. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  12604. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  12605. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  12606. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  12607. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  12608. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  12609. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  12610. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  12611. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  12612. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  12613. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  12614. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  12615. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  12616. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  12617. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  12618. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  12619. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  12620. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  12621. .ilen = 496,
  12622. .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
  12623. "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
  12624. "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
  12625. "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
  12626. "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
  12627. "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
  12628. "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
  12629. "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
  12630. "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
  12631. "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
  12632. "\x88\x18\x52\x56\x48\x58\xD1\x6B"
  12633. "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
  12634. "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
  12635. "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
  12636. "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
  12637. "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
  12638. "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
  12639. "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
  12640. "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
  12641. "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
  12642. "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
  12643. "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
  12644. "\x44\x67\x90\x20\xAC\x41\xDF\x43"
  12645. "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
  12646. "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
  12647. "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
  12648. "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
  12649. "\xAE\x59\x0F\x07\x88\x79\x53\x26"
  12650. "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
  12651. "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
  12652. "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
  12653. "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
  12654. "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
  12655. "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
  12656. "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
  12657. "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
  12658. "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
  12659. "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
  12660. "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
  12661. "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
  12662. "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
  12663. "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
  12664. "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
  12665. "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
  12666. "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
  12667. "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
  12668. "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
  12669. "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
  12670. "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
  12671. "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
  12672. "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
  12673. "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
  12674. "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
  12675. "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
  12676. "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
  12677. "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
  12678. "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
  12679. "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
  12680. "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
  12681. "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
  12682. "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
  12683. "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
  12684. .rlen = 496,
  12685. },
  12686. };
  12687. static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
  12688. { /* Generated from TF test vectors */
  12689. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  12690. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  12691. .klen = 16,
  12692. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  12693. .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
  12694. "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
  12695. "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
  12696. "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
  12697. "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
  12698. "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
  12699. "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
  12700. "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
  12701. "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
  12702. "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
  12703. "\x88\x18\x52\x56\x48\x58\xD1\x6B"
  12704. "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
  12705. "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
  12706. "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
  12707. "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
  12708. "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
  12709. "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
  12710. "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
  12711. "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
  12712. "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
  12713. "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
  12714. "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
  12715. "\x44\x67\x90\x20\xAC\x41\xDF\x43"
  12716. "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
  12717. "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
  12718. "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
  12719. "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
  12720. "\xAE\x59\x0F\x07\x88\x79\x53\x26"
  12721. "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
  12722. "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
  12723. "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
  12724. "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
  12725. "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
  12726. "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
  12727. "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
  12728. "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
  12729. "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
  12730. "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
  12731. "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
  12732. "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
  12733. "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
  12734. "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
  12735. "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
  12736. "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
  12737. "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
  12738. "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
  12739. "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
  12740. "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
  12741. "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
  12742. "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
  12743. "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
  12744. "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
  12745. "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
  12746. "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
  12747. "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
  12748. "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
  12749. "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
  12750. "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
  12751. "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
  12752. "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
  12753. "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
  12754. "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
  12755. .ilen = 496,
  12756. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  12757. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  12758. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  12759. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  12760. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  12761. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  12762. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  12763. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  12764. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  12765. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  12766. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  12767. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  12768. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  12769. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  12770. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  12771. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  12772. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  12773. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  12774. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  12775. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  12776. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  12777. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  12778. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  12779. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  12780. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  12781. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  12782. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  12783. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  12784. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  12785. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  12786. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  12787. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  12788. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  12789. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  12790. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  12791. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  12792. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  12793. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  12794. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  12795. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  12796. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  12797. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  12798. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  12799. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  12800. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  12801. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  12802. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  12803. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  12804. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  12805. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  12806. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  12807. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  12808. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  12809. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  12810. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  12811. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  12812. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  12813. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  12814. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  12815. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  12816. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  12817. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  12818. .rlen = 496,
  12819. },
  12820. };
  12821. /*
  12822. * ARC4 test vectors from OpenSSL
  12823. */
  12824. #define ARC4_ENC_TEST_VECTORS 7
  12825. #define ARC4_DEC_TEST_VECTORS 7
  12826. static struct cipher_testvec arc4_enc_tv_template[] = {
  12827. {
  12828. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12829. .klen = 8,
  12830. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12831. .ilen = 8,
  12832. .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  12833. .rlen = 8,
  12834. }, {
  12835. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12836. .klen = 8,
  12837. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  12838. .ilen = 8,
  12839. .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  12840. .rlen = 8,
  12841. }, {
  12842. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  12843. .klen = 8,
  12844. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  12845. .ilen = 8,
  12846. .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  12847. .rlen = 8,
  12848. }, {
  12849. .key = "\xef\x01\x23\x45",
  12850. .klen = 4,
  12851. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12852. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12853. "\x00\x00\x00\x00",
  12854. .ilen = 20,
  12855. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  12856. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  12857. "\x36\xb6\x78\x58",
  12858. .rlen = 20,
  12859. }, {
  12860. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12861. .klen = 8,
  12862. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  12863. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  12864. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  12865. "\x12\x34\x56\x78",
  12866. .ilen = 28,
  12867. .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  12868. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  12869. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  12870. "\x40\x01\x1e\xcf",
  12871. .rlen = 28,
  12872. }, {
  12873. .key = "\xef\x01\x23\x45",
  12874. .klen = 4,
  12875. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12876. "\x00\x00",
  12877. .ilen = 10,
  12878. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  12879. "\xbd\x61",
  12880. .rlen = 10,
  12881. }, {
  12882. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  12883. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12884. .klen = 16,
  12885. .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  12886. .ilen = 8,
  12887. .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  12888. .rlen = 8,
  12889. },
  12890. };
  12891. static struct cipher_testvec arc4_dec_tv_template[] = {
  12892. {
  12893. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12894. .klen = 8,
  12895. .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  12896. .ilen = 8,
  12897. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12898. .rlen = 8,
  12899. }, {
  12900. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12901. .klen = 8,
  12902. .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  12903. .ilen = 8,
  12904. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  12905. .rlen = 8,
  12906. }, {
  12907. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  12908. .klen = 8,
  12909. .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  12910. .ilen = 8,
  12911. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  12912. .rlen = 8,
  12913. }, {
  12914. .key = "\xef\x01\x23\x45",
  12915. .klen = 4,
  12916. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  12917. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  12918. "\x36\xb6\x78\x58",
  12919. .ilen = 20,
  12920. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12921. "\x00\x00\x00\x00\x00\x00\x00\x00"
  12922. "\x00\x00\x00\x00",
  12923. .rlen = 20,
  12924. }, {
  12925. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  12926. .klen = 8,
  12927. .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  12928. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  12929. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  12930. "\x40\x01\x1e\xcf",
  12931. .ilen = 28,
  12932. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  12933. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  12934. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  12935. "\x12\x34\x56\x78",
  12936. .rlen = 28,
  12937. }, {
  12938. .key = "\xef\x01\x23\x45",
  12939. .klen = 4,
  12940. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  12941. "\xbd\x61",
  12942. .ilen = 10,
  12943. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  12944. "\x00\x00",
  12945. .rlen = 10,
  12946. }, {
  12947. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  12948. "\x00\x00\x00\x00\x00\x00\x00\x00",
  12949. .klen = 16,
  12950. .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  12951. .ilen = 8,
  12952. .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  12953. .rlen = 8,
  12954. },
  12955. };
  12956. /*
  12957. * TEA test vectors
  12958. */
  12959. #define TEA_ENC_TEST_VECTORS 4
  12960. #define TEA_DEC_TEST_VECTORS 4
  12961. static struct cipher_testvec tea_enc_tv_template[] = {
  12962. {
  12963. .key = zeroed_string,
  12964. .klen = 16,
  12965. .input = zeroed_string,
  12966. .ilen = 8,
  12967. .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  12968. .rlen = 8,
  12969. }, {
  12970. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  12971. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  12972. .klen = 16,
  12973. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  12974. .ilen = 8,
  12975. .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  12976. .rlen = 8,
  12977. }, {
  12978. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  12979. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  12980. .klen = 16,
  12981. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  12982. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  12983. .ilen = 16,
  12984. .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  12985. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  12986. .rlen = 16,
  12987. }, {
  12988. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  12989. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  12990. .klen = 16,
  12991. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  12992. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  12993. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  12994. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  12995. .ilen = 32,
  12996. .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  12997. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  12998. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  12999. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  13000. .rlen = 32,
  13001. }
  13002. };
  13003. static struct cipher_testvec tea_dec_tv_template[] = {
  13004. {
  13005. .key = zeroed_string,
  13006. .klen = 16,
  13007. .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  13008. .ilen = 8,
  13009. .result = zeroed_string,
  13010. .rlen = 8,
  13011. }, {
  13012. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  13013. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  13014. .klen = 16,
  13015. .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  13016. .ilen = 8,
  13017. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  13018. .rlen = 8,
  13019. }, {
  13020. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  13021. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  13022. .klen = 16,
  13023. .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  13024. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  13025. .ilen = 16,
  13026. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  13027. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  13028. .rlen = 16,
  13029. }, {
  13030. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  13031. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  13032. .klen = 16,
  13033. .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  13034. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  13035. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  13036. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  13037. .ilen = 32,
  13038. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  13039. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  13040. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  13041. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  13042. .rlen = 32,
  13043. }
  13044. };
  13045. /*
  13046. * XTEA test vectors
  13047. */
  13048. #define XTEA_ENC_TEST_VECTORS 4
  13049. #define XTEA_DEC_TEST_VECTORS 4
  13050. static struct cipher_testvec xtea_enc_tv_template[] = {
  13051. {
  13052. .key = zeroed_string,
  13053. .klen = 16,
  13054. .input = zeroed_string,
  13055. .ilen = 8,
  13056. .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  13057. .rlen = 8,
  13058. }, {
  13059. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  13060. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  13061. .klen = 16,
  13062. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  13063. .ilen = 8,
  13064. .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  13065. .rlen = 8,
  13066. }, {
  13067. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  13068. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  13069. .klen = 16,
  13070. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  13071. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  13072. .ilen = 16,
  13073. .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  13074. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  13075. .rlen = 16,
  13076. }, {
  13077. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  13078. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  13079. .klen = 16,
  13080. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  13081. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  13082. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  13083. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  13084. .ilen = 32,
  13085. .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  13086. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  13087. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  13088. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  13089. .rlen = 32,
  13090. }
  13091. };
  13092. static struct cipher_testvec xtea_dec_tv_template[] = {
  13093. {
  13094. .key = zeroed_string,
  13095. .klen = 16,
  13096. .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  13097. .ilen = 8,
  13098. .result = zeroed_string,
  13099. .rlen = 8,
  13100. }, {
  13101. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  13102. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  13103. .klen = 16,
  13104. .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  13105. .ilen = 8,
  13106. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  13107. .rlen = 8,
  13108. }, {
  13109. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  13110. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  13111. .klen = 16,
  13112. .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  13113. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  13114. .ilen = 16,
  13115. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  13116. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  13117. .rlen = 16,
  13118. }, {
  13119. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  13120. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  13121. .klen = 16,
  13122. .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  13123. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  13124. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  13125. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  13126. .ilen = 32,
  13127. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  13128. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  13129. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  13130. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  13131. .rlen = 32,
  13132. }
  13133. };
  13134. /*
  13135. * KHAZAD test vectors.
  13136. */
  13137. #define KHAZAD_ENC_TEST_VECTORS 5
  13138. #define KHAZAD_DEC_TEST_VECTORS 5
  13139. static struct cipher_testvec khazad_enc_tv_template[] = {
  13140. {
  13141. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  13142. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13143. .klen = 16,
  13144. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13145. .ilen = 8,
  13146. .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  13147. .rlen = 8,
  13148. }, {
  13149. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  13150. "\x38\x38\x38\x38\x38\x38\x38\x38",
  13151. .klen = 16,
  13152. .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
  13153. .ilen = 8,
  13154. .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  13155. .rlen = 8,
  13156. }, {
  13157. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  13158. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  13159. .klen = 16,
  13160. .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  13161. .ilen = 8,
  13162. .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  13163. .rlen = 8,
  13164. }, {
  13165. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  13166. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  13167. .klen = 16,
  13168. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  13169. .ilen = 8,
  13170. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  13171. .rlen = 8,
  13172. }, {
  13173. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  13174. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  13175. .klen = 16,
  13176. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  13177. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  13178. .ilen = 16,
  13179. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  13180. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  13181. .rlen = 16,
  13182. },
  13183. };
  13184. static struct cipher_testvec khazad_dec_tv_template[] = {
  13185. {
  13186. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  13187. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13188. .klen = 16,
  13189. .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  13190. .ilen = 8,
  13191. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13192. .rlen = 8,
  13193. }, {
  13194. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  13195. "\x38\x38\x38\x38\x38\x38\x38\x38",
  13196. .klen = 16,
  13197. .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  13198. .ilen = 8,
  13199. .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
  13200. .rlen = 8,
  13201. }, {
  13202. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  13203. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  13204. .klen = 16,
  13205. .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  13206. .ilen = 8,
  13207. .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  13208. .rlen = 8,
  13209. }, {
  13210. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  13211. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  13212. .klen = 16,
  13213. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  13214. .ilen = 8,
  13215. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  13216. .rlen = 8,
  13217. }, {
  13218. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  13219. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  13220. .klen = 16,
  13221. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  13222. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  13223. .ilen = 16,
  13224. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  13225. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  13226. .rlen = 16,
  13227. },
  13228. };
  13229. /*
  13230. * Anubis test vectors.
  13231. */
  13232. #define ANUBIS_ENC_TEST_VECTORS 5
  13233. #define ANUBIS_DEC_TEST_VECTORS 5
  13234. #define ANUBIS_CBC_ENC_TEST_VECTORS 2
  13235. #define ANUBIS_CBC_DEC_TEST_VECTORS 2
  13236. static struct cipher_testvec anubis_enc_tv_template[] = {
  13237. {
  13238. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13239. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  13240. .klen = 16,
  13241. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13242. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  13243. .ilen = 16,
  13244. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  13245. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  13246. .rlen = 16,
  13247. }, {
  13248. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  13249. "\x03\x03\x03\x03\x03\x03\x03\x03"
  13250. "\x03\x03\x03\x03",
  13251. .klen = 20,
  13252. .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
  13253. "\x03\x03\x03\x03\x03\x03\x03\x03",
  13254. .ilen = 16,
  13255. .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  13256. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  13257. .rlen = 16,
  13258. }, {
  13259. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  13260. "\x24\x24\x24\x24\x24\x24\x24\x24"
  13261. "\x24\x24\x24\x24\x24\x24\x24\x24"
  13262. "\x24\x24\x24\x24",
  13263. .klen = 28,
  13264. .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
  13265. "\x24\x24\x24\x24\x24\x24\x24\x24",
  13266. .ilen = 16,
  13267. .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  13268. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  13269. .rlen = 16,
  13270. }, {
  13271. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  13272. "\x25\x25\x25\x25\x25\x25\x25\x25"
  13273. "\x25\x25\x25\x25\x25\x25\x25\x25"
  13274. "\x25\x25\x25\x25\x25\x25\x25\x25",
  13275. .klen = 32,
  13276. .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
  13277. "\x25\x25\x25\x25\x25\x25\x25\x25",
  13278. .ilen = 16,
  13279. .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  13280. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  13281. .rlen = 16,
  13282. }, {
  13283. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  13284. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13285. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13286. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13287. "\x35\x35\x35\x35\x35\x35\x35\x35",
  13288. .klen = 40,
  13289. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  13290. "\x35\x35\x35\x35\x35\x35\x35\x35",
  13291. .ilen = 16,
  13292. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  13293. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  13294. .rlen = 16,
  13295. },
  13296. };
  13297. static struct cipher_testvec anubis_dec_tv_template[] = {
  13298. {
  13299. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13300. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  13301. .klen = 16,
  13302. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  13303. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  13304. .ilen = 16,
  13305. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13306. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  13307. .rlen = 16,
  13308. }, {
  13309. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  13310. "\x03\x03\x03\x03\x03\x03\x03\x03"
  13311. "\x03\x03\x03\x03",
  13312. .klen = 20,
  13313. .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  13314. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  13315. .ilen = 16,
  13316. .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
  13317. "\x03\x03\x03\x03\x03\x03\x03\x03",
  13318. .rlen = 16,
  13319. }, {
  13320. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  13321. "\x24\x24\x24\x24\x24\x24\x24\x24"
  13322. "\x24\x24\x24\x24\x24\x24\x24\x24"
  13323. "\x24\x24\x24\x24",
  13324. .klen = 28,
  13325. .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  13326. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  13327. .ilen = 16,
  13328. .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
  13329. "\x24\x24\x24\x24\x24\x24\x24\x24",
  13330. .rlen = 16,
  13331. }, {
  13332. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  13333. "\x25\x25\x25\x25\x25\x25\x25\x25"
  13334. "\x25\x25\x25\x25\x25\x25\x25\x25"
  13335. "\x25\x25\x25\x25\x25\x25\x25\x25",
  13336. .klen = 32,
  13337. .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  13338. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  13339. .ilen = 16,
  13340. .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
  13341. "\x25\x25\x25\x25\x25\x25\x25\x25",
  13342. .rlen = 16,
  13343. }, {
  13344. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  13345. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13346. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13347. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13348. "\x35\x35\x35\x35\x35\x35\x35\x35",
  13349. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  13350. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  13351. .klen = 40,
  13352. .ilen = 16,
  13353. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  13354. "\x35\x35\x35\x35\x35\x35\x35\x35",
  13355. .rlen = 16,
  13356. },
  13357. };
  13358. static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
  13359. {
  13360. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13361. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  13362. .klen = 16,
  13363. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13364. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13365. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13366. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  13367. .ilen = 32,
  13368. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  13369. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  13370. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  13371. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  13372. .rlen = 32,
  13373. }, {
  13374. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  13375. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13376. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13377. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13378. "\x35\x35\x35\x35\x35\x35\x35\x35",
  13379. .klen = 40,
  13380. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  13381. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13382. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13383. "\x35\x35\x35\x35\x35\x35\x35\x35",
  13384. .ilen = 32,
  13385. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  13386. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  13387. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  13388. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  13389. .rlen = 32,
  13390. },
  13391. };
  13392. static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
  13393. {
  13394. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13395. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  13396. .klen = 16,
  13397. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  13398. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  13399. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  13400. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  13401. .ilen = 32,
  13402. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13403. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13404. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  13405. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  13406. .rlen = 32,
  13407. }, {
  13408. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  13409. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13410. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13411. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13412. "\x35\x35\x35\x35\x35\x35\x35\x35",
  13413. .klen = 40,
  13414. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  13415. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  13416. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  13417. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  13418. .ilen = 32,
  13419. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  13420. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13421. "\x35\x35\x35\x35\x35\x35\x35\x35"
  13422. "\x35\x35\x35\x35\x35\x35\x35\x35",
  13423. .rlen = 32,
  13424. },
  13425. };
  13426. /*
  13427. * XETA test vectors
  13428. */
  13429. #define XETA_ENC_TEST_VECTORS 4
  13430. #define XETA_DEC_TEST_VECTORS 4
  13431. static struct cipher_testvec xeta_enc_tv_template[] = {
  13432. {
  13433. .key = zeroed_string,
  13434. .klen = 16,
  13435. .input = zeroed_string,
  13436. .ilen = 8,
  13437. .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  13438. .rlen = 8,
  13439. }, {
  13440. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  13441. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  13442. .klen = 16,
  13443. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  13444. .ilen = 8,
  13445. .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  13446. .rlen = 8,
  13447. }, {
  13448. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  13449. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  13450. .klen = 16,
  13451. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  13452. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  13453. .ilen = 16,
  13454. .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  13455. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  13456. .rlen = 16,
  13457. }, {
  13458. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  13459. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  13460. .klen = 16,
  13461. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  13462. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  13463. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  13464. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  13465. .ilen = 32,
  13466. .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  13467. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  13468. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  13469. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  13470. .rlen = 32,
  13471. }
  13472. };
  13473. static struct cipher_testvec xeta_dec_tv_template[] = {
  13474. {
  13475. .key = zeroed_string,
  13476. .klen = 16,
  13477. .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  13478. .ilen = 8,
  13479. .result = zeroed_string,
  13480. .rlen = 8,
  13481. }, {
  13482. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  13483. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  13484. .klen = 16,
  13485. .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  13486. .ilen = 8,
  13487. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  13488. .rlen = 8,
  13489. }, {
  13490. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  13491. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  13492. .klen = 16,
  13493. .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  13494. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  13495. .ilen = 16,
  13496. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  13497. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  13498. .rlen = 16,
  13499. }, {
  13500. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  13501. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  13502. .klen = 16,
  13503. .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  13504. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  13505. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  13506. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  13507. .ilen = 32,
  13508. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  13509. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  13510. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  13511. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  13512. .rlen = 32,
  13513. }
  13514. };
  13515. /*
  13516. * FCrypt test vectors
  13517. */
  13518. #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
  13519. #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
  13520. static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
  13521. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  13522. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13523. .klen = 8,
  13524. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13525. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13526. .ilen = 8,
  13527. .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  13528. .rlen = 8,
  13529. }, {
  13530. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  13531. .klen = 8,
  13532. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13533. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  13534. .ilen = 8,
  13535. .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  13536. .rlen = 8,
  13537. }, { /* From Arla */
  13538. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  13539. .klen = 8,
  13540. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13541. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  13542. .ilen = 48,
  13543. .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  13544. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  13545. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  13546. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  13547. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  13548. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  13549. .rlen = 48,
  13550. }, {
  13551. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13552. .klen = 8,
  13553. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  13554. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  13555. .ilen = 48,
  13556. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  13557. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  13558. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  13559. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  13560. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  13561. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  13562. .rlen = 48,
  13563. }, { /* split-page version */
  13564. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13565. .klen = 8,
  13566. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  13567. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  13568. .ilen = 48,
  13569. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  13570. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  13571. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  13572. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  13573. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  13574. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  13575. .rlen = 48,
  13576. .np = 2,
  13577. .tap = { 20, 28 },
  13578. }
  13579. };
  13580. static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
  13581. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  13582. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13583. .klen = 8,
  13584. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13585. .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  13586. .ilen = 8,
  13587. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13588. .rlen = 8,
  13589. }, {
  13590. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  13591. .klen = 8,
  13592. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  13593. .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  13594. .ilen = 8,
  13595. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  13596. .rlen = 8,
  13597. }, { /* From Arla */
  13598. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  13599. .klen = 8,
  13600. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13601. .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  13602. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  13603. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  13604. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  13605. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  13606. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  13607. .ilen = 48,
  13608. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  13609. .rlen = 48,
  13610. }, {
  13611. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13612. .klen = 8,
  13613. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  13614. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  13615. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  13616. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  13617. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  13618. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  13619. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  13620. .ilen = 48,
  13621. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  13622. .rlen = 48,
  13623. }, { /* split-page version */
  13624. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13625. .klen = 8,
  13626. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  13627. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  13628. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  13629. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  13630. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  13631. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  13632. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  13633. .ilen = 48,
  13634. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  13635. .rlen = 48,
  13636. .np = 2,
  13637. .tap = { 20, 28 },
  13638. }
  13639. };
  13640. /*
  13641. * CAMELLIA test vectors.
  13642. */
  13643. #define CAMELLIA_ENC_TEST_VECTORS 4
  13644. #define CAMELLIA_DEC_TEST_VECTORS 4
  13645. #define CAMELLIA_CBC_ENC_TEST_VECTORS 3
  13646. #define CAMELLIA_CBC_DEC_TEST_VECTORS 3
  13647. #define CAMELLIA_CTR_ENC_TEST_VECTORS 2
  13648. #define CAMELLIA_CTR_DEC_TEST_VECTORS 2
  13649. #define CAMELLIA_LRW_ENC_TEST_VECTORS 8
  13650. #define CAMELLIA_LRW_DEC_TEST_VECTORS 8
  13651. #define CAMELLIA_XTS_ENC_TEST_VECTORS 5
  13652. #define CAMELLIA_XTS_DEC_TEST_VECTORS 5
  13653. static struct cipher_testvec camellia_enc_tv_template[] = {
  13654. {
  13655. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13656. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13657. .klen = 16,
  13658. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13659. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13660. .ilen = 16,
  13661. .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
  13662. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  13663. .rlen = 16,
  13664. }, {
  13665. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13666. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  13667. "\x00\x11\x22\x33\x44\x55\x66\x77",
  13668. .klen = 24,
  13669. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13670. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13671. .ilen = 16,
  13672. .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  13673. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  13674. .rlen = 16,
  13675. }, {
  13676. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13677. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  13678. "\x00\x11\x22\x33\x44\x55\x66\x77"
  13679. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  13680. .klen = 32,
  13681. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13682. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13683. .ilen = 16,
  13684. .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  13685. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  13686. .rlen = 16,
  13687. },
  13688. { /* Generated with Crypto++ */
  13689. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  13690. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  13691. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  13692. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  13693. .klen = 32,
  13694. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13695. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13696. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13697. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13698. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13699. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  13700. .ilen = 48,
  13701. .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
  13702. "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
  13703. "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
  13704. "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
  13705. "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
  13706. "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
  13707. .rlen = 48,
  13708. },
  13709. };
  13710. static struct cipher_testvec camellia_dec_tv_template[] = {
  13711. {
  13712. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13713. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13714. .klen = 16,
  13715. .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
  13716. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  13717. .ilen = 16,
  13718. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13719. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13720. .rlen = 16,
  13721. }, {
  13722. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13723. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  13724. "\x00\x11\x22\x33\x44\x55\x66\x77",
  13725. .klen = 24,
  13726. .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  13727. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  13728. .ilen = 16,
  13729. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13730. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13731. .rlen = 16,
  13732. }, {
  13733. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13734. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  13735. "\x00\x11\x22\x33\x44\x55\x66\x77"
  13736. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  13737. .klen = 32,
  13738. .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  13739. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  13740. .ilen = 16,
  13741. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  13742. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  13743. .rlen = 16,
  13744. },
  13745. { /* Generated with Crypto++ */
  13746. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  13747. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  13748. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  13749. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  13750. .klen = 32,
  13751. .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
  13752. "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
  13753. "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
  13754. "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
  13755. "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
  13756. "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
  13757. .ilen = 48,
  13758. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13759. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13760. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13761. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13762. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13763. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  13764. .rlen = 48,
  13765. },
  13766. };
  13767. static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
  13768. {
  13769. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  13770. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  13771. .klen = 16,
  13772. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  13773. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  13774. .input = "Single block msg",
  13775. .ilen = 16,
  13776. .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  13777. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  13778. .rlen = 16,
  13779. }, {
  13780. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  13781. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  13782. .klen = 16,
  13783. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  13784. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  13785. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13786. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  13787. "\x10\x11\x12\x13\x14\x15\x16\x17"
  13788. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  13789. .ilen = 32,
  13790. .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  13791. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  13792. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  13793. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  13794. .rlen = 32,
  13795. },
  13796. { /* Generated with Crypto++ */
  13797. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  13798. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  13799. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  13800. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  13801. .klen = 32,
  13802. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  13803. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  13804. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13805. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13806. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13807. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13808. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13809. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  13810. .ilen = 48,
  13811. .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
  13812. "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
  13813. "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
  13814. "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
  13815. "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
  13816. "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
  13817. .rlen = 48,
  13818. },
  13819. };
  13820. static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
  13821. {
  13822. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  13823. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  13824. .klen = 16,
  13825. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  13826. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  13827. .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  13828. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  13829. .ilen = 16,
  13830. .result = "Single block msg",
  13831. .rlen = 16,
  13832. }, {
  13833. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  13834. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  13835. .klen = 16,
  13836. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  13837. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  13838. .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  13839. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  13840. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  13841. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  13842. .ilen = 32,
  13843. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  13844. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  13845. "\x10\x11\x12\x13\x14\x15\x16\x17"
  13846. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  13847. .rlen = 32,
  13848. },
  13849. { /* Generated with Crypto++ */
  13850. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  13851. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  13852. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  13853. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  13854. .klen = 32,
  13855. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  13856. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  13857. .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
  13858. "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
  13859. "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
  13860. "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
  13861. "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
  13862. "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
  13863. .ilen = 48,
  13864. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13865. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13866. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13867. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13868. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13869. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  13870. .rlen = 48,
  13871. },
  13872. };
  13873. static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
  13874. { /* Generated with Crypto++ */
  13875. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  13876. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  13877. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  13878. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  13879. .klen = 32,
  13880. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  13881. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  13882. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13883. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13884. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13885. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13886. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13887. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  13888. .ilen = 48,
  13889. .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  13890. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  13891. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  13892. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  13893. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  13894. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
  13895. .rlen = 48,
  13896. },
  13897. { /* Generated with Crypto++ */
  13898. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  13899. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  13900. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  13901. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  13902. .klen = 32,
  13903. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  13904. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  13905. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13906. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13907. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13908. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13909. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13910. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  13911. "\xDF\x76\x0D",
  13912. .ilen = 51,
  13913. .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  13914. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  13915. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  13916. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  13917. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  13918. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
  13919. "\x1E\x43\xEF",
  13920. .rlen = 51,
  13921. },
  13922. };
  13923. static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
  13924. { /* Generated with Crypto++ */
  13925. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  13926. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  13927. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  13928. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  13929. .klen = 32,
  13930. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  13931. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  13932. .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  13933. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  13934. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  13935. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  13936. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  13937. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
  13938. .ilen = 48,
  13939. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13940. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13941. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13942. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13943. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13944. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  13945. .rlen = 48,
  13946. },
  13947. { /* Generated with Crypto++ */
  13948. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  13949. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  13950. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  13951. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  13952. .klen = 32,
  13953. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  13954. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  13955. .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  13956. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  13957. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  13958. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  13959. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  13960. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
  13961. "\x1E\x43\xEF",
  13962. .ilen = 51,
  13963. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13964. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13965. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13966. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13967. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13968. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  13969. "\xDF\x76\x0D",
  13970. .rlen = 51,
  13971. },
  13972. };
  13973. static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
  13974. /* Generated from AES-LRW test vectors */
  13975. {
  13976. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  13977. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  13978. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  13979. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  13980. .klen = 32,
  13981. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13982. "\x00\x00\x00\x00\x00\x00\x00\x01",
  13983. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  13984. "\x38\x39\x41\x42\x43\x44\x45\x46",
  13985. .ilen = 16,
  13986. .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
  13987. "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
  13988. .rlen = 16,
  13989. }, {
  13990. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  13991. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  13992. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  13993. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  13994. .klen = 32,
  13995. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  13996. "\x00\x00\x00\x00\x00\x00\x00\x02",
  13997. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  13998. "\x38\x39\x41\x42\x43\x44\x45\x46",
  13999. .ilen = 16,
  14000. .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
  14001. "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
  14002. .rlen = 16,
  14003. }, {
  14004. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  14005. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  14006. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  14007. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  14008. .klen = 32,
  14009. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14010. "\x00\x00\x00\x02\x00\x00\x00\x00",
  14011. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14012. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14013. .ilen = 16,
  14014. .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
  14015. "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
  14016. .rlen = 16,
  14017. }, {
  14018. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  14019. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  14020. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  14021. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  14022. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  14023. .klen = 40,
  14024. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14025. "\x00\x00\x00\x00\x00\x00\x00\x01",
  14026. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14027. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14028. .ilen = 16,
  14029. .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
  14030. "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
  14031. .rlen = 16,
  14032. }, {
  14033. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  14034. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  14035. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  14036. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  14037. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  14038. .klen = 40,
  14039. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14040. "\x00\x00\x00\x02\x00\x00\x00\x00",
  14041. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14042. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14043. .ilen = 16,
  14044. .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
  14045. "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
  14046. .rlen = 16,
  14047. }, {
  14048. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  14049. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  14050. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  14051. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  14052. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  14053. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  14054. .klen = 48,
  14055. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14056. "\x00\x00\x00\x00\x00\x00\x00\x01",
  14057. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14058. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14059. .ilen = 16,
  14060. .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
  14061. "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
  14062. .rlen = 16,
  14063. }, {
  14064. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  14065. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  14066. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  14067. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  14068. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  14069. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  14070. .klen = 48,
  14071. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14072. "\x00\x00\x00\x02\x00\x00\x00\x00",
  14073. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14074. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14075. .ilen = 16,
  14076. .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
  14077. "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
  14078. .rlen = 16,
  14079. }, {
  14080. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  14081. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  14082. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  14083. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  14084. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  14085. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  14086. .klen = 48,
  14087. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14088. "\x00\x00\x00\x00\x00\x00\x00\x01",
  14089. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  14090. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  14091. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  14092. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  14093. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  14094. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  14095. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  14096. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  14097. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  14098. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  14099. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  14100. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  14101. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  14102. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  14103. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  14104. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  14105. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  14106. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  14107. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  14108. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  14109. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  14110. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  14111. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  14112. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  14113. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  14114. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  14115. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  14116. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  14117. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  14118. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  14119. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  14120. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  14121. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  14122. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  14123. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  14124. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  14125. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  14126. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  14127. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  14128. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  14129. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  14130. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  14131. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  14132. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  14133. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  14134. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  14135. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  14136. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  14137. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  14138. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  14139. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  14140. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  14141. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  14142. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  14143. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  14144. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  14145. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  14146. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  14147. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  14148. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  14149. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  14150. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  14151. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  14152. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  14153. .ilen = 512,
  14154. .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
  14155. "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
  14156. "\x67\x76\xac\x2c\xd2\x63\x18\x93"
  14157. "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
  14158. "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
  14159. "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
  14160. "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
  14161. "\x62\xdd\x78\x81\xea\x1d\xef\x04"
  14162. "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
  14163. "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
  14164. "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
  14165. "\x40\x41\x69\xaa\x71\xc0\x37\xec"
  14166. "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
  14167. "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
  14168. "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
  14169. "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
  14170. "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
  14171. "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
  14172. "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
  14173. "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
  14174. "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
  14175. "\x42\x08\x40\x82\x06\x1c\x2d\x55"
  14176. "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
  14177. "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
  14178. "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
  14179. "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
  14180. "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
  14181. "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
  14182. "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
  14183. "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
  14184. "\xed\x14\xa9\x57\x19\x63\x40\x04"
  14185. "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
  14186. "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
  14187. "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
  14188. "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
  14189. "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
  14190. "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
  14191. "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
  14192. "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
  14193. "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
  14194. "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
  14195. "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
  14196. "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
  14197. "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
  14198. "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
  14199. "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
  14200. "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
  14201. "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
  14202. "\x35\xa5\x83\x04\x84\x01\x99\x56"
  14203. "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
  14204. "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
  14205. "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
  14206. "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
  14207. "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
  14208. "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
  14209. "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
  14210. "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
  14211. "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
  14212. "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
  14213. "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
  14214. "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
  14215. "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
  14216. "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
  14217. "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
  14218. .rlen = 512,
  14219. },
  14220. };
  14221. static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
  14222. /* Generated from AES-LRW test vectors */
  14223. /* same as enc vectors with input and result reversed */
  14224. {
  14225. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  14226. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  14227. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  14228. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  14229. .klen = 32,
  14230. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14231. "\x00\x00\x00\x00\x00\x00\x00\x01",
  14232. .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
  14233. "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
  14234. .ilen = 16,
  14235. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14236. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14237. .rlen = 16,
  14238. }, {
  14239. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  14240. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  14241. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  14242. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  14243. .klen = 32,
  14244. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14245. "\x00\x00\x00\x00\x00\x00\x00\x02",
  14246. .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
  14247. "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
  14248. .ilen = 16,
  14249. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14250. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14251. .rlen = 16,
  14252. }, {
  14253. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  14254. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  14255. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  14256. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  14257. .klen = 32,
  14258. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14259. "\x00\x00\x00\x02\x00\x00\x00\x00",
  14260. .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
  14261. "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
  14262. .ilen = 16,
  14263. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14264. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14265. .rlen = 16,
  14266. }, {
  14267. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  14268. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  14269. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  14270. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  14271. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  14272. .klen = 40,
  14273. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14274. "\x00\x00\x00\x00\x00\x00\x00\x01",
  14275. .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
  14276. "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
  14277. .ilen = 16,
  14278. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14279. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14280. .rlen = 16,
  14281. }, {
  14282. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  14283. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  14284. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  14285. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  14286. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  14287. .klen = 40,
  14288. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14289. "\x00\x00\x00\x02\x00\x00\x00\x00",
  14290. .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
  14291. "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
  14292. .ilen = 16,
  14293. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14294. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14295. .rlen = 16,
  14296. }, {
  14297. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  14298. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  14299. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  14300. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  14301. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  14302. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  14303. .klen = 48,
  14304. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14305. "\x00\x00\x00\x00\x00\x00\x00\x01",
  14306. .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
  14307. "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
  14308. .ilen = 16,
  14309. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14310. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14311. .rlen = 16,
  14312. }, {
  14313. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  14314. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  14315. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  14316. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  14317. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  14318. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  14319. .klen = 48,
  14320. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14321. "\x00\x00\x00\x02\x00\x00\x00\x00",
  14322. .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
  14323. "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
  14324. .ilen = 16,
  14325. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  14326. "\x38\x39\x41\x42\x43\x44\x45\x46",
  14327. .rlen = 16,
  14328. }, {
  14329. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  14330. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  14331. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  14332. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  14333. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  14334. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  14335. .klen = 48,
  14336. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14337. "\x00\x00\x00\x00\x00\x00\x00\x01",
  14338. .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
  14339. "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
  14340. "\x67\x76\xac\x2c\xd2\x63\x18\x93"
  14341. "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
  14342. "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
  14343. "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
  14344. "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
  14345. "\x62\xdd\x78\x81\xea\x1d\xef\x04"
  14346. "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
  14347. "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
  14348. "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
  14349. "\x40\x41\x69\xaa\x71\xc0\x37\xec"
  14350. "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
  14351. "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
  14352. "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
  14353. "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
  14354. "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
  14355. "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
  14356. "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
  14357. "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
  14358. "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
  14359. "\x42\x08\x40\x82\x06\x1c\x2d\x55"
  14360. "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
  14361. "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
  14362. "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
  14363. "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
  14364. "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
  14365. "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
  14366. "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
  14367. "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
  14368. "\xed\x14\xa9\x57\x19\x63\x40\x04"
  14369. "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
  14370. "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
  14371. "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
  14372. "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
  14373. "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
  14374. "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
  14375. "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
  14376. "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
  14377. "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
  14378. "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
  14379. "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
  14380. "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
  14381. "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
  14382. "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
  14383. "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
  14384. "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
  14385. "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
  14386. "\x35\xa5\x83\x04\x84\x01\x99\x56"
  14387. "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
  14388. "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
  14389. "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
  14390. "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
  14391. "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
  14392. "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
  14393. "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
  14394. "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
  14395. "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
  14396. "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
  14397. "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
  14398. "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
  14399. "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
  14400. "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
  14401. "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
  14402. .ilen = 512,
  14403. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  14404. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  14405. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  14406. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  14407. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  14408. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  14409. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  14410. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  14411. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  14412. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  14413. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  14414. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  14415. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  14416. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  14417. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  14418. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  14419. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  14420. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  14421. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  14422. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  14423. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  14424. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  14425. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  14426. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  14427. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  14428. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  14429. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  14430. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  14431. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  14432. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  14433. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  14434. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  14435. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  14436. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  14437. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  14438. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  14439. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  14440. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  14441. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  14442. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  14443. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  14444. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  14445. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  14446. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  14447. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  14448. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  14449. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  14450. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  14451. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  14452. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  14453. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  14454. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  14455. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  14456. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  14457. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  14458. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  14459. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  14460. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  14461. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  14462. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  14463. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  14464. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  14465. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  14466. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  14467. .rlen = 512,
  14468. },
  14469. };
  14470. static struct cipher_testvec camellia_xts_enc_tv_template[] = {
  14471. /* Generated from AES-XTS test vectors */
  14472. {
  14473. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14474. "\x00\x00\x00\x00\x00\x00\x00\x00"
  14475. "\x00\x00\x00\x00\x00\x00\x00\x00"
  14476. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14477. .klen = 32,
  14478. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14479. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14480. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14481. "\x00\x00\x00\x00\x00\x00\x00\x00"
  14482. "\x00\x00\x00\x00\x00\x00\x00\x00"
  14483. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14484. .ilen = 32,
  14485. .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
  14486. "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
  14487. "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
  14488. "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
  14489. .rlen = 32,
  14490. }, {
  14491. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  14492. "\x11\x11\x11\x11\x11\x11\x11\x11"
  14493. "\x22\x22\x22\x22\x22\x22\x22\x22"
  14494. "\x22\x22\x22\x22\x22\x22\x22\x22",
  14495. .klen = 32,
  14496. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  14497. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14498. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  14499. "\x44\x44\x44\x44\x44\x44\x44\x44"
  14500. "\x44\x44\x44\x44\x44\x44\x44\x44"
  14501. "\x44\x44\x44\x44\x44\x44\x44\x44",
  14502. .ilen = 32,
  14503. .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
  14504. "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
  14505. "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
  14506. "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
  14507. .rlen = 32,
  14508. }, {
  14509. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  14510. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  14511. "\x22\x22\x22\x22\x22\x22\x22\x22"
  14512. "\x22\x22\x22\x22\x22\x22\x22\x22",
  14513. .klen = 32,
  14514. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  14515. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14516. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  14517. "\x44\x44\x44\x44\x44\x44\x44\x44"
  14518. "\x44\x44\x44\x44\x44\x44\x44\x44"
  14519. "\x44\x44\x44\x44\x44\x44\x44\x44",
  14520. .ilen = 32,
  14521. .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
  14522. "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
  14523. "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
  14524. "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
  14525. .rlen = 32,
  14526. }, {
  14527. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  14528. "\x23\x53\x60\x28\x74\x71\x35\x26"
  14529. "\x31\x41\x59\x26\x53\x58\x97\x93"
  14530. "\x23\x84\x62\x64\x33\x83\x27\x95",
  14531. .klen = 32,
  14532. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14533. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14534. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  14535. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  14536. "\x10\x11\x12\x13\x14\x15\x16\x17"
  14537. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  14538. "\x20\x21\x22\x23\x24\x25\x26\x27"
  14539. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  14540. "\x30\x31\x32\x33\x34\x35\x36\x37"
  14541. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  14542. "\x40\x41\x42\x43\x44\x45\x46\x47"
  14543. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  14544. "\x50\x51\x52\x53\x54\x55\x56\x57"
  14545. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  14546. "\x60\x61\x62\x63\x64\x65\x66\x67"
  14547. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  14548. "\x70\x71\x72\x73\x74\x75\x76\x77"
  14549. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  14550. "\x80\x81\x82\x83\x84\x85\x86\x87"
  14551. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  14552. "\x90\x91\x92\x93\x94\x95\x96\x97"
  14553. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  14554. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  14555. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  14556. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  14557. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  14558. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  14559. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  14560. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  14561. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  14562. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  14563. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  14564. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  14565. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  14566. "\x00\x01\x02\x03\x04\x05\x06\x07"
  14567. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  14568. "\x10\x11\x12\x13\x14\x15\x16\x17"
  14569. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  14570. "\x20\x21\x22\x23\x24\x25\x26\x27"
  14571. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  14572. "\x30\x31\x32\x33\x34\x35\x36\x37"
  14573. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  14574. "\x40\x41\x42\x43\x44\x45\x46\x47"
  14575. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  14576. "\x50\x51\x52\x53\x54\x55\x56\x57"
  14577. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  14578. "\x60\x61\x62\x63\x64\x65\x66\x67"
  14579. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  14580. "\x70\x71\x72\x73\x74\x75\x76\x77"
  14581. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  14582. "\x80\x81\x82\x83\x84\x85\x86\x87"
  14583. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  14584. "\x90\x91\x92\x93\x94\x95\x96\x97"
  14585. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  14586. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  14587. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  14588. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  14589. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  14590. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  14591. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  14592. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  14593. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  14594. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  14595. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  14596. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  14597. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  14598. .ilen = 512,
  14599. .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
  14600. "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
  14601. "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
  14602. "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
  14603. "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
  14604. "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
  14605. "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
  14606. "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
  14607. "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
  14608. "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
  14609. "\x08\xda\x76\x00\x65\xcf\x7b\x31"
  14610. "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
  14611. "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
  14612. "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
  14613. "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
  14614. "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
  14615. "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
  14616. "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
  14617. "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
  14618. "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
  14619. "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
  14620. "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
  14621. "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
  14622. "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
  14623. "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
  14624. "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
  14625. "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
  14626. "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
  14627. "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
  14628. "\x16\x31\xb2\x47\x91\x67\xaa\x28"
  14629. "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
  14630. "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
  14631. "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
  14632. "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
  14633. "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
  14634. "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
  14635. "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
  14636. "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
  14637. "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
  14638. "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
  14639. "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
  14640. "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
  14641. "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
  14642. "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
  14643. "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
  14644. "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
  14645. "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
  14646. "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
  14647. "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
  14648. "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
  14649. "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
  14650. "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
  14651. "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
  14652. "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
  14653. "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
  14654. "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
  14655. "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
  14656. "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
  14657. "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
  14658. "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
  14659. "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
  14660. "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
  14661. "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
  14662. "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
  14663. .rlen = 512,
  14664. }, {
  14665. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  14666. "\x23\x53\x60\x28\x74\x71\x35\x26"
  14667. "\x62\x49\x77\x57\x24\x70\x93\x69"
  14668. "\x99\x59\x57\x49\x66\x96\x76\x27"
  14669. "\x31\x41\x59\x26\x53\x58\x97\x93"
  14670. "\x23\x84\x62\x64\x33\x83\x27\x95"
  14671. "\x02\x88\x41\x97\x16\x93\x99\x37"
  14672. "\x51\x05\x82\x09\x74\x94\x45\x92",
  14673. .klen = 64,
  14674. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  14675. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14676. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  14677. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  14678. "\x10\x11\x12\x13\x14\x15\x16\x17"
  14679. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  14680. "\x20\x21\x22\x23\x24\x25\x26\x27"
  14681. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  14682. "\x30\x31\x32\x33\x34\x35\x36\x37"
  14683. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  14684. "\x40\x41\x42\x43\x44\x45\x46\x47"
  14685. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  14686. "\x50\x51\x52\x53\x54\x55\x56\x57"
  14687. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  14688. "\x60\x61\x62\x63\x64\x65\x66\x67"
  14689. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  14690. "\x70\x71\x72\x73\x74\x75\x76\x77"
  14691. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  14692. "\x80\x81\x82\x83\x84\x85\x86\x87"
  14693. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  14694. "\x90\x91\x92\x93\x94\x95\x96\x97"
  14695. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  14696. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  14697. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  14698. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  14699. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  14700. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  14701. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  14702. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  14703. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  14704. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  14705. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  14706. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  14707. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  14708. "\x00\x01\x02\x03\x04\x05\x06\x07"
  14709. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  14710. "\x10\x11\x12\x13\x14\x15\x16\x17"
  14711. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  14712. "\x20\x21\x22\x23\x24\x25\x26\x27"
  14713. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  14714. "\x30\x31\x32\x33\x34\x35\x36\x37"
  14715. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  14716. "\x40\x41\x42\x43\x44\x45\x46\x47"
  14717. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  14718. "\x50\x51\x52\x53\x54\x55\x56\x57"
  14719. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  14720. "\x60\x61\x62\x63\x64\x65\x66\x67"
  14721. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  14722. "\x70\x71\x72\x73\x74\x75\x76\x77"
  14723. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  14724. "\x80\x81\x82\x83\x84\x85\x86\x87"
  14725. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  14726. "\x90\x91\x92\x93\x94\x95\x96\x97"
  14727. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  14728. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  14729. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  14730. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  14731. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  14732. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  14733. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  14734. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  14735. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  14736. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  14737. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  14738. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  14739. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  14740. .ilen = 512,
  14741. .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
  14742. "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
  14743. "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
  14744. "\xf1\x74\xac\x96\x05\x7b\x32\xca"
  14745. "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
  14746. "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
  14747. "\x97\x07\x82\xf0\x07\x12\x38\x0a"
  14748. "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
  14749. "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
  14750. "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
  14751. "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
  14752. "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
  14753. "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
  14754. "\x41\x82\x0c\x45\x39\x35\xa8\x75"
  14755. "\x03\x29\x01\x84\x8c\xab\x48\xbe"
  14756. "\x11\x56\x22\x67\xb7\x67\x1a\x09"
  14757. "\xa1\x72\x25\x41\x3c\x39\x65\x80"
  14758. "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
  14759. "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
  14760. "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
  14761. "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
  14762. "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
  14763. "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
  14764. "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
  14765. "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
  14766. "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
  14767. "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
  14768. "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
  14769. "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
  14770. "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
  14771. "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
  14772. "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
  14773. "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
  14774. "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
  14775. "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
  14776. "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
  14777. "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
  14778. "\xef\x38\x52\x18\x0e\x29\x7e\xef"
  14779. "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
  14780. "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
  14781. "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
  14782. "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
  14783. "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
  14784. "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
  14785. "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
  14786. "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
  14787. "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
  14788. "\x21\x17\xf8\x59\x15\x24\x64\x22"
  14789. "\x57\x48\x80\xd5\x3d\x92\x30\x07"
  14790. "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
  14791. "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
  14792. "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
  14793. "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
  14794. "\x6b\x84\xf3\x00\xba\x52\x05\x02"
  14795. "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
  14796. "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
  14797. "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
  14798. "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
  14799. "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
  14800. "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
  14801. "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
  14802. "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
  14803. "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
  14804. "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
  14805. .rlen = 512,
  14806. },
  14807. };
  14808. static struct cipher_testvec camellia_xts_dec_tv_template[] = {
  14809. /* Generated from AES-XTS test vectors */
  14810. /* same as enc vectors with input and result reversed */
  14811. {
  14812. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14813. "\x00\x00\x00\x00\x00\x00\x00\x00"
  14814. "\x00\x00\x00\x00\x00\x00\x00\x00"
  14815. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14816. .klen = 32,
  14817. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14818. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14819. .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
  14820. "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
  14821. "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
  14822. "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
  14823. .ilen = 32,
  14824. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14825. "\x00\x00\x00\x00\x00\x00\x00\x00"
  14826. "\x00\x00\x00\x00\x00\x00\x00\x00"
  14827. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14828. .rlen = 32,
  14829. }, {
  14830. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  14831. "\x11\x11\x11\x11\x11\x11\x11\x11"
  14832. "\x22\x22\x22\x22\x22\x22\x22\x22"
  14833. "\x22\x22\x22\x22\x22\x22\x22\x22",
  14834. .klen = 32,
  14835. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  14836. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14837. .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
  14838. "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
  14839. "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
  14840. "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
  14841. .ilen = 32,
  14842. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  14843. "\x44\x44\x44\x44\x44\x44\x44\x44"
  14844. "\x44\x44\x44\x44\x44\x44\x44\x44"
  14845. "\x44\x44\x44\x44\x44\x44\x44\x44",
  14846. .rlen = 32,
  14847. }, {
  14848. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  14849. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  14850. "\x22\x22\x22\x22\x22\x22\x22\x22"
  14851. "\x22\x22\x22\x22\x22\x22\x22\x22",
  14852. .klen = 32,
  14853. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  14854. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14855. .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
  14856. "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
  14857. "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
  14858. "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
  14859. .ilen = 32,
  14860. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  14861. "\x44\x44\x44\x44\x44\x44\x44\x44"
  14862. "\x44\x44\x44\x44\x44\x44\x44\x44"
  14863. "\x44\x44\x44\x44\x44\x44\x44\x44",
  14864. .rlen = 32,
  14865. }, {
  14866. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  14867. "\x23\x53\x60\x28\x74\x71\x35\x26"
  14868. "\x31\x41\x59\x26\x53\x58\x97\x93"
  14869. "\x23\x84\x62\x64\x33\x83\x27\x95",
  14870. .klen = 32,
  14871. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14872. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14873. .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
  14874. "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
  14875. "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
  14876. "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
  14877. "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
  14878. "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
  14879. "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
  14880. "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
  14881. "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
  14882. "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
  14883. "\x08\xda\x76\x00\x65\xcf\x7b\x31"
  14884. "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
  14885. "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
  14886. "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
  14887. "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
  14888. "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
  14889. "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
  14890. "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
  14891. "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
  14892. "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
  14893. "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
  14894. "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
  14895. "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
  14896. "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
  14897. "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
  14898. "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
  14899. "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
  14900. "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
  14901. "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
  14902. "\x16\x31\xb2\x47\x91\x67\xaa\x28"
  14903. "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
  14904. "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
  14905. "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
  14906. "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
  14907. "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
  14908. "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
  14909. "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
  14910. "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
  14911. "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
  14912. "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
  14913. "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
  14914. "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
  14915. "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
  14916. "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
  14917. "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
  14918. "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
  14919. "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
  14920. "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
  14921. "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
  14922. "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
  14923. "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
  14924. "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
  14925. "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
  14926. "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
  14927. "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
  14928. "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
  14929. "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
  14930. "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
  14931. "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
  14932. "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
  14933. "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
  14934. "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
  14935. "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
  14936. "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
  14937. .ilen = 512,
  14938. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  14939. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  14940. "\x10\x11\x12\x13\x14\x15\x16\x17"
  14941. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  14942. "\x20\x21\x22\x23\x24\x25\x26\x27"
  14943. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  14944. "\x30\x31\x32\x33\x34\x35\x36\x37"
  14945. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  14946. "\x40\x41\x42\x43\x44\x45\x46\x47"
  14947. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  14948. "\x50\x51\x52\x53\x54\x55\x56\x57"
  14949. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  14950. "\x60\x61\x62\x63\x64\x65\x66\x67"
  14951. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  14952. "\x70\x71\x72\x73\x74\x75\x76\x77"
  14953. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  14954. "\x80\x81\x82\x83\x84\x85\x86\x87"
  14955. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  14956. "\x90\x91\x92\x93\x94\x95\x96\x97"
  14957. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  14958. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  14959. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  14960. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  14961. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  14962. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  14963. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  14964. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  14965. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  14966. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  14967. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  14968. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  14969. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  14970. "\x00\x01\x02\x03\x04\x05\x06\x07"
  14971. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  14972. "\x10\x11\x12\x13\x14\x15\x16\x17"
  14973. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  14974. "\x20\x21\x22\x23\x24\x25\x26\x27"
  14975. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  14976. "\x30\x31\x32\x33\x34\x35\x36\x37"
  14977. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  14978. "\x40\x41\x42\x43\x44\x45\x46\x47"
  14979. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  14980. "\x50\x51\x52\x53\x54\x55\x56\x57"
  14981. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  14982. "\x60\x61\x62\x63\x64\x65\x66\x67"
  14983. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  14984. "\x70\x71\x72\x73\x74\x75\x76\x77"
  14985. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  14986. "\x80\x81\x82\x83\x84\x85\x86\x87"
  14987. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  14988. "\x90\x91\x92\x93\x94\x95\x96\x97"
  14989. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  14990. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  14991. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  14992. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  14993. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  14994. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  14995. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  14996. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  14997. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  14998. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  14999. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  15000. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  15001. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  15002. .rlen = 512,
  15003. }, {
  15004. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  15005. "\x23\x53\x60\x28\x74\x71\x35\x26"
  15006. "\x62\x49\x77\x57\x24\x70\x93\x69"
  15007. "\x99\x59\x57\x49\x66\x96\x76\x27"
  15008. "\x31\x41\x59\x26\x53\x58\x97\x93"
  15009. "\x23\x84\x62\x64\x33\x83\x27\x95"
  15010. "\x02\x88\x41\x97\x16\x93\x99\x37"
  15011. "\x51\x05\x82\x09\x74\x94\x45\x92",
  15012. .klen = 64,
  15013. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  15014. "\x00\x00\x00\x00\x00\x00\x00\x00",
  15015. .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
  15016. "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
  15017. "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
  15018. "\xf1\x74\xac\x96\x05\x7b\x32\xca"
  15019. "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
  15020. "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
  15021. "\x97\x07\x82\xf0\x07\x12\x38\x0a"
  15022. "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
  15023. "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
  15024. "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
  15025. "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
  15026. "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
  15027. "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
  15028. "\x41\x82\x0c\x45\x39\x35\xa8\x75"
  15029. "\x03\x29\x01\x84\x8c\xab\x48\xbe"
  15030. "\x11\x56\x22\x67\xb7\x67\x1a\x09"
  15031. "\xa1\x72\x25\x41\x3c\x39\x65\x80"
  15032. "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
  15033. "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
  15034. "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
  15035. "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
  15036. "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
  15037. "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
  15038. "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
  15039. "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
  15040. "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
  15041. "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
  15042. "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
  15043. "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
  15044. "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
  15045. "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
  15046. "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
  15047. "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
  15048. "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
  15049. "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
  15050. "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
  15051. "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
  15052. "\xef\x38\x52\x18\x0e\x29\x7e\xef"
  15053. "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
  15054. "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
  15055. "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
  15056. "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
  15057. "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
  15058. "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
  15059. "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
  15060. "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
  15061. "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
  15062. "\x21\x17\xf8\x59\x15\x24\x64\x22"
  15063. "\x57\x48\x80\xd5\x3d\x92\x30\x07"
  15064. "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
  15065. "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
  15066. "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
  15067. "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
  15068. "\x6b\x84\xf3\x00\xba\x52\x05\x02"
  15069. "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
  15070. "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
  15071. "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
  15072. "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
  15073. "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
  15074. "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
  15075. "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
  15076. "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
  15077. "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
  15078. "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
  15079. .ilen = 512,
  15080. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  15081. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  15082. "\x10\x11\x12\x13\x14\x15\x16\x17"
  15083. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  15084. "\x20\x21\x22\x23\x24\x25\x26\x27"
  15085. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  15086. "\x30\x31\x32\x33\x34\x35\x36\x37"
  15087. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  15088. "\x40\x41\x42\x43\x44\x45\x46\x47"
  15089. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  15090. "\x50\x51\x52\x53\x54\x55\x56\x57"
  15091. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  15092. "\x60\x61\x62\x63\x64\x65\x66\x67"
  15093. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  15094. "\x70\x71\x72\x73\x74\x75\x76\x77"
  15095. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  15096. "\x80\x81\x82\x83\x84\x85\x86\x87"
  15097. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  15098. "\x90\x91\x92\x93\x94\x95\x96\x97"
  15099. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  15100. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  15101. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  15102. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  15103. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  15104. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  15105. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  15106. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  15107. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  15108. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  15109. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  15110. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  15111. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  15112. "\x00\x01\x02\x03\x04\x05\x06\x07"
  15113. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  15114. "\x10\x11\x12\x13\x14\x15\x16\x17"
  15115. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  15116. "\x20\x21\x22\x23\x24\x25\x26\x27"
  15117. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  15118. "\x30\x31\x32\x33\x34\x35\x36\x37"
  15119. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  15120. "\x40\x41\x42\x43\x44\x45\x46\x47"
  15121. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  15122. "\x50\x51\x52\x53\x54\x55\x56\x57"
  15123. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  15124. "\x60\x61\x62\x63\x64\x65\x66\x67"
  15125. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  15126. "\x70\x71\x72\x73\x74\x75\x76\x77"
  15127. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  15128. "\x80\x81\x82\x83\x84\x85\x86\x87"
  15129. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  15130. "\x90\x91\x92\x93\x94\x95\x96\x97"
  15131. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  15132. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  15133. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  15134. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  15135. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  15136. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  15137. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  15138. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  15139. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  15140. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  15141. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  15142. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  15143. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  15144. .rlen = 512,
  15145. },
  15146. };
  15147. /*
  15148. * SEED test vectors
  15149. */
  15150. #define SEED_ENC_TEST_VECTORS 4
  15151. #define SEED_DEC_TEST_VECTORS 4
  15152. static struct cipher_testvec seed_enc_tv_template[] = {
  15153. {
  15154. .key = zeroed_string,
  15155. .klen = 16,
  15156. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  15157. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  15158. .ilen = 16,
  15159. .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  15160. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  15161. .rlen = 16,
  15162. }, {
  15163. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  15164. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  15165. .klen = 16,
  15166. .input = zeroed_string,
  15167. .ilen = 16,
  15168. .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  15169. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  15170. .rlen = 16,
  15171. }, {
  15172. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  15173. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  15174. .klen = 16,
  15175. .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  15176. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  15177. .ilen = 16,
  15178. .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  15179. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  15180. .rlen = 16,
  15181. }, {
  15182. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  15183. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  15184. .klen = 16,
  15185. .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  15186. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  15187. .ilen = 16,
  15188. .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  15189. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  15190. .rlen = 16,
  15191. }
  15192. };
  15193. static struct cipher_testvec seed_dec_tv_template[] = {
  15194. {
  15195. .key = zeroed_string,
  15196. .klen = 16,
  15197. .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  15198. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  15199. .ilen = 16,
  15200. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  15201. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  15202. .rlen = 16,
  15203. }, {
  15204. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  15205. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  15206. .klen = 16,
  15207. .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  15208. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  15209. .ilen = 16,
  15210. .result = zeroed_string,
  15211. .rlen = 16,
  15212. }, {
  15213. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  15214. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  15215. .klen = 16,
  15216. .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  15217. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  15218. .ilen = 16,
  15219. .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  15220. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  15221. .rlen = 16,
  15222. }, {
  15223. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  15224. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  15225. .klen = 16,
  15226. .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  15227. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  15228. .ilen = 16,
  15229. .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  15230. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  15231. .rlen = 16,
  15232. }
  15233. };
  15234. #define SALSA20_STREAM_ENC_TEST_VECTORS 5
  15235. static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
  15236. /*
  15237. * Testvectors from verified.test-vectors submitted to ECRYPT.
  15238. * They are truncated to size 39, 64, 111, 129 to test a variety
  15239. * of input length.
  15240. */
  15241. { /* Set 3, vector 0 */
  15242. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  15243. "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
  15244. .klen = 16,
  15245. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15246. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15247. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15248. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15249. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15250. "\x00\x00\x00\x00\x00\x00\x00",
  15251. .ilen = 39,
  15252. .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
  15253. "\x68\x02\x41\x0C\x68\x86\x88\x89"
  15254. "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
  15255. "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
  15256. "\x58\x3F\x52\x79\x70\xEB\xC1",
  15257. .rlen = 39,
  15258. }, { /* Set 5, vector 0 */
  15259. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15260. "\x00\x00\x00\x00\x00\x00\x00\x00",
  15261. .klen = 16,
  15262. .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
  15263. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15264. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15265. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15266. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15267. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15268. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15269. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15270. "\x00\x00\x00\x00\x00\x00\x00\x00",
  15271. .ilen = 64,
  15272. .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
  15273. "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
  15274. "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
  15275. "\x46\x26\xBF\x44\x3F\x21\x97\x76"
  15276. "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
  15277. "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
  15278. "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
  15279. "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
  15280. .rlen = 64,
  15281. }, { /* Set 3, vector 27 */
  15282. .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
  15283. "\x23\x24\x25\x26\x27\x28\x29\x2A"
  15284. "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
  15285. "\x33\x34\x35\x36\x37\x38\x39\x3A",
  15286. .klen = 32,
  15287. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15288. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15289. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15290. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15291. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15292. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15293. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15294. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15295. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15296. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15297. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15298. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15299. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15300. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15301. "\x00\x00\x00\x00\x00\x00\x00",
  15302. .ilen = 111,
  15303. .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
  15304. "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
  15305. "\x87\xD9\x47\xF8\x28\x91\x35\x98"
  15306. "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
  15307. "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
  15308. "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
  15309. "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
  15310. "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
  15311. "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
  15312. "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
  15313. "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
  15314. "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
  15315. "\x95\x46\x45\x54\xE9\x75\x03\x08"
  15316. "\x44\xAF\xE5\x8A\x81\x12\x09",
  15317. .rlen = 111,
  15318. }, { /* Set 5, vector 27 */
  15319. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15320. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15321. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15322. "\x00\x00\x00\x00\x00\x00\x00\x00",
  15323. .klen = 32,
  15324. .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
  15325. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15326. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15327. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15328. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15329. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15330. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15331. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15332. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15333. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15334. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15335. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15336. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15337. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15338. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15339. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15340. "\x00\x00\x00\x00\x00\x00\x00\x00"
  15341. "\x00",
  15342. .ilen = 129,
  15343. .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
  15344. "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
  15345. "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
  15346. "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
  15347. "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
  15348. "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
  15349. "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
  15350. "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
  15351. "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
  15352. "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
  15353. "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
  15354. "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
  15355. "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
  15356. "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
  15357. "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
  15358. "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
  15359. "\x5A",
  15360. .rlen = 129,
  15361. }, { /* large test vector generated using Crypto++ */
  15362. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  15363. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  15364. "\x10\x11\x12\x13\x14\x15\x16\x17"
  15365. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  15366. .klen = 32,
  15367. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15368. "\x00\x00\x00\x00\x00\x00\x00\x00",
  15369. .input =
  15370. "\x00\x01\x02\x03\x04\x05\x06\x07"
  15371. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  15372. "\x10\x11\x12\x13\x14\x15\x16\x17"
  15373. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  15374. "\x20\x21\x22\x23\x24\x25\x26\x27"
  15375. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  15376. "\x30\x31\x32\x33\x34\x35\x36\x37"
  15377. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  15378. "\x40\x41\x42\x43\x44\x45\x46\x47"
  15379. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  15380. "\x50\x51\x52\x53\x54\x55\x56\x57"
  15381. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  15382. "\x60\x61\x62\x63\x64\x65\x66\x67"
  15383. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  15384. "\x70\x71\x72\x73\x74\x75\x76\x77"
  15385. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  15386. "\x80\x81\x82\x83\x84\x85\x86\x87"
  15387. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  15388. "\x90\x91\x92\x93\x94\x95\x96\x97"
  15389. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  15390. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  15391. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  15392. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  15393. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  15394. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  15395. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  15396. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  15397. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  15398. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  15399. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  15400. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  15401. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  15402. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  15403. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  15404. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  15405. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  15406. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  15407. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  15408. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  15409. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  15410. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  15411. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  15412. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  15413. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  15414. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  15415. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  15416. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  15417. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  15418. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  15419. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  15420. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  15421. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  15422. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  15423. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  15424. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  15425. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  15426. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  15427. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  15428. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  15429. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  15430. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  15431. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  15432. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  15433. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  15434. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  15435. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  15436. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  15437. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  15438. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  15439. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  15440. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  15441. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  15442. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  15443. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  15444. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  15445. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  15446. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  15447. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  15448. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  15449. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  15450. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  15451. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  15452. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  15453. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  15454. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  15455. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  15456. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  15457. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  15458. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  15459. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  15460. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  15461. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  15462. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  15463. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  15464. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  15465. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  15466. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  15467. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  15468. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  15469. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  15470. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  15471. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  15472. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  15473. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  15474. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  15475. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  15476. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  15477. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  15478. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  15479. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  15480. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  15481. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  15482. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  15483. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  15484. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  15485. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  15486. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  15487. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  15488. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  15489. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  15490. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  15491. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  15492. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  15493. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  15494. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  15495. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  15496. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  15497. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  15498. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  15499. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  15500. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  15501. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  15502. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  15503. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  15504. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  15505. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  15506. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  15507. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  15508. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  15509. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  15510. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  15511. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  15512. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  15513. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  15514. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  15515. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  15516. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  15517. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  15518. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  15519. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  15520. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  15521. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  15522. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  15523. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  15524. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  15525. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  15526. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  15527. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  15528. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  15529. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  15530. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  15531. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  15532. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  15533. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  15534. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  15535. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  15536. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  15537. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  15538. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  15539. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  15540. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  15541. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  15542. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  15543. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  15544. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  15545. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  15546. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  15547. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  15548. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  15549. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  15550. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  15551. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  15552. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  15553. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  15554. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  15555. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  15556. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  15557. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  15558. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  15559. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  15560. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  15561. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  15562. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  15563. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  15564. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  15565. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  15566. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  15567. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  15568. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  15569. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  15570. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  15571. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  15572. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  15573. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  15574. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  15575. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  15576. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  15577. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  15578. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  15579. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  15580. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  15581. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  15582. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  15583. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  15584. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  15585. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  15586. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  15587. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  15588. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  15589. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  15590. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  15591. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  15592. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  15593. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  15594. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  15595. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  15596. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  15597. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  15598. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  15599. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  15600. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  15601. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  15602. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  15603. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  15604. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  15605. "\x28\x37\x46\x55\x64\x73\x82\x91"
  15606. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  15607. "\x18\x27\x36\x45\x54\x63\x72\x81"
  15608. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  15609. "\x08\x17\x26\x35\x44\x53\x62\x71"
  15610. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  15611. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  15612. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  15613. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  15614. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  15615. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  15616. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  15617. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  15618. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  15619. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  15620. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  15621. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  15622. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  15623. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  15624. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  15625. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  15626. "\x00\x11\x22\x33\x44\x55\x66\x77"
  15627. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  15628. "\x10\x21\x32\x43\x54\x65\x76\x87"
  15629. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  15630. "\x20\x31\x42\x53\x64\x75\x86\x97"
  15631. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  15632. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  15633. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  15634. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  15635. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  15636. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  15637. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  15638. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  15639. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  15640. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  15641. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  15642. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  15643. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  15644. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  15645. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  15646. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  15647. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  15648. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  15649. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  15650. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  15651. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  15652. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  15653. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  15654. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  15655. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  15656. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  15657. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  15658. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  15659. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  15660. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  15661. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  15662. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  15663. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  15664. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  15665. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  15666. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  15667. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  15668. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  15669. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  15670. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  15671. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  15672. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  15673. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  15674. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  15675. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  15676. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  15677. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  15678. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  15679. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  15680. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  15681. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  15682. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  15683. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  15684. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  15685. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  15686. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  15687. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  15688. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  15689. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  15690. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  15691. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  15692. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  15693. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  15694. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  15695. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  15696. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  15697. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  15698. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  15699. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  15700. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  15701. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  15702. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  15703. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  15704. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  15705. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  15706. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  15707. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  15708. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  15709. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  15710. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  15711. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  15712. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  15713. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  15714. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  15715. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  15716. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  15717. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  15718. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  15719. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  15720. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  15721. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  15722. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  15723. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  15724. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  15725. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  15726. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  15727. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  15728. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  15729. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  15730. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  15731. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  15732. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  15733. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  15734. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  15735. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  15736. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  15737. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  15738. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  15739. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  15740. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  15741. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  15742. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  15743. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  15744. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  15745. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  15746. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  15747. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  15748. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  15749. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  15750. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  15751. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  15752. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  15753. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  15754. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  15755. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  15756. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  15757. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  15758. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  15759. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  15760. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  15761. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  15762. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  15763. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  15764. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  15765. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  15766. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  15767. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  15768. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  15769. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  15770. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  15771. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  15772. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  15773. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  15774. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  15775. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  15776. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  15777. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  15778. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  15779. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  15780. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  15781. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  15782. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  15783. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  15784. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  15785. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  15786. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  15787. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  15788. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  15789. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  15790. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  15791. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  15792. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  15793. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  15794. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  15795. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  15796. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  15797. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  15798. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  15799. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  15800. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  15801. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  15802. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  15803. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  15804. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  15805. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  15806. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  15807. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  15808. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  15809. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  15810. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  15811. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  15812. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  15813. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  15814. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  15815. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  15816. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  15817. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  15818. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  15819. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  15820. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  15821. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  15822. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  15823. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  15824. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  15825. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  15826. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  15827. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  15828. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  15829. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  15830. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  15831. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  15832. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  15833. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  15834. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  15835. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  15836. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  15837. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  15838. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  15839. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  15840. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  15841. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  15842. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  15843. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  15844. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  15845. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  15846. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  15847. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  15848. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  15849. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  15850. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  15851. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  15852. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  15853. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  15854. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  15855. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  15856. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  15857. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  15858. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  15859. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  15860. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  15861. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  15862. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  15863. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  15864. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  15865. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  15866. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  15867. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  15868. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  15869. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  15870. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  15871. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  15872. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  15873. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  15874. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  15875. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  15876. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  15877. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  15878. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  15879. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  15880. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  15881. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  15882. "\x00\x21\x42\x63",
  15883. .ilen = 4100,
  15884. .result =
  15885. "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
  15886. "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
  15887. "\x29\x01\xce\x98\x55\x53\xf9\x0c"
  15888. "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
  15889. "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
  15890. "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
  15891. "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
  15892. "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
  15893. "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
  15894. "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
  15895. "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
  15896. "\xbb\xde\x56\x86\xab\x65\x21\x30"
  15897. "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
  15898. "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
  15899. "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
  15900. "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
  15901. "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
  15902. "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
  15903. "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
  15904. "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
  15905. "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
  15906. "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
  15907. "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
  15908. "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
  15909. "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
  15910. "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
  15911. "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
  15912. "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
  15913. "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
  15914. "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
  15915. "\x45\xff\x3f\xce\x55\xf6\x95\x10"
  15916. "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
  15917. "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
  15918. "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
  15919. "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
  15920. "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
  15921. "\x62\x08\x18\x7a\x25\x49\x28\xac"
  15922. "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
  15923. "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
  15924. "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
  15925. "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
  15926. "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
  15927. "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
  15928. "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
  15929. "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
  15930. "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
  15931. "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
  15932. "\x33\xee\x14\x19\x22\x52\x89\xa7"
  15933. "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
  15934. "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
  15935. "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
  15936. "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
  15937. "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
  15938. "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
  15939. "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
  15940. "\x04\x07\x08\x52\xe6\xc0\xda\x93"
  15941. "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
  15942. "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
  15943. "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
  15944. "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
  15945. "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
  15946. "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
  15947. "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
  15948. "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
  15949. "\x5a\x90\xae\x75\x0a\x74\x18\x89"
  15950. "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
  15951. "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
  15952. "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
  15953. "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
  15954. "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
  15955. "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
  15956. "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
  15957. "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
  15958. "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
  15959. "\x49\x97\x33\xab\x36\x14\x0a\x70"
  15960. "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
  15961. "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
  15962. "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
  15963. "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
  15964. "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
  15965. "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
  15966. "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
  15967. "\x47\x13\x28\x73\x3c\xbb\x00\x90"
  15968. "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
  15969. "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
  15970. "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
  15971. "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
  15972. "\xad\x04\x07\xae\x22\x90\x4a\x93"
  15973. "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
  15974. "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
  15975. "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
  15976. "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
  15977. "\x53\xf9\x80\x10\xde\x80\xa2\x41"
  15978. "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
  15979. "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
  15980. "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
  15981. "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
  15982. "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
  15983. "\xde\xff\x07\x44\xdd\x56\x1b\xad"
  15984. "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
  15985. "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
  15986. "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
  15987. "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
  15988. "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
  15989. "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
  15990. "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
  15991. "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
  15992. "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
  15993. "\x23\xf8\x66\x18\x14\x28\x34\x0f"
  15994. "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
  15995. "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
  15996. "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
  15997. "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
  15998. "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
  15999. "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
  16000. "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
  16001. "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
  16002. "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
  16003. "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
  16004. "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
  16005. "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
  16006. "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
  16007. "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
  16008. "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
  16009. "\xca\x8e\x61\x87\xde\xad\x80\xd2"
  16010. "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
  16011. "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
  16012. "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
  16013. "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
  16014. "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
  16015. "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
  16016. "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
  16017. "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
  16018. "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
  16019. "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
  16020. "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
  16021. "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
  16022. "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
  16023. "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
  16024. "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
  16025. "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
  16026. "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
  16027. "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
  16028. "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
  16029. "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
  16030. "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
  16031. "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
  16032. "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
  16033. "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
  16034. "\x54\xda\x24\x6a\xc4\x41\x65\x46"
  16035. "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
  16036. "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
  16037. "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
  16038. "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
  16039. "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
  16040. "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
  16041. "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
  16042. "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
  16043. "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
  16044. "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
  16045. "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
  16046. "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
  16047. "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
  16048. "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
  16049. "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
  16050. "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
  16051. "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
  16052. "\xef\xcc\xa7\xec\xab\x43\x09\x18"
  16053. "\xd3\xab\x68\xd1\x07\x99\x44\x47"
  16054. "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
  16055. "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
  16056. "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
  16057. "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
  16058. "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
  16059. "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
  16060. "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
  16061. "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
  16062. "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
  16063. "\x71\x6e\x9f\x58\x15\x67\x72\x87"
  16064. "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
  16065. "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
  16066. "\xba\x41\x54\xac\xf0\xfc\x59\x12"
  16067. "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
  16068. "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
  16069. "\x2e\x53\x49\x97\x94\x33\xae\x40"
  16070. "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
  16071. "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
  16072. "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
  16073. "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
  16074. "\xce\x87\xad\xcc\x72\x05\x00\x29"
  16075. "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
  16076. "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
  16077. "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
  16078. "\xac\xc0\x79\x50\x69\xca\x59\x32"
  16079. "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
  16080. "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
  16081. "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
  16082. "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
  16083. "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
  16084. "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
  16085. "\x05\x68\x6b\xab\xe3\x41\x49\xed"
  16086. "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
  16087. "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
  16088. "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
  16089. "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
  16090. "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
  16091. "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
  16092. "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
  16093. "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
  16094. "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
  16095. "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
  16096. "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
  16097. "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
  16098. "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
  16099. "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
  16100. "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
  16101. "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
  16102. "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
  16103. "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
  16104. "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
  16105. "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
  16106. "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
  16107. "\x85\x75\xe6\x43\xf6\x87\x08\x68"
  16108. "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
  16109. "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
  16110. "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
  16111. "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
  16112. "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
  16113. "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
  16114. "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
  16115. "\xaf\x55\xeb\x22\xac\x93\x68\x32"
  16116. "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
  16117. "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
  16118. "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
  16119. "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
  16120. "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
  16121. "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
  16122. "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
  16123. "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
  16124. "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
  16125. "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
  16126. "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
  16127. "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
  16128. "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
  16129. "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
  16130. "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
  16131. "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
  16132. "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
  16133. "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
  16134. "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
  16135. "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
  16136. "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
  16137. "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
  16138. "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
  16139. "\x38\x55\xab\x33\x26\xef\x9f\x43"
  16140. "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
  16141. "\x58\x09\x09\x1b\xc3\x65\x46\x46"
  16142. "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
  16143. "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
  16144. "\x63\x86\xf2\x03\x67\x45\xd2\x72"
  16145. "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
  16146. "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
  16147. "\x2b\x82\x39\xbd\x69\x54\xed\x62"
  16148. "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
  16149. "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
  16150. "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
  16151. "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
  16152. "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
  16153. "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
  16154. "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
  16155. "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
  16156. "\x55\xad\xa4\xd1\x22\x54\x70\x94"
  16157. "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
  16158. "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
  16159. "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
  16160. "\x62\x36\x43\xb2\x82\x15\x75\x50"
  16161. "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
  16162. "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
  16163. "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
  16164. "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
  16165. "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
  16166. "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
  16167. "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
  16168. "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
  16169. "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
  16170. "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
  16171. "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
  16172. "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
  16173. "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
  16174. "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
  16175. "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
  16176. "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
  16177. "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
  16178. "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
  16179. "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
  16180. "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
  16181. "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
  16182. "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
  16183. "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
  16184. "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
  16185. "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
  16186. "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
  16187. "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
  16188. "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
  16189. "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
  16190. "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
  16191. "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
  16192. "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
  16193. "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
  16194. "\x42\x19\x23\x7d\xc8\x73\xee\x25"
  16195. "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
  16196. "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
  16197. "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
  16198. "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
  16199. "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
  16200. "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
  16201. "\xdb\x87\xee\xef\x55\x89\x2a\x59"
  16202. "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
  16203. "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
  16204. "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
  16205. "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
  16206. "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
  16207. "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
  16208. "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
  16209. "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
  16210. "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
  16211. "\xae\xab\x86\x09\x89\xc9\xc2\x40"
  16212. "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
  16213. "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
  16214. "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
  16215. "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
  16216. "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
  16217. "\x95\xd9\x34\x34\x86\xc6\x41\x94"
  16218. "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
  16219. "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
  16220. "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
  16221. "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
  16222. "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
  16223. "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
  16224. "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
  16225. "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
  16226. "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
  16227. "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
  16228. "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
  16229. "\xa7\x33\x34\x86\xca\xe4\x96\x23"
  16230. "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
  16231. "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
  16232. "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
  16233. "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
  16234. "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
  16235. "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
  16236. "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
  16237. "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
  16238. "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
  16239. "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
  16240. "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
  16241. "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
  16242. "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
  16243. "\x68\xc8\x7f\x51\x22\x42\xef\x49"
  16244. "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
  16245. "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
  16246. "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
  16247. "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
  16248. "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
  16249. "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
  16250. "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
  16251. "\x73\x2e\x71\x79\x16\x06\x63\x28"
  16252. "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
  16253. "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
  16254. "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
  16255. "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
  16256. "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
  16257. "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
  16258. "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
  16259. "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
  16260. "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
  16261. "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
  16262. "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
  16263. "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
  16264. "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
  16265. "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
  16266. "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
  16267. "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
  16268. "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
  16269. "\x19\x07\xaf\x90\x62\x5c\x68\x98"
  16270. "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
  16271. "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
  16272. "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
  16273. "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
  16274. "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
  16275. "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
  16276. "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
  16277. "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
  16278. "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
  16279. "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
  16280. "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
  16281. "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
  16282. "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
  16283. "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
  16284. "\x21\x33\x44\xfe\x7f\x35\x32\x93"
  16285. "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
  16286. "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
  16287. "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
  16288. "\x64\xf0\x48\xe5\x57\x99\xee\x75"
  16289. "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
  16290. "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
  16291. "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
  16292. "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
  16293. "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
  16294. "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
  16295. "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
  16296. "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
  16297. "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
  16298. "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
  16299. "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
  16300. "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
  16301. "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
  16302. "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
  16303. "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
  16304. "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
  16305. "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
  16306. "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
  16307. "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
  16308. "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
  16309. "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
  16310. "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
  16311. "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
  16312. "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
  16313. "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
  16314. "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
  16315. "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
  16316. "\x56\xf5\x4e\x01\x35\x27\x45\x77"
  16317. "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
  16318. "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
  16319. "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
  16320. "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
  16321. "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
  16322. "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
  16323. "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
  16324. "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
  16325. "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
  16326. "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
  16327. "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
  16328. "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
  16329. "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
  16330. "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
  16331. "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
  16332. "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
  16333. "\x87\x8f\x03\x21\x28\x95\x0c\x89"
  16334. "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
  16335. "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
  16336. "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
  16337. "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
  16338. "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
  16339. "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
  16340. "\x85\x73\x78\x45\x20\x7f\xae\x13"
  16341. "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
  16342. "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
  16343. "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
  16344. "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
  16345. "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
  16346. "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
  16347. "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
  16348. "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
  16349. "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
  16350. "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
  16351. "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
  16352. "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
  16353. "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
  16354. "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
  16355. "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
  16356. "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
  16357. "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
  16358. "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
  16359. "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
  16360. "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
  16361. "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
  16362. "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
  16363. "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
  16364. "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
  16365. "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
  16366. "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
  16367. "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
  16368. "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
  16369. "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
  16370. "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
  16371. "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
  16372. "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
  16373. "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
  16374. "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
  16375. "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
  16376. "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
  16377. "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
  16378. "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
  16379. "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
  16380. "\x6e\x12\x17\x72\x63\x57\xc7\xba"
  16381. "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
  16382. "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
  16383. "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
  16384. "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
  16385. "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
  16386. "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
  16387. "\x0c\x24\x43\x31\x40\x57\xf1\x72"
  16388. "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
  16389. "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
  16390. "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
  16391. "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
  16392. "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
  16393. "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
  16394. "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
  16395. "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
  16396. "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
  16397. "\xaf\xdf\x11\x95",
  16398. .rlen = 4100,
  16399. .np = 2,
  16400. .tap = { 4064, 36 },
  16401. },
  16402. };
  16403. /*
  16404. * CTS (Cipher Text Stealing) mode tests
  16405. */
  16406. #define CTS_MODE_ENC_TEST_VECTORS 6
  16407. #define CTS_MODE_DEC_TEST_VECTORS 6
  16408. static struct cipher_testvec cts_mode_enc_tv_template[] = {
  16409. { /* from rfc3962 */
  16410. .klen = 16,
  16411. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16412. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16413. .ilen = 17,
  16414. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16415. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16416. "\x20",
  16417. .rlen = 17,
  16418. .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  16419. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  16420. "\x97",
  16421. }, {
  16422. .klen = 16,
  16423. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16424. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16425. .ilen = 31,
  16426. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16427. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16428. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  16429. "\x20\x47\x61\x75\x27\x73\x20",
  16430. .rlen = 31,
  16431. .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  16432. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  16433. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  16434. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  16435. }, {
  16436. .klen = 16,
  16437. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16438. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16439. .ilen = 32,
  16440. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16441. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16442. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  16443. "\x20\x47\x61\x75\x27\x73\x20\x43",
  16444. .rlen = 32,
  16445. .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  16446. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  16447. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  16448. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  16449. }, {
  16450. .klen = 16,
  16451. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16452. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16453. .ilen = 47,
  16454. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16455. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16456. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  16457. "\x20\x47\x61\x75\x27\x73\x20\x43"
  16458. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  16459. "\x70\x6c\x65\x61\x73\x65\x2c",
  16460. .rlen = 47,
  16461. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  16462. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  16463. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  16464. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  16465. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  16466. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  16467. }, {
  16468. .klen = 16,
  16469. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16470. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16471. .ilen = 48,
  16472. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16473. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16474. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  16475. "\x20\x47\x61\x75\x27\x73\x20\x43"
  16476. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  16477. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  16478. .rlen = 48,
  16479. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  16480. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  16481. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  16482. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  16483. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  16484. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  16485. }, {
  16486. .klen = 16,
  16487. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16488. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16489. .ilen = 64,
  16490. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16491. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16492. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  16493. "\x20\x47\x61\x75\x27\x73\x20\x43"
  16494. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  16495. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  16496. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  16497. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  16498. .rlen = 64,
  16499. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  16500. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  16501. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  16502. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  16503. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  16504. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  16505. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  16506. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  16507. }
  16508. };
  16509. static struct cipher_testvec cts_mode_dec_tv_template[] = {
  16510. { /* from rfc3962 */
  16511. .klen = 16,
  16512. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16513. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16514. .rlen = 17,
  16515. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16516. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16517. "\x20",
  16518. .ilen = 17,
  16519. .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  16520. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  16521. "\x97",
  16522. }, {
  16523. .klen = 16,
  16524. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16525. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16526. .rlen = 31,
  16527. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16528. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16529. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  16530. "\x20\x47\x61\x75\x27\x73\x20",
  16531. .ilen = 31,
  16532. .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  16533. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  16534. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  16535. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  16536. }, {
  16537. .klen = 16,
  16538. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16539. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16540. .rlen = 32,
  16541. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16542. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16543. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  16544. "\x20\x47\x61\x75\x27\x73\x20\x43",
  16545. .ilen = 32,
  16546. .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  16547. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  16548. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  16549. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  16550. }, {
  16551. .klen = 16,
  16552. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16553. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16554. .rlen = 47,
  16555. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16556. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16557. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  16558. "\x20\x47\x61\x75\x27\x73\x20\x43"
  16559. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  16560. "\x70\x6c\x65\x61\x73\x65\x2c",
  16561. .ilen = 47,
  16562. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  16563. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  16564. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  16565. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  16566. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  16567. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  16568. }, {
  16569. .klen = 16,
  16570. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16571. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16572. .rlen = 48,
  16573. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16574. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16575. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  16576. "\x20\x47\x61\x75\x27\x73\x20\x43"
  16577. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  16578. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  16579. .ilen = 48,
  16580. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  16581. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  16582. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  16583. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  16584. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  16585. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  16586. }, {
  16587. .klen = 16,
  16588. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  16589. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  16590. .rlen = 64,
  16591. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  16592. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  16593. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  16594. "\x20\x47\x61\x75\x27\x73\x20\x43"
  16595. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  16596. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  16597. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  16598. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  16599. .ilen = 64,
  16600. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  16601. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  16602. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  16603. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  16604. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  16605. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  16606. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  16607. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  16608. }
  16609. };
  16610. /*
  16611. * Compression stuff.
  16612. */
  16613. #define COMP_BUF_SIZE 512
  16614. struct comp_testvec {
  16615. int inlen, outlen;
  16616. char input[COMP_BUF_SIZE];
  16617. char output[COMP_BUF_SIZE];
  16618. };
  16619. struct pcomp_testvec {
  16620. void *params;
  16621. unsigned int paramsize;
  16622. int inlen, outlen;
  16623. char input[COMP_BUF_SIZE];
  16624. char output[COMP_BUF_SIZE];
  16625. };
  16626. /*
  16627. * Deflate test vectors (null-terminated strings).
  16628. * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
  16629. */
  16630. #define DEFLATE_COMP_TEST_VECTORS 2
  16631. #define DEFLATE_DECOMP_TEST_VECTORS 2
  16632. static struct comp_testvec deflate_comp_tv_template[] = {
  16633. {
  16634. .inlen = 70,
  16635. .outlen = 38,
  16636. .input = "Join us now and share the software "
  16637. "Join us now and share the software ",
  16638. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  16639. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  16640. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  16641. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  16642. "\x71\xbc\x08\x2b\x01\x00",
  16643. }, {
  16644. .inlen = 191,
  16645. .outlen = 122,
  16646. .input = "This document describes a compression method based on the DEFLATE"
  16647. "compression algorithm. This document defines the application of "
  16648. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  16649. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  16650. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  16651. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  16652. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  16653. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  16654. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  16655. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  16656. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  16657. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  16658. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  16659. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  16660. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  16661. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  16662. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  16663. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  16664. "\xfa\x02",
  16665. },
  16666. };
  16667. static struct comp_testvec deflate_decomp_tv_template[] = {
  16668. {
  16669. .inlen = 122,
  16670. .outlen = 191,
  16671. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  16672. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  16673. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  16674. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  16675. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  16676. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  16677. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  16678. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  16679. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  16680. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  16681. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  16682. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  16683. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  16684. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  16685. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  16686. "\xfa\x02",
  16687. .output = "This document describes a compression method based on the DEFLATE"
  16688. "compression algorithm. This document defines the application of "
  16689. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  16690. }, {
  16691. .inlen = 38,
  16692. .outlen = 70,
  16693. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  16694. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  16695. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  16696. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  16697. "\x71\xbc\x08\x2b\x01\x00",
  16698. .output = "Join us now and share the software "
  16699. "Join us now and share the software ",
  16700. },
  16701. };
  16702. #define ZLIB_COMP_TEST_VECTORS 2
  16703. #define ZLIB_DECOMP_TEST_VECTORS 2
  16704. static const struct {
  16705. struct nlattr nla;
  16706. int val;
  16707. } deflate_comp_params[] = {
  16708. {
  16709. .nla = {
  16710. .nla_len = NLA_HDRLEN + sizeof(int),
  16711. .nla_type = ZLIB_COMP_LEVEL,
  16712. },
  16713. .val = Z_DEFAULT_COMPRESSION,
  16714. }, {
  16715. .nla = {
  16716. .nla_len = NLA_HDRLEN + sizeof(int),
  16717. .nla_type = ZLIB_COMP_METHOD,
  16718. },
  16719. .val = Z_DEFLATED,
  16720. }, {
  16721. .nla = {
  16722. .nla_len = NLA_HDRLEN + sizeof(int),
  16723. .nla_type = ZLIB_COMP_WINDOWBITS,
  16724. },
  16725. .val = -11,
  16726. }, {
  16727. .nla = {
  16728. .nla_len = NLA_HDRLEN + sizeof(int),
  16729. .nla_type = ZLIB_COMP_MEMLEVEL,
  16730. },
  16731. .val = MAX_MEM_LEVEL,
  16732. }, {
  16733. .nla = {
  16734. .nla_len = NLA_HDRLEN + sizeof(int),
  16735. .nla_type = ZLIB_COMP_STRATEGY,
  16736. },
  16737. .val = Z_DEFAULT_STRATEGY,
  16738. }
  16739. };
  16740. static const struct {
  16741. struct nlattr nla;
  16742. int val;
  16743. } deflate_decomp_params[] = {
  16744. {
  16745. .nla = {
  16746. .nla_len = NLA_HDRLEN + sizeof(int),
  16747. .nla_type = ZLIB_DECOMP_WINDOWBITS,
  16748. },
  16749. .val = -11,
  16750. }
  16751. };
  16752. static struct pcomp_testvec zlib_comp_tv_template[] = {
  16753. {
  16754. .params = &deflate_comp_params,
  16755. .paramsize = sizeof(deflate_comp_params),
  16756. .inlen = 70,
  16757. .outlen = 38,
  16758. .input = "Join us now and share the software "
  16759. "Join us now and share the software ",
  16760. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  16761. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  16762. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  16763. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  16764. "\x71\xbc\x08\x2b\x01\x00",
  16765. }, {
  16766. .params = &deflate_comp_params,
  16767. .paramsize = sizeof(deflate_comp_params),
  16768. .inlen = 191,
  16769. .outlen = 122,
  16770. .input = "This document describes a compression method based on the DEFLATE"
  16771. "compression algorithm. This document defines the application of "
  16772. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  16773. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  16774. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  16775. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  16776. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  16777. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  16778. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  16779. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  16780. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  16781. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  16782. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  16783. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  16784. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  16785. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  16786. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  16787. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  16788. "\xfa\x02",
  16789. },
  16790. };
  16791. static struct pcomp_testvec zlib_decomp_tv_template[] = {
  16792. {
  16793. .params = &deflate_decomp_params,
  16794. .paramsize = sizeof(deflate_decomp_params),
  16795. .inlen = 122,
  16796. .outlen = 191,
  16797. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  16798. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  16799. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  16800. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  16801. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  16802. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  16803. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  16804. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  16805. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  16806. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  16807. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  16808. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  16809. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  16810. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  16811. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  16812. "\xfa\x02",
  16813. .output = "This document describes a compression method based on the DEFLATE"
  16814. "compression algorithm. This document defines the application of "
  16815. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  16816. }, {
  16817. .params = &deflate_decomp_params,
  16818. .paramsize = sizeof(deflate_decomp_params),
  16819. .inlen = 38,
  16820. .outlen = 70,
  16821. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  16822. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  16823. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  16824. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  16825. "\x71\xbc\x08\x2b\x01\x00",
  16826. .output = "Join us now and share the software "
  16827. "Join us now and share the software ",
  16828. },
  16829. };
  16830. /*
  16831. * LZO test vectors (null-terminated strings).
  16832. */
  16833. #define LZO_COMP_TEST_VECTORS 2
  16834. #define LZO_DECOMP_TEST_VECTORS 2
  16835. static struct comp_testvec lzo_comp_tv_template[] = {
  16836. {
  16837. .inlen = 70,
  16838. .outlen = 46,
  16839. .input = "Join us now and share the software "
  16840. "Join us now and share the software ",
  16841. .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  16842. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  16843. "\x64\x20\x73\x68\x61\x72\x65\x20"
  16844. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  16845. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  16846. "\x3d\x88\x00\x11\x00\x00",
  16847. }, {
  16848. .inlen = 159,
  16849. .outlen = 133,
  16850. .input = "This document describes a compression method based on the LZO "
  16851. "compression algorithm. This document defines the application of "
  16852. "the LZO algorithm used in UBIFS.",
  16853. .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  16854. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  16855. "\x64\x65\x73\x63\x72\x69\x62\x65"
  16856. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  16857. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  16858. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  16859. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  16860. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  16861. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  16862. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  16863. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  16864. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  16865. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  16866. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  16867. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  16868. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  16869. "\x53\x2e\x11\x00\x00",
  16870. },
  16871. };
  16872. static struct comp_testvec lzo_decomp_tv_template[] = {
  16873. {
  16874. .inlen = 133,
  16875. .outlen = 159,
  16876. .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  16877. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  16878. "\x64\x65\x73\x63\x72\x69\x62\x65"
  16879. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  16880. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  16881. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  16882. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  16883. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  16884. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  16885. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  16886. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  16887. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  16888. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  16889. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  16890. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  16891. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  16892. "\x53\x2e\x11\x00\x00",
  16893. .output = "This document describes a compression method based on the LZO "
  16894. "compression algorithm. This document defines the application of "
  16895. "the LZO algorithm used in UBIFS.",
  16896. }, {
  16897. .inlen = 46,
  16898. .outlen = 70,
  16899. .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  16900. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  16901. "\x64\x20\x73\x68\x61\x72\x65\x20"
  16902. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  16903. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  16904. "\x3d\x88\x00\x11\x00\x00",
  16905. .output = "Join us now and share the software "
  16906. "Join us now and share the software ",
  16907. },
  16908. };
  16909. /*
  16910. * Michael MIC test vectors from IEEE 802.11i
  16911. */
  16912. #define MICHAEL_MIC_TEST_VECTORS 6
  16913. static struct hash_testvec michael_mic_tv_template[] = {
  16914. {
  16915. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  16916. .ksize = 8,
  16917. .plaintext = zeroed_string,
  16918. .psize = 0,
  16919. .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  16920. },
  16921. {
  16922. .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  16923. .ksize = 8,
  16924. .plaintext = "M",
  16925. .psize = 1,
  16926. .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  16927. },
  16928. {
  16929. .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  16930. .ksize = 8,
  16931. .plaintext = "Mi",
  16932. .psize = 2,
  16933. .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  16934. },
  16935. {
  16936. .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  16937. .ksize = 8,
  16938. .plaintext = "Mic",
  16939. .psize = 3,
  16940. .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  16941. },
  16942. {
  16943. .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  16944. .ksize = 8,
  16945. .plaintext = "Mich",
  16946. .psize = 4,
  16947. .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  16948. },
  16949. {
  16950. .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  16951. .ksize = 8,
  16952. .plaintext = "Michael",
  16953. .psize = 7,
  16954. .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
  16955. }
  16956. };
  16957. /*
  16958. * CRC32C test vectors
  16959. */
  16960. #define CRC32C_TEST_VECTORS 14
  16961. static struct hash_testvec crc32c_tv_template[] = {
  16962. {
  16963. .psize = 0,
  16964. .digest = "\x00\x00\x00\x00",
  16965. },
  16966. {
  16967. .key = "\x87\xa9\xcb\xed",
  16968. .ksize = 4,
  16969. .psize = 0,
  16970. .digest = "\x78\x56\x34\x12",
  16971. },
  16972. {
  16973. .key = "\xff\xff\xff\xff",
  16974. .ksize = 4,
  16975. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  16976. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  16977. "\x11\x12\x13\x14\x15\x16\x17\x18"
  16978. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  16979. "\x21\x22\x23\x24\x25\x26\x27\x28",
  16980. .psize = 40,
  16981. .digest = "\x7f\x15\x2c\x0e",
  16982. },
  16983. {
  16984. .key = "\xff\xff\xff\xff",
  16985. .ksize = 4,
  16986. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  16987. "\x31\x32\x33\x34\x35\x36\x37\x38"
  16988. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  16989. "\x41\x42\x43\x44\x45\x46\x47\x48"
  16990. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  16991. .psize = 40,
  16992. .digest = "\xf6\xeb\x80\xe9",
  16993. },
  16994. {
  16995. .key = "\xff\xff\xff\xff",
  16996. .ksize = 4,
  16997. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  16998. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  16999. "\x61\x62\x63\x64\x65\x66\x67\x68"
  17000. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  17001. "\x71\x72\x73\x74\x75\x76\x77\x78",
  17002. .psize = 40,
  17003. .digest = "\xed\xbd\x74\xde",
  17004. },
  17005. {
  17006. .key = "\xff\xff\xff\xff",
  17007. .ksize = 4,
  17008. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  17009. "\x81\x82\x83\x84\x85\x86\x87\x88"
  17010. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  17011. "\x91\x92\x93\x94\x95\x96\x97\x98"
  17012. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  17013. .psize = 40,
  17014. .digest = "\x62\xc8\x79\xd5",
  17015. },
  17016. {
  17017. .key = "\xff\xff\xff\xff",
  17018. .ksize = 4,
  17019. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  17020. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  17021. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  17022. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  17023. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  17024. .psize = 40,
  17025. .digest = "\xd0\x9a\x97\xba",
  17026. },
  17027. {
  17028. .key = "\xff\xff\xff\xff",
  17029. .ksize = 4,
  17030. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  17031. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  17032. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  17033. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  17034. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  17035. .psize = 40,
  17036. .digest = "\x13\xd9\x29\x2b",
  17037. },
  17038. {
  17039. .key = "\x80\xea\xd3\xf1",
  17040. .ksize = 4,
  17041. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  17042. "\x31\x32\x33\x34\x35\x36\x37\x38"
  17043. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  17044. "\x41\x42\x43\x44\x45\x46\x47\x48"
  17045. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  17046. .psize = 40,
  17047. .digest = "\x0c\xb5\xe2\xa2",
  17048. },
  17049. {
  17050. .key = "\xf3\x4a\x1d\x5d",
  17051. .ksize = 4,
  17052. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  17053. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  17054. "\x61\x62\x63\x64\x65\x66\x67\x68"
  17055. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  17056. "\x71\x72\x73\x74\x75\x76\x77\x78",
  17057. .psize = 40,
  17058. .digest = "\xd1\x7f\xfb\xa6",
  17059. },
  17060. {
  17061. .key = "\x2e\x80\x04\x59",
  17062. .ksize = 4,
  17063. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  17064. "\x81\x82\x83\x84\x85\x86\x87\x88"
  17065. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  17066. "\x91\x92\x93\x94\x95\x96\x97\x98"
  17067. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  17068. .psize = 40,
  17069. .digest = "\x59\x33\xe6\x7a",
  17070. },
  17071. {
  17072. .key = "\xa6\xcc\x19\x85",
  17073. .ksize = 4,
  17074. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  17075. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  17076. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  17077. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  17078. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  17079. .psize = 40,
  17080. .digest = "\xbe\x03\x01\xd2",
  17081. },
  17082. {
  17083. .key = "\x41\xfc\xfe\x2d",
  17084. .ksize = 4,
  17085. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  17086. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  17087. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  17088. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  17089. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  17090. .psize = 40,
  17091. .digest = "\x75\xd3\xc5\x24",
  17092. },
  17093. {
  17094. .key = "\xff\xff\xff\xff",
  17095. .ksize = 4,
  17096. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  17097. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  17098. "\x11\x12\x13\x14\x15\x16\x17\x18"
  17099. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  17100. "\x21\x22\x23\x24\x25\x26\x27\x28"
  17101. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  17102. "\x31\x32\x33\x34\x35\x36\x37\x38"
  17103. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  17104. "\x41\x42\x43\x44\x45\x46\x47\x48"
  17105. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  17106. "\x51\x52\x53\x54\x55\x56\x57\x58"
  17107. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  17108. "\x61\x62\x63\x64\x65\x66\x67\x68"
  17109. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  17110. "\x71\x72\x73\x74\x75\x76\x77\x78"
  17111. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  17112. "\x81\x82\x83\x84\x85\x86\x87\x88"
  17113. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  17114. "\x91\x92\x93\x94\x95\x96\x97\x98"
  17115. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  17116. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  17117. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  17118. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  17119. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  17120. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  17121. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  17122. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  17123. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  17124. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  17125. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  17126. .psize = 240,
  17127. .digest = "\x75\xd3\xc5\x24",
  17128. .np = 2,
  17129. .tap = { 31, 209 }
  17130. },
  17131. };
  17132. /*
  17133. * Blakcifn CRC test vectors
  17134. */
  17135. #define BFIN_CRC_TEST_VECTORS 6
  17136. static struct hash_testvec bfin_crc_tv_template[] = {
  17137. {
  17138. .psize = 0,
  17139. .digest = "\x00\x00\x00\x00",
  17140. },
  17141. {
  17142. .key = "\x87\xa9\xcb\xed",
  17143. .ksize = 4,
  17144. .psize = 0,
  17145. .digest = "\x87\xa9\xcb\xed",
  17146. },
  17147. {
  17148. .key = "\xff\xff\xff\xff",
  17149. .ksize = 4,
  17150. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  17151. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  17152. "\x11\x12\x13\x14\x15\x16\x17\x18"
  17153. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  17154. "\x21\x22\x23\x24\x25\x26\x27\x28",
  17155. .psize = 40,
  17156. .digest = "\x84\x0c\x8d\xa2",
  17157. },
  17158. {
  17159. .key = "\xff\xff\xff\xff",
  17160. .ksize = 4,
  17161. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  17162. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  17163. "\x11\x12\x13\x14\x15\x16\x17\x18"
  17164. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  17165. "\x21\x22\x23\x24\x25\x26",
  17166. .psize = 38,
  17167. .digest = "\x8c\x58\xec\xb7",
  17168. },
  17169. {
  17170. .key = "\xff\xff\xff\xff",
  17171. .ksize = 4,
  17172. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  17173. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  17174. "\x11\x12\x13\x14\x15\x16\x17\x18"
  17175. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  17176. "\x21\x22\x23\x24\x25\x26\x27",
  17177. .psize = 39,
  17178. .digest = "\xdc\x50\x28\x7b",
  17179. },
  17180. {
  17181. .key = "\xff\xff\xff\xff",
  17182. .ksize = 4,
  17183. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  17184. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  17185. "\x11\x12\x13\x14\x15\x16\x17\x18"
  17186. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  17187. "\x21\x22\x23\x24\x25\x26\x27\x28"
  17188. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  17189. "\x31\x32\x33\x34\x35\x36\x37\x38"
  17190. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  17191. "\x41\x42\x43\x44\x45\x46\x47\x48"
  17192. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  17193. "\x51\x52\x53\x54\x55\x56\x57\x58"
  17194. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  17195. "\x61\x62\x63\x64\x65\x66\x67\x68"
  17196. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  17197. "\x71\x72\x73\x74\x75\x76\x77\x78"
  17198. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  17199. "\x81\x82\x83\x84\x85\x86\x87\x88"
  17200. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  17201. "\x91\x92\x93\x94\x95\x96\x97\x98"
  17202. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  17203. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  17204. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  17205. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  17206. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  17207. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  17208. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  17209. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  17210. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  17211. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  17212. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  17213. .psize = 240,
  17214. .digest = "\x10\x19\x4a\x5c",
  17215. .np = 2,
  17216. .tap = { 31, 209 }
  17217. },
  17218. };
  17219. #endif /* _CRYPTO_TESTMGR_H */