testmgr.h 662 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089
  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 also_non_np;
  51. unsigned char fail;
  52. unsigned char wk; /* weak key flag */
  53. unsigned char klen;
  54. unsigned short ilen;
  55. unsigned short rlen;
  56. };
  57. struct aead_testvec {
  58. char *key;
  59. char *iv;
  60. char *input;
  61. char *assoc;
  62. char *result;
  63. unsigned char tap[MAX_TAP];
  64. unsigned char atap[MAX_TAP];
  65. int np;
  66. int anp;
  67. unsigned char fail;
  68. unsigned char novrfy; /* ccm dec verification failure expected */
  69. unsigned char wk; /* weak key flag */
  70. unsigned char klen;
  71. unsigned short ilen;
  72. unsigned short alen;
  73. unsigned short rlen;
  74. };
  75. struct cprng_testvec {
  76. char *key;
  77. char *dt;
  78. char *v;
  79. char *result;
  80. unsigned char klen;
  81. unsigned short dtlen;
  82. unsigned short vlen;
  83. unsigned short rlen;
  84. unsigned short loops;
  85. };
  86. static char zeroed_string[48];
  87. /*
  88. * MD4 test vectors from RFC1320
  89. */
  90. #define MD4_TEST_VECTORS 7
  91. static struct hash_testvec md4_tv_template [] = {
  92. {
  93. .plaintext = "",
  94. .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
  95. "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
  96. }, {
  97. .plaintext = "a",
  98. .psize = 1,
  99. .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
  100. "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
  101. }, {
  102. .plaintext = "abc",
  103. .psize = 3,
  104. .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
  105. "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
  106. }, {
  107. .plaintext = "message digest",
  108. .psize = 14,
  109. .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
  110. "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
  111. }, {
  112. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  113. .psize = 26,
  114. .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
  115. "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
  116. .np = 2,
  117. .tap = { 13, 13 },
  118. }, {
  119. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  120. .psize = 62,
  121. .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
  122. "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
  123. }, {
  124. .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
  125. "45678901234567890",
  126. .psize = 80,
  127. .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
  128. "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
  129. },
  130. };
  131. /*
  132. * MD5 test vectors from RFC1321
  133. */
  134. #define MD5_TEST_VECTORS 7
  135. static struct hash_testvec md5_tv_template[] = {
  136. {
  137. .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
  138. "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
  139. }, {
  140. .plaintext = "a",
  141. .psize = 1,
  142. .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
  143. "\x31\xc3\x99\xe2\x69\x77\x26\x61",
  144. }, {
  145. .plaintext = "abc",
  146. .psize = 3,
  147. .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
  148. "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
  149. }, {
  150. .plaintext = "message digest",
  151. .psize = 14,
  152. .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
  153. "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
  154. }, {
  155. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  156. .psize = 26,
  157. .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
  158. "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
  159. .np = 2,
  160. .tap = {13, 13}
  161. }, {
  162. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  163. .psize = 62,
  164. .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
  165. "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
  166. }, {
  167. .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
  168. "345678901234567890",
  169. .psize = 80,
  170. .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
  171. "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
  172. }
  173. };
  174. /*
  175. * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
  176. */
  177. #define RMD128_TEST_VECTORS 10
  178. static struct hash_testvec rmd128_tv_template[] = {
  179. {
  180. .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
  181. "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
  182. }, {
  183. .plaintext = "a",
  184. .psize = 1,
  185. .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
  186. "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
  187. }, {
  188. .plaintext = "abc",
  189. .psize = 3,
  190. .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
  191. "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
  192. }, {
  193. .plaintext = "message digest",
  194. .psize = 14,
  195. .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
  196. "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
  197. }, {
  198. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  199. .psize = 26,
  200. .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
  201. "\x10\x71\x49\x22\xb3\x71\x83\x4e",
  202. }, {
  203. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  204. "fghijklmnopqrstuvwxyz0123456789",
  205. .psize = 62,
  206. .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
  207. "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
  208. }, {
  209. .plaintext = "1234567890123456789012345678901234567890"
  210. "1234567890123456789012345678901234567890",
  211. .psize = 80,
  212. .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
  213. "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
  214. }, {
  215. .plaintext = "abcdbcdecdefdefgefghfghighij"
  216. "hijkijkljklmklmnlmnomnopnopq",
  217. .psize = 56,
  218. .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
  219. "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
  220. .np = 2,
  221. .tap = { 28, 28 },
  222. }, {
  223. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  224. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  225. "lmnopqrsmnopqrstnopqrstu",
  226. .psize = 112,
  227. .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
  228. "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
  229. }, {
  230. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  231. .psize = 32,
  232. .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
  233. "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
  234. }
  235. };
  236. /*
  237. * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
  238. */
  239. #define RMD160_TEST_VECTORS 10
  240. static struct hash_testvec rmd160_tv_template[] = {
  241. {
  242. .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
  243. "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
  244. }, {
  245. .plaintext = "a",
  246. .psize = 1,
  247. .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
  248. "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
  249. }, {
  250. .plaintext = "abc",
  251. .psize = 3,
  252. .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
  253. "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
  254. }, {
  255. .plaintext = "message digest",
  256. .psize = 14,
  257. .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
  258. "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
  259. }, {
  260. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  261. .psize = 26,
  262. .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
  263. "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
  264. }, {
  265. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  266. "fghijklmnopqrstuvwxyz0123456789",
  267. .psize = 62,
  268. .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
  269. "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
  270. }, {
  271. .plaintext = "1234567890123456789012345678901234567890"
  272. "1234567890123456789012345678901234567890",
  273. .psize = 80,
  274. .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
  275. "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
  276. }, {
  277. .plaintext = "abcdbcdecdefdefgefghfghighij"
  278. "hijkijkljklmklmnlmnomnopnopq",
  279. .psize = 56,
  280. .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
  281. "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
  282. .np = 2,
  283. .tap = { 28, 28 },
  284. }, {
  285. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  286. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  287. "lmnopqrsmnopqrstnopqrstu",
  288. .psize = 112,
  289. .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
  290. "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
  291. }, {
  292. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  293. .psize = 32,
  294. .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
  295. "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
  296. }
  297. };
  298. /*
  299. * RIPEMD-256 test vectors
  300. */
  301. #define RMD256_TEST_VECTORS 8
  302. static struct hash_testvec rmd256_tv_template[] = {
  303. {
  304. .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
  305. "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
  306. "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
  307. "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
  308. }, {
  309. .plaintext = "a",
  310. .psize = 1,
  311. .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
  312. "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
  313. "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
  314. "\xcd\x88\x3a\x91\x34\x69\x29\x25",
  315. }, {
  316. .plaintext = "abc",
  317. .psize = 3,
  318. .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
  319. "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
  320. "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
  321. "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
  322. }, {
  323. .plaintext = "message digest",
  324. .psize = 14,
  325. .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
  326. "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
  327. "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
  328. "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
  329. }, {
  330. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  331. .psize = 26,
  332. .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
  333. "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
  334. "\x78\x96\x11\x8a\x51\x97\x96\x87"
  335. "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
  336. }, {
  337. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  338. "fghijklmnopqrstuvwxyz0123456789",
  339. .psize = 62,
  340. .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
  341. "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
  342. "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
  343. "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
  344. }, {
  345. .plaintext = "1234567890123456789012345678901234567890"
  346. "1234567890123456789012345678901234567890",
  347. .psize = 80,
  348. .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
  349. "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
  350. "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
  351. "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
  352. }, {
  353. .plaintext = "abcdbcdecdefdefgefghfghighij"
  354. "hijkijkljklmklmnlmnomnopnopq",
  355. .psize = 56,
  356. .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
  357. "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
  358. "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
  359. "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
  360. .np = 2,
  361. .tap = { 28, 28 },
  362. }
  363. };
  364. /*
  365. * RIPEMD-320 test vectors
  366. */
  367. #define RMD320_TEST_VECTORS 8
  368. static struct hash_testvec rmd320_tv_template[] = {
  369. {
  370. .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
  371. "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
  372. "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
  373. "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
  374. }, {
  375. .plaintext = "a",
  376. .psize = 1,
  377. .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
  378. "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
  379. "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
  380. "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
  381. }, {
  382. .plaintext = "abc",
  383. .psize = 3,
  384. .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
  385. "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
  386. "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
  387. "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
  388. }, {
  389. .plaintext = "message digest",
  390. .psize = 14,
  391. .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
  392. "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
  393. "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
  394. "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
  395. }, {
  396. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  397. .psize = 26,
  398. .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
  399. "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
  400. "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
  401. "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
  402. }, {
  403. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  404. "fghijklmnopqrstuvwxyz0123456789",
  405. .psize = 62,
  406. .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
  407. "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
  408. "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
  409. "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
  410. }, {
  411. .plaintext = "1234567890123456789012345678901234567890"
  412. "1234567890123456789012345678901234567890",
  413. .psize = 80,
  414. .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
  415. "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
  416. "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
  417. "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
  418. }, {
  419. .plaintext = "abcdbcdecdefdefgefghfghighij"
  420. "hijkijkljklmklmnlmnomnopnopq",
  421. .psize = 56,
  422. .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
  423. "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
  424. "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
  425. "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
  426. .np = 2,
  427. .tap = { 28, 28 },
  428. }
  429. };
  430. /*
  431. * SHA1 test vectors from from FIPS PUB 180-1
  432. * Long vector from CAVS 5.0
  433. */
  434. #define SHA1_TEST_VECTORS 3
  435. static struct hash_testvec sha1_tv_template[] = {
  436. {
  437. .plaintext = "abc",
  438. .psize = 3,
  439. .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
  440. "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
  441. }, {
  442. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  443. .psize = 56,
  444. .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
  445. "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
  446. .np = 2,
  447. .tap = { 28, 28 }
  448. }, {
  449. .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
  450. "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
  451. "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
  452. "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
  453. "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
  454. "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
  455. "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
  456. "\x72\x28\x26\xc0\x66\x86\x9e\xda"
  457. "\xcd\x73\xb2\x54\x80\x35\x18\x58"
  458. "\x13\xe2\x26\x34\xa9\xda\x44\x00"
  459. "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
  460. "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
  461. "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
  462. "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
  463. "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
  464. "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
  465. "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
  466. "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
  467. "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
  468. "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
  469. "\x5a\x90\x11",
  470. .psize = 163,
  471. .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
  472. "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
  473. .np = 4,
  474. .tap = { 63, 64, 31, 5 }
  475. }
  476. };
  477. /*
  478. * SHA224 test vectors from from FIPS PUB 180-2
  479. */
  480. #define SHA224_TEST_VECTORS 2
  481. static struct hash_testvec sha224_tv_template[] = {
  482. {
  483. .plaintext = "abc",
  484. .psize = 3,
  485. .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
  486. "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
  487. "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
  488. "\xE3\x6C\x9D\xA7",
  489. }, {
  490. .plaintext =
  491. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  492. .psize = 56,
  493. .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
  494. "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
  495. "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
  496. "\x52\x52\x25\x25",
  497. .np = 2,
  498. .tap = { 28, 28 }
  499. }
  500. };
  501. /*
  502. * SHA256 test vectors from from NIST
  503. */
  504. #define SHA256_TEST_VECTORS 2
  505. static struct hash_testvec sha256_tv_template[] = {
  506. {
  507. .plaintext = "abc",
  508. .psize = 3,
  509. .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
  510. "\x41\x41\x40\xde\x5d\xae\x22\x23"
  511. "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
  512. "\xb4\x10\xff\x61\xf2\x00\x15\xad",
  513. }, {
  514. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  515. .psize = 56,
  516. .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
  517. "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
  518. "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
  519. "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
  520. .np = 2,
  521. .tap = { 28, 28 }
  522. },
  523. };
  524. /*
  525. * SHA384 test vectors from from NIST and kerneli
  526. */
  527. #define SHA384_TEST_VECTORS 4
  528. static struct hash_testvec sha384_tv_template[] = {
  529. {
  530. .plaintext= "abc",
  531. .psize = 3,
  532. .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
  533. "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
  534. "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
  535. "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
  536. "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
  537. "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
  538. }, {
  539. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  540. .psize = 56,
  541. .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
  542. "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
  543. "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
  544. "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
  545. "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
  546. "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
  547. }, {
  548. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  549. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  550. .psize = 112,
  551. .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
  552. "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
  553. "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
  554. "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
  555. "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
  556. "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
  557. }, {
  558. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  559. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  560. .psize = 104,
  561. .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
  562. "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
  563. "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
  564. "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
  565. "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
  566. "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
  567. .np = 4,
  568. .tap = { 26, 26, 26, 26 }
  569. },
  570. };
  571. /*
  572. * SHA512 test vectors from from NIST and kerneli
  573. */
  574. #define SHA512_TEST_VECTORS 4
  575. static struct hash_testvec sha512_tv_template[] = {
  576. {
  577. .plaintext = "abc",
  578. .psize = 3,
  579. .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
  580. "\xcc\x41\x73\x49\xae\x20\x41\x31"
  581. "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
  582. "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
  583. "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
  584. "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
  585. "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
  586. "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
  587. }, {
  588. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  589. .psize = 56,
  590. .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
  591. "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
  592. "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
  593. "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
  594. "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
  595. "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
  596. "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
  597. "\x54\xec\x63\x12\x38\xca\x34\x45",
  598. }, {
  599. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  600. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  601. .psize = 112,
  602. .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
  603. "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
  604. "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
  605. "\x72\x99\xae\xad\xb6\x88\x90\x18"
  606. "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
  607. "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
  608. "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
  609. "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
  610. }, {
  611. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  612. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  613. .psize = 104,
  614. .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
  615. "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
  616. "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
  617. "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
  618. "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
  619. "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
  620. "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
  621. "\xed\xb4\x19\x87\x23\x28\x50\xc9",
  622. .np = 4,
  623. .tap = { 26, 26, 26, 26 }
  624. },
  625. };
  626. /*
  627. * WHIRLPOOL test vectors from Whirlpool package
  628. * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
  629. * submission
  630. */
  631. #define WP512_TEST_VECTORS 8
  632. static struct hash_testvec wp512_tv_template[] = {
  633. {
  634. .plaintext = "",
  635. .psize = 0,
  636. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  637. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  638. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  639. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  640. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  641. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
  642. "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
  643. "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
  644. }, {
  645. .plaintext = "a",
  646. .psize = 1,
  647. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  648. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  649. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  650. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  651. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  652. "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
  653. "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
  654. "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
  655. }, {
  656. .plaintext = "abc",
  657. .psize = 3,
  658. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  659. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  660. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  661. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  662. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  663. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
  664. "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
  665. "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
  666. }, {
  667. .plaintext = "message digest",
  668. .psize = 14,
  669. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  670. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  671. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  672. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  673. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  674. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
  675. "\x92\xED\x92\x00\x52\x83\x8F\x33"
  676. "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
  677. }, {
  678. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  679. .psize = 26,
  680. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  681. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  682. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  683. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  684. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  685. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
  686. "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
  687. "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
  688. }, {
  689. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  690. "abcdefghijklmnopqrstuvwxyz0123456789",
  691. .psize = 62,
  692. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  693. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  694. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  695. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  696. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  697. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
  698. "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
  699. "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
  700. }, {
  701. .plaintext = "1234567890123456789012345678901234567890"
  702. "1234567890123456789012345678901234567890",
  703. .psize = 80,
  704. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  705. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  706. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  707. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  708. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  709. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
  710. "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
  711. "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
  712. }, {
  713. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  714. .psize = 32,
  715. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  716. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  717. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  718. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  719. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  720. "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
  721. "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
  722. "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
  723. },
  724. };
  725. #define WP384_TEST_VECTORS 8
  726. static struct hash_testvec wp384_tv_template[] = {
  727. {
  728. .plaintext = "",
  729. .psize = 0,
  730. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  731. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  732. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  733. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  734. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  735. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
  736. }, {
  737. .plaintext = "a",
  738. .psize = 1,
  739. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  740. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  741. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  742. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  743. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  744. "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
  745. }, {
  746. .plaintext = "abc",
  747. .psize = 3,
  748. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  749. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  750. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  751. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  752. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  753. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
  754. }, {
  755. .plaintext = "message digest",
  756. .psize = 14,
  757. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  758. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  759. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  760. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  761. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  762. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
  763. }, {
  764. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  765. .psize = 26,
  766. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  767. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  768. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  769. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  770. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  771. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
  772. }, {
  773. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  774. "abcdefghijklmnopqrstuvwxyz0123456789",
  775. .psize = 62,
  776. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  777. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  778. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  779. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  780. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  781. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
  782. }, {
  783. .plaintext = "1234567890123456789012345678901234567890"
  784. "1234567890123456789012345678901234567890",
  785. .psize = 80,
  786. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  787. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  788. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  789. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  790. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  791. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
  792. }, {
  793. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  794. .psize = 32,
  795. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  796. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  797. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  798. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  799. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  800. "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
  801. },
  802. };
  803. #define WP256_TEST_VECTORS 8
  804. static struct hash_testvec wp256_tv_template[] = {
  805. {
  806. .plaintext = "",
  807. .psize = 0,
  808. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  809. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  810. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  811. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
  812. }, {
  813. .plaintext = "a",
  814. .psize = 1,
  815. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  816. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  817. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  818. "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
  819. }, {
  820. .plaintext = "abc",
  821. .psize = 3,
  822. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  823. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  824. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  825. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
  826. }, {
  827. .plaintext = "message digest",
  828. .psize = 14,
  829. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  830. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  831. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  832. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
  833. }, {
  834. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  835. .psize = 26,
  836. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  837. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  838. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  839. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
  840. }, {
  841. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  842. "abcdefghijklmnopqrstuvwxyz0123456789",
  843. .psize = 62,
  844. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  845. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  846. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  847. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
  848. }, {
  849. .plaintext = "1234567890123456789012345678901234567890"
  850. "1234567890123456789012345678901234567890",
  851. .psize = 80,
  852. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  853. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  854. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  855. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
  856. }, {
  857. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  858. .psize = 32,
  859. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  860. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  861. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  862. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
  863. },
  864. };
  865. /*
  866. * TIGER test vectors from Tiger website
  867. */
  868. #define TGR192_TEST_VECTORS 6
  869. static struct hash_testvec tgr192_tv_template[] = {
  870. {
  871. .plaintext = "",
  872. .psize = 0,
  873. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  874. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  875. "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
  876. }, {
  877. .plaintext = "abc",
  878. .psize = 3,
  879. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  880. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  881. "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
  882. }, {
  883. .plaintext = "Tiger",
  884. .psize = 5,
  885. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  886. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  887. "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
  888. }, {
  889. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  890. .psize = 64,
  891. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  892. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  893. "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
  894. }, {
  895. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  896. .psize = 64,
  897. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  898. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  899. "\x57\x89\x65\x65\x97\x5f\x91\x97",
  900. }, {
  901. .plaintext = "Tiger - A Fast New Hash Function, "
  902. "by Ross Anderson and Eli Biham, "
  903. "proceedings of Fast Software Encryption 3, "
  904. "Cambridge, 1996.",
  905. .psize = 125,
  906. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  907. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  908. "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
  909. },
  910. };
  911. #define TGR160_TEST_VECTORS 6
  912. static struct hash_testvec tgr160_tv_template[] = {
  913. {
  914. .plaintext = "",
  915. .psize = 0,
  916. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  917. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  918. "\xf3\x73\xde\x2d",
  919. }, {
  920. .plaintext = "abc",
  921. .psize = 3,
  922. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  923. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  924. "\x93\x5f\x7b\x95",
  925. }, {
  926. .plaintext = "Tiger",
  927. .psize = 5,
  928. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  929. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  930. "\x37\x79\x0c\x11",
  931. }, {
  932. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  933. .psize = 64,
  934. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  935. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  936. "\xb5\x86\x44\x50",
  937. }, {
  938. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  939. .psize = 64,
  940. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  941. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  942. "\x57\x89\x65\x65",
  943. }, {
  944. .plaintext = "Tiger - A Fast New Hash Function, "
  945. "by Ross Anderson and Eli Biham, "
  946. "proceedings of Fast Software Encryption 3, "
  947. "Cambridge, 1996.",
  948. .psize = 125,
  949. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  950. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  951. "\xdd\x68\x15\x1d",
  952. },
  953. };
  954. #define TGR128_TEST_VECTORS 6
  955. static struct hash_testvec tgr128_tv_template[] = {
  956. {
  957. .plaintext = "",
  958. .psize = 0,
  959. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  960. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
  961. }, {
  962. .plaintext = "abc",
  963. .psize = 3,
  964. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  965. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
  966. }, {
  967. .plaintext = "Tiger",
  968. .psize = 5,
  969. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  970. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
  971. }, {
  972. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  973. .psize = 64,
  974. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  975. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
  976. }, {
  977. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  978. .psize = 64,
  979. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  980. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
  981. }, {
  982. .plaintext = "Tiger - A Fast New Hash Function, "
  983. "by Ross Anderson and Eli Biham, "
  984. "proceedings of Fast Software Encryption 3, "
  985. "Cambridge, 1996.",
  986. .psize = 125,
  987. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  988. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
  989. },
  990. };
  991. #define GHASH_TEST_VECTORS 1
  992. static struct hash_testvec ghash_tv_template[] =
  993. {
  994. {
  995. .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
  996. .ksize = 16,
  997. .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
  998. .psize = 16,
  999. .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
  1000. "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
  1001. },
  1002. };
  1003. /*
  1004. * HMAC-MD5 test vectors from RFC2202
  1005. * (These need to be fixed to not use strlen).
  1006. */
  1007. #define HMAC_MD5_TEST_VECTORS 7
  1008. static struct hash_testvec hmac_md5_tv_template[] =
  1009. {
  1010. {
  1011. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1012. .ksize = 16,
  1013. .plaintext = "Hi There",
  1014. .psize = 8,
  1015. .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
  1016. "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
  1017. }, {
  1018. .key = "Jefe",
  1019. .ksize = 4,
  1020. .plaintext = "what do ya want for nothing?",
  1021. .psize = 28,
  1022. .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
  1023. "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
  1024. .np = 2,
  1025. .tap = {14, 14}
  1026. }, {
  1027. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1028. .ksize = 16,
  1029. .plaintext = "\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\xdd"
  1032. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1033. .psize = 50,
  1034. .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
  1035. "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
  1036. }, {
  1037. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1038. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1039. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1040. .ksize = 25,
  1041. .plaintext = "\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\xcd"
  1044. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1045. .psize = 50,
  1046. .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
  1047. "\x3a\x75\x16\x47\x46\xff\xaa\x79",
  1048. }, {
  1049. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1050. .ksize = 16,
  1051. .plaintext = "Test With Truncation",
  1052. .psize = 20,
  1053. .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
  1054. "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
  1055. }, {
  1056. .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1062. "\xaa\xaa",
  1063. .ksize = 80,
  1064. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1065. .psize = 54,
  1066. .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
  1067. "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
  1068. }, {
  1069. .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1075. "\xaa\xaa",
  1076. .ksize = 80,
  1077. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1078. "Block-Size Data",
  1079. .psize = 73,
  1080. .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
  1081. "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
  1082. },
  1083. };
  1084. /*
  1085. * HMAC-RIPEMD128 test vectors from RFC2286
  1086. */
  1087. #define HMAC_RMD128_TEST_VECTORS 7
  1088. static struct hash_testvec hmac_rmd128_tv_template[] = {
  1089. {
  1090. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1091. .ksize = 16,
  1092. .plaintext = "Hi There",
  1093. .psize = 8,
  1094. .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
  1095. "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
  1096. }, {
  1097. .key = "Jefe",
  1098. .ksize = 4,
  1099. .plaintext = "what do ya want for nothing?",
  1100. .psize = 28,
  1101. .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
  1102. "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
  1103. .np = 2,
  1104. .tap = { 14, 14 },
  1105. }, {
  1106. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1107. .ksize = 16,
  1108. .plaintext = "\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\xdd"
  1111. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1112. .psize = 50,
  1113. .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
  1114. "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
  1115. }, {
  1116. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1117. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1118. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1119. .ksize = 25,
  1120. .plaintext = "\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\xcd"
  1123. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1124. .psize = 50,
  1125. .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
  1126. "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
  1127. }, {
  1128. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1129. .ksize = 16,
  1130. .plaintext = "Test With Truncation",
  1131. .psize = 20,
  1132. .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
  1133. "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
  1134. }, {
  1135. .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1141. "\xaa\xaa",
  1142. .ksize = 80,
  1143. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1144. .psize = 54,
  1145. .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
  1146. "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
  1147. }, {
  1148. .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1154. "\xaa\xaa",
  1155. .ksize = 80,
  1156. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1157. "Block-Size Data",
  1158. .psize = 73,
  1159. .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
  1160. "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
  1161. },
  1162. };
  1163. /*
  1164. * HMAC-RIPEMD160 test vectors from RFC2286
  1165. */
  1166. #define HMAC_RMD160_TEST_VECTORS 7
  1167. static struct hash_testvec hmac_rmd160_tv_template[] = {
  1168. {
  1169. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1170. .ksize = 20,
  1171. .plaintext = "Hi There",
  1172. .psize = 8,
  1173. .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
  1174. "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
  1175. }, {
  1176. .key = "Jefe",
  1177. .ksize = 4,
  1178. .plaintext = "what do ya want for nothing?",
  1179. .psize = 28,
  1180. .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
  1181. "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
  1182. .np = 2,
  1183. .tap = { 14, 14 },
  1184. }, {
  1185. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1186. .ksize = 20,
  1187. .plaintext = "\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\xdd"
  1190. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1191. .psize = 50,
  1192. .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
  1193. "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
  1194. }, {
  1195. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1196. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1197. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1198. .ksize = 25,
  1199. .plaintext = "\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\xcd"
  1202. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1203. .psize = 50,
  1204. .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
  1205. "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
  1206. }, {
  1207. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1208. .ksize = 20,
  1209. .plaintext = "Test With Truncation",
  1210. .psize = 20,
  1211. .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
  1212. "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
  1213. }, {
  1214. .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1220. "\xaa\xaa",
  1221. .ksize = 80,
  1222. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1223. .psize = 54,
  1224. .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
  1225. "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
  1226. }, {
  1227. .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1233. "\xaa\xaa",
  1234. .ksize = 80,
  1235. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1236. "Block-Size Data",
  1237. .psize = 73,
  1238. .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
  1239. "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
  1240. },
  1241. };
  1242. /*
  1243. * HMAC-SHA1 test vectors from RFC2202
  1244. */
  1245. #define HMAC_SHA1_TEST_VECTORS 7
  1246. static struct hash_testvec hmac_sha1_tv_template[] = {
  1247. {
  1248. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1249. .ksize = 20,
  1250. .plaintext = "Hi There",
  1251. .psize = 8,
  1252. .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
  1253. "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
  1254. "\x46\xbe",
  1255. }, {
  1256. .key = "Jefe",
  1257. .ksize = 4,
  1258. .plaintext = "what do ya want for nothing?",
  1259. .psize = 28,
  1260. .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
  1261. "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
  1262. .np = 2,
  1263. .tap = { 14, 14 }
  1264. }, {
  1265. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1266. .ksize = 20,
  1267. .plaintext = "\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\xdd"
  1270. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1271. .psize = 50,
  1272. .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
  1273. "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
  1274. }, {
  1275. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1276. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1277. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1278. .ksize = 25,
  1279. .plaintext = "\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\xcd"
  1282. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1283. .psize = 50,
  1284. .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
  1285. "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
  1286. }, {
  1287. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1288. .ksize = 20,
  1289. .plaintext = "Test With Truncation",
  1290. .psize = 20,
  1291. .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
  1292. "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
  1293. }, {
  1294. .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1300. "\xaa\xaa",
  1301. .ksize = 80,
  1302. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1303. .psize = 54,
  1304. .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
  1305. "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
  1306. }, {
  1307. .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1313. "\xaa\xaa",
  1314. .ksize = 80,
  1315. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1316. "Block-Size Data",
  1317. .psize = 73,
  1318. .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
  1319. "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
  1320. },
  1321. };
  1322. /*
  1323. * SHA224 HMAC test vectors from RFC4231
  1324. */
  1325. #define HMAC_SHA224_TEST_VECTORS 4
  1326. static struct hash_testvec hmac_sha224_tv_template[] = {
  1327. {
  1328. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1329. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1330. "\x0b\x0b\x0b\x0b",
  1331. .ksize = 20,
  1332. /* ("Hi There") */
  1333. .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
  1334. .psize = 8,
  1335. .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
  1336. "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
  1337. "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
  1338. "\x53\x68\x4b\x22",
  1339. }, {
  1340. .key = "Jefe",
  1341. .ksize = 4,
  1342. /* ("what do ya want for nothing?") */
  1343. .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
  1344. "\x79\x61\x20\x77\x61\x6e\x74\x20"
  1345. "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
  1346. "\x69\x6e\x67\x3f",
  1347. .psize = 28,
  1348. .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
  1349. "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
  1350. "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
  1351. "\x8f\xd0\x5e\x44",
  1352. .np = 4,
  1353. .tap = { 7, 7, 7, 7 }
  1354. }, {
  1355. .key = "\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\xaa\xaa\xaa\xaa\xaa"
  1371. "\xaa\xaa\xaa",
  1372. .ksize = 131,
  1373. /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
  1374. .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
  1375. "\x6e\x67\x20\x4c\x61\x72\x67\x65"
  1376. "\x72\x20\x54\x68\x61\x6e\x20\x42"
  1377. "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
  1378. "\x65\x20\x4b\x65\x79\x20\x2d\x20"
  1379. "\x48\x61\x73\x68\x20\x4b\x65\x79"
  1380. "\x20\x46\x69\x72\x73\x74",
  1381. .psize = 54,
  1382. .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
  1383. "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
  1384. "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
  1385. "\x3f\xa6\x87\x0e",
  1386. }, {
  1387. .key = "\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\xaa\xaa\xaa\xaa\xaa"
  1403. "\xaa\xaa\xaa",
  1404. .ksize = 131,
  1405. /* ("This is a test using a larger than block-size key and a")
  1406. (" larger than block-size data. The key needs to be")
  1407. (" hashed before being used by the HMAC algorithm.") */
  1408. .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
  1409. "\x61\x20\x74\x65\x73\x74\x20\x75"
  1410. "\x73\x69\x6e\x67\x20\x61\x20\x6c"
  1411. "\x61\x72\x67\x65\x72\x20\x74\x68"
  1412. "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
  1413. "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
  1414. "\x79\x20\x61\x6e\x64\x20\x61\x20"
  1415. "\x6c\x61\x72\x67\x65\x72\x20\x74"
  1416. "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
  1417. "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
  1418. "\x61\x74\x61\x2e\x20\x54\x68\x65"
  1419. "\x20\x6b\x65\x79\x20\x6e\x65\x65"
  1420. "\x64\x73\x20\x74\x6f\x20\x62\x65"
  1421. "\x20\x68\x61\x73\x68\x65\x64\x20"
  1422. "\x62\x65\x66\x6f\x72\x65\x20\x62"
  1423. "\x65\x69\x6e\x67\x20\x75\x73\x65"
  1424. "\x64\x20\x62\x79\x20\x74\x68\x65"
  1425. "\x20\x48\x4d\x41\x43\x20\x61\x6c"
  1426. "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
  1427. .psize = 152,
  1428. .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
  1429. "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
  1430. "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
  1431. "\xf6\xf5\x65\xd1",
  1432. },
  1433. };
  1434. /*
  1435. * HMAC-SHA256 test vectors from
  1436. * draft-ietf-ipsec-ciph-sha-256-01.txt
  1437. */
  1438. #define HMAC_SHA256_TEST_VECTORS 10
  1439. static struct hash_testvec hmac_sha256_tv_template[] = {
  1440. {
  1441. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1442. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1443. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1444. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1445. .ksize = 32,
  1446. .plaintext = "abc",
  1447. .psize = 3,
  1448. .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
  1449. "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
  1450. "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
  1451. "\x92\x75\x90\x21\xcf\xab\x81\x81",
  1452. }, {
  1453. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1454. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1455. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1456. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1457. .ksize = 32,
  1458. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1459. .psize = 56,
  1460. .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
  1461. "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
  1462. "\xe6\x98\xe3\x61\x19\x42\x11\x49"
  1463. "\xea\x8c\x71\x24\x56\x69\x7d\x30",
  1464. }, {
  1465. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1466. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1467. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1468. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1469. .ksize = 32,
  1470. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
  1471. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1472. .psize = 112,
  1473. .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
  1474. "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
  1475. "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
  1476. "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
  1477. }, {
  1478. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1479. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1480. "\x0b\x0b\x0b\x0b\x0b\x0b",
  1481. .ksize = 32,
  1482. .plaintext = "Hi There",
  1483. .psize = 8,
  1484. .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
  1485. "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
  1486. "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
  1487. "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
  1488. }, {
  1489. .key = "Jefe",
  1490. .ksize = 4,
  1491. .plaintext = "what do ya want for nothing?",
  1492. .psize = 28,
  1493. .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
  1494. "\x6a\x04\x24\x26\x08\x95\x75\xc7"
  1495. "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
  1496. "\x9d\xec\x58\xb9\x64\xec\x38\x43",
  1497. .np = 2,
  1498. .tap = { 14, 14 }
  1499. }, {
  1500. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1501. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1502. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1503. .ksize = 32,
  1504. .plaintext = "\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\xdd"
  1507. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1508. .psize = 50,
  1509. .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
  1510. "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
  1511. "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
  1512. "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
  1513. }, {
  1514. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1515. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1516. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1517. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  1518. "\x21\x22\x23\x24\x25",
  1519. .ksize = 37,
  1520. .plaintext = "\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\xcd"
  1523. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1524. .psize = 50,
  1525. .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
  1526. "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
  1527. "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
  1528. "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
  1529. }, {
  1530. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1531. "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1532. "\x0c\x0c\x0c\x0c\x0c\x0c",
  1533. .ksize = 32,
  1534. .plaintext = "Test With Truncation",
  1535. .psize = 20,
  1536. .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
  1537. "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
  1538. "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
  1539. "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
  1540. }, {
  1541. .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1547. "\xaa\xaa",
  1548. .ksize = 80,
  1549. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1550. .psize = 54,
  1551. .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
  1552. "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
  1553. "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
  1554. "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
  1555. }, {
  1556. .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1562. "\xaa\xaa",
  1563. .ksize = 80,
  1564. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
  1565. "One Block-Size Data",
  1566. .psize = 73,
  1567. .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
  1568. "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
  1569. "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
  1570. "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
  1571. },
  1572. };
  1573. #define XCBC_AES_TEST_VECTORS 6
  1574. static struct hash_testvec aes_xcbc128_tv_template[] = {
  1575. {
  1576. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1577. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1578. .plaintext = zeroed_string,
  1579. .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
  1580. "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
  1581. .psize = 0,
  1582. .ksize = 16,
  1583. }, {
  1584. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1585. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1586. .plaintext = "\x00\x01\x02",
  1587. .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
  1588. "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
  1589. .psize = 3,
  1590. .ksize = 16,
  1591. } , {
  1592. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1593. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1594. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1595. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1596. .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
  1597. "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
  1598. .psize = 16,
  1599. .ksize = 16,
  1600. }, {
  1601. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1602. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1603. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1604. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1605. "\x10\x11\x12\x13",
  1606. .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
  1607. "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
  1608. .tap = { 10, 10 },
  1609. .psize = 20,
  1610. .np = 2,
  1611. .ksize = 16,
  1612. }, {
  1613. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1614. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1615. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1616. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1617. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1618. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  1619. .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
  1620. "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
  1621. .psize = 32,
  1622. .ksize = 16,
  1623. }, {
  1624. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1625. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1626. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1627. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1628. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1629. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  1630. "\x20\x21",
  1631. .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
  1632. "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
  1633. .tap = { 17, 17 },
  1634. .psize = 34,
  1635. .np = 2,
  1636. .ksize = 16,
  1637. }
  1638. };
  1639. #define VMAC_AES_TEST_VECTORS 8
  1640. static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
  1641. '\x02', '\x03', '\x02', '\x02',
  1642. '\x02', '\x04', '\x01', '\x07',
  1643. '\x04', '\x01', '\x04', '\x03',};
  1644. static char vmac_string2[128] = {'a', 'b', 'c',};
  1645. static char vmac_string3[128] = {'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. 'a', 'b', 'c', 'a', 'b', 'c',
  1653. };
  1654. static struct hash_testvec aes_vmac128_tv_template[] = {
  1655. {
  1656. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1657. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1658. .plaintext = NULL,
  1659. .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
  1660. .psize = 0,
  1661. .ksize = 16,
  1662. }, {
  1663. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1664. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1665. .plaintext = vmac_string1,
  1666. .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
  1667. .psize = 128,
  1668. .ksize = 16,
  1669. }, {
  1670. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1671. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1672. .plaintext = vmac_string2,
  1673. .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
  1674. .psize = 128,
  1675. .ksize = 16,
  1676. }, {
  1677. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1678. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1679. .plaintext = vmac_string3,
  1680. .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
  1681. .psize = 128,
  1682. .ksize = 16,
  1683. }, {
  1684. .key = "abcdefghijklmnop",
  1685. .plaintext = NULL,
  1686. .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
  1687. .psize = 0,
  1688. .ksize = 16,
  1689. }, {
  1690. .key = "abcdefghijklmnop",
  1691. .plaintext = vmac_string1,
  1692. .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
  1693. .psize = 128,
  1694. .ksize = 16,
  1695. }, {
  1696. .key = "abcdefghijklmnop",
  1697. .plaintext = vmac_string2,
  1698. .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
  1699. .psize = 128,
  1700. .ksize = 16,
  1701. }, {
  1702. .key = "abcdefghijklmnop",
  1703. .plaintext = vmac_string3,
  1704. .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
  1705. .psize = 128,
  1706. .ksize = 16,
  1707. },
  1708. };
  1709. /*
  1710. * SHA384 HMAC test vectors from RFC4231
  1711. */
  1712. #define HMAC_SHA384_TEST_VECTORS 4
  1713. static struct hash_testvec hmac_sha384_tv_template[] = {
  1714. {
  1715. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1716. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1717. "\x0b\x0b\x0b\x0b",
  1718. .ksize = 20,
  1719. .plaintext = "Hi There",
  1720. .psize = 8,
  1721. .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
  1722. "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
  1723. "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
  1724. "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
  1725. "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
  1726. "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
  1727. }, {
  1728. .key = "Jefe",
  1729. .ksize = 4,
  1730. .plaintext = "what do ya want for nothing?",
  1731. .psize = 28,
  1732. .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
  1733. "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
  1734. "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
  1735. "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
  1736. "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
  1737. "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
  1738. .np = 4,
  1739. .tap = { 7, 7, 7, 7 }
  1740. }, {
  1741. .key = "\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\xaa\xaa\xaa\xaa\xaa"
  1757. "\xaa\xaa\xaa",
  1758. .ksize = 131,
  1759. .plaintext = "Test Using Larger Than Block-Siz"
  1760. "e Key - Hash Key First",
  1761. .psize = 54,
  1762. .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
  1763. "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
  1764. "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
  1765. "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
  1766. "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
  1767. "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
  1768. }, {
  1769. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1770. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1771. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1772. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1773. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1774. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1775. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1776. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1777. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1778. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1779. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1780. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1781. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1782. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1783. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1784. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1785. "\xaa\xaa\xaa",
  1786. .ksize = 131,
  1787. .plaintext = "This is a test u"
  1788. "sing a larger th"
  1789. "an block-size ke"
  1790. "y and a larger t"
  1791. "han block-size d"
  1792. "ata. The key nee"
  1793. "ds to be hashed "
  1794. "before being use"
  1795. "d by the HMAC al"
  1796. "gorithm.",
  1797. .psize = 152,
  1798. .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
  1799. "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
  1800. "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
  1801. "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
  1802. "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
  1803. "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
  1804. },
  1805. };
  1806. /*
  1807. * SHA512 HMAC test vectors from RFC4231
  1808. */
  1809. #define HMAC_SHA512_TEST_VECTORS 4
  1810. static struct hash_testvec hmac_sha512_tv_template[] = {
  1811. {
  1812. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1813. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1814. "\x0b\x0b\x0b\x0b",
  1815. .ksize = 20,
  1816. .plaintext = "Hi There",
  1817. .psize = 8,
  1818. .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
  1819. "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
  1820. "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
  1821. "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
  1822. "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
  1823. "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
  1824. "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
  1825. "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
  1826. }, {
  1827. .key = "Jefe",
  1828. .ksize = 4,
  1829. .plaintext = "what do ya want for nothing?",
  1830. .psize = 28,
  1831. .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
  1832. "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
  1833. "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
  1834. "\x10\x27\x0c\xd7\xea\x25\x05\x54"
  1835. "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
  1836. "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
  1837. "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
  1838. "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
  1839. .np = 4,
  1840. .tap = { 7, 7, 7, 7 }
  1841. }, {
  1842. .key = "\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\xaa\xaa\xaa\xaa\xaa"
  1858. "\xaa\xaa\xaa",
  1859. .ksize = 131,
  1860. .plaintext = "Test Using Large"
  1861. "r Than Block-Siz"
  1862. "e Key - Hash Key"
  1863. " First",
  1864. .psize = 54,
  1865. .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
  1866. "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
  1867. "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
  1868. "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
  1869. "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
  1870. "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
  1871. "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
  1872. "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
  1873. }, {
  1874. .key = "\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\xaa\xaa\xaa\xaa\xaa"
  1890. "\xaa\xaa\xaa",
  1891. .ksize = 131,
  1892. .plaintext =
  1893. "This is a test u"
  1894. "sing a larger th"
  1895. "an block-size ke"
  1896. "y and a larger t"
  1897. "han block-size d"
  1898. "ata. The key nee"
  1899. "ds to be hashed "
  1900. "before being use"
  1901. "d by the HMAC al"
  1902. "gorithm.",
  1903. .psize = 152,
  1904. .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
  1905. "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
  1906. "\xde\xbd\x71\xf8\x86\x72\x89\x86"
  1907. "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
  1908. "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
  1909. "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
  1910. "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
  1911. "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
  1912. },
  1913. };
  1914. /*
  1915. * DES test vectors.
  1916. */
  1917. #define DES_ENC_TEST_VECTORS 10
  1918. #define DES_DEC_TEST_VECTORS 4
  1919. #define DES_CBC_ENC_TEST_VECTORS 5
  1920. #define DES_CBC_DEC_TEST_VECTORS 4
  1921. #define DES3_EDE_ENC_TEST_VECTORS 3
  1922. #define DES3_EDE_DEC_TEST_VECTORS 3
  1923. #define DES3_EDE_CBC_ENC_TEST_VECTORS 1
  1924. #define DES3_EDE_CBC_DEC_TEST_VECTORS 1
  1925. static struct cipher_testvec des_enc_tv_template[] = {
  1926. { /* From Applied Cryptography */
  1927. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1928. .klen = 8,
  1929. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1930. .ilen = 8,
  1931. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1932. .rlen = 8,
  1933. }, { /* Same key, different plaintext block */
  1934. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1935. .klen = 8,
  1936. .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
  1937. .ilen = 8,
  1938. .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1939. .rlen = 8,
  1940. }, { /* Sbox test from NBS */
  1941. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1942. .klen = 8,
  1943. .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1944. .ilen = 8,
  1945. .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1946. .rlen = 8,
  1947. }, { /* Three blocks */
  1948. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1949. .klen = 8,
  1950. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1951. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1952. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1953. .ilen = 24,
  1954. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1955. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1956. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1957. .rlen = 24,
  1958. }, { /* Weak key */
  1959. .fail = 1,
  1960. .wk = 1,
  1961. .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
  1962. .klen = 8,
  1963. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1964. .ilen = 8,
  1965. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1966. .rlen = 8,
  1967. }, { /* Two blocks -- for testing encryption across pages */
  1968. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1969. .klen = 8,
  1970. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1971. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1972. .ilen = 16,
  1973. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1974. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1975. .rlen = 16,
  1976. .np = 2,
  1977. .tap = { 8, 8 }
  1978. }, { /* Four blocks -- for testing encryption with chunking */
  1979. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1980. .klen = 8,
  1981. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1982. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1983. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
  1984. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1985. .ilen = 32,
  1986. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1987. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1988. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
  1989. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1990. .rlen = 32,
  1991. .np = 3,
  1992. .tap = { 14, 10, 8 }
  1993. }, {
  1994. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1995. .klen = 8,
  1996. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1997. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1998. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1999. .ilen = 24,
  2000. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2001. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  2002. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  2003. .rlen = 24,
  2004. .np = 4,
  2005. .tap = { 2, 1, 3, 18 }
  2006. }, {
  2007. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2008. .klen = 8,
  2009. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2010. "\x22\x33\x44\x55\x66\x77\x88\x99",
  2011. .ilen = 16,
  2012. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2013. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  2014. .rlen = 16,
  2015. .np = 5,
  2016. .tap = { 2, 2, 2, 2, 8 }
  2017. }, {
  2018. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2019. .klen = 8,
  2020. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  2021. .ilen = 8,
  2022. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  2023. .rlen = 8,
  2024. .np = 8,
  2025. .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
  2026. },
  2027. };
  2028. static struct cipher_testvec des_dec_tv_template[] = {
  2029. { /* From Applied Cryptography */
  2030. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2031. .klen = 8,
  2032. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  2033. .ilen = 8,
  2034. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  2035. .rlen = 8,
  2036. }, { /* Sbox test from NBS */
  2037. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  2038. .klen = 8,
  2039. .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2040. .ilen = 8,
  2041. .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  2042. .rlen = 8,
  2043. }, { /* Two blocks, for chunking test */
  2044. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2045. .klen = 8,
  2046. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2047. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2048. .ilen = 16,
  2049. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2050. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  2051. .rlen = 16,
  2052. .np = 2,
  2053. .tap = { 8, 8 }
  2054. }, {
  2055. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2056. .klen = 8,
  2057. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  2058. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  2059. .ilen = 16,
  2060. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  2061. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  2062. .rlen = 16,
  2063. .np = 3,
  2064. .tap = { 3, 12, 1 }
  2065. },
  2066. };
  2067. static struct cipher_testvec des_cbc_enc_tv_template[] = {
  2068. { /* From OpenSSL */
  2069. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2070. .klen = 8,
  2071. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2072. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2073. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2074. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2075. .ilen = 24,
  2076. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  2077. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  2078. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  2079. .rlen = 24,
  2080. }, { /* FIPS Pub 81 */
  2081. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2082. .klen = 8,
  2083. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  2084. .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  2085. .ilen = 8,
  2086. .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2087. .rlen = 8,
  2088. }, {
  2089. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2090. .klen = 8,
  2091. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2092. .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2093. .ilen = 8,
  2094. .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2095. .rlen = 8,
  2096. }, {
  2097. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2098. .klen = 8,
  2099. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2100. .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2101. .ilen = 8,
  2102. .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2103. .rlen = 8,
  2104. }, { /* Copy of openssl vector for chunk testing */
  2105. /* From OpenSSL */
  2106. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2107. .klen = 8,
  2108. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2109. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2110. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2111. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2112. .ilen = 24,
  2113. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  2114. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  2115. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  2116. .rlen = 24,
  2117. .np = 2,
  2118. .tap = { 13, 11 }
  2119. },
  2120. };
  2121. static struct cipher_testvec des_cbc_dec_tv_template[] = {
  2122. { /* FIPS Pub 81 */
  2123. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2124. .klen = 8,
  2125. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  2126. .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2127. .ilen = 8,
  2128. .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  2129. .rlen = 8,
  2130. }, {
  2131. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2132. .klen = 8,
  2133. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2134. .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2135. .ilen = 8,
  2136. .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2137. .rlen = 8,
  2138. }, {
  2139. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2140. .klen = 8,
  2141. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2142. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2143. .ilen = 8,
  2144. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2145. .rlen = 8,
  2146. }, { /* Copy of above, for chunk testing */
  2147. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2148. .klen = 8,
  2149. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2150. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2151. .ilen = 8,
  2152. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2153. .rlen = 8,
  2154. .np = 2,
  2155. .tap = { 4, 4 }
  2156. },
  2157. };
  2158. static struct cipher_testvec des3_ede_enc_tv_template[] = {
  2159. { /* These are from openssl */
  2160. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2161. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2162. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2163. .klen = 24,
  2164. .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2165. .ilen = 8,
  2166. .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2167. .rlen = 8,
  2168. }, {
  2169. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2170. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2171. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2172. .klen = 24,
  2173. .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2174. .ilen = 8,
  2175. .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2176. .rlen = 8,
  2177. }, {
  2178. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2179. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2180. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2181. .klen = 24,
  2182. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2183. .ilen = 8,
  2184. .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2185. .rlen = 8,
  2186. },
  2187. };
  2188. static struct cipher_testvec des3_ede_dec_tv_template[] = {
  2189. { /* These are from openssl */
  2190. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2191. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2192. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2193. .klen = 24,
  2194. .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2195. .ilen = 8,
  2196. .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2197. .rlen = 8,
  2198. }, {
  2199. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2200. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2201. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2202. .klen = 24,
  2203. .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2204. .ilen = 8,
  2205. .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2206. .rlen = 8,
  2207. }, {
  2208. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2209. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2210. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2211. .klen = 24,
  2212. .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2213. .ilen = 8,
  2214. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2215. .rlen = 8,
  2216. },
  2217. };
  2218. static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
  2219. { /* Generated from openssl */
  2220. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2221. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2222. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2223. .klen = 24,
  2224. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2225. .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2226. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2227. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2228. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2229. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2230. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2231. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2232. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2233. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2234. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2235. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2236. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2237. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2238. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2239. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2240. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2241. .ilen = 128,
  2242. .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2243. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2244. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2245. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2246. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2247. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2248. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2249. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2250. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2251. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2252. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2253. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2254. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2255. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2256. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2257. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2258. .rlen = 128,
  2259. },
  2260. };
  2261. static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
  2262. { /* Generated from openssl */
  2263. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2264. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2265. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2266. .klen = 24,
  2267. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2268. .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2269. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2270. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2271. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2272. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2273. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2274. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2275. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2276. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2277. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2278. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2279. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2280. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2281. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2282. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2283. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2284. .ilen = 128,
  2285. .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2286. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2287. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2288. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2289. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2290. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2291. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2292. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2293. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2294. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2295. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2296. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2297. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2298. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2299. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2300. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2301. .rlen = 128,
  2302. },
  2303. };
  2304. /*
  2305. * Blowfish test vectors.
  2306. */
  2307. #define BF_ENC_TEST_VECTORS 7
  2308. #define BF_DEC_TEST_VECTORS 7
  2309. #define BF_CBC_ENC_TEST_VECTORS 2
  2310. #define BF_CBC_DEC_TEST_VECTORS 2
  2311. #define BF_CTR_ENC_TEST_VECTORS 2
  2312. #define BF_CTR_DEC_TEST_VECTORS 2
  2313. static struct cipher_testvec bf_enc_tv_template[] = {
  2314. { /* DES test vectors from OpenSSL */
  2315. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2316. .klen = 8,
  2317. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2318. .ilen = 8,
  2319. .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2320. .rlen = 8,
  2321. }, {
  2322. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2323. .klen = 8,
  2324. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2325. .ilen = 8,
  2326. .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2327. .rlen = 8,
  2328. }, {
  2329. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2330. .klen = 8,
  2331. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2332. .ilen = 8,
  2333. .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2334. .rlen = 8,
  2335. }, { /* Vary the keylength... */
  2336. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2337. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2338. .klen = 16,
  2339. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2340. .ilen = 8,
  2341. .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2342. .rlen = 8,
  2343. }, {
  2344. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2345. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2346. "\x00\x11\x22\x33\x44",
  2347. .klen = 21,
  2348. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2349. .ilen = 8,
  2350. .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2351. .rlen = 8,
  2352. }, { /* Generated with bf488 */
  2353. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2354. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2355. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2356. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2357. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2358. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2359. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2360. .klen = 56,
  2361. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2362. .ilen = 8,
  2363. .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2364. .rlen = 8,
  2365. }, { /* Generated with Crypto++ */
  2366. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2367. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2368. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2369. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2370. .klen = 32,
  2371. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2372. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2373. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2374. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2375. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2376. .ilen = 40,
  2377. .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
  2378. "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
  2379. "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
  2380. "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
  2381. "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
  2382. .rlen = 40,
  2383. .also_non_np = 1,
  2384. .np = 2,
  2385. .tap = { 40 - 8, 8 },
  2386. },
  2387. };
  2388. static struct cipher_testvec bf_dec_tv_template[] = {
  2389. { /* DES test vectors from OpenSSL */
  2390. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2391. .klen = 8,
  2392. .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2393. .ilen = 8,
  2394. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2395. .rlen = 8,
  2396. }, {
  2397. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2398. .klen = 8,
  2399. .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2400. .ilen = 8,
  2401. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2402. .rlen = 8,
  2403. }, {
  2404. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2405. .klen = 8,
  2406. .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2407. .ilen = 8,
  2408. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2409. .rlen = 8,
  2410. }, { /* Vary the keylength... */
  2411. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2412. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2413. .klen = 16,
  2414. .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2415. .ilen = 8,
  2416. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2417. .rlen = 8,
  2418. }, {
  2419. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2420. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2421. "\x00\x11\x22\x33\x44",
  2422. .klen = 21,
  2423. .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2424. .ilen = 8,
  2425. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2426. .rlen = 8,
  2427. }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
  2428. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2429. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2430. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2431. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2432. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2433. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2434. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2435. .klen = 56,
  2436. .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2437. .ilen = 8,
  2438. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2439. .rlen = 8,
  2440. }, { /* Generated with Crypto++ */
  2441. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2442. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2443. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2444. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2445. .klen = 32,
  2446. .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
  2447. "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
  2448. "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
  2449. "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
  2450. "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
  2451. .ilen = 40,
  2452. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2453. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2454. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2455. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2456. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2457. .rlen = 40,
  2458. .also_non_np = 1,
  2459. .np = 2,
  2460. .tap = { 40 - 8, 8 },
  2461. },
  2462. };
  2463. static struct cipher_testvec bf_cbc_enc_tv_template[] = {
  2464. { /* From OpenSSL */
  2465. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2466. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2467. .klen = 16,
  2468. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2469. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2470. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2471. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2472. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2473. .ilen = 32,
  2474. .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2475. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2476. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2477. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2478. .rlen = 32,
  2479. }, { /* Generated with Crypto++ */
  2480. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2481. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2482. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2483. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2484. .klen = 32,
  2485. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2486. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2487. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2488. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2489. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2490. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2491. .ilen = 40,
  2492. .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
  2493. "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
  2494. "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
  2495. "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
  2496. "\x01\x9C\x93\x63\x51\x60\x82\xD2",
  2497. .rlen = 40,
  2498. .also_non_np = 1,
  2499. .np = 2,
  2500. .tap = { 40 - 8, 8 },
  2501. },
  2502. };
  2503. static struct cipher_testvec bf_cbc_dec_tv_template[] = {
  2504. { /* From OpenSSL */
  2505. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2506. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2507. .klen = 16,
  2508. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2509. .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2510. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2511. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2512. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2513. .ilen = 32,
  2514. .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2515. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2516. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2517. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2518. .rlen = 32,
  2519. }, { /* Generated with Crypto++ */
  2520. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2521. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2522. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2523. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2524. .klen = 32,
  2525. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2526. .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
  2527. "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
  2528. "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
  2529. "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
  2530. "\x01\x9C\x93\x63\x51\x60\x82\xD2",
  2531. .ilen = 40,
  2532. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2533. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2534. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2535. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2536. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2537. .rlen = 40,
  2538. .also_non_np = 1,
  2539. .np = 2,
  2540. .tap = { 40 - 8, 8 },
  2541. },
  2542. };
  2543. static struct cipher_testvec bf_ctr_enc_tv_template[] = {
  2544. { /* Generated with Crypto++ */
  2545. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2546. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2547. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2548. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2549. .klen = 32,
  2550. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2551. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2552. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2553. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2554. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2555. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2556. .ilen = 40,
  2557. .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2558. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2559. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2560. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2561. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
  2562. .rlen = 40,
  2563. }, { /* Generated with Crypto++ */
  2564. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2565. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2566. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2567. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2568. .klen = 32,
  2569. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2570. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2571. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2572. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2573. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2574. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2575. "\x6D\x04\x9B",
  2576. .ilen = 43,
  2577. .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2578. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2579. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2580. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2581. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
  2582. "\x3D\xA7\xE9",
  2583. .rlen = 43,
  2584. .also_non_np = 1,
  2585. .np = 2,
  2586. .tap = { 43 - 8, 8 },
  2587. },
  2588. };
  2589. static struct cipher_testvec bf_ctr_dec_tv_template[] = {
  2590. { /* Generated with Crypto++ */
  2591. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2592. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2593. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2594. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2595. .klen = 32,
  2596. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2597. .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2598. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2599. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2600. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2601. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
  2602. .ilen = 40,
  2603. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2604. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2605. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2606. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2607. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
  2608. .rlen = 40,
  2609. }, { /* Generated with Crypto++ */
  2610. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  2611. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  2612. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  2613. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  2614. .klen = 32,
  2615. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  2616. .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
  2617. "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
  2618. "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
  2619. "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
  2620. "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
  2621. "\x3D\xA7\xE9",
  2622. .ilen = 43,
  2623. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2624. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2625. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2626. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2627. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2628. "\x6D\x04\x9B",
  2629. .rlen = 43,
  2630. .also_non_np = 1,
  2631. .np = 2,
  2632. .tap = { 43 - 8, 8 },
  2633. },
  2634. };
  2635. /*
  2636. * Twofish test vectors.
  2637. */
  2638. #define TF_ENC_TEST_VECTORS 4
  2639. #define TF_DEC_TEST_VECTORS 4
  2640. #define TF_CBC_ENC_TEST_VECTORS 5
  2641. #define TF_CBC_DEC_TEST_VECTORS 5
  2642. #define TF_CTR_ENC_TEST_VECTORS 2
  2643. #define TF_CTR_DEC_TEST_VECTORS 2
  2644. #define TF_LRW_ENC_TEST_VECTORS 8
  2645. #define TF_LRW_DEC_TEST_VECTORS 8
  2646. #define TF_XTS_ENC_TEST_VECTORS 5
  2647. #define TF_XTS_DEC_TEST_VECTORS 5
  2648. static struct cipher_testvec tf_enc_tv_template[] = {
  2649. {
  2650. .key = zeroed_string,
  2651. .klen = 16,
  2652. .input = zeroed_string,
  2653. .ilen = 16,
  2654. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2655. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2656. .rlen = 16,
  2657. }, {
  2658. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2659. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2660. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2661. .klen = 24,
  2662. .input = zeroed_string,
  2663. .ilen = 16,
  2664. .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2665. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2666. .rlen = 16,
  2667. }, {
  2668. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2669. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2670. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2671. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2672. .klen = 32,
  2673. .input = zeroed_string,
  2674. .ilen = 16,
  2675. .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2676. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2677. .rlen = 16,
  2678. }, { /* Generated with Crypto++ */
  2679. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  2680. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  2681. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  2682. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  2683. .klen = 32,
  2684. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2685. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2686. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2687. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2688. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2689. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2690. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2691. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  2692. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  2693. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  2694. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  2695. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  2696. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  2697. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  2698. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  2699. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  2700. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  2701. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  2702. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  2703. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  2704. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  2705. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  2706. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  2707. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  2708. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  2709. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  2710. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  2711. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  2712. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  2713. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  2714. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  2715. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  2716. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  2717. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  2718. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  2719. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  2720. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  2721. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  2722. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  2723. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  2724. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  2725. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  2726. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  2727. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  2728. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  2729. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  2730. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  2731. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  2732. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  2733. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  2734. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  2735. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  2736. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  2737. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  2738. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  2739. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  2740. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  2741. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  2742. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  2743. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  2744. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  2745. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  2746. .ilen = 496,
  2747. .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
  2748. "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
  2749. "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
  2750. "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
  2751. "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
  2752. "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
  2753. "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
  2754. "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
  2755. "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
  2756. "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
  2757. "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
  2758. "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
  2759. "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
  2760. "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
  2761. "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
  2762. "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
  2763. "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
  2764. "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
  2765. "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
  2766. "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
  2767. "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
  2768. "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
  2769. "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
  2770. "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
  2771. "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
  2772. "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
  2773. "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
  2774. "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
  2775. "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
  2776. "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
  2777. "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
  2778. "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
  2779. "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
  2780. "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
  2781. "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
  2782. "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
  2783. "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
  2784. "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
  2785. "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
  2786. "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
  2787. "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
  2788. "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
  2789. "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
  2790. "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
  2791. "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
  2792. "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
  2793. "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
  2794. "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
  2795. "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
  2796. "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
  2797. "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
  2798. "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
  2799. "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
  2800. "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
  2801. "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
  2802. "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
  2803. "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
  2804. "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
  2805. "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
  2806. "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
  2807. "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
  2808. "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
  2809. .rlen = 496,
  2810. .also_non_np = 1,
  2811. .np = 2,
  2812. .tap = { 496 - 16, 16 },
  2813. },
  2814. };
  2815. static struct cipher_testvec tf_dec_tv_template[] = {
  2816. {
  2817. .key = zeroed_string,
  2818. .klen = 16,
  2819. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2820. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2821. .ilen = 16,
  2822. .result = zeroed_string,
  2823. .rlen = 16,
  2824. }, {
  2825. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2826. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2827. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2828. .klen = 24,
  2829. .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2830. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2831. .ilen = 16,
  2832. .result = zeroed_string,
  2833. .rlen = 16,
  2834. }, {
  2835. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2836. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2837. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2838. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2839. .klen = 32,
  2840. .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2841. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2842. .ilen = 16,
  2843. .result = zeroed_string,
  2844. .rlen = 16,
  2845. }, { /* Generated with Crypto++ */
  2846. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  2847. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  2848. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  2849. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  2850. .klen = 32,
  2851. .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
  2852. "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
  2853. "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
  2854. "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
  2855. "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
  2856. "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
  2857. "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
  2858. "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
  2859. "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
  2860. "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
  2861. "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
  2862. "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
  2863. "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
  2864. "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
  2865. "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
  2866. "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
  2867. "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
  2868. "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
  2869. "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
  2870. "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
  2871. "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
  2872. "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
  2873. "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
  2874. "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
  2875. "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
  2876. "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
  2877. "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
  2878. "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
  2879. "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
  2880. "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
  2881. "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
  2882. "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
  2883. "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
  2884. "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
  2885. "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
  2886. "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
  2887. "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
  2888. "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
  2889. "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
  2890. "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
  2891. "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
  2892. "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
  2893. "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
  2894. "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
  2895. "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
  2896. "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
  2897. "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
  2898. "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
  2899. "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
  2900. "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
  2901. "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
  2902. "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
  2903. "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
  2904. "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
  2905. "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
  2906. "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
  2907. "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
  2908. "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
  2909. "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
  2910. "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
  2911. "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
  2912. "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
  2913. .ilen = 496,
  2914. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  2915. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  2916. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  2917. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  2918. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  2919. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  2920. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  2921. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  2922. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  2923. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  2924. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  2925. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  2926. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  2927. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  2928. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  2929. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  2930. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  2931. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  2932. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  2933. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  2934. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  2935. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  2936. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  2937. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  2938. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  2939. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  2940. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  2941. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  2942. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  2943. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  2944. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  2945. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  2946. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  2947. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  2948. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  2949. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  2950. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  2951. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  2952. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  2953. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  2954. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  2955. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  2956. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  2957. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  2958. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  2959. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  2960. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  2961. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  2962. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  2963. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  2964. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  2965. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  2966. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  2967. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  2968. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  2969. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  2970. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  2971. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  2972. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  2973. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  2974. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  2975. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  2976. .rlen = 496,
  2977. .also_non_np = 1,
  2978. .np = 2,
  2979. .tap = { 496 - 16, 16 },
  2980. },
  2981. };
  2982. static struct cipher_testvec tf_cbc_enc_tv_template[] = {
  2983. { /* Generated with Nettle */
  2984. .key = zeroed_string,
  2985. .klen = 16,
  2986. .iv = zeroed_string,
  2987. .input = zeroed_string,
  2988. .ilen = 16,
  2989. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2990. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2991. .rlen = 16,
  2992. }, {
  2993. .key = zeroed_string,
  2994. .klen = 16,
  2995. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2996. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2997. .input = zeroed_string,
  2998. .ilen = 16,
  2999. .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  3000. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  3001. .rlen = 16,
  3002. }, {
  3003. .key = zeroed_string,
  3004. .klen = 16,
  3005. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  3006. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  3007. .input = zeroed_string,
  3008. .ilen = 16,
  3009. .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  3010. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  3011. .rlen = 16,
  3012. }, {
  3013. .key = zeroed_string,
  3014. .klen = 16,
  3015. .iv = zeroed_string,
  3016. .input = zeroed_string,
  3017. .ilen = 48,
  3018. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  3019. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  3020. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  3021. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  3022. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  3023. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  3024. .rlen = 48,
  3025. }, { /* Generated with Crypto++ */
  3026. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3027. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3028. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3029. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3030. .klen = 32,
  3031. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3032. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3033. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3034. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3035. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3036. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3037. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3038. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3039. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3040. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3041. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3042. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3043. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3044. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3045. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3046. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3047. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3048. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3049. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3050. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3051. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3052. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3053. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3054. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3055. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3056. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3057. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3058. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3059. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3060. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3061. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3062. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3063. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3064. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3065. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3066. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3067. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3068. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3069. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3070. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3071. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3072. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3073. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3074. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3075. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3076. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3077. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3078. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3079. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3080. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3081. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3082. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3083. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3084. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3085. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3086. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3087. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3088. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3089. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3090. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3091. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3092. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3093. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3094. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  3095. .ilen = 496,
  3096. .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
  3097. "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
  3098. "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
  3099. "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
  3100. "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
  3101. "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
  3102. "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
  3103. "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
  3104. "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
  3105. "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
  3106. "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
  3107. "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
  3108. "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
  3109. "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
  3110. "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
  3111. "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
  3112. "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
  3113. "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
  3114. "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
  3115. "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
  3116. "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
  3117. "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
  3118. "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
  3119. "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
  3120. "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
  3121. "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
  3122. "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
  3123. "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
  3124. "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
  3125. "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
  3126. "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
  3127. "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
  3128. "\x75\x42\x62\x04\x31\x1F\x95\x7C"
  3129. "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
  3130. "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
  3131. "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
  3132. "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
  3133. "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
  3134. "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
  3135. "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
  3136. "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
  3137. "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
  3138. "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
  3139. "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
  3140. "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
  3141. "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
  3142. "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
  3143. "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
  3144. "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
  3145. "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
  3146. "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
  3147. "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
  3148. "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
  3149. "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
  3150. "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
  3151. "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
  3152. "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
  3153. "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
  3154. "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
  3155. "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
  3156. "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
  3157. "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
  3158. .rlen = 496,
  3159. .also_non_np = 1,
  3160. .np = 2,
  3161. .tap = { 496 - 16, 16 },
  3162. },
  3163. };
  3164. static struct cipher_testvec tf_cbc_dec_tv_template[] = {
  3165. { /* Reverse of the first four above */
  3166. .key = zeroed_string,
  3167. .klen = 16,
  3168. .iv = zeroed_string,
  3169. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  3170. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  3171. .ilen = 16,
  3172. .result = zeroed_string,
  3173. .rlen = 16,
  3174. }, {
  3175. .key = zeroed_string,
  3176. .klen = 16,
  3177. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  3178. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  3179. .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  3180. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  3181. .ilen = 16,
  3182. .result = zeroed_string,
  3183. .rlen = 16,
  3184. }, {
  3185. .key = zeroed_string,
  3186. .klen = 16,
  3187. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  3188. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  3189. .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  3190. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  3191. .ilen = 16,
  3192. .result = zeroed_string,
  3193. .rlen = 16,
  3194. }, {
  3195. .key = zeroed_string,
  3196. .klen = 16,
  3197. .iv = zeroed_string,
  3198. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  3199. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  3200. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  3201. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  3202. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  3203. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  3204. .ilen = 48,
  3205. .result = zeroed_string,
  3206. .rlen = 48,
  3207. }, { /* Generated with Crypto++ */
  3208. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3209. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3210. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3211. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3212. .klen = 32,
  3213. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3214. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3215. .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
  3216. "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
  3217. "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
  3218. "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
  3219. "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
  3220. "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
  3221. "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
  3222. "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
  3223. "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
  3224. "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
  3225. "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
  3226. "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
  3227. "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
  3228. "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
  3229. "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
  3230. "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
  3231. "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
  3232. "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
  3233. "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
  3234. "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
  3235. "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
  3236. "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
  3237. "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
  3238. "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
  3239. "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
  3240. "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
  3241. "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
  3242. "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
  3243. "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
  3244. "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
  3245. "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
  3246. "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
  3247. "\x75\x42\x62\x04\x31\x1F\x95\x7C"
  3248. "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
  3249. "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
  3250. "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
  3251. "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
  3252. "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
  3253. "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
  3254. "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
  3255. "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
  3256. "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
  3257. "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
  3258. "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
  3259. "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
  3260. "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
  3261. "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
  3262. "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
  3263. "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
  3264. "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
  3265. "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
  3266. "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
  3267. "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
  3268. "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
  3269. "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
  3270. "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
  3271. "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
  3272. "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
  3273. "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
  3274. "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
  3275. "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
  3276. "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
  3277. .ilen = 496,
  3278. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3279. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3280. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3281. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3282. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3283. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3284. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3285. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3286. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3287. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3288. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3289. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3290. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3291. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3292. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3293. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3294. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3295. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3296. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3297. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3298. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3299. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3300. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3301. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3302. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3303. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3304. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3305. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3306. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3307. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3308. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3309. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3310. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3311. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3312. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3313. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3314. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3315. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3316. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3317. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3318. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3319. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3320. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3321. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3322. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3323. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3324. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3325. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3326. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3327. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3328. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3329. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3330. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3331. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3332. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3333. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3334. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3335. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3336. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3337. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3338. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3339. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  3340. .rlen = 496,
  3341. .also_non_np = 1,
  3342. .np = 2,
  3343. .tap = { 496 - 16, 16 },
  3344. },
  3345. };
  3346. static struct cipher_testvec tf_ctr_enc_tv_template[] = {
  3347. { /* Generated with Crypto++ */
  3348. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3349. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3350. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3351. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3352. .klen = 32,
  3353. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3354. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3355. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3356. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3357. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3358. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3359. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3360. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3361. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3362. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3363. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3364. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3365. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3366. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3367. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3368. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3369. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3370. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3371. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3372. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3373. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3374. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3375. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3376. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3377. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3378. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3379. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3380. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3381. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3382. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3383. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3384. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3385. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3386. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3387. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3388. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3389. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3390. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3391. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3392. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3393. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3394. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3395. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3396. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3397. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3398. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3399. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3400. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3401. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3402. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3403. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3404. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3405. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3406. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3407. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3408. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3409. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3410. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3411. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3412. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3413. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3414. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3415. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3416. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  3417. .ilen = 496,
  3418. .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  3419. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  3420. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  3421. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  3422. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  3423. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  3424. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  3425. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  3426. "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
  3427. "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
  3428. "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
  3429. "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
  3430. "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
  3431. "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
  3432. "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
  3433. "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
  3434. "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
  3435. "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
  3436. "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
  3437. "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
  3438. "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
  3439. "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
  3440. "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
  3441. "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
  3442. "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
  3443. "\x23\x61\x48\xEA\x80\x04\x27\xAA"
  3444. "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
  3445. "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
  3446. "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
  3447. "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
  3448. "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
  3449. "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
  3450. "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
  3451. "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
  3452. "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
  3453. "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
  3454. "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
  3455. "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
  3456. "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
  3457. "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
  3458. "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
  3459. "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
  3460. "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
  3461. "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
  3462. "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
  3463. "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
  3464. "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
  3465. "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
  3466. "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
  3467. "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
  3468. "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
  3469. "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
  3470. "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
  3471. "\x11\xE9\x43\x83\x76\xAA\x53\x37"
  3472. "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
  3473. "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
  3474. "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
  3475. "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
  3476. "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
  3477. "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
  3478. "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
  3479. "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
  3480. .rlen = 496,
  3481. }, { /* Generated with Crypto++ */
  3482. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3483. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3484. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3485. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3486. .klen = 32,
  3487. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3488. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3489. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3490. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3491. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3492. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3493. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3494. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3495. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3496. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3497. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3498. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3499. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3500. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3501. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3502. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3503. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3504. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3505. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3506. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3507. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3508. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3509. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3510. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3511. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3512. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3513. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3514. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3515. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3516. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3517. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3518. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3519. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3520. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3521. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3522. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3523. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3524. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3525. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3526. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3527. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3528. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3529. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3530. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3531. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3532. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3533. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3534. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3535. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3536. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3537. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3538. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3539. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3540. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3541. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3542. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3543. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3544. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3545. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3546. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3547. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3548. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3549. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3550. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
  3551. "\x2B\xC2\x59",
  3552. .ilen = 499,
  3553. .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  3554. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  3555. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  3556. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  3557. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  3558. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  3559. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  3560. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  3561. "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
  3562. "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
  3563. "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
  3564. "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
  3565. "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
  3566. "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
  3567. "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
  3568. "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
  3569. "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
  3570. "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
  3571. "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
  3572. "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
  3573. "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
  3574. "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
  3575. "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
  3576. "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
  3577. "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
  3578. "\x23\x61\x48\xEA\x80\x04\x27\xAA"
  3579. "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
  3580. "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
  3581. "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
  3582. "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
  3583. "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
  3584. "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
  3585. "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
  3586. "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
  3587. "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
  3588. "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
  3589. "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
  3590. "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
  3591. "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
  3592. "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
  3593. "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
  3594. "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
  3595. "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
  3596. "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
  3597. "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
  3598. "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
  3599. "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
  3600. "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
  3601. "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
  3602. "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
  3603. "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
  3604. "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
  3605. "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
  3606. "\x11\xE9\x43\x83\x76\xAA\x53\x37"
  3607. "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
  3608. "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
  3609. "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
  3610. "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
  3611. "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
  3612. "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
  3613. "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
  3614. "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
  3615. "\x6C\x82\x9D",
  3616. .rlen = 499,
  3617. .also_non_np = 1,
  3618. .np = 2,
  3619. .tap = { 499 - 16, 16 },
  3620. },
  3621. };
  3622. static struct cipher_testvec tf_ctr_dec_tv_template[] = {
  3623. { /* Generated with Crypto++ */
  3624. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3625. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3626. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3627. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3628. .klen = 32,
  3629. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3630. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3631. .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  3632. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  3633. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  3634. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  3635. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  3636. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  3637. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  3638. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  3639. "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
  3640. "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
  3641. "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
  3642. "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
  3643. "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
  3644. "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
  3645. "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
  3646. "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
  3647. "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
  3648. "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
  3649. "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
  3650. "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
  3651. "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
  3652. "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
  3653. "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
  3654. "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
  3655. "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
  3656. "\x23\x61\x48\xEA\x80\x04\x27\xAA"
  3657. "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
  3658. "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
  3659. "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
  3660. "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
  3661. "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
  3662. "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
  3663. "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
  3664. "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
  3665. "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
  3666. "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
  3667. "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
  3668. "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
  3669. "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
  3670. "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
  3671. "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
  3672. "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
  3673. "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
  3674. "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
  3675. "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
  3676. "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
  3677. "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
  3678. "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
  3679. "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
  3680. "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
  3681. "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
  3682. "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
  3683. "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
  3684. "\x11\xE9\x43\x83\x76\xAA\x53\x37"
  3685. "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
  3686. "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
  3687. "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
  3688. "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
  3689. "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
  3690. "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
  3691. "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
  3692. "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
  3693. .ilen = 496,
  3694. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3695. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3696. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3697. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3698. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3699. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3700. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3701. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3702. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3703. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3704. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3705. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3706. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3707. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3708. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3709. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3710. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3711. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3712. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3713. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3714. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3715. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3716. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3717. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3718. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3719. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3720. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3721. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3722. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3723. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3724. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3725. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3726. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3727. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3728. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3729. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3730. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3731. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3732. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3733. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3734. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3735. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3736. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3737. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3738. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3739. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3740. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3741. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3742. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3743. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3744. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3745. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3746. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3747. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3748. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3749. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3750. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3751. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3752. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3753. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3754. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3755. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  3756. .rlen = 496,
  3757. }, { /* Generated with Crypto++ */
  3758. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  3759. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  3760. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  3761. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  3762. .klen = 32,
  3763. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  3764. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  3765. .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
  3766. "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
  3767. "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
  3768. "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
  3769. "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
  3770. "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
  3771. "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
  3772. "\x01\x41\x21\x12\x38\xAB\x52\x4F"
  3773. "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
  3774. "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
  3775. "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
  3776. "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
  3777. "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
  3778. "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
  3779. "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
  3780. "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
  3781. "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
  3782. "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
  3783. "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
  3784. "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
  3785. "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
  3786. "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
  3787. "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
  3788. "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
  3789. "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
  3790. "\x23\x61\x48\xEA\x80\x04\x27\xAA"
  3791. "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
  3792. "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
  3793. "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
  3794. "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
  3795. "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
  3796. "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
  3797. "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
  3798. "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
  3799. "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
  3800. "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
  3801. "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
  3802. "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
  3803. "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
  3804. "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
  3805. "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
  3806. "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
  3807. "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
  3808. "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
  3809. "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
  3810. "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
  3811. "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
  3812. "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
  3813. "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
  3814. "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
  3815. "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
  3816. "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
  3817. "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
  3818. "\x11\xE9\x43\x83\x76\xAA\x53\x37"
  3819. "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
  3820. "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
  3821. "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
  3822. "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
  3823. "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
  3824. "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
  3825. "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
  3826. "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
  3827. "\x6C\x82\x9D",
  3828. .ilen = 499,
  3829. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  3830. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  3831. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  3832. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  3833. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  3834. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  3835. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  3836. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  3837. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  3838. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  3839. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  3840. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  3841. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  3842. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  3843. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  3844. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  3845. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  3846. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  3847. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  3848. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  3849. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  3850. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  3851. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  3852. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  3853. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  3854. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  3855. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  3856. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  3857. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  3858. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  3859. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  3860. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  3861. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  3862. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  3863. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  3864. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  3865. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  3866. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  3867. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  3868. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  3869. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  3870. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  3871. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  3872. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  3873. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  3874. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  3875. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  3876. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  3877. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  3878. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  3879. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  3880. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  3881. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  3882. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  3883. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  3884. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  3885. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  3886. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  3887. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  3888. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  3889. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  3890. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
  3891. "\x2B\xC2\x59",
  3892. .rlen = 499,
  3893. .also_non_np = 1,
  3894. .np = 2,
  3895. .tap = { 499 - 16, 16 },
  3896. },
  3897. };
  3898. static struct cipher_testvec tf_lrw_enc_tv_template[] = {
  3899. /* Generated from AES-LRW test vectors */
  3900. {
  3901. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3902. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3903. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3904. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3905. .klen = 32,
  3906. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3907. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3908. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3909. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3910. .ilen = 16,
  3911. .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
  3912. "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
  3913. .rlen = 16,
  3914. }, {
  3915. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3916. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3917. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3918. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3919. .klen = 32,
  3920. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3921. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3922. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3923. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3924. .ilen = 16,
  3925. .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
  3926. "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
  3927. .rlen = 16,
  3928. }, {
  3929. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3930. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3931. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3932. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3933. .klen = 32,
  3934. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3935. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3936. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3937. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3938. .ilen = 16,
  3939. .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
  3940. "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
  3941. .rlen = 16,
  3942. }, {
  3943. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3944. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3945. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3946. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3947. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3948. .klen = 40,
  3949. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3950. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3951. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3952. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3953. .ilen = 16,
  3954. .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
  3955. "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
  3956. .rlen = 16,
  3957. }, {
  3958. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3959. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3960. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3961. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3962. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3963. .klen = 40,
  3964. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3965. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3966. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3967. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3968. .ilen = 16,
  3969. .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
  3970. "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
  3971. .rlen = 16,
  3972. }, {
  3973. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3974. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3975. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3976. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3977. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3978. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3979. .klen = 48,
  3980. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3981. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3982. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3983. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3984. .ilen = 16,
  3985. .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
  3986. "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
  3987. .rlen = 16,
  3988. }, {
  3989. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3990. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3991. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3992. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3993. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3994. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3995. .klen = 48,
  3996. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3997. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3998. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3999. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4000. .ilen = 16,
  4001. .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
  4002. "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
  4003. .rlen = 16,
  4004. }, {
  4005. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  4006. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  4007. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  4008. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  4009. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  4010. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  4011. .klen = 48,
  4012. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4013. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4014. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  4015. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  4016. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  4017. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  4018. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  4019. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  4020. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  4021. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  4022. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  4023. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  4024. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  4025. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  4026. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  4027. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  4028. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  4029. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  4030. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  4031. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  4032. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  4033. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  4034. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  4035. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  4036. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  4037. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  4038. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  4039. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  4040. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  4041. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  4042. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  4043. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  4044. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  4045. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  4046. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  4047. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  4048. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  4049. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  4050. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  4051. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  4052. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  4053. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  4054. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  4055. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  4056. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  4057. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  4058. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  4059. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  4060. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  4061. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  4062. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  4063. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  4064. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  4065. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  4066. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  4067. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  4068. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  4069. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  4070. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  4071. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  4072. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  4073. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  4074. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  4075. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  4076. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  4077. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  4078. .ilen = 512,
  4079. .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
  4080. "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
  4081. "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
  4082. "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
  4083. "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
  4084. "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
  4085. "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
  4086. "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
  4087. "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
  4088. "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
  4089. "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
  4090. "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
  4091. "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
  4092. "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
  4093. "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
  4094. "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
  4095. "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
  4096. "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
  4097. "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
  4098. "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
  4099. "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
  4100. "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
  4101. "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
  4102. "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
  4103. "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
  4104. "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
  4105. "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
  4106. "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
  4107. "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
  4108. "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
  4109. "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
  4110. "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
  4111. "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
  4112. "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
  4113. "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
  4114. "\x3e\xae\x71\x90\x07\x70\x1c\x38"
  4115. "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
  4116. "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
  4117. "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
  4118. "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
  4119. "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
  4120. "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
  4121. "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
  4122. "\x93\x51\x1d\x3d\x62\x59\x83\x82"
  4123. "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
  4124. "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
  4125. "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
  4126. "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
  4127. "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
  4128. "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
  4129. "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
  4130. "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
  4131. "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
  4132. "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
  4133. "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
  4134. "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
  4135. "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
  4136. "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
  4137. "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
  4138. "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
  4139. "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
  4140. "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
  4141. "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
  4142. "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
  4143. .rlen = 512,
  4144. .also_non_np = 1,
  4145. .np = 2,
  4146. .tap = { 512 - 16, 16 },
  4147. },
  4148. };
  4149. static struct cipher_testvec tf_lrw_dec_tv_template[] = {
  4150. /* Generated from AES-LRW test vectors */
  4151. /* same as enc vectors with input and result reversed */
  4152. {
  4153. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  4154. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  4155. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  4156. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  4157. .klen = 32,
  4158. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4159. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4160. .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
  4161. "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
  4162. .ilen = 16,
  4163. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4164. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4165. .rlen = 16,
  4166. }, {
  4167. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  4168. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  4169. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  4170. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  4171. .klen = 32,
  4172. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4173. "\x00\x00\x00\x00\x00\x00\x00\x02",
  4174. .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
  4175. "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
  4176. .ilen = 16,
  4177. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4178. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4179. .rlen = 16,
  4180. }, {
  4181. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  4182. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  4183. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  4184. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  4185. .klen = 32,
  4186. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4187. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4188. .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
  4189. "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
  4190. .ilen = 16,
  4191. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4192. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4193. .rlen = 16,
  4194. }, {
  4195. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  4196. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  4197. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  4198. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  4199. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  4200. .klen = 40,
  4201. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4202. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4203. .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
  4204. "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
  4205. .ilen = 16,
  4206. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4207. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4208. .rlen = 16,
  4209. }, {
  4210. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  4211. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  4212. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  4213. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  4214. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  4215. .klen = 40,
  4216. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4217. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4218. .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
  4219. "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
  4220. .ilen = 16,
  4221. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4222. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4223. .rlen = 16,
  4224. }, {
  4225. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  4226. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  4227. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  4228. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  4229. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  4230. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  4231. .klen = 48,
  4232. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4233. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4234. .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
  4235. "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
  4236. .ilen = 16,
  4237. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4238. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4239. .rlen = 16,
  4240. }, {
  4241. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  4242. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  4243. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  4244. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  4245. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  4246. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  4247. .klen = 48,
  4248. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4249. "\x00\x00\x00\x02\x00\x00\x00\x00",
  4250. .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
  4251. "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
  4252. .ilen = 16,
  4253. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  4254. "\x38\x39\x41\x42\x43\x44\x45\x46",
  4255. .rlen = 16,
  4256. }, {
  4257. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  4258. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  4259. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  4260. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  4261. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  4262. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  4263. .klen = 48,
  4264. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4265. "\x00\x00\x00\x00\x00\x00\x00\x01",
  4266. .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
  4267. "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
  4268. "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
  4269. "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
  4270. "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
  4271. "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
  4272. "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
  4273. "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
  4274. "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
  4275. "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
  4276. "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
  4277. "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
  4278. "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
  4279. "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
  4280. "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
  4281. "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
  4282. "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
  4283. "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
  4284. "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
  4285. "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
  4286. "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
  4287. "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
  4288. "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
  4289. "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
  4290. "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
  4291. "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
  4292. "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
  4293. "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
  4294. "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
  4295. "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
  4296. "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
  4297. "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
  4298. "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
  4299. "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
  4300. "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
  4301. "\x3e\xae\x71\x90\x07\x70\x1c\x38"
  4302. "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
  4303. "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
  4304. "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
  4305. "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
  4306. "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
  4307. "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
  4308. "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
  4309. "\x93\x51\x1d\x3d\x62\x59\x83\x82"
  4310. "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
  4311. "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
  4312. "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
  4313. "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
  4314. "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
  4315. "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
  4316. "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
  4317. "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
  4318. "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
  4319. "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
  4320. "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
  4321. "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
  4322. "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
  4323. "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
  4324. "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
  4325. "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
  4326. "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
  4327. "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
  4328. "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
  4329. "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
  4330. .ilen = 512,
  4331. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  4332. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  4333. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  4334. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  4335. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  4336. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  4337. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  4338. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  4339. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  4340. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  4341. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  4342. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  4343. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  4344. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  4345. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  4346. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  4347. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  4348. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  4349. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  4350. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  4351. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  4352. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  4353. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  4354. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  4355. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  4356. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  4357. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  4358. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  4359. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  4360. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  4361. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  4362. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  4363. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  4364. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  4365. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  4366. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  4367. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  4368. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  4369. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  4370. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  4371. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  4372. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  4373. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  4374. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  4375. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  4376. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  4377. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  4378. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  4379. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  4380. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  4381. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  4382. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  4383. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  4384. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  4385. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  4386. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  4387. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  4388. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  4389. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  4390. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  4391. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  4392. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  4393. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  4394. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  4395. .rlen = 512,
  4396. .also_non_np = 1,
  4397. .np = 2,
  4398. .tap = { 512 - 16, 16 },
  4399. },
  4400. };
  4401. static struct cipher_testvec tf_xts_enc_tv_template[] = {
  4402. /* Generated from AES-XTS test vectors */
  4403. {
  4404. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4405. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4406. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4407. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4408. .klen = 32,
  4409. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4410. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4411. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4412. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4413. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4414. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4415. .ilen = 32,
  4416. .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
  4417. "\x30\x74\xe4\x44\x52\x77\x97\x43"
  4418. "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
  4419. "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
  4420. .rlen = 32,
  4421. }, {
  4422. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  4423. "\x11\x11\x11\x11\x11\x11\x11\x11"
  4424. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4425. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4426. .klen = 32,
  4427. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4428. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4429. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4430. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4431. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4432. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4433. .ilen = 32,
  4434. .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
  4435. "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
  4436. "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
  4437. "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
  4438. .rlen = 32,
  4439. }, {
  4440. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  4441. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  4442. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4443. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4444. .klen = 32,
  4445. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4446. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4447. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4448. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4449. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4450. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4451. .ilen = 32,
  4452. .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
  4453. "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
  4454. "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
  4455. "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
  4456. .rlen = 32,
  4457. }, {
  4458. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4459. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4460. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4461. "\x23\x84\x62\x64\x33\x83\x27\x95",
  4462. .klen = 32,
  4463. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4464. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4465. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4466. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4467. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4468. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4469. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4470. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4471. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4472. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4473. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4474. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4475. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4476. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4477. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4478. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4479. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4480. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4481. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4482. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4483. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4484. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4485. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4486. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4487. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4488. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4489. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4490. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4491. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4492. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4493. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4494. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4495. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4496. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4497. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4498. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4499. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4500. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4501. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4502. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4503. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4504. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4505. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4506. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4507. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4508. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4509. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4510. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4511. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4512. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4513. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4514. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4515. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4516. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4517. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4518. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4519. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4520. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4521. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4522. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4523. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4524. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4525. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4526. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4527. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4528. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4529. .ilen = 512,
  4530. .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
  4531. "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
  4532. "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
  4533. "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
  4534. "\xea\x35\x35\x8c\xb2\x46\x61\x06"
  4535. "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
  4536. "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
  4537. "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
  4538. "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
  4539. "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
  4540. "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
  4541. "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
  4542. "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
  4543. "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
  4544. "\x01\x73\x68\x32\x25\x19\xfa\xfb"
  4545. "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
  4546. "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
  4547. "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
  4548. "\x39\x80\x39\x09\x97\x65\xf2\x83"
  4549. "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
  4550. "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
  4551. "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
  4552. "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
  4553. "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
  4554. "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
  4555. "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
  4556. "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
  4557. "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
  4558. "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
  4559. "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
  4560. "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
  4561. "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
  4562. "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
  4563. "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
  4564. "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
  4565. "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
  4566. "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
  4567. "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
  4568. "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
  4569. "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
  4570. "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
  4571. "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
  4572. "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
  4573. "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
  4574. "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
  4575. "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
  4576. "\x04\x39\x73\x32\xb2\x86\x79\xe7"
  4577. "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
  4578. "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
  4579. "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
  4580. "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
  4581. "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
  4582. "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
  4583. "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
  4584. "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
  4585. "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
  4586. "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
  4587. "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
  4588. "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
  4589. "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
  4590. "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
  4591. "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
  4592. "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
  4593. "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
  4594. .rlen = 512,
  4595. }, {
  4596. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4597. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4598. "\x62\x49\x77\x57\x24\x70\x93\x69"
  4599. "\x99\x59\x57\x49\x66\x96\x76\x27"
  4600. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4601. "\x23\x84\x62\x64\x33\x83\x27\x95"
  4602. "\x02\x88\x41\x97\x16\x93\x99\x37"
  4603. "\x51\x05\x82\x09\x74\x94\x45\x92",
  4604. .klen = 64,
  4605. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  4606. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4607. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4608. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4609. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4610. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4611. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4612. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4613. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4614. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4615. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4616. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4617. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4618. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4619. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4620. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4621. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4622. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4623. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4624. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4625. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4626. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4627. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4628. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4629. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4630. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4631. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4632. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4633. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4634. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4635. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4636. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4637. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4638. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4639. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4640. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4641. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4642. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4643. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4644. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4645. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4646. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4647. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4648. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4649. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4650. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4651. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4652. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4653. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4654. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4655. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4656. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4657. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4658. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4659. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4660. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4661. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4662. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4663. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4664. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4665. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4666. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4667. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4668. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4669. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4670. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4671. .ilen = 512,
  4672. .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
  4673. "\x35\x39\x71\x88\x76\x1e\xc9\xea"
  4674. "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
  4675. "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
  4676. "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
  4677. "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
  4678. "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
  4679. "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
  4680. "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
  4681. "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
  4682. "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
  4683. "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
  4684. "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
  4685. "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
  4686. "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
  4687. "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
  4688. "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
  4689. "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
  4690. "\x69\x35\x61\x86\xf8\x86\xb9\x89"
  4691. "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
  4692. "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
  4693. "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
  4694. "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
  4695. "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
  4696. "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
  4697. "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
  4698. "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
  4699. "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
  4700. "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
  4701. "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
  4702. "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
  4703. "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
  4704. "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
  4705. "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
  4706. "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
  4707. "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
  4708. "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
  4709. "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
  4710. "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
  4711. "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
  4712. "\xad\x12\x32\x31\x03\xf7\x21\xbe"
  4713. "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
  4714. "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
  4715. "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
  4716. "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
  4717. "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
  4718. "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
  4719. "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
  4720. "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
  4721. "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
  4722. "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
  4723. "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
  4724. "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
  4725. "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
  4726. "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
  4727. "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
  4728. "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
  4729. "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
  4730. "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
  4731. "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
  4732. "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
  4733. "\xf3\xea\x67\x52\x78\xc2\xce\x70"
  4734. "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
  4735. "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
  4736. .rlen = 512,
  4737. .also_non_np = 1,
  4738. .np = 2,
  4739. .tap = { 512 - 16, 16 },
  4740. },
  4741. };
  4742. static struct cipher_testvec tf_xts_dec_tv_template[] = {
  4743. /* Generated from AES-XTS test vectors */
  4744. /* same as enc vectors with input and result reversed */
  4745. {
  4746. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4747. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4748. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4749. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4750. .klen = 32,
  4751. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4752. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4753. .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
  4754. "\x30\x74\xe4\x44\x52\x77\x97\x43"
  4755. "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
  4756. "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
  4757. .ilen = 32,
  4758. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4759. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4760. "\x00\x00\x00\x00\x00\x00\x00\x00"
  4761. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4762. .rlen = 32,
  4763. }, {
  4764. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  4765. "\x11\x11\x11\x11\x11\x11\x11\x11"
  4766. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4767. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4768. .klen = 32,
  4769. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4770. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4771. .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
  4772. "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
  4773. "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
  4774. "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
  4775. .ilen = 32,
  4776. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4777. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4778. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4779. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4780. .rlen = 32,
  4781. }, {
  4782. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  4783. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  4784. "\x22\x22\x22\x22\x22\x22\x22\x22"
  4785. "\x22\x22\x22\x22\x22\x22\x22\x22",
  4786. .klen = 32,
  4787. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  4788. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4789. .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
  4790. "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
  4791. "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
  4792. "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
  4793. .ilen = 32,
  4794. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  4795. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4796. "\x44\x44\x44\x44\x44\x44\x44\x44"
  4797. "\x44\x44\x44\x44\x44\x44\x44\x44",
  4798. .rlen = 32,
  4799. }, {
  4800. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4801. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4802. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4803. "\x23\x84\x62\x64\x33\x83\x27\x95",
  4804. .klen = 32,
  4805. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  4806. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4807. .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
  4808. "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
  4809. "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
  4810. "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
  4811. "\xea\x35\x35\x8c\xb2\x46\x61\x06"
  4812. "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
  4813. "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
  4814. "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
  4815. "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
  4816. "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
  4817. "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
  4818. "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
  4819. "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
  4820. "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
  4821. "\x01\x73\x68\x32\x25\x19\xfa\xfb"
  4822. "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
  4823. "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
  4824. "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
  4825. "\x39\x80\x39\x09\x97\x65\xf2\x83"
  4826. "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
  4827. "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
  4828. "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
  4829. "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
  4830. "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
  4831. "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
  4832. "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
  4833. "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
  4834. "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
  4835. "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
  4836. "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
  4837. "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
  4838. "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
  4839. "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
  4840. "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
  4841. "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
  4842. "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
  4843. "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
  4844. "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
  4845. "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
  4846. "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
  4847. "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
  4848. "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
  4849. "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
  4850. "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
  4851. "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
  4852. "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
  4853. "\x04\x39\x73\x32\xb2\x86\x79\xe7"
  4854. "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
  4855. "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
  4856. "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
  4857. "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
  4858. "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
  4859. "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
  4860. "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
  4861. "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
  4862. "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
  4863. "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
  4864. "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
  4865. "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
  4866. "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
  4867. "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
  4868. "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
  4869. "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
  4870. "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
  4871. .ilen = 512,
  4872. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4873. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4874. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4875. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4876. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4877. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4878. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4879. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4880. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4881. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4882. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4883. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4884. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4885. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4886. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4887. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4888. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4889. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4890. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4891. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4892. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4893. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4894. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4895. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4896. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4897. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4898. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4899. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4900. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4901. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4902. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4903. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4904. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4905. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4906. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4907. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4908. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4909. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4910. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4911. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4912. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4913. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4914. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4915. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4916. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4917. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4918. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4919. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4920. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4921. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4922. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4923. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4924. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4925. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4926. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4927. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4928. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4929. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4930. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4931. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4932. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4933. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4934. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4935. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4936. .rlen = 512,
  4937. }, {
  4938. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  4939. "\x23\x53\x60\x28\x74\x71\x35\x26"
  4940. "\x62\x49\x77\x57\x24\x70\x93\x69"
  4941. "\x99\x59\x57\x49\x66\x96\x76\x27"
  4942. "\x31\x41\x59\x26\x53\x58\x97\x93"
  4943. "\x23\x84\x62\x64\x33\x83\x27\x95"
  4944. "\x02\x88\x41\x97\x16\x93\x99\x37"
  4945. "\x51\x05\x82\x09\x74\x94\x45\x92",
  4946. .klen = 64,
  4947. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  4948. "\x00\x00\x00\x00\x00\x00\x00\x00",
  4949. .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
  4950. "\x35\x39\x71\x88\x76\x1e\xc9\xea"
  4951. "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
  4952. "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
  4953. "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
  4954. "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
  4955. "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
  4956. "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
  4957. "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
  4958. "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
  4959. "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
  4960. "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
  4961. "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
  4962. "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
  4963. "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
  4964. "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
  4965. "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
  4966. "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
  4967. "\x69\x35\x61\x86\xf8\x86\xb9\x89"
  4968. "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
  4969. "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
  4970. "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
  4971. "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
  4972. "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
  4973. "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
  4974. "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
  4975. "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
  4976. "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
  4977. "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
  4978. "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
  4979. "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
  4980. "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
  4981. "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
  4982. "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
  4983. "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
  4984. "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
  4985. "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
  4986. "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
  4987. "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
  4988. "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
  4989. "\xad\x12\x32\x31\x03\xf7\x21\xbe"
  4990. "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
  4991. "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
  4992. "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
  4993. "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
  4994. "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
  4995. "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
  4996. "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
  4997. "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
  4998. "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
  4999. "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
  5000. "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
  5001. "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
  5002. "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
  5003. "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
  5004. "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
  5005. "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
  5006. "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
  5007. "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
  5008. "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
  5009. "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
  5010. "\xf3\xea\x67\x52\x78\xc2\xce\x70"
  5011. "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
  5012. "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
  5013. .ilen = 512,
  5014. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5015. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5016. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5017. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5018. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5019. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5020. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5021. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5022. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5023. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5024. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5025. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5026. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5027. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5028. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5029. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5030. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5031. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5032. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5033. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5034. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5035. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5036. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5037. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5038. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5039. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5040. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5041. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5042. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5043. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5044. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5045. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  5046. "\x00\x01\x02\x03\x04\x05\x06\x07"
  5047. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5048. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5049. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5050. "\x20\x21\x22\x23\x24\x25\x26\x27"
  5051. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  5052. "\x30\x31\x32\x33\x34\x35\x36\x37"
  5053. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  5054. "\x40\x41\x42\x43\x44\x45\x46\x47"
  5055. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  5056. "\x50\x51\x52\x53\x54\x55\x56\x57"
  5057. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  5058. "\x60\x61\x62\x63\x64\x65\x66\x67"
  5059. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  5060. "\x70\x71\x72\x73\x74\x75\x76\x77"
  5061. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  5062. "\x80\x81\x82\x83\x84\x85\x86\x87"
  5063. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  5064. "\x90\x91\x92\x93\x94\x95\x96\x97"
  5065. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  5066. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  5067. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  5068. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  5069. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  5070. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5071. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  5072. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  5073. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  5074. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  5075. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  5076. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  5077. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  5078. .rlen = 512,
  5079. .also_non_np = 1,
  5080. .np = 2,
  5081. .tap = { 512 - 16, 16 },
  5082. },
  5083. };
  5084. /*
  5085. * Serpent test vectors. These are backwards because Serpent writes
  5086. * octet sequences in right-to-left mode.
  5087. */
  5088. #define SERPENT_ENC_TEST_VECTORS 5
  5089. #define SERPENT_DEC_TEST_VECTORS 5
  5090. #define TNEPRES_ENC_TEST_VECTORS 4
  5091. #define TNEPRES_DEC_TEST_VECTORS 4
  5092. #define SERPENT_CBC_ENC_TEST_VECTORS 1
  5093. #define SERPENT_CBC_DEC_TEST_VECTORS 1
  5094. #define SERPENT_CTR_ENC_TEST_VECTORS 2
  5095. #define SERPENT_CTR_DEC_TEST_VECTORS 2
  5096. #define SERPENT_LRW_ENC_TEST_VECTORS 8
  5097. #define SERPENT_LRW_DEC_TEST_VECTORS 8
  5098. #define SERPENT_XTS_ENC_TEST_VECTORS 5
  5099. #define SERPENT_XTS_DEC_TEST_VECTORS 5
  5100. static struct cipher_testvec serpent_enc_tv_template[] = {
  5101. {
  5102. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5103. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5104. .ilen = 16,
  5105. .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  5106. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  5107. .rlen = 16,
  5108. }, {
  5109. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5110. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5111. .klen = 16,
  5112. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5113. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5114. .ilen = 16,
  5115. .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  5116. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  5117. .rlen = 16,
  5118. }, {
  5119. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5120. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5121. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5122. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5123. .klen = 32,
  5124. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5125. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5126. .ilen = 16,
  5127. .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  5128. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  5129. .rlen = 16,
  5130. }, {
  5131. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  5132. .klen = 16,
  5133. .input = zeroed_string,
  5134. .ilen = 16,
  5135. .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  5136. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  5137. .rlen = 16,
  5138. }, { /* Generated with Crypto++ */
  5139. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5140. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5141. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5142. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5143. .klen = 32,
  5144. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5145. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5146. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5147. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5148. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5149. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5150. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5151. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5152. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5153. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5154. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5155. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5156. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5157. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5158. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5159. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5160. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5161. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5162. .ilen = 144,
  5163. .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
  5164. "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
  5165. "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
  5166. "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
  5167. "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
  5168. "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
  5169. "\x99\x34\x89\x5B\x54\xE9\x12\x13"
  5170. "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
  5171. "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
  5172. "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
  5173. "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
  5174. "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
  5175. "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
  5176. "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
  5177. "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
  5178. "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
  5179. "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
  5180. "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
  5181. .rlen = 144,
  5182. .also_non_np = 1,
  5183. .np = 2,
  5184. .tap = { 144 - 16, 16 },
  5185. },
  5186. };
  5187. static struct cipher_testvec tnepres_enc_tv_template[] = {
  5188. { /* KeySize=128, PT=0, I=1 */
  5189. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5190. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5191. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  5192. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5193. .klen = 16,
  5194. .ilen = 16,
  5195. .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
  5196. "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
  5197. .rlen = 16,
  5198. }, { /* KeySize=192, PT=0, I=1 */
  5199. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  5200. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5201. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5202. .klen = 24,
  5203. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5204. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5205. .ilen = 16,
  5206. .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
  5207. "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
  5208. .rlen = 16,
  5209. }, { /* KeySize=256, PT=0, I=1 */
  5210. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  5211. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5212. "\x00\x00\x00\x00\x00\x00\x00\x00"
  5213. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5214. .klen = 32,
  5215. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5216. "\x00\x00\x00\x00\x00\x00\x00\x00",
  5217. .ilen = 16,
  5218. .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
  5219. "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
  5220. .rlen = 16,
  5221. }, { /* KeySize=256, I=257 */
  5222. .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
  5223. "\x17\x16\x15\x14\x13\x12\x11\x10"
  5224. "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  5225. "\x07\x06\x05\x04\x03\x02\x01\x00",
  5226. .klen = 32,
  5227. .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  5228. "\x07\x06\x05\x04\x03\x02\x01\x00",
  5229. .ilen = 16,
  5230. .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
  5231. "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
  5232. .rlen = 16,
  5233. },
  5234. };
  5235. static struct cipher_testvec serpent_dec_tv_template[] = {
  5236. {
  5237. .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  5238. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  5239. .ilen = 16,
  5240. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5241. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5242. .rlen = 16,
  5243. }, {
  5244. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5245. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5246. .klen = 16,
  5247. .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  5248. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  5249. .ilen = 16,
  5250. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5251. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5252. .rlen = 16,
  5253. }, {
  5254. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5255. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5256. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5257. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5258. .klen = 32,
  5259. .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  5260. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  5261. .ilen = 16,
  5262. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5263. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5264. .rlen = 16,
  5265. }, {
  5266. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  5267. .klen = 16,
  5268. .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  5269. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  5270. .ilen = 16,
  5271. .result = zeroed_string,
  5272. .rlen = 16,
  5273. }, { /* Generated with Crypto++ */
  5274. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5275. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5276. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5277. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5278. .klen = 32,
  5279. .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
  5280. "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
  5281. "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
  5282. "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
  5283. "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
  5284. "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
  5285. "\x99\x34\x89\x5B\x54\xE9\x12\x13"
  5286. "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
  5287. "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
  5288. "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
  5289. "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
  5290. "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
  5291. "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
  5292. "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
  5293. "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
  5294. "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
  5295. "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
  5296. "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
  5297. .ilen = 144,
  5298. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5299. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5300. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5301. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5302. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5303. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5304. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5305. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5306. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5307. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5308. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5309. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5310. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5311. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5312. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5313. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5314. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5315. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5316. .rlen = 144,
  5317. .also_non_np = 1,
  5318. .np = 2,
  5319. .tap = { 144 - 16, 16 },
  5320. },
  5321. };
  5322. static struct cipher_testvec tnepres_dec_tv_template[] = {
  5323. {
  5324. .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
  5325. "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
  5326. .ilen = 16,
  5327. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5328. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5329. .rlen = 16,
  5330. }, {
  5331. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5332. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5333. .klen = 16,
  5334. .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
  5335. "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
  5336. .ilen = 16,
  5337. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5338. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5339. .rlen = 16,
  5340. }, {
  5341. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5342. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5343. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5344. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5345. .klen = 32,
  5346. .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
  5347. "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
  5348. .ilen = 16,
  5349. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5350. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  5351. .rlen = 16,
  5352. }, { /* KeySize=128, I=121 */
  5353. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  5354. .klen = 16,
  5355. .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
  5356. "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
  5357. .ilen = 16,
  5358. .result = zeroed_string,
  5359. .rlen = 16,
  5360. },
  5361. };
  5362. static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
  5363. { /* Generated with Crypto++ */
  5364. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5365. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5366. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5367. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5368. .klen = 32,
  5369. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5370. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5371. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5372. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5373. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5374. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5375. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5376. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5377. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5378. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5379. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5380. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5381. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5382. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5383. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5384. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5385. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5386. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5387. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5388. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5389. .ilen = 144,
  5390. .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
  5391. "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
  5392. "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
  5393. "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
  5394. "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
  5395. "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
  5396. "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
  5397. "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
  5398. "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
  5399. "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
  5400. "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
  5401. "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
  5402. "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
  5403. "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
  5404. "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
  5405. "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
  5406. "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
  5407. "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
  5408. .rlen = 144,
  5409. .also_non_np = 1,
  5410. .np = 2,
  5411. .tap = { 144 - 16, 16 },
  5412. },
  5413. };
  5414. static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
  5415. { /* Generated with Crypto++ */
  5416. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5417. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5418. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5419. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5420. .klen = 32,
  5421. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5422. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5423. .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
  5424. "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
  5425. "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
  5426. "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
  5427. "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
  5428. "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
  5429. "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
  5430. "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
  5431. "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
  5432. "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
  5433. "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
  5434. "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
  5435. "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
  5436. "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
  5437. "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
  5438. "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
  5439. "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
  5440. "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
  5441. .ilen = 144,
  5442. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5443. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5444. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5445. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5446. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5447. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5448. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5449. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5450. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5451. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5452. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5453. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5454. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5455. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5456. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5457. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5458. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5459. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5460. .rlen = 144,
  5461. .also_non_np = 1,
  5462. .np = 2,
  5463. .tap = { 144 - 16, 16 },
  5464. },
  5465. };
  5466. static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
  5467. { /* Generated with Crypto++ */
  5468. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5469. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5470. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5471. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5472. .klen = 32,
  5473. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5474. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5475. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5476. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5477. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5478. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5479. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5480. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5481. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5482. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5483. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5484. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5485. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5486. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5487. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5488. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5489. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5490. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5491. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5492. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5493. .ilen = 144,
  5494. .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  5495. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  5496. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  5497. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  5498. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  5499. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  5500. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  5501. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  5502. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  5503. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  5504. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  5505. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  5506. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  5507. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  5508. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  5509. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  5510. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  5511. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
  5512. .rlen = 144,
  5513. }, { /* Generated with Crypto++ */
  5514. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5515. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5516. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5517. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5518. .klen = 32,
  5519. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5520. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5521. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5522. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5523. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5524. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5525. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5526. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5527. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5528. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5529. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5530. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5531. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5532. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5533. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5534. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5535. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5536. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5537. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5538. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  5539. "\xF1\x65\xFC",
  5540. .ilen = 147,
  5541. .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  5542. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  5543. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  5544. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  5545. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  5546. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  5547. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  5548. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  5549. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  5550. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  5551. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  5552. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  5553. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  5554. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  5555. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  5556. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  5557. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  5558. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
  5559. "\xE6\xD0\x97",
  5560. .rlen = 147,
  5561. .also_non_np = 1,
  5562. .np = 2,
  5563. .tap = { 147 - 16, 16 },
  5564. },
  5565. };
  5566. static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
  5567. { /* Generated with Crypto++ */
  5568. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5569. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5570. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5571. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5572. .klen = 32,
  5573. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5574. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5575. .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  5576. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  5577. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  5578. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  5579. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  5580. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  5581. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  5582. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  5583. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  5584. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  5585. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  5586. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  5587. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  5588. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  5589. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  5590. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  5591. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  5592. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
  5593. .ilen = 144,
  5594. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5595. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5596. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5597. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5598. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5599. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5600. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5601. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5602. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5603. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5604. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5605. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5606. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5607. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5608. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5609. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5610. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5611. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
  5612. .rlen = 144,
  5613. }, { /* Generated with Crypto++ */
  5614. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  5615. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  5616. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  5617. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  5618. .klen = 32,
  5619. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  5620. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  5621. .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
  5622. "\x37\x69\xE3\x3A\x22\x85\x48\x46"
  5623. "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
  5624. "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
  5625. "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
  5626. "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
  5627. "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
  5628. "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
  5629. "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
  5630. "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
  5631. "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
  5632. "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
  5633. "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
  5634. "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
  5635. "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
  5636. "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
  5637. "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
  5638. "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
  5639. "\xE6\xD0\x97",
  5640. .ilen = 147,
  5641. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  5642. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  5643. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  5644. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  5645. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  5646. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  5647. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  5648. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  5649. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  5650. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  5651. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  5652. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  5653. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  5654. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  5655. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  5656. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  5657. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  5658. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  5659. "\xF1\x65\xFC",
  5660. .rlen = 147,
  5661. .also_non_np = 1,
  5662. .np = 2,
  5663. .tap = { 147 - 16, 16 },
  5664. },
  5665. };
  5666. static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
  5667. /* Generated from AES-LRW test vectors */
  5668. {
  5669. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  5670. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  5671. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  5672. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  5673. .klen = 32,
  5674. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5675. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5676. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5677. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5678. .ilen = 16,
  5679. .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
  5680. "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
  5681. .rlen = 16,
  5682. }, {
  5683. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  5684. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  5685. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  5686. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  5687. .klen = 32,
  5688. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5689. "\x00\x00\x00\x00\x00\x00\x00\x02",
  5690. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5691. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5692. .ilen = 16,
  5693. .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
  5694. "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
  5695. .rlen = 16,
  5696. }, {
  5697. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  5698. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  5699. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  5700. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  5701. .klen = 32,
  5702. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5703. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5704. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5705. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5706. .ilen = 16,
  5707. .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
  5708. "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
  5709. .rlen = 16,
  5710. }, {
  5711. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  5712. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  5713. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  5714. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  5715. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  5716. .klen = 40,
  5717. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5718. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5719. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5720. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5721. .ilen = 16,
  5722. .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
  5723. "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
  5724. .rlen = 16,
  5725. }, {
  5726. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  5727. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  5728. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  5729. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  5730. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  5731. .klen = 40,
  5732. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5733. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5734. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5735. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5736. .ilen = 16,
  5737. .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
  5738. "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
  5739. .rlen = 16,
  5740. }, {
  5741. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  5742. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  5743. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  5744. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  5745. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  5746. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  5747. .klen = 48,
  5748. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5749. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5750. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5751. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5752. .ilen = 16,
  5753. .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
  5754. "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
  5755. .rlen = 16,
  5756. }, {
  5757. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  5758. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  5759. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  5760. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  5761. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  5762. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  5763. .klen = 48,
  5764. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5765. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5766. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5767. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5768. .ilen = 16,
  5769. .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
  5770. "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
  5771. .rlen = 16,
  5772. }, {
  5773. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  5774. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  5775. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  5776. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  5777. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  5778. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  5779. .klen = 48,
  5780. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5781. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5782. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  5783. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  5784. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  5785. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  5786. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  5787. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  5788. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  5789. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  5790. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  5791. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  5792. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  5793. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  5794. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  5795. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  5796. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  5797. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  5798. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  5799. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  5800. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  5801. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  5802. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  5803. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  5804. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  5805. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  5806. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  5807. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  5808. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  5809. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  5810. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  5811. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  5812. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  5813. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  5814. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  5815. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  5816. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  5817. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  5818. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  5819. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  5820. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  5821. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  5822. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  5823. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  5824. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  5825. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  5826. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  5827. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  5828. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  5829. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  5830. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  5831. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  5832. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  5833. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  5834. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  5835. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  5836. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  5837. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  5838. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  5839. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  5840. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  5841. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  5842. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  5843. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  5844. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  5845. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  5846. .ilen = 512,
  5847. .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
  5848. "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
  5849. "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
  5850. "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
  5851. "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
  5852. "\xce\xab\xda\x33\x30\x20\x12\xfa"
  5853. "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
  5854. "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
  5855. "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
  5856. "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
  5857. "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
  5858. "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
  5859. "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
  5860. "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
  5861. "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
  5862. "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
  5863. "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
  5864. "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
  5865. "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
  5866. "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
  5867. "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
  5868. "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
  5869. "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
  5870. "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
  5871. "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
  5872. "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
  5873. "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
  5874. "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
  5875. "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
  5876. "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
  5877. "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
  5878. "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
  5879. "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
  5880. "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
  5881. "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
  5882. "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
  5883. "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
  5884. "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
  5885. "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
  5886. "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
  5887. "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
  5888. "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
  5889. "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
  5890. "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
  5891. "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
  5892. "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
  5893. "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
  5894. "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
  5895. "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
  5896. "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
  5897. "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
  5898. "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
  5899. "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
  5900. "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
  5901. "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
  5902. "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
  5903. "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
  5904. "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
  5905. "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
  5906. "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
  5907. "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
  5908. "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
  5909. "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
  5910. "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
  5911. .rlen = 512,
  5912. .also_non_np = 1,
  5913. .np = 2,
  5914. .tap = { 512 - 16, 16 },
  5915. },
  5916. };
  5917. static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
  5918. /* Generated from AES-LRW test vectors */
  5919. /* same as enc vectors with input and result reversed */
  5920. {
  5921. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  5922. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  5923. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  5924. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  5925. .klen = 32,
  5926. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5927. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5928. .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
  5929. "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
  5930. .ilen = 16,
  5931. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5932. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5933. .rlen = 16,
  5934. }, {
  5935. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  5936. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  5937. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  5938. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  5939. .klen = 32,
  5940. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5941. "\x00\x00\x00\x00\x00\x00\x00\x02",
  5942. .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
  5943. "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
  5944. .ilen = 16,
  5945. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5946. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5947. .rlen = 16,
  5948. }, {
  5949. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  5950. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  5951. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  5952. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  5953. .klen = 32,
  5954. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5955. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5956. .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
  5957. "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
  5958. .ilen = 16,
  5959. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5960. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5961. .rlen = 16,
  5962. }, {
  5963. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  5964. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  5965. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  5966. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  5967. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  5968. .klen = 40,
  5969. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5970. "\x00\x00\x00\x00\x00\x00\x00\x01",
  5971. .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
  5972. "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
  5973. .ilen = 16,
  5974. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5975. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5976. .rlen = 16,
  5977. }, {
  5978. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  5979. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  5980. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  5981. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  5982. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  5983. .klen = 40,
  5984. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  5985. "\x00\x00\x00\x02\x00\x00\x00\x00",
  5986. .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
  5987. "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
  5988. .ilen = 16,
  5989. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  5990. "\x38\x39\x41\x42\x43\x44\x45\x46",
  5991. .rlen = 16,
  5992. }, {
  5993. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  5994. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  5995. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  5996. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  5997. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  5998. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  5999. .klen = 48,
  6000. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6001. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6002. .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
  6003. "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
  6004. .ilen = 16,
  6005. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6006. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6007. .rlen = 16,
  6008. }, {
  6009. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  6010. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  6011. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  6012. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  6013. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  6014. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  6015. .klen = 48,
  6016. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6017. "\x00\x00\x00\x02\x00\x00\x00\x00",
  6018. .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
  6019. "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
  6020. .ilen = 16,
  6021. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  6022. "\x38\x39\x41\x42\x43\x44\x45\x46",
  6023. .rlen = 16,
  6024. }, {
  6025. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  6026. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  6027. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  6028. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  6029. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  6030. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  6031. .klen = 48,
  6032. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6033. "\x00\x00\x00\x00\x00\x00\x00\x01",
  6034. .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
  6035. "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
  6036. "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
  6037. "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
  6038. "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
  6039. "\xce\xab\xda\x33\x30\x20\x12\xfa"
  6040. "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
  6041. "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
  6042. "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
  6043. "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
  6044. "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
  6045. "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
  6046. "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
  6047. "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
  6048. "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
  6049. "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
  6050. "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
  6051. "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
  6052. "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
  6053. "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
  6054. "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
  6055. "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
  6056. "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
  6057. "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
  6058. "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
  6059. "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
  6060. "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
  6061. "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
  6062. "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
  6063. "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
  6064. "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
  6065. "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
  6066. "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
  6067. "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
  6068. "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
  6069. "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
  6070. "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
  6071. "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
  6072. "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
  6073. "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
  6074. "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
  6075. "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
  6076. "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
  6077. "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
  6078. "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
  6079. "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
  6080. "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
  6081. "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
  6082. "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
  6083. "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
  6084. "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
  6085. "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
  6086. "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
  6087. "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
  6088. "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
  6089. "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
  6090. "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
  6091. "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
  6092. "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
  6093. "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
  6094. "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
  6095. "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
  6096. "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
  6097. "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
  6098. .ilen = 512,
  6099. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  6100. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  6101. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  6102. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  6103. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  6104. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  6105. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  6106. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  6107. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  6108. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  6109. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  6110. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  6111. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  6112. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  6113. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  6114. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  6115. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  6116. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  6117. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  6118. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  6119. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  6120. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  6121. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  6122. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  6123. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  6124. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  6125. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  6126. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  6127. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  6128. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  6129. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  6130. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  6131. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  6132. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  6133. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  6134. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  6135. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  6136. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  6137. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  6138. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  6139. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  6140. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  6141. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  6142. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  6143. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  6144. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  6145. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  6146. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  6147. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  6148. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  6149. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  6150. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  6151. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  6152. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  6153. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  6154. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  6155. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  6156. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  6157. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  6158. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  6159. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  6160. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  6161. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  6162. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  6163. .rlen = 512,
  6164. .also_non_np = 1,
  6165. .np = 2,
  6166. .tap = { 512 - 16, 16 },
  6167. },
  6168. };
  6169. static struct cipher_testvec serpent_xts_enc_tv_template[] = {
  6170. /* Generated from AES-XTS test vectors */
  6171. {
  6172. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6173. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6174. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6175. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6176. .klen = 32,
  6177. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6178. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6179. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6180. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6181. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6182. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6183. .ilen = 32,
  6184. .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
  6185. "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
  6186. "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
  6187. "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
  6188. .rlen = 32,
  6189. }, {
  6190. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  6191. "\x11\x11\x11\x11\x11\x11\x11\x11"
  6192. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6193. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6194. .klen = 32,
  6195. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6196. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6197. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6198. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6199. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6200. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6201. .ilen = 32,
  6202. .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
  6203. "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
  6204. "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
  6205. "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
  6206. .rlen = 32,
  6207. }, {
  6208. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  6209. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  6210. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6211. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6212. .klen = 32,
  6213. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6214. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6215. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6216. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6217. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6218. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6219. .ilen = 32,
  6220. .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
  6221. "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
  6222. "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
  6223. "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
  6224. .rlen = 32,
  6225. }, {
  6226. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6227. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6228. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6229. "\x23\x84\x62\x64\x33\x83\x27\x95",
  6230. .klen = 32,
  6231. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6232. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6233. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6234. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6235. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6236. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6237. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6238. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6239. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6240. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6241. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6242. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6243. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6244. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6245. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6246. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6247. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6248. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6249. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6250. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6251. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6252. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6253. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6254. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6255. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6256. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6257. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6258. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6259. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6260. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6261. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6262. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6263. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6264. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6265. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6266. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6267. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6268. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6269. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6270. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6271. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6272. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6273. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6274. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6275. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6276. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6277. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6278. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6279. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6280. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6281. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6282. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6283. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6284. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6285. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6286. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6287. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6288. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6289. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6290. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6291. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6292. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6293. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6294. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6295. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6296. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  6297. .ilen = 512,
  6298. .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
  6299. "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
  6300. "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
  6301. "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
  6302. "\x00\x5c\x75\x14\x06\xd6\x25\x82"
  6303. "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
  6304. "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
  6305. "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
  6306. "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
  6307. "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
  6308. "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
  6309. "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
  6310. "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
  6311. "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
  6312. "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
  6313. "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
  6314. "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
  6315. "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
  6316. "\x58\xfa\x43\x91\x16\x85\x40\xbb"
  6317. "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
  6318. "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
  6319. "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
  6320. "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
  6321. "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
  6322. "\x6e\x29\x60\xbd\x10\x14\x84\x82"
  6323. "\x83\x82\x0c\x63\x73\x92\x02\x7c"
  6324. "\x55\x37\x20\x80\x17\x51\xc8\xbc"
  6325. "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
  6326. "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
  6327. "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
  6328. "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
  6329. "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
  6330. "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
  6331. "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
  6332. "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
  6333. "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
  6334. "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
  6335. "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
  6336. "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
  6337. "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
  6338. "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
  6339. "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
  6340. "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
  6341. "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
  6342. "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
  6343. "\x43\x42\x35\xd0\xcf\xec\x77\x67"
  6344. "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
  6345. "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
  6346. "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
  6347. "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
  6348. "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
  6349. "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
  6350. "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
  6351. "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
  6352. "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
  6353. "\x03\x57\xe6\x98\x52\x2f\x61\x62"
  6354. "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
  6355. "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
  6356. "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
  6357. "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
  6358. "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
  6359. "\xef\x91\x64\x1d\x18\x07\x4e\x31"
  6360. "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
  6361. "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
  6362. .rlen = 512,
  6363. }, {
  6364. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6365. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6366. "\x62\x49\x77\x57\x24\x70\x93\x69"
  6367. "\x99\x59\x57\x49\x66\x96\x76\x27"
  6368. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6369. "\x23\x84\x62\x64\x33\x83\x27\x95"
  6370. "\x02\x88\x41\x97\x16\x93\x99\x37"
  6371. "\x51\x05\x82\x09\x74\x94\x45\x92",
  6372. .klen = 64,
  6373. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  6374. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6375. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6376. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6377. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6378. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6379. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6380. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6381. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6382. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6383. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6384. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6385. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6386. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6387. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6388. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6389. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6390. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6391. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6392. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6393. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6394. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6395. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6396. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6397. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6398. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6399. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6400. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6401. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6402. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6403. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6404. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6405. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6406. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6407. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6408. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6409. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6410. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6411. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6412. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6413. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6414. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6415. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6416. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6417. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6418. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6419. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6420. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6421. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6422. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6423. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6424. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6425. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6426. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6427. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6428. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6429. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6430. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6431. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6432. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6433. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6434. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6435. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6436. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6437. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6438. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  6439. .ilen = 512,
  6440. .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
  6441. "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
  6442. "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
  6443. "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
  6444. "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
  6445. "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
  6446. "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
  6447. "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
  6448. "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
  6449. "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
  6450. "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
  6451. "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
  6452. "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
  6453. "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
  6454. "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
  6455. "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
  6456. "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
  6457. "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
  6458. "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
  6459. "\xec\x9a\xda\x64\x96\xb5\x61\xff"
  6460. "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
  6461. "\x81\x85\x14\xa8\x59\xac\x8c\x94"
  6462. "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
  6463. "\x82\xc6\x4d\xca\x86\xea\x53\x28"
  6464. "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
  6465. "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
  6466. "\x05\xca\x81\x7b\xda\xa2\xde\x63"
  6467. "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
  6468. "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
  6469. "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
  6470. "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
  6471. "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
  6472. "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
  6473. "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
  6474. "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
  6475. "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
  6476. "\xfd\x43\x7d\xda\x42\x51\x87\x43"
  6477. "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
  6478. "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
  6479. "\x27\x5f\x11\xac\x71\xc7\x48\x46"
  6480. "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
  6481. "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
  6482. "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
  6483. "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
  6484. "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
  6485. "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
  6486. "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
  6487. "\x50\x88\x97\x40\x69\xb1\x37\xf5"
  6488. "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
  6489. "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
  6490. "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
  6491. "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
  6492. "\xc1\x16\x73\x50\x77\xba\xa6\x65"
  6493. "\x20\x2d\xb0\x02\x27\x89\xda\x99"
  6494. "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
  6495. "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
  6496. "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
  6497. "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
  6498. "\xa3\x0e\x33\x74\x40\x18\x39\x72"
  6499. "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
  6500. "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
  6501. "\x30\x05\xc8\x92\x98\x80\xff\x7a"
  6502. "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
  6503. "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
  6504. .rlen = 512,
  6505. .also_non_np = 1,
  6506. .np = 2,
  6507. .tap = { 512 - 16, 16 },
  6508. },
  6509. };
  6510. static struct cipher_testvec serpent_xts_dec_tv_template[] = {
  6511. /* Generated from AES-XTS test vectors */
  6512. /* same as enc vectors with input and result reversed */
  6513. {
  6514. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6515. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6516. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6517. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6518. .klen = 32,
  6519. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6520. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6521. .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
  6522. "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
  6523. "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
  6524. "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
  6525. .ilen = 32,
  6526. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6527. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6528. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6529. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6530. .rlen = 32,
  6531. }, {
  6532. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  6533. "\x11\x11\x11\x11\x11\x11\x11\x11"
  6534. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6535. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6536. .klen = 32,
  6537. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6538. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6539. .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
  6540. "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
  6541. "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
  6542. "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
  6543. .ilen = 32,
  6544. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6545. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6546. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6547. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6548. .rlen = 32,
  6549. }, {
  6550. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  6551. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  6552. "\x22\x22\x22\x22\x22\x22\x22\x22"
  6553. "\x22\x22\x22\x22\x22\x22\x22\x22",
  6554. .klen = 32,
  6555. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  6556. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6557. .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
  6558. "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
  6559. "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
  6560. "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
  6561. .ilen = 32,
  6562. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  6563. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6564. "\x44\x44\x44\x44\x44\x44\x44\x44"
  6565. "\x44\x44\x44\x44\x44\x44\x44\x44",
  6566. .rlen = 32,
  6567. }, {
  6568. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6569. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6570. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6571. "\x23\x84\x62\x64\x33\x83\x27\x95",
  6572. .klen = 32,
  6573. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6574. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6575. .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
  6576. "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
  6577. "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
  6578. "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
  6579. "\x00\x5c\x75\x14\x06\xd6\x25\x82"
  6580. "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
  6581. "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
  6582. "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
  6583. "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
  6584. "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
  6585. "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
  6586. "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
  6587. "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
  6588. "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
  6589. "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
  6590. "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
  6591. "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
  6592. "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
  6593. "\x58\xfa\x43\x91\x16\x85\x40\xbb"
  6594. "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
  6595. "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
  6596. "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
  6597. "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
  6598. "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
  6599. "\x6e\x29\x60\xbd\x10\x14\x84\x82"
  6600. "\x83\x82\x0c\x63\x73\x92\x02\x7c"
  6601. "\x55\x37\x20\x80\x17\x51\xc8\xbc"
  6602. "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
  6603. "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
  6604. "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
  6605. "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
  6606. "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
  6607. "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
  6608. "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
  6609. "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
  6610. "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
  6611. "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
  6612. "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
  6613. "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
  6614. "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
  6615. "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
  6616. "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
  6617. "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
  6618. "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
  6619. "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
  6620. "\x43\x42\x35\xd0\xcf\xec\x77\x67"
  6621. "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
  6622. "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
  6623. "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
  6624. "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
  6625. "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
  6626. "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
  6627. "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
  6628. "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
  6629. "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
  6630. "\x03\x57\xe6\x98\x52\x2f\x61\x62"
  6631. "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
  6632. "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
  6633. "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
  6634. "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
  6635. "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
  6636. "\xef\x91\x64\x1d\x18\x07\x4e\x31"
  6637. "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
  6638. "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
  6639. .ilen = 512,
  6640. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6641. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6642. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6643. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6644. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6645. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6646. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6647. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6648. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6649. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6650. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6651. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6652. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6653. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6654. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6655. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6656. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6657. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6658. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6659. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6660. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6661. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6662. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6663. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6664. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6665. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6666. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6667. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6668. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6669. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6670. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6671. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6672. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6673. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6674. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6675. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6676. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6677. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6678. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6679. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6680. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6681. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6682. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6683. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6684. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6685. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6686. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6687. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6688. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6689. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6690. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6691. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6692. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6693. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6694. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6695. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6696. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6697. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6698. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6699. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6700. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6701. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6702. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6703. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  6704. .rlen = 512,
  6705. }, {
  6706. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  6707. "\x23\x53\x60\x28\x74\x71\x35\x26"
  6708. "\x62\x49\x77\x57\x24\x70\x93\x69"
  6709. "\x99\x59\x57\x49\x66\x96\x76\x27"
  6710. "\x31\x41\x59\x26\x53\x58\x97\x93"
  6711. "\x23\x84\x62\x64\x33\x83\x27\x95"
  6712. "\x02\x88\x41\x97\x16\x93\x99\x37"
  6713. "\x51\x05\x82\x09\x74\x94\x45\x92",
  6714. .klen = 64,
  6715. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  6716. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6717. .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
  6718. "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
  6719. "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
  6720. "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
  6721. "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
  6722. "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
  6723. "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
  6724. "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
  6725. "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
  6726. "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
  6727. "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
  6728. "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
  6729. "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
  6730. "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
  6731. "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
  6732. "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
  6733. "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
  6734. "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
  6735. "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
  6736. "\xec\x9a\xda\x64\x96\xb5\x61\xff"
  6737. "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
  6738. "\x81\x85\x14\xa8\x59\xac\x8c\x94"
  6739. "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
  6740. "\x82\xc6\x4d\xca\x86\xea\x53\x28"
  6741. "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
  6742. "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
  6743. "\x05\xca\x81\x7b\xda\xa2\xde\x63"
  6744. "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
  6745. "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
  6746. "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
  6747. "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
  6748. "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
  6749. "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
  6750. "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
  6751. "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
  6752. "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
  6753. "\xfd\x43\x7d\xda\x42\x51\x87\x43"
  6754. "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
  6755. "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
  6756. "\x27\x5f\x11\xac\x71\xc7\x48\x46"
  6757. "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
  6758. "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
  6759. "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
  6760. "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
  6761. "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
  6762. "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
  6763. "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
  6764. "\x50\x88\x97\x40\x69\xb1\x37\xf5"
  6765. "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
  6766. "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
  6767. "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
  6768. "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
  6769. "\xc1\x16\x73\x50\x77\xba\xa6\x65"
  6770. "\x20\x2d\xb0\x02\x27\x89\xda\x99"
  6771. "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
  6772. "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
  6773. "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
  6774. "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
  6775. "\xa3\x0e\x33\x74\x40\x18\x39\x72"
  6776. "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
  6777. "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
  6778. "\x30\x05\xc8\x92\x98\x80\xff\x7a"
  6779. "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
  6780. "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
  6781. .ilen = 512,
  6782. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  6783. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6784. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6785. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6786. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6787. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6788. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6789. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6790. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6791. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6792. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6793. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6794. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6795. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6796. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6797. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6798. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6799. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6800. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6801. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6802. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6803. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6804. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6805. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6806. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6807. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6808. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6809. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6810. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6811. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6812. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6813. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  6814. "\x00\x01\x02\x03\x04\x05\x06\x07"
  6815. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  6816. "\x10\x11\x12\x13\x14\x15\x16\x17"
  6817. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  6818. "\x20\x21\x22\x23\x24\x25\x26\x27"
  6819. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  6820. "\x30\x31\x32\x33\x34\x35\x36\x37"
  6821. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  6822. "\x40\x41\x42\x43\x44\x45\x46\x47"
  6823. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  6824. "\x50\x51\x52\x53\x54\x55\x56\x57"
  6825. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  6826. "\x60\x61\x62\x63\x64\x65\x66\x67"
  6827. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  6828. "\x70\x71\x72\x73\x74\x75\x76\x77"
  6829. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  6830. "\x80\x81\x82\x83\x84\x85\x86\x87"
  6831. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  6832. "\x90\x91\x92\x93\x94\x95\x96\x97"
  6833. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  6834. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  6835. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  6836. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  6837. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  6838. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  6839. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  6840. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  6841. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  6842. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  6843. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  6844. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  6845. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  6846. .rlen = 512,
  6847. .also_non_np = 1,
  6848. .np = 2,
  6849. .tap = { 512 - 16, 16 },
  6850. },
  6851. };
  6852. /* Cast6 test vectors from RFC 2612 */
  6853. #define CAST6_ENC_TEST_VECTORS 4
  6854. #define CAST6_DEC_TEST_VECTORS 4
  6855. #define CAST6_CBC_ENC_TEST_VECTORS 1
  6856. #define CAST6_CBC_DEC_TEST_VECTORS 1
  6857. #define CAST6_CTR_ENC_TEST_VECTORS 2
  6858. #define CAST6_CTR_DEC_TEST_VECTORS 2
  6859. #define CAST6_LRW_ENC_TEST_VECTORS 1
  6860. #define CAST6_LRW_DEC_TEST_VECTORS 1
  6861. #define CAST6_XTS_ENC_TEST_VECTORS 1
  6862. #define CAST6_XTS_DEC_TEST_VECTORS 1
  6863. static struct cipher_testvec cast6_enc_tv_template[] = {
  6864. {
  6865. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  6866. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  6867. .klen = 16,
  6868. .input = zeroed_string,
  6869. .ilen = 16,
  6870. .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  6871. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  6872. .rlen = 16,
  6873. }, {
  6874. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  6875. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  6876. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  6877. .klen = 24,
  6878. .input = zeroed_string,
  6879. .ilen = 16,
  6880. .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  6881. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  6882. .rlen = 16,
  6883. }, {
  6884. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  6885. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  6886. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  6887. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  6888. .klen = 32,
  6889. .input = zeroed_string,
  6890. .ilen = 16,
  6891. .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  6892. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  6893. .rlen = 16,
  6894. }, { /* Generated from TF test vectors */
  6895. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  6896. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  6897. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  6898. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  6899. .klen = 32,
  6900. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  6901. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  6902. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  6903. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  6904. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  6905. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  6906. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  6907. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  6908. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  6909. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  6910. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  6911. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  6912. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  6913. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  6914. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  6915. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  6916. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  6917. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  6918. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  6919. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  6920. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  6921. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  6922. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  6923. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  6924. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  6925. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  6926. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  6927. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  6928. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  6929. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  6930. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  6931. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  6932. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  6933. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  6934. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  6935. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  6936. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  6937. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  6938. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  6939. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  6940. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  6941. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  6942. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  6943. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  6944. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  6945. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  6946. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  6947. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  6948. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  6949. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  6950. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  6951. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  6952. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  6953. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  6954. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  6955. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  6956. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  6957. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  6958. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  6959. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  6960. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  6961. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  6962. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  6963. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  6964. .ilen = 496,
  6965. .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
  6966. "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
  6967. "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
  6968. "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
  6969. "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
  6970. "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
  6971. "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
  6972. "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
  6973. "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
  6974. "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
  6975. "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
  6976. "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
  6977. "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
  6978. "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
  6979. "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
  6980. "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
  6981. "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
  6982. "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
  6983. "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
  6984. "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
  6985. "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
  6986. "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
  6987. "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
  6988. "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
  6989. "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
  6990. "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
  6991. "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
  6992. "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
  6993. "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
  6994. "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
  6995. "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
  6996. "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
  6997. "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
  6998. "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
  6999. "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
  7000. "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
  7001. "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
  7002. "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
  7003. "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
  7004. "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
  7005. "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
  7006. "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
  7007. "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
  7008. "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
  7009. "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
  7010. "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
  7011. "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
  7012. "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
  7013. "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
  7014. "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
  7015. "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
  7016. "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
  7017. "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
  7018. "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
  7019. "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
  7020. "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
  7021. "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
  7022. "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
  7023. "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
  7024. "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
  7025. "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
  7026. "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
  7027. .rlen = 496,
  7028. .also_non_np = 1,
  7029. .np = 2,
  7030. .tap = { 496 - 16, 16 },
  7031. },
  7032. };
  7033. static struct cipher_testvec cast6_dec_tv_template[] = {
  7034. {
  7035. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  7036. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  7037. .klen = 16,
  7038. .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  7039. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  7040. .ilen = 16,
  7041. .result = zeroed_string,
  7042. .rlen = 16,
  7043. }, {
  7044. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  7045. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  7046. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  7047. .klen = 24,
  7048. .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  7049. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  7050. .ilen = 16,
  7051. .result = zeroed_string,
  7052. .rlen = 16,
  7053. }, {
  7054. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  7055. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  7056. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  7057. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  7058. .klen = 32,
  7059. .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  7060. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  7061. .ilen = 16,
  7062. .result = zeroed_string,
  7063. .rlen = 16,
  7064. }, { /* Generated from TF test vectors */
  7065. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  7066. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  7067. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  7068. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  7069. .klen = 32,
  7070. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  7071. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  7072. .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
  7073. "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
  7074. "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
  7075. "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
  7076. "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
  7077. "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
  7078. "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
  7079. "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
  7080. "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
  7081. "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
  7082. "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
  7083. "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
  7084. "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
  7085. "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
  7086. "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
  7087. "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
  7088. "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
  7089. "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
  7090. "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
  7091. "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
  7092. "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
  7093. "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
  7094. "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
  7095. "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
  7096. "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
  7097. "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
  7098. "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
  7099. "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
  7100. "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
  7101. "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
  7102. "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
  7103. "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
  7104. "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
  7105. "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
  7106. "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
  7107. "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
  7108. "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
  7109. "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
  7110. "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
  7111. "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
  7112. "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
  7113. "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
  7114. "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
  7115. "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
  7116. "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
  7117. "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
  7118. "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
  7119. "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
  7120. "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
  7121. "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
  7122. "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
  7123. "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
  7124. "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
  7125. "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
  7126. "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
  7127. "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
  7128. "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
  7129. "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
  7130. "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
  7131. "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
  7132. "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
  7133. "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
  7134. .ilen = 496,
  7135. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  7136. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  7137. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  7138. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  7139. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  7140. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  7141. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  7142. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  7143. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  7144. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  7145. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  7146. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  7147. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  7148. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  7149. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  7150. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  7151. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  7152. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  7153. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  7154. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  7155. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  7156. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  7157. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  7158. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  7159. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  7160. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  7161. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  7162. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  7163. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  7164. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  7165. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  7166. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  7167. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  7168. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  7169. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  7170. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  7171. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  7172. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  7173. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  7174. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  7175. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  7176. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  7177. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  7178. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  7179. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  7180. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  7181. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  7182. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  7183. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  7184. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  7185. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  7186. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  7187. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  7188. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  7189. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  7190. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  7191. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  7192. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  7193. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  7194. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  7195. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  7196. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  7197. .rlen = 496,
  7198. .also_non_np = 1,
  7199. .np = 2,
  7200. .tap = { 496 - 16, 16 },
  7201. },
  7202. };
  7203. static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
  7204. { /* Generated from TF test vectors */
  7205. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  7206. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  7207. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  7208. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  7209. .klen = 32,
  7210. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  7211. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  7212. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  7213. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  7214. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  7215. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  7216. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  7217. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  7218. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  7219. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  7220. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  7221. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  7222. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  7223. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  7224. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  7225. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  7226. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  7227. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  7228. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  7229. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  7230. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  7231. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  7232. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  7233. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  7234. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  7235. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  7236. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  7237. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  7238. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  7239. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  7240. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  7241. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  7242. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  7243. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  7244. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  7245. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  7246. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  7247. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  7248. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  7249. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  7250. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  7251. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  7252. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  7253. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  7254. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  7255. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  7256. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  7257. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  7258. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  7259. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  7260. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  7261. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  7262. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  7263. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  7264. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  7265. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  7266. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  7267. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  7268. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  7269. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  7270. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  7271. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  7272. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  7273. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  7274. .ilen = 496,
  7275. .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
  7276. "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
  7277. "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
  7278. "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
  7279. "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
  7280. "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
  7281. "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
  7282. "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
  7283. "\x57\x95\xE1\x21\x26\x10\x9A\x21"
  7284. "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
  7285. "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
  7286. "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
  7287. "\x23\x16\x47\x72\x81\x13\x3A\x72"
  7288. "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
  7289. "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
  7290. "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
  7291. "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
  7292. "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
  7293. "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
  7294. "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
  7295. "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
  7296. "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
  7297. "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
  7298. "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
  7299. "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
  7300. "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
  7301. "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
  7302. "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
  7303. "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
  7304. "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
  7305. "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
  7306. "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
  7307. "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
  7308. "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
  7309. "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
  7310. "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
  7311. "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
  7312. "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
  7313. "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
  7314. "\x73\x3F\x12\x91\x47\x54\xBA\x39"
  7315. "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
  7316. "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
  7317. "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
  7318. "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
  7319. "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
  7320. "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
  7321. "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
  7322. "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
  7323. "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
  7324. "\x80\x21\x83\x58\x3C\x76\xFD\x28"
  7325. "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
  7326. "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
  7327. "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
  7328. "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
  7329. "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
  7330. "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
  7331. "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
  7332. "\x56\x4D\x82\x62\x37\xA3\x48\x01"
  7333. "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
  7334. "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
  7335. "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
  7336. "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
  7337. .rlen = 496,
  7338. .also_non_np = 1,
  7339. .np = 2,
  7340. .tap = { 496 - 16, 16 },
  7341. },
  7342. };
  7343. static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
  7344. { /* Generated from TF test vectors */
  7345. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  7346. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  7347. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  7348. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  7349. .klen = 32,
  7350. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  7351. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  7352. .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
  7353. "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
  7354. "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
  7355. "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
  7356. "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
  7357. "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
  7358. "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
  7359. "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
  7360. "\x57\x95\xE1\x21\x26\x10\x9A\x21"
  7361. "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
  7362. "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
  7363. "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
  7364. "\x23\x16\x47\x72\x81\x13\x3A\x72"
  7365. "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
  7366. "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
  7367. "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
  7368. "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
  7369. "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
  7370. "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
  7371. "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
  7372. "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
  7373. "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
  7374. "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
  7375. "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
  7376. "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
  7377. "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
  7378. "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
  7379. "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
  7380. "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
  7381. "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
  7382. "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
  7383. "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
  7384. "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
  7385. "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
  7386. "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
  7387. "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
  7388. "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
  7389. "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
  7390. "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
  7391. "\x73\x3F\x12\x91\x47\x54\xBA\x39"
  7392. "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
  7393. "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
  7394. "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
  7395. "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
  7396. "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
  7397. "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
  7398. "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
  7399. "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
  7400. "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
  7401. "\x80\x21\x83\x58\x3C\x76\xFD\x28"
  7402. "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
  7403. "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
  7404. "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
  7405. "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
  7406. "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
  7407. "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
  7408. "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
  7409. "\x56\x4D\x82\x62\x37\xA3\x48\x01"
  7410. "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
  7411. "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
  7412. "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
  7413. "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
  7414. .ilen = 496,
  7415. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  7416. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  7417. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  7418. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  7419. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  7420. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  7421. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  7422. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  7423. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  7424. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  7425. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  7426. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  7427. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  7428. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  7429. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  7430. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  7431. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  7432. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  7433. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  7434. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  7435. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  7436. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  7437. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  7438. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  7439. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  7440. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  7441. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  7442. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  7443. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  7444. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  7445. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  7446. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  7447. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  7448. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  7449. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  7450. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  7451. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  7452. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  7453. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  7454. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  7455. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  7456. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  7457. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  7458. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  7459. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  7460. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  7461. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  7462. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  7463. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  7464. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  7465. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  7466. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  7467. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  7468. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  7469. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  7470. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  7471. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  7472. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  7473. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  7474. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  7475. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  7476. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  7477. .rlen = 496,
  7478. .also_non_np = 1,
  7479. .np = 2,
  7480. .tap = { 496 - 16, 16 },
  7481. },
  7482. };
  7483. static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
  7484. { /* Generated from TF test vectors */
  7485. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  7486. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  7487. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  7488. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  7489. .klen = 32,
  7490. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  7491. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  7492. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  7493. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  7494. "\x3A",
  7495. .ilen = 17,
  7496. .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
  7497. "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
  7498. "\x57",
  7499. .rlen = 17,
  7500. }, { /* Generated from TF test vectors */
  7501. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  7502. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  7503. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  7504. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  7505. .klen = 32,
  7506. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  7507. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  7508. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  7509. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  7510. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  7511. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  7512. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  7513. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  7514. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  7515. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  7516. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  7517. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  7518. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  7519. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  7520. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  7521. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  7522. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  7523. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  7524. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  7525. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  7526. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  7527. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  7528. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  7529. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  7530. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  7531. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  7532. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  7533. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  7534. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  7535. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  7536. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  7537. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  7538. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  7539. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  7540. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  7541. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  7542. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  7543. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  7544. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  7545. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  7546. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  7547. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  7548. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  7549. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  7550. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  7551. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  7552. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  7553. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  7554. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  7555. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  7556. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  7557. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  7558. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  7559. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  7560. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  7561. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  7562. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  7563. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  7564. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  7565. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  7566. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  7567. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  7568. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  7569. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  7570. .ilen = 496,
  7571. .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
  7572. "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
  7573. "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
  7574. "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
  7575. "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
  7576. "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
  7577. "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
  7578. "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
  7579. "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
  7580. "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
  7581. "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
  7582. "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
  7583. "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
  7584. "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
  7585. "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
  7586. "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
  7587. "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
  7588. "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
  7589. "\x49\x61\x22\x52\x64\x8C\x46\x41"
  7590. "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
  7591. "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
  7592. "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
  7593. "\x00\x14\x15\x59\xC1\x30\x64\xAF"
  7594. "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
  7595. "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
  7596. "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
  7597. "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
  7598. "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
  7599. "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
  7600. "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
  7601. "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
  7602. "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
  7603. "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
  7604. "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
  7605. "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
  7606. "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
  7607. "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
  7608. "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
  7609. "\x60\x40\x38\x90\x20\x46\xC7\xB3"
  7610. "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
  7611. "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
  7612. "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
  7613. "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
  7614. "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
  7615. "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
  7616. "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
  7617. "\x73\xFC\x91\xAB\x79\x41\x23\x14"
  7618. "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
  7619. "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
  7620. "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
  7621. "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
  7622. "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
  7623. "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
  7624. "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
  7625. "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
  7626. "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
  7627. "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
  7628. "\x19\x35\x88\x22\x45\x59\x0E\x8F"
  7629. "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
  7630. "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
  7631. "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
  7632. "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
  7633. .rlen = 496,
  7634. .also_non_np = 1,
  7635. .np = 2,
  7636. .tap = { 496 - 16, 16 },
  7637. },
  7638. };
  7639. static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
  7640. { /* Generated from TF test vectors */
  7641. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  7642. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  7643. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  7644. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  7645. .klen = 32,
  7646. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  7647. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  7648. .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
  7649. "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
  7650. "\x57",
  7651. .ilen = 17,
  7652. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  7653. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  7654. "\x3A",
  7655. .rlen = 17,
  7656. }, { /* Generated from TF test vectors */
  7657. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  7658. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  7659. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  7660. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  7661. .klen = 32,
  7662. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  7663. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  7664. .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
  7665. "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
  7666. "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
  7667. "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
  7668. "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
  7669. "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
  7670. "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
  7671. "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
  7672. "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
  7673. "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
  7674. "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
  7675. "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
  7676. "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
  7677. "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
  7678. "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
  7679. "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
  7680. "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
  7681. "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
  7682. "\x49\x61\x22\x52\x64\x8C\x46\x41"
  7683. "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
  7684. "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
  7685. "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
  7686. "\x00\x14\x15\x59\xC1\x30\x64\xAF"
  7687. "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
  7688. "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
  7689. "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
  7690. "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
  7691. "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
  7692. "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
  7693. "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
  7694. "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
  7695. "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
  7696. "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
  7697. "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
  7698. "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
  7699. "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
  7700. "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
  7701. "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
  7702. "\x60\x40\x38\x90\x20\x46\xC7\xB3"
  7703. "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
  7704. "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
  7705. "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
  7706. "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
  7707. "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
  7708. "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
  7709. "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
  7710. "\x73\xFC\x91\xAB\x79\x41\x23\x14"
  7711. "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
  7712. "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
  7713. "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
  7714. "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
  7715. "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
  7716. "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
  7717. "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
  7718. "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
  7719. "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
  7720. "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
  7721. "\x19\x35\x88\x22\x45\x59\x0E\x8F"
  7722. "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
  7723. "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
  7724. "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
  7725. "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
  7726. .ilen = 496,
  7727. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  7728. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  7729. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  7730. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  7731. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  7732. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  7733. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  7734. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  7735. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  7736. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  7737. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  7738. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  7739. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  7740. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  7741. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  7742. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  7743. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  7744. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  7745. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  7746. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  7747. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  7748. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  7749. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  7750. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  7751. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  7752. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  7753. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  7754. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  7755. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  7756. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  7757. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  7758. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  7759. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  7760. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  7761. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  7762. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  7763. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  7764. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  7765. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  7766. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  7767. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  7768. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  7769. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  7770. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  7771. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  7772. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  7773. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  7774. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  7775. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  7776. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  7777. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  7778. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  7779. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  7780. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  7781. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  7782. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  7783. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  7784. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  7785. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  7786. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  7787. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  7788. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  7789. .rlen = 496,
  7790. .also_non_np = 1,
  7791. .np = 2,
  7792. .tap = { 496 - 16, 16 },
  7793. },
  7794. };
  7795. static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
  7796. { /* Generated from TF test vectors */
  7797. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  7798. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  7799. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  7800. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  7801. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  7802. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  7803. .klen = 48,
  7804. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7805. "\x00\x00\x00\x00\x00\x00\x00\x01",
  7806. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  7807. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  7808. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  7809. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  7810. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  7811. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  7812. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  7813. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  7814. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  7815. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  7816. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  7817. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  7818. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  7819. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  7820. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  7821. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  7822. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  7823. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  7824. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  7825. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  7826. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  7827. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  7828. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  7829. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  7830. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  7831. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  7832. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  7833. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  7834. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  7835. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  7836. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  7837. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  7838. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  7839. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  7840. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  7841. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  7842. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  7843. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  7844. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  7845. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  7846. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  7847. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  7848. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  7849. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  7850. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  7851. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  7852. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  7853. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  7854. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  7855. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  7856. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  7857. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  7858. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  7859. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  7860. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  7861. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  7862. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  7863. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  7864. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  7865. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  7866. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  7867. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  7868. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  7869. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  7870. .ilen = 512,
  7871. .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
  7872. "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
  7873. "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
  7874. "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
  7875. "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
  7876. "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
  7877. "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
  7878. "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
  7879. "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
  7880. "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
  7881. "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
  7882. "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
  7883. "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
  7884. "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
  7885. "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
  7886. "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
  7887. "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
  7888. "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
  7889. "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
  7890. "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
  7891. "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
  7892. "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
  7893. "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
  7894. "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
  7895. "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
  7896. "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
  7897. "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
  7898. "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
  7899. "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
  7900. "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
  7901. "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
  7902. "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
  7903. "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
  7904. "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
  7905. "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
  7906. "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
  7907. "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
  7908. "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
  7909. "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
  7910. "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
  7911. "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
  7912. "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
  7913. "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
  7914. "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
  7915. "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
  7916. "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
  7917. "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
  7918. "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
  7919. "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
  7920. "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
  7921. "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
  7922. "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
  7923. "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
  7924. "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
  7925. "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
  7926. "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
  7927. "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
  7928. "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
  7929. "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
  7930. "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
  7931. "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
  7932. "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
  7933. "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
  7934. "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
  7935. .rlen = 512,
  7936. .also_non_np = 1,
  7937. .np = 2,
  7938. .tap = { 512 - 16, 16 },
  7939. },
  7940. };
  7941. static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
  7942. { /* Generated from TF test vectors */
  7943. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  7944. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  7945. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  7946. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  7947. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  7948. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  7949. .klen = 48,
  7950. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7951. "\x00\x00\x00\x00\x00\x00\x00\x01",
  7952. .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
  7953. "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
  7954. "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
  7955. "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
  7956. "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
  7957. "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
  7958. "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
  7959. "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
  7960. "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
  7961. "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
  7962. "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
  7963. "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
  7964. "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
  7965. "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
  7966. "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
  7967. "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
  7968. "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
  7969. "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
  7970. "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
  7971. "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
  7972. "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
  7973. "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
  7974. "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
  7975. "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
  7976. "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
  7977. "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
  7978. "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
  7979. "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
  7980. "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
  7981. "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
  7982. "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
  7983. "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
  7984. "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
  7985. "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
  7986. "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
  7987. "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
  7988. "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
  7989. "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
  7990. "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
  7991. "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
  7992. "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
  7993. "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
  7994. "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
  7995. "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
  7996. "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
  7997. "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
  7998. "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
  7999. "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
  8000. "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
  8001. "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
  8002. "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
  8003. "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
  8004. "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
  8005. "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
  8006. "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
  8007. "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
  8008. "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
  8009. "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
  8010. "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
  8011. "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
  8012. "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
  8013. "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
  8014. "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
  8015. "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
  8016. .ilen = 512,
  8017. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  8018. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  8019. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  8020. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  8021. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  8022. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  8023. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  8024. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  8025. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  8026. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  8027. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  8028. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  8029. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  8030. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  8031. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  8032. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  8033. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  8034. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  8035. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  8036. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  8037. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  8038. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  8039. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  8040. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  8041. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  8042. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  8043. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  8044. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  8045. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  8046. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  8047. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  8048. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  8049. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  8050. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  8051. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  8052. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  8053. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  8054. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  8055. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  8056. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  8057. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  8058. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  8059. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  8060. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  8061. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  8062. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  8063. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  8064. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  8065. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  8066. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  8067. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  8068. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  8069. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  8070. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  8071. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  8072. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  8073. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  8074. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  8075. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  8076. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  8077. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  8078. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  8079. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  8080. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  8081. .rlen = 512,
  8082. .also_non_np = 1,
  8083. .np = 2,
  8084. .tap = { 512 - 16, 16 },
  8085. },
  8086. };
  8087. static struct cipher_testvec cast6_xts_enc_tv_template[] = {
  8088. { /* Generated from TF test vectors */
  8089. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  8090. "\x23\x53\x60\x28\x74\x71\x35\x26"
  8091. "\x62\x49\x77\x57\x24\x70\x93\x69"
  8092. "\x99\x59\x57\x49\x66\x96\x76\x27"
  8093. "\x31\x41\x59\x26\x53\x58\x97\x93"
  8094. "\x23\x84\x62\x64\x33\x83\x27\x95"
  8095. "\x02\x88\x41\x97\x16\x93\x99\x37"
  8096. "\x51\x05\x82\x09\x74\x94\x45\x92",
  8097. .klen = 64,
  8098. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  8099. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8100. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8101. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8102. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8103. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8104. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8105. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8106. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8107. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8108. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8109. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8110. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8111. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8112. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8113. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8114. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8115. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8116. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8117. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8118. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8119. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8120. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8121. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8122. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8123. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8124. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8125. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8126. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8127. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8128. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8129. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8130. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8131. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  8132. "\x00\x01\x02\x03\x04\x05\x06\x07"
  8133. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8134. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8135. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8136. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8137. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8138. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8139. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8140. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8141. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8142. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8143. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8144. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8145. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8146. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8147. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8148. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8149. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8150. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8151. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8152. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8153. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8154. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8155. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8156. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8157. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8158. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8159. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8160. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8161. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8162. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8163. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  8164. .ilen = 512,
  8165. .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
  8166. "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
  8167. "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
  8168. "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
  8169. "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
  8170. "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
  8171. "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
  8172. "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
  8173. "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
  8174. "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
  8175. "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
  8176. "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
  8177. "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
  8178. "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
  8179. "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
  8180. "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
  8181. "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
  8182. "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
  8183. "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
  8184. "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
  8185. "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
  8186. "\x71\x38\x17\x91\x44\xE8\xFC\x65"
  8187. "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
  8188. "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
  8189. "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
  8190. "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
  8191. "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
  8192. "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
  8193. "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
  8194. "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
  8195. "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
  8196. "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
  8197. "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
  8198. "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
  8199. "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
  8200. "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
  8201. "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
  8202. "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
  8203. "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
  8204. "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
  8205. "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
  8206. "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
  8207. "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
  8208. "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
  8209. "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
  8210. "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
  8211. "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
  8212. "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
  8213. "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
  8214. "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
  8215. "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
  8216. "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
  8217. "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
  8218. "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
  8219. "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
  8220. "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
  8221. "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
  8222. "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
  8223. "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
  8224. "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
  8225. "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
  8226. "\x45\x72\x80\x17\x81\xBD\x9D\x62"
  8227. "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
  8228. "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
  8229. .rlen = 512,
  8230. .also_non_np = 1,
  8231. .np = 2,
  8232. .tap = { 512 - 16, 16 },
  8233. },
  8234. };
  8235. static struct cipher_testvec cast6_xts_dec_tv_template[] = {
  8236. { /* Generated from TF test vectors */
  8237. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  8238. "\x23\x53\x60\x28\x74\x71\x35\x26"
  8239. "\x62\x49\x77\x57\x24\x70\x93\x69"
  8240. "\x99\x59\x57\x49\x66\x96\x76\x27"
  8241. "\x31\x41\x59\x26\x53\x58\x97\x93"
  8242. "\x23\x84\x62\x64\x33\x83\x27\x95"
  8243. "\x02\x88\x41\x97\x16\x93\x99\x37"
  8244. "\x51\x05\x82\x09\x74\x94\x45\x92",
  8245. .klen = 64,
  8246. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  8247. "\x00\x00\x00\x00\x00\x00\x00\x00",
  8248. .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
  8249. "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
  8250. "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
  8251. "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
  8252. "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
  8253. "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
  8254. "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
  8255. "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
  8256. "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
  8257. "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
  8258. "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
  8259. "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
  8260. "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
  8261. "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
  8262. "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
  8263. "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
  8264. "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
  8265. "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
  8266. "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
  8267. "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
  8268. "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
  8269. "\x71\x38\x17\x91\x44\xE8\xFC\x65"
  8270. "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
  8271. "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
  8272. "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
  8273. "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
  8274. "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
  8275. "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
  8276. "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
  8277. "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
  8278. "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
  8279. "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
  8280. "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
  8281. "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
  8282. "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
  8283. "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
  8284. "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
  8285. "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
  8286. "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
  8287. "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
  8288. "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
  8289. "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
  8290. "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
  8291. "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
  8292. "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
  8293. "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
  8294. "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
  8295. "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
  8296. "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
  8297. "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
  8298. "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
  8299. "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
  8300. "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
  8301. "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
  8302. "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
  8303. "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
  8304. "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
  8305. "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
  8306. "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
  8307. "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
  8308. "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
  8309. "\x45\x72\x80\x17\x81\xBD\x9D\x62"
  8310. "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
  8311. "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
  8312. .ilen = 512,
  8313. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8314. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8315. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8316. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8317. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8318. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8319. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8320. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8321. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8322. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8323. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8324. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8325. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8326. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8327. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8328. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8329. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8330. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8331. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8332. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8333. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8334. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8335. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8336. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8337. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8338. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8339. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8340. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8341. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8342. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8343. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8344. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  8345. "\x00\x01\x02\x03\x04\x05\x06\x07"
  8346. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8347. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8348. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8349. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8350. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8351. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8352. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8353. "\x40\x41\x42\x43\x44\x45\x46\x47"
  8354. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  8355. "\x50\x51\x52\x53\x54\x55\x56\x57"
  8356. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  8357. "\x60\x61\x62\x63\x64\x65\x66\x67"
  8358. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  8359. "\x70\x71\x72\x73\x74\x75\x76\x77"
  8360. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  8361. "\x80\x81\x82\x83\x84\x85\x86\x87"
  8362. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  8363. "\x90\x91\x92\x93\x94\x95\x96\x97"
  8364. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  8365. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8366. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8367. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8368. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8369. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8370. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8371. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8372. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  8373. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  8374. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  8375. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  8376. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  8377. .rlen = 512,
  8378. .also_non_np = 1,
  8379. .np = 2,
  8380. .tap = { 512 - 16, 16 },
  8381. },
  8382. };
  8383. /*
  8384. * AES test vectors.
  8385. */
  8386. #define AES_ENC_TEST_VECTORS 3
  8387. #define AES_DEC_TEST_VECTORS 3
  8388. #define AES_CBC_ENC_TEST_VECTORS 4
  8389. #define AES_CBC_DEC_TEST_VECTORS 4
  8390. #define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7
  8391. #define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7
  8392. #define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7
  8393. #define AES_LRW_ENC_TEST_VECTORS 8
  8394. #define AES_LRW_DEC_TEST_VECTORS 8
  8395. #define AES_XTS_ENC_TEST_VECTORS 5
  8396. #define AES_XTS_DEC_TEST_VECTORS 5
  8397. #define AES_CTR_ENC_TEST_VECTORS 3
  8398. #define AES_CTR_DEC_TEST_VECTORS 3
  8399. #define AES_OFB_ENC_TEST_VECTORS 1
  8400. #define AES_OFB_DEC_TEST_VECTORS 1
  8401. #define AES_CTR_3686_ENC_TEST_VECTORS 7
  8402. #define AES_CTR_3686_DEC_TEST_VECTORS 6
  8403. #define AES_GCM_ENC_TEST_VECTORS 9
  8404. #define AES_GCM_DEC_TEST_VECTORS 8
  8405. #define AES_GCM_4106_ENC_TEST_VECTORS 7
  8406. #define AES_GCM_4106_DEC_TEST_VECTORS 7
  8407. #define AES_CCM_ENC_TEST_VECTORS 7
  8408. #define AES_CCM_DEC_TEST_VECTORS 7
  8409. #define AES_CCM_4309_ENC_TEST_VECTORS 7
  8410. #define AES_CCM_4309_DEC_TEST_VECTORS 10
  8411. static struct cipher_testvec aes_enc_tv_template[] = {
  8412. { /* From FIPS-197 */
  8413. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8414. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8415. .klen = 16,
  8416. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  8417. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  8418. .ilen = 16,
  8419. .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  8420. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  8421. .rlen = 16,
  8422. }, {
  8423. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8424. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8425. "\x10\x11\x12\x13\x14\x15\x16\x17",
  8426. .klen = 24,
  8427. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  8428. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  8429. .ilen = 16,
  8430. .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  8431. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  8432. .rlen = 16,
  8433. }, {
  8434. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8435. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8436. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8437. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8438. .klen = 32,
  8439. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  8440. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  8441. .ilen = 16,
  8442. .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  8443. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  8444. .rlen = 16,
  8445. },
  8446. };
  8447. static struct cipher_testvec aes_dec_tv_template[] = {
  8448. { /* From FIPS-197 */
  8449. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8450. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8451. .klen = 16,
  8452. .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  8453. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  8454. .ilen = 16,
  8455. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  8456. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  8457. .rlen = 16,
  8458. }, {
  8459. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8460. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8461. "\x10\x11\x12\x13\x14\x15\x16\x17",
  8462. .klen = 24,
  8463. .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  8464. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  8465. .ilen = 16,
  8466. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  8467. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  8468. .rlen = 16,
  8469. }, {
  8470. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8471. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8472. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8473. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8474. .klen = 32,
  8475. .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  8476. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  8477. .ilen = 16,
  8478. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  8479. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  8480. .rlen = 16,
  8481. },
  8482. };
  8483. static struct cipher_testvec aes_cbc_enc_tv_template[] = {
  8484. { /* From RFC 3602 */
  8485. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  8486. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  8487. .klen = 16,
  8488. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  8489. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  8490. .input = "Single block msg",
  8491. .ilen = 16,
  8492. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  8493. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  8494. .rlen = 16,
  8495. }, {
  8496. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  8497. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  8498. .klen = 16,
  8499. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  8500. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  8501. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8502. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8503. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8504. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8505. .ilen = 32,
  8506. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  8507. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  8508. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  8509. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  8510. .rlen = 32,
  8511. }, { /* From NIST SP800-38A */
  8512. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  8513. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  8514. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  8515. .klen = 24,
  8516. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8517. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8518. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  8519. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  8520. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  8521. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  8522. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  8523. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  8524. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  8525. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  8526. .ilen = 64,
  8527. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  8528. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  8529. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  8530. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  8531. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  8532. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  8533. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  8534. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  8535. .rlen = 64,
  8536. }, {
  8537. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  8538. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  8539. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  8540. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  8541. .klen = 32,
  8542. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8543. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8544. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  8545. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  8546. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  8547. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  8548. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  8549. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  8550. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  8551. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  8552. .ilen = 64,
  8553. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  8554. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  8555. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  8556. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  8557. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  8558. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  8559. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  8560. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  8561. .rlen = 64,
  8562. },
  8563. };
  8564. static struct cipher_testvec aes_cbc_dec_tv_template[] = {
  8565. { /* From RFC 3602 */
  8566. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  8567. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  8568. .klen = 16,
  8569. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  8570. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  8571. .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  8572. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  8573. .ilen = 16,
  8574. .result = "Single block msg",
  8575. .rlen = 16,
  8576. }, {
  8577. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  8578. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  8579. .klen = 16,
  8580. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  8581. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  8582. .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  8583. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  8584. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  8585. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  8586. .ilen = 32,
  8587. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8588. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8589. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8590. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8591. .rlen = 32,
  8592. }, { /* From NIST SP800-38A */
  8593. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  8594. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  8595. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  8596. .klen = 24,
  8597. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8598. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8599. .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  8600. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  8601. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  8602. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  8603. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  8604. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  8605. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  8606. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  8607. .ilen = 64,
  8608. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  8609. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  8610. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  8611. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  8612. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  8613. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  8614. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  8615. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  8616. .rlen = 64,
  8617. }, {
  8618. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  8619. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  8620. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  8621. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  8622. .klen = 32,
  8623. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8624. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8625. .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  8626. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  8627. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  8628. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  8629. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  8630. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  8631. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  8632. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  8633. .ilen = 64,
  8634. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  8635. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  8636. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  8637. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  8638. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  8639. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  8640. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  8641. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  8642. .rlen = 64,
  8643. },
  8644. };
  8645. static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = {
  8646. { /* RFC 3602 Case 1 */
  8647. #ifdef __LITTLE_ENDIAN
  8648. .key = "\x08\x00" /* rta length */
  8649. "\x01\x00" /* rta type */
  8650. #else
  8651. .key = "\x00\x08" /* rta length */
  8652. "\x00\x01" /* rta type */
  8653. #endif
  8654. "\x00\x00\x00\x10" /* enc key length */
  8655. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8656. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8657. "\x00\x00\x00\x00"
  8658. "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  8659. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  8660. .klen = 8 + 20 + 16,
  8661. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  8662. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  8663. .input = "Single block msg",
  8664. .ilen = 16,
  8665. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  8666. "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
  8667. "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
  8668. "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
  8669. "\x03\x71\xa2\x06",
  8670. .rlen = 16 + 20,
  8671. }, { /* RFC 3602 Case 2 */
  8672. #ifdef __LITTLE_ENDIAN
  8673. .key = "\x08\x00" /* rta length */
  8674. "\x01\x00" /* rta type */
  8675. #else
  8676. .key = "\x00\x08" /* rta length */
  8677. "\x00\x01" /* rta type */
  8678. #endif
  8679. "\x00\x00\x00\x10" /* enc key length */
  8680. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8681. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8682. "\x30\x31\x32\x33"
  8683. "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  8684. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  8685. .klen = 8 + 20 + 16,
  8686. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  8687. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  8688. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8689. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8690. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8691. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8692. .ilen = 32,
  8693. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  8694. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  8695. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  8696. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
  8697. "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
  8698. "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
  8699. "\x65\x39\xf8\xde",
  8700. .rlen = 32 + 20,
  8701. }, { /* RFC 3602 Case 3 */
  8702. #ifdef __LITTLE_ENDIAN
  8703. .key = "\x08\x00" /* rta length */
  8704. "\x01\x00" /* rta type */
  8705. #else
  8706. .key = "\x00\x08" /* rta length */
  8707. "\x00\x01" /* rta type */
  8708. #endif
  8709. "\x00\x00\x00\x10" /* enc key length */
  8710. "\x11\x22\x33\x44\x55\x66\x77\x88"
  8711. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  8712. "\x22\x33\x44\x55"
  8713. "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
  8714. "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
  8715. .klen = 8 + 20 + 16,
  8716. .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
  8717. "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
  8718. .input = "This is a 48-byte message (exactly 3 AES blocks)",
  8719. .ilen = 48,
  8720. .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
  8721. "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
  8722. "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
  8723. "\x50\x69\x39\x27\x67\x72\xf8\xd5"
  8724. "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
  8725. "\x85\x79\x69\x5d\x83\xba\x26\x84"
  8726. "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
  8727. "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
  8728. "\x8d\x62\xf2\x1e",
  8729. .rlen = 48 + 20,
  8730. }, { /* RFC 3602 Case 4 */
  8731. #ifdef __LITTLE_ENDIAN
  8732. .key = "\x08\x00" /* rta length */
  8733. "\x01\x00" /* rta type */
  8734. #else
  8735. .key = "\x00\x08" /* rta length */
  8736. "\x00\x01" /* rta type */
  8737. #endif
  8738. "\x00\x00\x00\x10" /* enc key length */
  8739. "\x11\x22\x33\x44\x55\x66\x77\x88"
  8740. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  8741. "\x22\x33\x44\x55"
  8742. "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
  8743. "\xbc\x46\x90\x3d\xba\x29\x03\x49",
  8744. .klen = 8 + 20 + 16,
  8745. .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
  8746. "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
  8747. .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  8748. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  8749. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  8750. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  8751. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  8752. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  8753. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  8754. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
  8755. .ilen = 64,
  8756. .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
  8757. "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
  8758. "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
  8759. "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
  8760. "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
  8761. "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
  8762. "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
  8763. "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
  8764. "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
  8765. "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
  8766. "\x1d\xbe\xc6\xe9",
  8767. .rlen = 64 + 20,
  8768. }, { /* RFC 3602 Case 5 */
  8769. #ifdef __LITTLE_ENDIAN
  8770. .key = "\x08\x00" /* rta length */
  8771. "\x01\x00" /* rta type */
  8772. #else
  8773. .key = "\x00\x08" /* rta length */
  8774. "\x00\x01" /* rta type */
  8775. #endif
  8776. "\x00\x00\x00\x10" /* enc key length */
  8777. "\x11\x22\x33\x44\x55\x66\x77\x88"
  8778. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  8779. "\x22\x33\x44\x55"
  8780. "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
  8781. "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
  8782. .klen = 8 + 20 + 16,
  8783. .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
  8784. "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
  8785. .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
  8786. .alen = 8,
  8787. .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
  8788. "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
  8789. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8790. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8791. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  8792. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8793. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8794. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8795. "\x01\x02\x03\x04\x05\x06\x07\x08"
  8796. "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
  8797. .ilen = 80,
  8798. .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
  8799. "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
  8800. "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
  8801. "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
  8802. "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
  8803. "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
  8804. "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
  8805. "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
  8806. "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
  8807. "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
  8808. "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
  8809. "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
  8810. "\x85\xe1\x59\xf7",
  8811. .rlen = 80 + 20,
  8812. }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
  8813. #ifdef __LITTLE_ENDIAN
  8814. .key = "\x08\x00" /* rta length */
  8815. "\x01\x00" /* rta type */
  8816. #else
  8817. .key = "\x00\x08" /* rta length */
  8818. "\x00\x01" /* rta type */
  8819. #endif
  8820. "\x00\x00\x00\x18" /* enc key length */
  8821. "\x11\x22\x33\x44\x55\x66\x77\x88"
  8822. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  8823. "\x22\x33\x44\x55"
  8824. "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  8825. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  8826. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  8827. .klen = 8 + 20 + 24,
  8828. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8829. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8830. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  8831. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  8832. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  8833. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  8834. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  8835. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  8836. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  8837. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  8838. .ilen = 64,
  8839. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  8840. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  8841. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  8842. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  8843. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  8844. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  8845. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  8846. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
  8847. "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
  8848. "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
  8849. "\x47\x4c\xfc\x36",
  8850. .rlen = 64 + 20,
  8851. }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
  8852. #ifdef __LITTLE_ENDIAN
  8853. .key = "\x08\x00" /* rta length */
  8854. "\x01\x00" /* rta type */
  8855. #else
  8856. .key = "\x00\x08" /* rta length */
  8857. "\x00\x01" /* rta type */
  8858. #endif
  8859. "\x00\x00\x00\x20" /* enc key length */
  8860. "\x11\x22\x33\x44\x55\x66\x77\x88"
  8861. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  8862. "\x22\x33\x44\x55"
  8863. "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  8864. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  8865. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  8866. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  8867. .klen = 8 + 20 + 32,
  8868. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8869. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  8870. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  8871. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  8872. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  8873. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  8874. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  8875. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  8876. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  8877. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  8878. .ilen = 64,
  8879. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  8880. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  8881. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  8882. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  8883. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  8884. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  8885. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  8886. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
  8887. "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
  8888. "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
  8889. "\x51\xee\xd6\x4e",
  8890. .rlen = 64 + 20,
  8891. },
  8892. };
  8893. static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = {
  8894. { /* RFC 3602 Case 1 */
  8895. #ifdef __LITTLE_ENDIAN
  8896. .key = "\x08\x00" /* rta length */
  8897. "\x01\x00" /* rta type */
  8898. #else
  8899. .key = "\x00\x08" /* rta length */
  8900. "\x00\x01" /* rta type */
  8901. #endif
  8902. "\x00\x00\x00\x10" /* enc key length */
  8903. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8904. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8905. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8906. "\x00\x00\x00\x00\x00\x00\x00\x00"
  8907. "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  8908. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  8909. .klen = 8 + 32 + 16,
  8910. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  8911. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  8912. .input = "Single block msg",
  8913. .ilen = 16,
  8914. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  8915. "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
  8916. "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
  8917. "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
  8918. "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
  8919. "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
  8920. .rlen = 16 + 32,
  8921. }, { /* RFC 3602 Case 2 */
  8922. #ifdef __LITTLE_ENDIAN
  8923. .key = "\x08\x00" /* rta length */
  8924. "\x01\x00" /* rta type */
  8925. #else
  8926. .key = "\x00\x08" /* rta length */
  8927. "\x00\x01" /* rta type */
  8928. #endif
  8929. "\x00\x00\x00\x10" /* enc key length */
  8930. "\x20\x21\x22\x23\x24\x25\x26\x27"
  8931. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  8932. "\x30\x31\x32\x33\x34\x35\x36\x37"
  8933. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  8934. "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  8935. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  8936. .klen = 8 + 32 + 16,
  8937. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  8938. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  8939. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  8940. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  8941. "\x10\x11\x12\x13\x14\x15\x16\x17"
  8942. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  8943. .ilen = 32,
  8944. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  8945. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  8946. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  8947. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
  8948. "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
  8949. "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
  8950. "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
  8951. "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
  8952. .rlen = 32 + 32,
  8953. }, { /* RFC 3602 Case 3 */
  8954. #ifdef __LITTLE_ENDIAN
  8955. .key = "\x08\x00" /* rta length */
  8956. "\x01\x00" /* rta type */
  8957. #else
  8958. .key = "\x00\x08" /* rta length */
  8959. "\x00\x01" /* rta type */
  8960. #endif
  8961. "\x00\x00\x00\x10" /* enc key length */
  8962. "\x11\x22\x33\x44\x55\x66\x77\x88"
  8963. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  8964. "\x22\x33\x44\x55\x66\x77\x88\x99"
  8965. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  8966. "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
  8967. "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
  8968. .klen = 8 + 32 + 16,
  8969. .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
  8970. "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
  8971. .input = "This is a 48-byte message (exactly 3 AES blocks)",
  8972. .ilen = 48,
  8973. .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
  8974. "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
  8975. "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
  8976. "\x50\x69\x39\x27\x67\x72\xf8\xd5"
  8977. "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
  8978. "\x85\x79\x69\x5d\x83\xba\x26\x84"
  8979. "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
  8980. "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
  8981. "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
  8982. "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
  8983. .rlen = 48 + 32,
  8984. }, { /* RFC 3602 Case 4 */
  8985. #ifdef __LITTLE_ENDIAN
  8986. .key = "\x08\x00" /* rta length */
  8987. "\x01\x00" /* rta type */
  8988. #else
  8989. .key = "\x00\x08" /* rta length */
  8990. "\x00\x01" /* rta type */
  8991. #endif
  8992. "\x00\x00\x00\x10" /* enc key length */
  8993. "\x11\x22\x33\x44\x55\x66\x77\x88"
  8994. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  8995. "\x22\x33\x44\x55\x66\x77\x88\x99"
  8996. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  8997. "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
  8998. "\xbc\x46\x90\x3d\xba\x29\x03\x49",
  8999. .klen = 8 + 32 + 16,
  9000. .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
  9001. "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
  9002. .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  9003. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  9004. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  9005. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  9006. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9007. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  9008. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  9009. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
  9010. .ilen = 64,
  9011. .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
  9012. "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
  9013. "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
  9014. "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
  9015. "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
  9016. "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
  9017. "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
  9018. "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
  9019. "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
  9020. "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
  9021. "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
  9022. "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
  9023. .rlen = 64 + 32,
  9024. }, { /* RFC 3602 Case 5 */
  9025. #ifdef __LITTLE_ENDIAN
  9026. .key = "\x08\x00" /* rta length */
  9027. "\x01\x00" /* rta type */
  9028. #else
  9029. .key = "\x00\x08" /* rta length */
  9030. "\x00\x01" /* rta type */
  9031. #endif
  9032. "\x00\x00\x00\x10" /* enc key length */
  9033. "\x11\x22\x33\x44\x55\x66\x77\x88"
  9034. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  9035. "\x22\x33\x44\x55\x66\x77\x88\x99"
  9036. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  9037. "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
  9038. "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
  9039. .klen = 8 + 32 + 16,
  9040. .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
  9041. "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
  9042. .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
  9043. .alen = 8,
  9044. .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
  9045. "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
  9046. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9047. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9048. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  9049. "\x20\x21\x22\x23\x24\x25\x26\x27"
  9050. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  9051. "\x30\x31\x32\x33\x34\x35\x36\x37"
  9052. "\x01\x02\x03\x04\x05\x06\x07\x08"
  9053. "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
  9054. .ilen = 80,
  9055. .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
  9056. "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
  9057. "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
  9058. "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
  9059. "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
  9060. "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
  9061. "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
  9062. "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
  9063. "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
  9064. "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
  9065. "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
  9066. "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
  9067. "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
  9068. "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
  9069. .rlen = 80 + 32,
  9070. }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
  9071. #ifdef __LITTLE_ENDIAN
  9072. .key = "\x08\x00" /* rta length */
  9073. "\x01\x00" /* rta type */
  9074. #else
  9075. .key = "\x00\x08" /* rta length */
  9076. "\x00\x01" /* rta type */
  9077. #endif
  9078. "\x00\x00\x00\x18" /* enc key length */
  9079. "\x11\x22\x33\x44\x55\x66\x77\x88"
  9080. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  9081. "\x22\x33\x44\x55\x66\x77\x88\x99"
  9082. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  9083. "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  9084. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  9085. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  9086. .klen = 8 + 32 + 24,
  9087. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9088. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  9089. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  9090. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  9091. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  9092. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  9093. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  9094. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  9095. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  9096. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  9097. .ilen = 64,
  9098. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  9099. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  9100. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  9101. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  9102. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  9103. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  9104. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  9105. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
  9106. "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
  9107. "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
  9108. "\xca\x71\x85\x93\xf7\x85\x55\x8b"
  9109. "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
  9110. .rlen = 64 + 32,
  9111. }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
  9112. #ifdef __LITTLE_ENDIAN
  9113. .key = "\x08\x00" /* rta length */
  9114. "\x01\x00" /* rta type */
  9115. #else
  9116. .key = "\x00\x08" /* rta length */
  9117. "\x00\x01" /* rta type */
  9118. #endif
  9119. "\x00\x00\x00\x20" /* enc key length */
  9120. "\x11\x22\x33\x44\x55\x66\x77\x88"
  9121. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  9122. "\x22\x33\x44\x55\x66\x77\x88\x99"
  9123. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  9124. "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  9125. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  9126. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  9127. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  9128. .klen = 8 + 32 + 32,
  9129. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9130. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  9131. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  9132. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  9133. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  9134. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  9135. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  9136. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  9137. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  9138. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  9139. .ilen = 64,
  9140. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  9141. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  9142. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  9143. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  9144. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  9145. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  9146. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  9147. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
  9148. "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
  9149. "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
  9150. "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
  9151. "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
  9152. .rlen = 64 + 32,
  9153. },
  9154. };
  9155. static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = {
  9156. { /* RFC 3602 Case 1 */
  9157. #ifdef __LITTLE_ENDIAN
  9158. .key = "\x08\x00" /* rta length */
  9159. "\x01\x00" /* rta type */
  9160. #else
  9161. .key = "\x00\x08" /* rta length */
  9162. "\x00\x01" /* rta type */
  9163. #endif
  9164. "\x00\x00\x00\x10" /* enc key length */
  9165. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9166. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9167. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9168. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9169. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9170. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9171. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9172. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9173. "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  9174. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  9175. .klen = 8 + 64 + 16,
  9176. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  9177. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  9178. .input = "Single block msg",
  9179. .ilen = 16,
  9180. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  9181. "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
  9182. "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
  9183. "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
  9184. "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
  9185. "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
  9186. "\xec\xbd\x50\x08\x07\x64\x1a\x49"
  9187. "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
  9188. "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
  9189. "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
  9190. .rlen = 16 + 64,
  9191. }, { /* RFC 3602 Case 2 */
  9192. #ifdef __LITTLE_ENDIAN
  9193. .key = "\x08\x00" /* rta length */
  9194. "\x01\x00" /* rta type */
  9195. #else
  9196. .key = "\x00\x08" /* rta length */
  9197. "\x00\x01" /* rta type */
  9198. #endif
  9199. "\x00\x00\x00\x10" /* enc key length */
  9200. "\x20\x21\x22\x23\x24\x25\x26\x27"
  9201. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  9202. "\x30\x31\x32\x33\x34\x35\x36\x37"
  9203. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  9204. "\x40\x41\x42\x43\x44\x45\x46\x47"
  9205. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  9206. "\x50\x51\x52\x53\x54\x55\x56\x57"
  9207. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  9208. "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  9209. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  9210. .klen = 8 + 64 + 16,
  9211. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  9212. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  9213. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9214. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9215. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9216. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  9217. .ilen = 32,
  9218. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  9219. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  9220. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  9221. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
  9222. "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
  9223. "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
  9224. "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
  9225. "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
  9226. "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
  9227. "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
  9228. "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
  9229. "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
  9230. .rlen = 32 + 64,
  9231. }, { /* RFC 3602 Case 3 */
  9232. #ifdef __LITTLE_ENDIAN
  9233. .key = "\x08\x00" /* rta length */
  9234. "\x01\x00" /* rta type */
  9235. #else
  9236. .key = "\x00\x08" /* rta length */
  9237. "\x00\x01" /* rta type */
  9238. #endif
  9239. "\x00\x00\x00\x10" /* enc key length */
  9240. "\x11\x22\x33\x44\x55\x66\x77\x88"
  9241. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  9242. "\x22\x33\x44\x55\x66\x77\x88\x99"
  9243. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  9244. "\x33\x44\x55\x66\x77\x88\x99\xaa"
  9245. "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
  9246. "\x44\x55\x66\x77\x88\x99\xaa\xbb"
  9247. "\xcc\xdd\xee\xff\x11\x22\x33\x44"
  9248. "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
  9249. "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
  9250. .klen = 8 + 64 + 16,
  9251. .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
  9252. "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
  9253. .input = "This is a 48-byte message (exactly 3 AES blocks)",
  9254. .ilen = 48,
  9255. .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
  9256. "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
  9257. "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
  9258. "\x50\x69\x39\x27\x67\x72\xf8\xd5"
  9259. "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
  9260. "\x85\x79\x69\x5d\x83\xba\x26\x84"
  9261. "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
  9262. "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
  9263. "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
  9264. "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
  9265. "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
  9266. "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
  9267. "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
  9268. "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
  9269. .rlen = 48 + 64,
  9270. }, { /* RFC 3602 Case 4 */
  9271. #ifdef __LITTLE_ENDIAN
  9272. .key = "\x08\x00" /* rta length */
  9273. "\x01\x00" /* rta type */
  9274. #else
  9275. .key = "\x00\x08" /* rta length */
  9276. "\x00\x01" /* rta type */
  9277. #endif
  9278. "\x00\x00\x00\x10" /* enc key length */
  9279. "\x11\x22\x33\x44\x55\x66\x77\x88"
  9280. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  9281. "\x22\x33\x44\x55\x66\x77\x88\x99"
  9282. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  9283. "\x33\x44\x55\x66\x77\x88\x99\xaa"
  9284. "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
  9285. "\x44\x55\x66\x77\x88\x99\xaa\xbb"
  9286. "\xcc\xdd\xee\xff\x11\x22\x33\x44"
  9287. "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
  9288. "\xbc\x46\x90\x3d\xba\x29\x03\x49",
  9289. .klen = 8 + 64 + 16,
  9290. .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
  9291. "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
  9292. .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  9293. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  9294. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  9295. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  9296. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  9297. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  9298. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  9299. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
  9300. .ilen = 64,
  9301. .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
  9302. "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
  9303. "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
  9304. "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
  9305. "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
  9306. "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
  9307. "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
  9308. "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
  9309. "\x82\xcd\x42\x28\x21\x20\x15\xcc"
  9310. "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
  9311. "\x61\x32\x82\x85\xcf\x27\xed\xb4"
  9312. "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
  9313. "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
  9314. "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
  9315. "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
  9316. "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
  9317. .rlen = 64 + 64,
  9318. }, { /* RFC 3602 Case 5 */
  9319. #ifdef __LITTLE_ENDIAN
  9320. .key = "\x08\x00" /* rta length */
  9321. "\x01\x00" /* rta type */
  9322. #else
  9323. .key = "\x00\x08" /* rta length */
  9324. "\x00\x01" /* rta type */
  9325. #endif
  9326. "\x00\x00\x00\x10" /* enc key length */
  9327. "\x11\x22\x33\x44\x55\x66\x77\x88"
  9328. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  9329. "\x22\x33\x44\x55\x66\x77\x88\x99"
  9330. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  9331. "\x33\x44\x55\x66\x77\x88\x99\xaa"
  9332. "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
  9333. "\x44\x55\x66\x77\x88\x99\xaa\xbb"
  9334. "\xcc\xdd\xee\xff\x11\x22\x33\x44"
  9335. "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
  9336. "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
  9337. .klen = 8 + 64 + 16,
  9338. .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
  9339. "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
  9340. .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
  9341. .alen = 8,
  9342. .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
  9343. "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
  9344. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  9345. "\x10\x11\x12\x13\x14\x15\x16\x17"
  9346. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  9347. "\x20\x21\x22\x23\x24\x25\x26\x27"
  9348. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  9349. "\x30\x31\x32\x33\x34\x35\x36\x37"
  9350. "\x01\x02\x03\x04\x05\x06\x07\x08"
  9351. "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
  9352. .ilen = 80,
  9353. .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
  9354. "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
  9355. "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
  9356. "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
  9357. "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
  9358. "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
  9359. "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
  9360. "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
  9361. "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
  9362. "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
  9363. "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
  9364. "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
  9365. "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
  9366. "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
  9367. "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
  9368. "\x92\x26\xc1\x76\x20\x11\xeb\xba"
  9369. "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
  9370. "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
  9371. .rlen = 80 + 64,
  9372. }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
  9373. #ifdef __LITTLE_ENDIAN
  9374. .key = "\x08\x00" /* rta length */
  9375. "\x01\x00" /* rta type */
  9376. #else
  9377. .key = "\x00\x08" /* rta length */
  9378. "\x00\x01" /* rta type */
  9379. #endif
  9380. "\x00\x00\x00\x18" /* enc key length */
  9381. "\x11\x22\x33\x44\x55\x66\x77\x88"
  9382. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  9383. "\x22\x33\x44\x55\x66\x77\x88\x99"
  9384. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  9385. "\x33\x44\x55\x66\x77\x88\x99\xaa"
  9386. "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
  9387. "\x44\x55\x66\x77\x88\x99\xaa\xbb"
  9388. "\xcc\xdd\xee\xff\x11\x22\x33\x44"
  9389. "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  9390. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  9391. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  9392. .klen = 8 + 64 + 24,
  9393. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9394. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  9395. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  9396. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  9397. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  9398. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  9399. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  9400. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  9401. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  9402. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  9403. .ilen = 64,
  9404. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  9405. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  9406. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  9407. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  9408. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  9409. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  9410. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  9411. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
  9412. "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
  9413. "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
  9414. "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
  9415. "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
  9416. "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
  9417. "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
  9418. "\x8d\x43\x98\xa7\x94\x16\x07\x02"
  9419. "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
  9420. .rlen = 64 + 64,
  9421. }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
  9422. #ifdef __LITTLE_ENDIAN
  9423. .key = "\x08\x00" /* rta length */
  9424. "\x01\x00" /* rta type */
  9425. #else
  9426. .key = "\x00\x08" /* rta length */
  9427. "\x00\x01" /* rta type */
  9428. #endif
  9429. "\x00\x00\x00\x20" /* enc key length */
  9430. "\x11\x22\x33\x44\x55\x66\x77\x88"
  9431. "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
  9432. "\x22\x33\x44\x55\x66\x77\x88\x99"
  9433. "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
  9434. "\x33\x44\x55\x66\x77\x88\x99\xaa"
  9435. "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
  9436. "\x44\x55\x66\x77\x88\x99\xaa\xbb"
  9437. "\xcc\xdd\xee\xff\x11\x22\x33\x44"
  9438. "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  9439. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  9440. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  9441. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  9442. .klen = 8 + 64 + 32,
  9443. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  9444. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  9445. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  9446. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  9447. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  9448. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  9449. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  9450. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  9451. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  9452. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  9453. .ilen = 64,
  9454. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  9455. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  9456. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  9457. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  9458. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  9459. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  9460. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  9461. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
  9462. "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
  9463. "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
  9464. "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
  9465. "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
  9466. "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
  9467. "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
  9468. "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
  9469. "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
  9470. .rlen = 64 + 64,
  9471. },
  9472. };
  9473. static struct cipher_testvec aes_lrw_enc_tv_template[] = {
  9474. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  9475. { /* LRW-32-AES 1 */
  9476. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  9477. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  9478. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  9479. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  9480. .klen = 32,
  9481. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9482. "\x00\x00\x00\x00\x00\x00\x00\x01",
  9483. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9484. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9485. .ilen = 16,
  9486. .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  9487. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  9488. .rlen = 16,
  9489. }, { /* LRW-32-AES 2 */
  9490. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  9491. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  9492. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  9493. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  9494. .klen = 32,
  9495. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9496. "\x00\x00\x00\x00\x00\x00\x00\x02",
  9497. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9498. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9499. .ilen = 16,
  9500. .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  9501. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  9502. .rlen = 16,
  9503. }, { /* LRW-32-AES 3 */
  9504. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  9505. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  9506. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  9507. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  9508. .klen = 32,
  9509. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9510. "\x00\x00\x00\x02\x00\x00\x00\x00",
  9511. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9512. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9513. .ilen = 16,
  9514. .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  9515. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  9516. .rlen = 16,
  9517. }, { /* LRW-32-AES 4 */
  9518. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  9519. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  9520. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  9521. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  9522. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  9523. .klen = 40,
  9524. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9525. "\x00\x00\x00\x00\x00\x00\x00\x01",
  9526. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9527. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9528. .ilen = 16,
  9529. .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  9530. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  9531. .rlen = 16,
  9532. }, { /* LRW-32-AES 5 */
  9533. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  9534. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  9535. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  9536. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  9537. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  9538. .klen = 40,
  9539. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9540. "\x00\x00\x00\x02\x00\x00\x00\x00",
  9541. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9542. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9543. .ilen = 16,
  9544. .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  9545. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  9546. .rlen = 16,
  9547. }, { /* LRW-32-AES 6 */
  9548. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  9549. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  9550. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  9551. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  9552. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  9553. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  9554. .klen = 48,
  9555. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9556. "\x00\x00\x00\x00\x00\x00\x00\x01",
  9557. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9558. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9559. .ilen = 16,
  9560. .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  9561. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  9562. .rlen = 16,
  9563. }, { /* LRW-32-AES 7 */
  9564. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  9565. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  9566. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  9567. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  9568. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  9569. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  9570. .klen = 48,
  9571. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9572. "\x00\x00\x00\x02\x00\x00\x00\x00",
  9573. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9574. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9575. .ilen = 16,
  9576. .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  9577. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  9578. .rlen = 16,
  9579. }, {
  9580. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  9581. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  9582. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  9583. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  9584. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  9585. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  9586. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  9587. .klen = 48,
  9588. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9589. "\x00\x00\x00\x00\x00\x00\x00\x01",
  9590. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  9591. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  9592. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  9593. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  9594. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  9595. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  9596. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  9597. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  9598. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  9599. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  9600. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  9601. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  9602. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  9603. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  9604. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  9605. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  9606. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  9607. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  9608. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  9609. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  9610. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  9611. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  9612. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  9613. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  9614. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  9615. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  9616. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  9617. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  9618. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  9619. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  9620. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  9621. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  9622. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  9623. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  9624. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  9625. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  9626. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  9627. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  9628. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  9629. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  9630. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  9631. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  9632. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  9633. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  9634. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  9635. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  9636. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  9637. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  9638. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  9639. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  9640. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  9641. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  9642. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  9643. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  9644. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  9645. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  9646. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  9647. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  9648. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  9649. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  9650. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  9651. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  9652. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  9653. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  9654. .ilen = 512,
  9655. .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  9656. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  9657. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  9658. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  9659. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  9660. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  9661. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  9662. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  9663. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  9664. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  9665. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  9666. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  9667. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  9668. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  9669. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  9670. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  9671. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  9672. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  9673. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  9674. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  9675. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  9676. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  9677. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  9678. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  9679. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  9680. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  9681. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  9682. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  9683. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  9684. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  9685. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  9686. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  9687. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  9688. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  9689. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  9690. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  9691. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  9692. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  9693. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  9694. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  9695. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  9696. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  9697. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  9698. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  9699. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  9700. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  9701. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  9702. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  9703. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  9704. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  9705. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  9706. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  9707. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  9708. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  9709. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  9710. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  9711. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  9712. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  9713. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  9714. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  9715. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  9716. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  9717. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  9718. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  9719. .rlen = 512,
  9720. .also_non_np = 1,
  9721. .np = 2,
  9722. .tap = { 512 - 16, 16 },
  9723. }
  9724. };
  9725. static struct cipher_testvec aes_lrw_dec_tv_template[] = {
  9726. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  9727. /* same as enc vectors with input and result reversed */
  9728. { /* LRW-32-AES 1 */
  9729. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  9730. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  9731. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  9732. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  9733. .klen = 32,
  9734. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9735. "\x00\x00\x00\x00\x00\x00\x00\x01",
  9736. .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  9737. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  9738. .ilen = 16,
  9739. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9740. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9741. .rlen = 16,
  9742. }, { /* LRW-32-AES 2 */
  9743. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  9744. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  9745. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  9746. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  9747. .klen = 32,
  9748. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9749. "\x00\x00\x00\x00\x00\x00\x00\x02",
  9750. .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  9751. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  9752. .ilen = 16,
  9753. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9754. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9755. .rlen = 16,
  9756. }, { /* LRW-32-AES 3 */
  9757. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  9758. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  9759. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  9760. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  9761. .klen = 32,
  9762. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9763. "\x00\x00\x00\x02\x00\x00\x00\x00",
  9764. .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  9765. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  9766. .ilen = 16,
  9767. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9768. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9769. .rlen = 16,
  9770. }, { /* LRW-32-AES 4 */
  9771. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  9772. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  9773. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  9774. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  9775. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  9776. .klen = 40,
  9777. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9778. "\x00\x00\x00\x00\x00\x00\x00\x01",
  9779. .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  9780. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  9781. .ilen = 16,
  9782. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9783. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9784. .rlen = 16,
  9785. }, { /* LRW-32-AES 5 */
  9786. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  9787. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  9788. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  9789. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  9790. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  9791. .klen = 40,
  9792. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9793. "\x00\x00\x00\x02\x00\x00\x00\x00",
  9794. .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  9795. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  9796. .ilen = 16,
  9797. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9798. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9799. .rlen = 16,
  9800. }, { /* LRW-32-AES 6 */
  9801. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  9802. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  9803. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  9804. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  9805. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  9806. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  9807. .klen = 48,
  9808. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9809. "\x00\x00\x00\x00\x00\x00\x00\x01",
  9810. .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  9811. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  9812. .ilen = 16,
  9813. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9814. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9815. .rlen = 16,
  9816. }, { /* LRW-32-AES 7 */
  9817. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  9818. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  9819. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  9820. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  9821. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  9822. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  9823. .klen = 48,
  9824. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9825. "\x00\x00\x00\x02\x00\x00\x00\x00",
  9826. .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  9827. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  9828. .ilen = 16,
  9829. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  9830. "\x38\x39\x41\x42\x43\x44\x45\x46",
  9831. .rlen = 16,
  9832. }, {
  9833. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  9834. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  9835. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  9836. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  9837. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  9838. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  9839. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  9840. .klen = 48,
  9841. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9842. "\x00\x00\x00\x00\x00\x00\x00\x01",
  9843. .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  9844. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  9845. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  9846. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  9847. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  9848. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  9849. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  9850. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  9851. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  9852. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  9853. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  9854. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  9855. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  9856. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  9857. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  9858. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  9859. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  9860. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  9861. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  9862. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  9863. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  9864. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  9865. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  9866. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  9867. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  9868. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  9869. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  9870. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  9871. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  9872. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  9873. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  9874. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  9875. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  9876. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  9877. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  9878. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  9879. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  9880. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  9881. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  9882. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  9883. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  9884. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  9885. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  9886. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  9887. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  9888. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  9889. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  9890. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  9891. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  9892. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  9893. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  9894. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  9895. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  9896. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  9897. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  9898. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  9899. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  9900. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  9901. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  9902. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  9903. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  9904. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  9905. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  9906. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  9907. .ilen = 512,
  9908. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  9909. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  9910. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  9911. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  9912. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  9913. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  9914. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  9915. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  9916. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  9917. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  9918. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  9919. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  9920. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  9921. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  9922. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  9923. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  9924. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  9925. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  9926. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  9927. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  9928. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  9929. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  9930. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  9931. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  9932. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  9933. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  9934. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  9935. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  9936. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  9937. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  9938. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  9939. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  9940. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  9941. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  9942. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  9943. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  9944. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  9945. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  9946. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  9947. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  9948. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  9949. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  9950. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  9951. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  9952. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  9953. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  9954. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  9955. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  9956. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  9957. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  9958. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  9959. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  9960. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  9961. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  9962. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  9963. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  9964. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  9965. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  9966. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  9967. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  9968. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  9969. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  9970. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  9971. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  9972. .rlen = 512,
  9973. .also_non_np = 1,
  9974. .np = 2,
  9975. .tap = { 512 - 16, 16 },
  9976. }
  9977. };
  9978. static struct cipher_testvec aes_xts_enc_tv_template[] = {
  9979. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  9980. { /* XTS-AES 1 */
  9981. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9982. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9983. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9984. "\x00\x00\x00\x00\x00\x00\x00\x00",
  9985. .klen = 32,
  9986. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9987. "\x00\x00\x00\x00\x00\x00\x00\x00",
  9988. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  9989. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9990. "\x00\x00\x00\x00\x00\x00\x00\x00"
  9991. "\x00\x00\x00\x00\x00\x00\x00\x00",
  9992. .ilen = 32,
  9993. .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  9994. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  9995. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  9996. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  9997. .rlen = 32,
  9998. }, { /* XTS-AES 2 */
  9999. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  10000. "\x11\x11\x11\x11\x11\x11\x11\x11"
  10001. "\x22\x22\x22\x22\x22\x22\x22\x22"
  10002. "\x22\x22\x22\x22\x22\x22\x22\x22",
  10003. .klen = 32,
  10004. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  10005. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10006. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  10007. "\x44\x44\x44\x44\x44\x44\x44\x44"
  10008. "\x44\x44\x44\x44\x44\x44\x44\x44"
  10009. "\x44\x44\x44\x44\x44\x44\x44\x44",
  10010. .ilen = 32,
  10011. .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  10012. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  10013. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  10014. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  10015. .rlen = 32,
  10016. }, { /* XTS-AES 3 */
  10017. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  10018. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  10019. "\x22\x22\x22\x22\x22\x22\x22\x22"
  10020. "\x22\x22\x22\x22\x22\x22\x22\x22",
  10021. .klen = 32,
  10022. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  10023. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10024. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  10025. "\x44\x44\x44\x44\x44\x44\x44\x44"
  10026. "\x44\x44\x44\x44\x44\x44\x44\x44"
  10027. "\x44\x44\x44\x44\x44\x44\x44\x44",
  10028. .ilen = 32,
  10029. .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  10030. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  10031. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  10032. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  10033. .rlen = 32,
  10034. }, { /* XTS-AES 4 */
  10035. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  10036. "\x23\x53\x60\x28\x74\x71\x35\x26"
  10037. "\x31\x41\x59\x26\x53\x58\x97\x93"
  10038. "\x23\x84\x62\x64\x33\x83\x27\x95",
  10039. .klen = 32,
  10040. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  10041. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10042. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  10043. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10044. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10045. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  10046. "\x20\x21\x22\x23\x24\x25\x26\x27"
  10047. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  10048. "\x30\x31\x32\x33\x34\x35\x36\x37"
  10049. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  10050. "\x40\x41\x42\x43\x44\x45\x46\x47"
  10051. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  10052. "\x50\x51\x52\x53\x54\x55\x56\x57"
  10053. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  10054. "\x60\x61\x62\x63\x64\x65\x66\x67"
  10055. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  10056. "\x70\x71\x72\x73\x74\x75\x76\x77"
  10057. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  10058. "\x80\x81\x82\x83\x84\x85\x86\x87"
  10059. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  10060. "\x90\x91\x92\x93\x94\x95\x96\x97"
  10061. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  10062. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  10063. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  10064. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  10065. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  10066. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  10067. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  10068. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  10069. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  10070. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  10071. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  10072. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10073. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  10074. "\x00\x01\x02\x03\x04\x05\x06\x07"
  10075. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10076. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10077. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  10078. "\x20\x21\x22\x23\x24\x25\x26\x27"
  10079. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  10080. "\x30\x31\x32\x33\x34\x35\x36\x37"
  10081. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  10082. "\x40\x41\x42\x43\x44\x45\x46\x47"
  10083. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  10084. "\x50\x51\x52\x53\x54\x55\x56\x57"
  10085. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  10086. "\x60\x61\x62\x63\x64\x65\x66\x67"
  10087. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  10088. "\x70\x71\x72\x73\x74\x75\x76\x77"
  10089. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  10090. "\x80\x81\x82\x83\x84\x85\x86\x87"
  10091. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  10092. "\x90\x91\x92\x93\x94\x95\x96\x97"
  10093. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  10094. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  10095. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  10096. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  10097. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  10098. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  10099. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  10100. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  10101. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  10102. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  10103. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  10104. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10105. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  10106. .ilen = 512,
  10107. .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  10108. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  10109. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  10110. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  10111. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  10112. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  10113. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  10114. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  10115. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  10116. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  10117. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  10118. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  10119. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  10120. "\x22\x97\x61\x46\xae\x20\xce\x84"
  10121. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  10122. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  10123. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  10124. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  10125. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  10126. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  10127. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  10128. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  10129. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  10130. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  10131. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  10132. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  10133. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  10134. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  10135. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  10136. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  10137. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  10138. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  10139. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  10140. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  10141. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  10142. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  10143. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  10144. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  10145. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  10146. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  10147. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  10148. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  10149. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  10150. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  10151. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  10152. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  10153. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  10154. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  10155. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  10156. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  10157. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  10158. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  10159. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  10160. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  10161. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  10162. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  10163. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  10164. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  10165. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  10166. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  10167. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  10168. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  10169. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  10170. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  10171. .rlen = 512,
  10172. }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
  10173. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  10174. "\x23\x53\x60\x28\x74\x71\x35\x26"
  10175. "\x62\x49\x77\x57\x24\x70\x93\x69"
  10176. "\x99\x59\x57\x49\x66\x96\x76\x27"
  10177. "\x31\x41\x59\x26\x53\x58\x97\x93"
  10178. "\x23\x84\x62\x64\x33\x83\x27\x95"
  10179. "\x02\x88\x41\x97\x16\x93\x99\x37"
  10180. "\x51\x05\x82\x09\x74\x94\x45\x92",
  10181. .klen = 64,
  10182. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  10183. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10184. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10185. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10186. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  10187. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10188. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10189. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  10190. "\x20\x21\x22\x23\x24\x25\x26\x27"
  10191. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  10192. "\x30\x31\x32\x33\x34\x35\x36\x37"
  10193. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  10194. "\x40\x41\x42\x43\x44\x45\x46\x47"
  10195. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  10196. "\x50\x51\x52\x53\x54\x55\x56\x57"
  10197. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  10198. "\x60\x61\x62\x63\x64\x65\x66\x67"
  10199. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  10200. "\x70\x71\x72\x73\x74\x75\x76\x77"
  10201. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  10202. "\x80\x81\x82\x83\x84\x85\x86\x87"
  10203. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  10204. "\x90\x91\x92\x93\x94\x95\x96\x97"
  10205. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  10206. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  10207. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  10208. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  10209. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  10210. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  10211. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  10212. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  10213. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  10214. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  10215. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  10216. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10217. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  10218. "\x00\x01\x02\x03\x04\x05\x06\x07"
  10219. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10220. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10221. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  10222. "\x20\x21\x22\x23\x24\x25\x26\x27"
  10223. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  10224. "\x30\x31\x32\x33\x34\x35\x36\x37"
  10225. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  10226. "\x40\x41\x42\x43\x44\x45\x46\x47"
  10227. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  10228. "\x50\x51\x52\x53\x54\x55\x56\x57"
  10229. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  10230. "\x60\x61\x62\x63\x64\x65\x66\x67"
  10231. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  10232. "\x70\x71\x72\x73\x74\x75\x76\x77"
  10233. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  10234. "\x80\x81\x82\x83\x84\x85\x86\x87"
  10235. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  10236. "\x90\x91\x92\x93\x94\x95\x96\x97"
  10237. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  10238. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  10239. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  10240. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  10241. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  10242. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  10243. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  10244. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  10245. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  10246. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  10247. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  10248. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10249. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  10250. .ilen = 512,
  10251. .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
  10252. "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
  10253. "\xea\x00\x80\x3f\x5e\x48\x23\x57"
  10254. "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
  10255. "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
  10256. "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
  10257. "\x68\x0a\x86\xac\x35\xad\xfc\x33"
  10258. "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
  10259. "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
  10260. "\xb1\x08\xfd\x10\x98\xba\xec\x70"
  10261. "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
  10262. "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
  10263. "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
  10264. "\xae\xba\x12\x29\x61\xd0\x3a\x75"
  10265. "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
  10266. "\x00\x02\x08\x87\x89\x14\x29\xca"
  10267. "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
  10268. "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
  10269. "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
  10270. "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
  10271. "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
  10272. "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
  10273. "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
  10274. "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
  10275. "\x93\xec\x05\xc5\x2e\x04\x93\xef"
  10276. "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
  10277. "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
  10278. "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
  10279. "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
  10280. "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
  10281. "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
  10282. "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
  10283. "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
  10284. "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
  10285. "\xbc\x48\x14\x57\x77\x8f\x61\x60"
  10286. "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
  10287. "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
  10288. "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
  10289. "\xf4\xc3\x33\xec\x44\x23\x88\x51"
  10290. "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
  10291. "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
  10292. "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
  10293. "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
  10294. "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
  10295. "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
  10296. "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
  10297. "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
  10298. "\x92\x5f\xed\xc4\xae\x74\xff\xac"
  10299. "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
  10300. "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
  10301. "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
  10302. "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
  10303. "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
  10304. "\x94\x30\x54\xff\x84\x01\x14\x93"
  10305. "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
  10306. "\x53\x76\x44\x1a\x77\xed\x43\x85"
  10307. "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
  10308. "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
  10309. "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
  10310. "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
  10311. "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
  10312. "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
  10313. "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
  10314. "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
  10315. .rlen = 512,
  10316. .also_non_np = 1,
  10317. .np = 2,
  10318. .tap = { 512 - 16, 16 },
  10319. }
  10320. };
  10321. static struct cipher_testvec aes_xts_dec_tv_template[] = {
  10322. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  10323. { /* XTS-AES 1 */
  10324. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  10325. "\x00\x00\x00\x00\x00\x00\x00\x00"
  10326. "\x00\x00\x00\x00\x00\x00\x00\x00"
  10327. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10328. .klen = 32,
  10329. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  10330. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10331. .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  10332. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  10333. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  10334. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  10335. .ilen = 32,
  10336. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  10337. "\x00\x00\x00\x00\x00\x00\x00\x00"
  10338. "\x00\x00\x00\x00\x00\x00\x00\x00"
  10339. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10340. .rlen = 32,
  10341. }, { /* XTS-AES 2 */
  10342. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  10343. "\x11\x11\x11\x11\x11\x11\x11\x11"
  10344. "\x22\x22\x22\x22\x22\x22\x22\x22"
  10345. "\x22\x22\x22\x22\x22\x22\x22\x22",
  10346. .klen = 32,
  10347. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  10348. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10349. .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  10350. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  10351. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  10352. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  10353. .ilen = 32,
  10354. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  10355. "\x44\x44\x44\x44\x44\x44\x44\x44"
  10356. "\x44\x44\x44\x44\x44\x44\x44\x44"
  10357. "\x44\x44\x44\x44\x44\x44\x44\x44",
  10358. .rlen = 32,
  10359. }, { /* XTS-AES 3 */
  10360. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  10361. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  10362. "\x22\x22\x22\x22\x22\x22\x22\x22"
  10363. "\x22\x22\x22\x22\x22\x22\x22\x22",
  10364. .klen = 32,
  10365. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  10366. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10367. .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  10368. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  10369. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  10370. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  10371. .ilen = 32,
  10372. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  10373. "\x44\x44\x44\x44\x44\x44\x44\x44"
  10374. "\x44\x44\x44\x44\x44\x44\x44\x44"
  10375. "\x44\x44\x44\x44\x44\x44\x44\x44",
  10376. .rlen = 32,
  10377. }, { /* XTS-AES 4 */
  10378. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  10379. "\x23\x53\x60\x28\x74\x71\x35\x26"
  10380. "\x31\x41\x59\x26\x53\x58\x97\x93"
  10381. "\x23\x84\x62\x64\x33\x83\x27\x95",
  10382. .klen = 32,
  10383. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  10384. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10385. .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  10386. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  10387. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  10388. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  10389. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  10390. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  10391. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  10392. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  10393. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  10394. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  10395. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  10396. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  10397. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  10398. "\x22\x97\x61\x46\xae\x20\xce\x84"
  10399. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  10400. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  10401. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  10402. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  10403. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  10404. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  10405. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  10406. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  10407. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  10408. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  10409. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  10410. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  10411. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  10412. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  10413. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  10414. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  10415. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  10416. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  10417. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  10418. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  10419. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  10420. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  10421. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  10422. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  10423. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  10424. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  10425. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  10426. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  10427. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  10428. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  10429. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  10430. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  10431. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  10432. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  10433. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  10434. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  10435. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  10436. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  10437. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  10438. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  10439. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  10440. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  10441. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  10442. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  10443. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  10444. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  10445. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  10446. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  10447. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  10448. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  10449. .ilen = 512,
  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. "\x20\x21\x22\x23\x24\x25\x26\x27"
  10455. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  10456. "\x30\x31\x32\x33\x34\x35\x36\x37"
  10457. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  10458. "\x40\x41\x42\x43\x44\x45\x46\x47"
  10459. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  10460. "\x50\x51\x52\x53\x54\x55\x56\x57"
  10461. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  10462. "\x60\x61\x62\x63\x64\x65\x66\x67"
  10463. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  10464. "\x70\x71\x72\x73\x74\x75\x76\x77"
  10465. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  10466. "\x80\x81\x82\x83\x84\x85\x86\x87"
  10467. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  10468. "\x90\x91\x92\x93\x94\x95\x96\x97"
  10469. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  10470. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  10471. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  10472. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  10473. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  10474. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  10475. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  10476. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  10477. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  10478. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  10479. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  10480. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10481. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  10482. "\x00\x01\x02\x03\x04\x05\x06\x07"
  10483. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10484. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10485. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  10486. "\x20\x21\x22\x23\x24\x25\x26\x27"
  10487. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  10488. "\x30\x31\x32\x33\x34\x35\x36\x37"
  10489. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  10490. "\x40\x41\x42\x43\x44\x45\x46\x47"
  10491. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  10492. "\x50\x51\x52\x53\x54\x55\x56\x57"
  10493. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  10494. "\x60\x61\x62\x63\x64\x65\x66\x67"
  10495. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  10496. "\x70\x71\x72\x73\x74\x75\x76\x77"
  10497. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  10498. "\x80\x81\x82\x83\x84\x85\x86\x87"
  10499. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  10500. "\x90\x91\x92\x93\x94\x95\x96\x97"
  10501. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  10502. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  10503. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  10504. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  10505. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  10506. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  10507. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  10508. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  10509. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  10510. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  10511. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  10512. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10513. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  10514. .rlen = 512,
  10515. }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
  10516. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  10517. "\x23\x53\x60\x28\x74\x71\x35\x26"
  10518. "\x62\x49\x77\x57\x24\x70\x93\x69"
  10519. "\x99\x59\x57\x49\x66\x96\x76\x27"
  10520. "\x31\x41\x59\x26\x53\x58\x97\x93"
  10521. "\x23\x84\x62\x64\x33\x83\x27\x95"
  10522. "\x02\x88\x41\x97\x16\x93\x99\x37"
  10523. "\x51\x05\x82\x09\x74\x94\x45\x92",
  10524. .klen = 64,
  10525. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  10526. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10527. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10528. "\x00\x00\x00\x00\x00\x00\x00\x00",
  10529. .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
  10530. "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
  10531. "\xea\x00\x80\x3f\x5e\x48\x23\x57"
  10532. "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
  10533. "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
  10534. "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
  10535. "\x68\x0a\x86\xac\x35\xad\xfc\x33"
  10536. "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
  10537. "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
  10538. "\xb1\x08\xfd\x10\x98\xba\xec\x70"
  10539. "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
  10540. "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
  10541. "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
  10542. "\xae\xba\x12\x29\x61\xd0\x3a\x75"
  10543. "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
  10544. "\x00\x02\x08\x87\x89\x14\x29\xca"
  10545. "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
  10546. "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
  10547. "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
  10548. "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
  10549. "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
  10550. "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
  10551. "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
  10552. "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
  10553. "\x93\xec\x05\xc5\x2e\x04\x93\xef"
  10554. "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
  10555. "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
  10556. "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
  10557. "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
  10558. "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
  10559. "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
  10560. "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
  10561. "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
  10562. "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
  10563. "\xbc\x48\x14\x57\x77\x8f\x61\x60"
  10564. "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
  10565. "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
  10566. "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
  10567. "\xf4\xc3\x33\xec\x44\x23\x88\x51"
  10568. "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
  10569. "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
  10570. "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
  10571. "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
  10572. "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
  10573. "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
  10574. "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
  10575. "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
  10576. "\x92\x5f\xed\xc4\xae\x74\xff\xac"
  10577. "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
  10578. "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
  10579. "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
  10580. "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
  10581. "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
  10582. "\x94\x30\x54\xff\x84\x01\x14\x93"
  10583. "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
  10584. "\x53\x76\x44\x1a\x77\xed\x43\x85"
  10585. "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
  10586. "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
  10587. "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
  10588. "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
  10589. "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
  10590. "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
  10591. "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
  10592. "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
  10593. .ilen = 512,
  10594. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  10595. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10596. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10597. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  10598. "\x20\x21\x22\x23\x24\x25\x26\x27"
  10599. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  10600. "\x30\x31\x32\x33\x34\x35\x36\x37"
  10601. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  10602. "\x40\x41\x42\x43\x44\x45\x46\x47"
  10603. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  10604. "\x50\x51\x52\x53\x54\x55\x56\x57"
  10605. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  10606. "\x60\x61\x62\x63\x64\x65\x66\x67"
  10607. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  10608. "\x70\x71\x72\x73\x74\x75\x76\x77"
  10609. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  10610. "\x80\x81\x82\x83\x84\x85\x86\x87"
  10611. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  10612. "\x90\x91\x92\x93\x94\x95\x96\x97"
  10613. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  10614. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  10615. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  10616. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  10617. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  10618. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  10619. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  10620. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  10621. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  10622. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  10623. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  10624. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10625. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  10626. "\x00\x01\x02\x03\x04\x05\x06\x07"
  10627. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10628. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10629. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  10630. "\x20\x21\x22\x23\x24\x25\x26\x27"
  10631. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  10632. "\x30\x31\x32\x33\x34\x35\x36\x37"
  10633. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  10634. "\x40\x41\x42\x43\x44\x45\x46\x47"
  10635. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  10636. "\x50\x51\x52\x53\x54\x55\x56\x57"
  10637. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  10638. "\x60\x61\x62\x63\x64\x65\x66\x67"
  10639. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  10640. "\x70\x71\x72\x73\x74\x75\x76\x77"
  10641. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  10642. "\x80\x81\x82\x83\x84\x85\x86\x87"
  10643. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  10644. "\x90\x91\x92\x93\x94\x95\x96\x97"
  10645. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  10646. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  10647. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  10648. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  10649. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  10650. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  10651. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  10652. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  10653. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  10654. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  10655. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  10656. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10657. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  10658. .rlen = 512,
  10659. .also_non_np = 1,
  10660. .np = 2,
  10661. .tap = { 512 - 16, 16 },
  10662. }
  10663. };
  10664. static struct cipher_testvec aes_ctr_enc_tv_template[] = {
  10665. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  10666. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  10667. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  10668. .klen = 16,
  10669. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10670. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  10671. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  10672. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  10673. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  10674. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  10675. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  10676. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  10677. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  10678. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  10679. .ilen = 64,
  10680. .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  10681. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  10682. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  10683. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  10684. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  10685. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  10686. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  10687. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  10688. .rlen = 64,
  10689. }, {
  10690. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  10691. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  10692. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  10693. .klen = 24,
  10694. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10695. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  10696. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  10697. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  10698. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  10699. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  10700. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  10701. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  10702. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  10703. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  10704. .ilen = 64,
  10705. .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  10706. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  10707. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  10708. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  10709. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  10710. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  10711. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  10712. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  10713. .rlen = 64,
  10714. }, {
  10715. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  10716. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  10717. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  10718. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  10719. .klen = 32,
  10720. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10721. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  10722. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  10723. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  10724. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  10725. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  10726. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  10727. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  10728. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  10729. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  10730. .ilen = 64,
  10731. .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  10732. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  10733. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  10734. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  10735. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  10736. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  10737. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  10738. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  10739. .rlen = 64,
  10740. }
  10741. };
  10742. static struct cipher_testvec aes_ctr_dec_tv_template[] = {
  10743. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  10744. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  10745. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  10746. .klen = 16,
  10747. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10748. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  10749. .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  10750. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  10751. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  10752. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  10753. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  10754. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  10755. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  10756. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  10757. .ilen = 64,
  10758. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  10759. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  10760. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  10761. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  10762. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  10763. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  10764. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  10765. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  10766. .rlen = 64,
  10767. }, {
  10768. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  10769. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  10770. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  10771. .klen = 24,
  10772. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10773. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  10774. .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  10775. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  10776. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  10777. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  10778. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  10779. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  10780. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  10781. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  10782. .ilen = 64,
  10783. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  10784. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  10785. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  10786. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  10787. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  10788. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  10789. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  10790. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  10791. .rlen = 64,
  10792. }, {
  10793. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  10794. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  10795. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  10796. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  10797. .klen = 32,
  10798. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10799. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  10800. .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  10801. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  10802. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  10803. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  10804. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  10805. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  10806. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  10807. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  10808. .ilen = 64,
  10809. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  10810. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  10811. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  10812. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  10813. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  10814. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  10815. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  10816. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  10817. .rlen = 64,
  10818. }
  10819. };
  10820. static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
  10821. { /* From RFC 3686 */
  10822. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  10823. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  10824. "\x00\x00\x00\x30",
  10825. .klen = 20,
  10826. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10827. .input = "Single block msg",
  10828. .ilen = 16,
  10829. .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  10830. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  10831. .rlen = 16,
  10832. }, {
  10833. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  10834. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  10835. "\x00\x6c\xb6\xdb",
  10836. .klen = 20,
  10837. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  10838. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  10839. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10840. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10841. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  10842. .ilen = 32,
  10843. .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  10844. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  10845. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  10846. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  10847. .rlen = 32,
  10848. }, {
  10849. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  10850. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  10851. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  10852. "\x00\x00\x00\x48",
  10853. .klen = 28,
  10854. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  10855. .input = "Single block msg",
  10856. .ilen = 16,
  10857. .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  10858. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  10859. .rlen = 16,
  10860. }, {
  10861. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  10862. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  10863. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  10864. "\x00\x96\xb0\x3b",
  10865. .klen = 28,
  10866. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  10867. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  10868. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10869. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10870. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  10871. .ilen = 32,
  10872. .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  10873. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  10874. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  10875. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  10876. .rlen = 32,
  10877. }, {
  10878. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  10879. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  10880. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  10881. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  10882. "\x00\x00\x00\x60",
  10883. .klen = 36,
  10884. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  10885. .input = "Single block msg",
  10886. .ilen = 16,
  10887. .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  10888. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  10889. .rlen = 16,
  10890. }, {
  10891. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  10892. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  10893. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  10894. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  10895. "\x00\xfa\xac\x24",
  10896. .klen = 36,
  10897. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  10898. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  10899. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10900. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10901. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  10902. .ilen = 32,
  10903. .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  10904. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  10905. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  10906. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  10907. .rlen = 32,
  10908. }, {
  10909. // generated using Crypto++
  10910. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  10911. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10912. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10913. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  10914. "\x00\x00\x00\x00",
  10915. .klen = 32 + 4,
  10916. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  10917. .input =
  10918. "\x00\x01\x02\x03\x04\x05\x06\x07"
  10919. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  10920. "\x10\x11\x12\x13\x14\x15\x16\x17"
  10921. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  10922. "\x20\x21\x22\x23\x24\x25\x26\x27"
  10923. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  10924. "\x30\x31\x32\x33\x34\x35\x36\x37"
  10925. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  10926. "\x40\x41\x42\x43\x44\x45\x46\x47"
  10927. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  10928. "\x50\x51\x52\x53\x54\x55\x56\x57"
  10929. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  10930. "\x60\x61\x62\x63\x64\x65\x66\x67"
  10931. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  10932. "\x70\x71\x72\x73\x74\x75\x76\x77"
  10933. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  10934. "\x80\x81\x82\x83\x84\x85\x86\x87"
  10935. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  10936. "\x90\x91\x92\x93\x94\x95\x96\x97"
  10937. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  10938. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  10939. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  10940. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  10941. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  10942. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  10943. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  10944. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  10945. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  10946. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  10947. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  10948. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  10949. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  10950. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  10951. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  10952. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  10953. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  10954. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  10955. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  10956. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  10957. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  10958. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  10959. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  10960. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  10961. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  10962. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  10963. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  10964. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  10965. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  10966. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  10967. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  10968. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  10969. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  10970. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  10971. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  10972. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  10973. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  10974. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  10975. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  10976. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  10977. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  10978. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  10979. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  10980. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  10981. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  10982. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  10983. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  10984. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  10985. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  10986. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  10987. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  10988. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  10989. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  10990. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  10991. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  10992. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  10993. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  10994. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  10995. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  10996. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  10997. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  10998. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  10999. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  11000. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  11001. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  11002. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  11003. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  11004. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  11005. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  11006. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  11007. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  11008. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  11009. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  11010. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  11011. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  11012. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  11013. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  11014. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  11015. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  11016. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  11017. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  11018. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  11019. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  11020. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  11021. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  11022. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  11023. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  11024. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  11025. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  11026. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  11027. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  11028. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  11029. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  11030. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  11031. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  11032. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  11033. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  11034. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  11035. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  11036. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  11037. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  11038. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  11039. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  11040. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  11041. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  11042. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  11043. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  11044. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  11045. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  11046. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  11047. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  11048. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  11049. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  11050. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  11051. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  11052. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  11053. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  11054. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  11055. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  11056. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  11057. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  11058. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  11059. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  11060. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  11061. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  11062. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  11063. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  11064. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  11065. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  11066. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  11067. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  11068. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  11069. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  11070. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  11071. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  11072. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  11073. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  11074. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  11075. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  11076. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  11077. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  11078. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  11079. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  11080. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  11081. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  11082. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  11083. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  11084. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  11085. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  11086. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  11087. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  11088. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  11089. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  11090. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  11091. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  11092. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  11093. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  11094. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  11095. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  11096. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  11097. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  11098. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  11099. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  11100. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  11101. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  11102. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  11103. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  11104. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  11105. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  11106. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  11107. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  11108. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  11109. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  11110. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  11111. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  11112. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  11113. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  11114. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  11115. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  11116. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  11117. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  11118. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  11119. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  11120. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  11121. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  11122. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  11123. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  11124. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  11125. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  11126. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  11127. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  11128. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  11129. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  11130. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  11131. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  11132. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  11133. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  11134. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  11135. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  11136. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  11137. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  11138. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  11139. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  11140. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  11141. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  11142. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  11143. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  11144. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  11145. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  11146. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  11147. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  11148. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  11149. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  11150. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  11151. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  11152. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  11153. "\x28\x37\x46\x55\x64\x73\x82\x91"
  11154. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  11155. "\x18\x27\x36\x45\x54\x63\x72\x81"
  11156. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  11157. "\x08\x17\x26\x35\x44\x53\x62\x71"
  11158. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  11159. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  11160. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  11161. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  11162. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  11163. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  11164. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  11165. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  11166. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  11167. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  11168. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  11169. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  11170. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  11171. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  11172. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  11173. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  11174. "\x00\x11\x22\x33\x44\x55\x66\x77"
  11175. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  11176. "\x10\x21\x32\x43\x54\x65\x76\x87"
  11177. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  11178. "\x20\x31\x42\x53\x64\x75\x86\x97"
  11179. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  11180. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  11181. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  11182. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  11183. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  11184. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  11185. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  11186. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  11187. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  11188. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  11189. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  11190. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  11191. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  11192. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  11193. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  11194. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  11195. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  11196. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  11197. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  11198. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  11199. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  11200. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  11201. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  11202. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  11203. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  11204. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  11205. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  11206. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  11207. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  11208. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  11209. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  11210. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  11211. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  11212. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  11213. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  11214. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  11215. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  11216. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  11217. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  11218. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  11219. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  11220. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  11221. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  11222. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  11223. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  11224. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  11225. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  11226. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  11227. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  11228. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  11229. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  11230. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  11231. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  11232. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  11233. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  11234. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  11235. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  11236. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  11237. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  11238. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  11239. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  11240. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  11241. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  11242. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  11243. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  11244. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  11245. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  11246. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  11247. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  11248. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  11249. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  11250. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  11251. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  11252. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  11253. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  11254. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  11255. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  11256. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  11257. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  11258. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  11259. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  11260. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  11261. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  11262. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  11263. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  11264. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  11265. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  11266. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  11267. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  11268. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  11269. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  11270. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  11271. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  11272. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  11273. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  11274. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  11275. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  11276. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  11277. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  11278. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  11279. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  11280. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  11281. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  11282. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  11283. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  11284. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  11285. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  11286. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  11287. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  11288. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  11289. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  11290. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  11291. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  11292. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  11293. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  11294. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  11295. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  11296. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  11297. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  11298. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  11299. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  11300. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  11301. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  11302. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  11303. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  11304. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  11305. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  11306. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  11307. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  11308. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  11309. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  11310. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  11311. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  11312. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  11313. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  11314. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  11315. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  11316. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  11317. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  11318. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  11319. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  11320. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  11321. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  11322. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  11323. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  11324. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  11325. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  11326. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  11327. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  11328. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  11329. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  11330. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  11331. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  11332. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  11333. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  11334. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  11335. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  11336. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  11337. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  11338. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  11339. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  11340. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  11341. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  11342. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  11343. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  11344. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  11345. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  11346. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  11347. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  11348. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  11349. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  11350. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  11351. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  11352. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  11353. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  11354. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  11355. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  11356. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  11357. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  11358. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  11359. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  11360. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  11361. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  11362. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  11363. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  11364. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  11365. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  11366. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  11367. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  11368. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  11369. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  11370. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  11371. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  11372. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  11373. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  11374. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  11375. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  11376. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  11377. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  11378. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  11379. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  11380. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  11381. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  11382. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  11383. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  11384. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  11385. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  11386. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  11387. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  11388. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  11389. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  11390. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  11391. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  11392. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  11393. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  11394. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  11395. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  11396. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  11397. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  11398. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  11399. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  11400. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  11401. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  11402. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  11403. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  11404. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  11405. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  11406. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  11407. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  11408. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  11409. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  11410. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  11411. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  11412. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  11413. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  11414. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  11415. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  11416. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  11417. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  11418. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  11419. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  11420. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  11421. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  11422. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  11423. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  11424. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  11425. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  11426. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  11427. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  11428. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  11429. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  11430. "\x00\x21\x42\x63",
  11431. .ilen = 4100,
  11432. .result =
  11433. "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
  11434. "\xae\xff\x91\x3a\x44\xcf\x38\x32"
  11435. "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
  11436. "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
  11437. "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
  11438. "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
  11439. "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
  11440. "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
  11441. "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
  11442. "\x18\xff\x75\x6d\x06\x2d\x00\xab"
  11443. "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
  11444. "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
  11445. "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
  11446. "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
  11447. "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
  11448. "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
  11449. "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
  11450. "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
  11451. "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
  11452. "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
  11453. "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
  11454. "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
  11455. "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
  11456. "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
  11457. "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
  11458. "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
  11459. "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
  11460. "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
  11461. "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
  11462. "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
  11463. "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
  11464. "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
  11465. "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
  11466. "\x6a\x25\x15\x33\x4e\x45\x08\xec"
  11467. "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
  11468. "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
  11469. "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
  11470. "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
  11471. "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
  11472. "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
  11473. "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
  11474. "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
  11475. "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
  11476. "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
  11477. "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
  11478. "\x04\x02\xef\xd3\x44\xde\x76\x31"
  11479. "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
  11480. "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
  11481. "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
  11482. "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
  11483. "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
  11484. "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
  11485. "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
  11486. "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
  11487. "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
  11488. "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
  11489. "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
  11490. "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
  11491. "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
  11492. "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
  11493. "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
  11494. "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
  11495. "\x32\x03\xed\xf0\x50\x1c\x56\x39"
  11496. "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
  11497. "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
  11498. "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
  11499. "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
  11500. "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
  11501. "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
  11502. "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
  11503. "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
  11504. "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
  11505. "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
  11506. "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
  11507. "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
  11508. "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
  11509. "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
  11510. "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
  11511. "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
  11512. "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
  11513. "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
  11514. "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
  11515. "\x69\x3a\x29\x23\xac\x86\x32\xa5"
  11516. "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
  11517. "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
  11518. "\x59\x6a\xd3\x50\x59\x43\x59\xde"
  11519. "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
  11520. "\x18\x34\x0d\x1a\x63\x33\xed\x10"
  11521. "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
  11522. "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
  11523. "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
  11524. "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
  11525. "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
  11526. "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
  11527. "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
  11528. "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
  11529. "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
  11530. "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
  11531. "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
  11532. "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
  11533. "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
  11534. "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
  11535. "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
  11536. "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
  11537. "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
  11538. "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
  11539. "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
  11540. "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
  11541. "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
  11542. "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
  11543. "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
  11544. "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
  11545. "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
  11546. "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
  11547. "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
  11548. "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
  11549. "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
  11550. "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
  11551. "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
  11552. "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
  11553. "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
  11554. "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
  11555. "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
  11556. "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
  11557. "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
  11558. "\x26\x39\x83\x94\xef\x27\xd8\x53"
  11559. "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
  11560. "\x43\x7c\x95\x0a\x53\xef\x66\xda"
  11561. "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
  11562. "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
  11563. "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
  11564. "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
  11565. "\x88\xee\x73\xcf\x66\x2f\x52\x56"
  11566. "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
  11567. "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
  11568. "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
  11569. "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
  11570. "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
  11571. "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
  11572. "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
  11573. "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
  11574. "\xba\x61\x34\x38\x7c\xda\x48\x3e"
  11575. "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
  11576. "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
  11577. "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
  11578. "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
  11579. "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
  11580. "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
  11581. "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
  11582. "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
  11583. "\x35\x12\xe3\x36\x28\x27\x36\x58"
  11584. "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
  11585. "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
  11586. "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
  11587. "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
  11588. "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
  11589. "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
  11590. "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
  11591. "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
  11592. "\x89\xf3\x78\x35\x44\x62\x78\x72"
  11593. "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
  11594. "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
  11595. "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
  11596. "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
  11597. "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
  11598. "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
  11599. "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
  11600. "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
  11601. "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
  11602. "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
  11603. "\xd2\x49\x77\x81\x6d\x90\x70\xae"
  11604. "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
  11605. "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
  11606. "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
  11607. "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
  11608. "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
  11609. "\x45\x42\x27\x75\x50\xe5\xee\xb8"
  11610. "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
  11611. "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
  11612. "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
  11613. "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
  11614. "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
  11615. "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
  11616. "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
  11617. "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
  11618. "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
  11619. "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
  11620. "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
  11621. "\xa9\x21\x2b\x92\x94\x87\x62\x57"
  11622. "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
  11623. "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
  11624. "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
  11625. "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
  11626. "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
  11627. "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
  11628. "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
  11629. "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
  11630. "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
  11631. "\x69\x34\x78\x61\x24\x21\x9c\x8a"
  11632. "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
  11633. "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
  11634. "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
  11635. "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
  11636. "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
  11637. "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
  11638. "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
  11639. "\xb1\x95\x28\x86\x20\xe9\x17\x49"
  11640. "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
  11641. "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
  11642. "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
  11643. "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
  11644. "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
  11645. "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
  11646. "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
  11647. "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
  11648. "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
  11649. "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
  11650. "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
  11651. "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
  11652. "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
  11653. "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
  11654. "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
  11655. "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
  11656. "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
  11657. "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
  11658. "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
  11659. "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
  11660. "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
  11661. "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
  11662. "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
  11663. "\x29\x90\x46\x30\x92\x69\x7d\x13"
  11664. "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
  11665. "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
  11666. "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
  11667. "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
  11668. "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
  11669. "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
  11670. "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
  11671. "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
  11672. "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
  11673. "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
  11674. "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
  11675. "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
  11676. "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
  11677. "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
  11678. "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
  11679. "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
  11680. "\x77\x65\x08\x60\x11\x76\x4c\x8d"
  11681. "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
  11682. "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
  11683. "\x03\xd1\x24\x95\xec\x6d\xab\x38"
  11684. "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
  11685. "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
  11686. "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
  11687. "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
  11688. "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
  11689. "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
  11690. "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
  11691. "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
  11692. "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
  11693. "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
  11694. "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
  11695. "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
  11696. "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
  11697. "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
  11698. "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
  11699. "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
  11700. "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
  11701. "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
  11702. "\xe5\x79\x81\x73\xcd\x43\x59\x68"
  11703. "\x73\x02\x3b\x78\x21\x72\x43\x00"
  11704. "\x49\x17\xf7\x00\xaf\x68\x24\x53"
  11705. "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
  11706. "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
  11707. "\x11\x94\x13\x69\x51\x09\x28\xde"
  11708. "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
  11709. "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
  11710. "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
  11711. "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
  11712. "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
  11713. "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
  11714. "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
  11715. "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
  11716. "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
  11717. "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
  11718. "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
  11719. "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
  11720. "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
  11721. "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
  11722. "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
  11723. "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
  11724. "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
  11725. "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
  11726. "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
  11727. "\x69\xdc\xab\x24\x57\x60\x47\xc1"
  11728. "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
  11729. "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
  11730. "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
  11731. "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
  11732. "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
  11733. "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
  11734. "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
  11735. "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
  11736. "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
  11737. "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
  11738. "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
  11739. "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
  11740. "\x85\x62\x82\x70\x18\xe2\x9a\x78"
  11741. "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
  11742. "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
  11743. "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
  11744. "\x35\xf3\x61\x06\x72\x84\xc4\x32"
  11745. "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
  11746. "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
  11747. "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
  11748. "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
  11749. "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
  11750. "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
  11751. "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
  11752. "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
  11753. "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
  11754. "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
  11755. "\x4f\x73\x38\x09\x75\x64\x48\xe0"
  11756. "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
  11757. "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
  11758. "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
  11759. "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
  11760. "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
  11761. "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
  11762. "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
  11763. "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
  11764. "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
  11765. "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
  11766. "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
  11767. "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
  11768. "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
  11769. "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
  11770. "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
  11771. "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
  11772. "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
  11773. "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
  11774. "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
  11775. "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
  11776. "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
  11777. "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
  11778. "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
  11779. "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
  11780. "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
  11781. "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
  11782. "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
  11783. "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
  11784. "\xce\x4d\x5f\x18\x60\xce\x87\x22"
  11785. "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
  11786. "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
  11787. "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
  11788. "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
  11789. "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
  11790. "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
  11791. "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
  11792. "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
  11793. "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
  11794. "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
  11795. "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
  11796. "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
  11797. "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
  11798. "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
  11799. "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
  11800. "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
  11801. "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
  11802. "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
  11803. "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
  11804. "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
  11805. "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
  11806. "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
  11807. "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
  11808. "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
  11809. "\xce\x54\xf9\x18\x58\xb5\xff\x44"
  11810. "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
  11811. "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
  11812. "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
  11813. "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
  11814. "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
  11815. "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
  11816. "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
  11817. "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
  11818. "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
  11819. "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
  11820. "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
  11821. "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
  11822. "\x0c\xd6\x04\x14\xde\x51\x74\x75"
  11823. "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
  11824. "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
  11825. "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
  11826. "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
  11827. "\x75\x46\x65\x4e\x07\x34\x37\xa3"
  11828. "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
  11829. "\x69\x24\x0e\x38\x67\x43\x8c\xde"
  11830. "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
  11831. "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
  11832. "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
  11833. "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
  11834. "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
  11835. "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
  11836. "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
  11837. "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
  11838. "\x91\x7d\x62\x64\x96\x72\xde\xfc"
  11839. "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
  11840. "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
  11841. "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
  11842. "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
  11843. "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
  11844. "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
  11845. "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
  11846. "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
  11847. "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
  11848. "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
  11849. "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
  11850. "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
  11851. "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
  11852. "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
  11853. "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
  11854. "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
  11855. "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
  11856. "\xae\xed\x39\x88\x42\x11\x3c\xed"
  11857. "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
  11858. "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
  11859. "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
  11860. "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
  11861. "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
  11862. "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
  11863. "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
  11864. "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
  11865. "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
  11866. "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
  11867. "\x34\x17\xde\xba\x47\xf1\x06\x18"
  11868. "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
  11869. "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
  11870. "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
  11871. "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
  11872. "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
  11873. "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
  11874. "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
  11875. "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
  11876. "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
  11877. "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
  11878. "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
  11879. "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
  11880. "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
  11881. "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
  11882. "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
  11883. "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
  11884. "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
  11885. "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
  11886. "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
  11887. "\x2c\x56\x39\x79\x0f\x69\x44\x75"
  11888. "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
  11889. "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
  11890. "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
  11891. "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
  11892. "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
  11893. "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
  11894. "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
  11895. "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
  11896. "\x63\x9b\xce\x61\x24\x79\xc0\x70"
  11897. "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
  11898. "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
  11899. "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
  11900. "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
  11901. "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
  11902. "\x74\x56\x58\x40\x02\x37\x52\x2c"
  11903. "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
  11904. "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
  11905. "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
  11906. "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
  11907. "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
  11908. "\xed\x38\x80\x36\x72\x43\x27\x49"
  11909. "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
  11910. "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
  11911. "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
  11912. "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
  11913. "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
  11914. "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
  11915. "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
  11916. "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
  11917. "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
  11918. "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
  11919. "\x12\xee\x30\xfe\xd8\x30\xef\x34"
  11920. "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
  11921. "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
  11922. "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
  11923. "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
  11924. "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
  11925. "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
  11926. "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
  11927. "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
  11928. "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
  11929. "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
  11930. "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
  11931. "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
  11932. "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
  11933. "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
  11934. "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
  11935. "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
  11936. "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
  11937. "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
  11938. "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
  11939. "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
  11940. "\x44\x12\xfb\x73\x77\xd4\x13\x39"
  11941. "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
  11942. "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
  11943. "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
  11944. "\x4b\xef\x31\x18\xea\xac\xb1\x84"
  11945. "\x21\xed\xda\x86",
  11946. .rlen = 4100,
  11947. .np = 2,
  11948. .tap = { 4064, 36 },
  11949. },
  11950. };
  11951. static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
  11952. { /* From RFC 3686 */
  11953. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  11954. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  11955. "\x00\x00\x00\x30",
  11956. .klen = 20,
  11957. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  11958. .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  11959. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  11960. .ilen = 16,
  11961. .result = "Single block msg",
  11962. .rlen = 16,
  11963. }, {
  11964. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  11965. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  11966. "\x00\x6c\xb6\xdb",
  11967. .klen = 20,
  11968. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  11969. .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  11970. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  11971. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  11972. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  11973. .ilen = 32,
  11974. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  11975. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  11976. "\x10\x11\x12\x13\x14\x15\x16\x17"
  11977. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  11978. .rlen = 32,
  11979. }, {
  11980. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  11981. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  11982. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  11983. "\x00\x00\x00\x48",
  11984. .klen = 28,
  11985. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  11986. .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  11987. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  11988. .ilen = 16,
  11989. .result = "Single block msg",
  11990. .rlen = 16,
  11991. }, {
  11992. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  11993. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  11994. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  11995. "\x00\x96\xb0\x3b",
  11996. .klen = 28,
  11997. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  11998. .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  11999. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  12000. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  12001. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  12002. .ilen = 32,
  12003. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12004. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12005. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12006. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  12007. .rlen = 32,
  12008. }, {
  12009. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  12010. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  12011. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  12012. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  12013. "\x00\x00\x00\x60",
  12014. .klen = 36,
  12015. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  12016. .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  12017. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  12018. .ilen = 16,
  12019. .result = "Single block msg",
  12020. .rlen = 16,
  12021. }, {
  12022. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  12023. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  12024. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  12025. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  12026. "\x00\xfa\xac\x24",
  12027. .klen = 36,
  12028. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  12029. .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  12030. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  12031. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  12032. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  12033. .ilen = 32,
  12034. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12035. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12036. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12037. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  12038. .rlen = 32,
  12039. },
  12040. };
  12041. static struct cipher_testvec aes_ofb_enc_tv_template[] = {
  12042. /* From NIST Special Publication 800-38A, Appendix F.5 */
  12043. {
  12044. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  12045. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  12046. .klen = 16,
  12047. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
  12048. "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  12049. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  12050. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  12051. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  12052. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  12053. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  12054. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  12055. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  12056. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  12057. .ilen = 64,
  12058. .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
  12059. "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
  12060. "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
  12061. "\x3c\x52\xda\xc5\x4e\xd8\x25"
  12062. "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
  12063. "\x44\xf7\xa8\x22\x60\xed\xcc"
  12064. "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
  12065. "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
  12066. .rlen = 64,
  12067. }
  12068. };
  12069. static struct cipher_testvec aes_ofb_dec_tv_template[] = {
  12070. /* From NIST Special Publication 800-38A, Appendix F.5 */
  12071. {
  12072. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  12073. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  12074. .klen = 16,
  12075. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
  12076. "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  12077. .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
  12078. "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
  12079. "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
  12080. "\x3c\x52\xda\xc5\x4e\xd8\x25"
  12081. "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
  12082. "\x44\xf7\xa8\x22\x60\xed\xcc"
  12083. "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
  12084. "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
  12085. .ilen = 64,
  12086. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  12087. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  12088. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  12089. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  12090. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  12091. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  12092. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  12093. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  12094. .rlen = 64,
  12095. }
  12096. };
  12097. static struct aead_testvec aes_gcm_enc_tv_template[] = {
  12098. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  12099. .key = zeroed_string,
  12100. .klen = 16,
  12101. .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
  12102. "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
  12103. .rlen = 16,
  12104. }, {
  12105. .key = zeroed_string,
  12106. .klen = 16,
  12107. .input = zeroed_string,
  12108. .ilen = 16,
  12109. .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
  12110. "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
  12111. "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
  12112. "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
  12113. .rlen = 32,
  12114. }, {
  12115. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12116. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  12117. .klen = 16,
  12118. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  12119. "\xde\xca\xf8\x88",
  12120. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  12121. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  12122. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  12123. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  12124. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  12125. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  12126. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  12127. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  12128. .ilen = 64,
  12129. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  12130. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  12131. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  12132. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  12133. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  12134. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  12135. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  12136. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  12137. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  12138. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  12139. .rlen = 80,
  12140. }, {
  12141. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12142. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  12143. .klen = 16,
  12144. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  12145. "\xde\xca\xf8\x88",
  12146. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  12147. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  12148. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  12149. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  12150. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  12151. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  12152. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  12153. "\xba\x63\x7b\x39",
  12154. .ilen = 60,
  12155. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  12156. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  12157. "\xab\xad\xda\xd2",
  12158. .alen = 20,
  12159. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  12160. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  12161. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  12162. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  12163. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  12164. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  12165. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  12166. "\x3d\x58\xe0\x91"
  12167. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  12168. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  12169. .rlen = 76,
  12170. }, {
  12171. .key = zeroed_string,
  12172. .klen = 24,
  12173. .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
  12174. "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
  12175. .rlen = 16,
  12176. }, {
  12177. .key = zeroed_string,
  12178. .klen = 24,
  12179. .input = zeroed_string,
  12180. .ilen = 16,
  12181. .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  12182. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  12183. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  12184. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  12185. .rlen = 32,
  12186. }, {
  12187. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12188. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12189. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  12190. .klen = 24,
  12191. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  12192. "\xde\xca\xf8\x88",
  12193. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  12194. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  12195. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  12196. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  12197. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  12198. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  12199. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  12200. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  12201. .ilen = 64,
  12202. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  12203. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  12204. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  12205. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  12206. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  12207. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  12208. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  12209. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  12210. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  12211. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  12212. .rlen = 80,
  12213. }, {
  12214. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12215. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12216. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  12217. .klen = 24,
  12218. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  12219. "\xde\xca\xf8\x88",
  12220. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  12221. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  12222. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  12223. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  12224. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  12225. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  12226. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  12227. "\xba\x63\x7b\x39",
  12228. .ilen = 60,
  12229. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  12230. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  12231. "\xab\xad\xda\xd2",
  12232. .alen = 20,
  12233. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  12234. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  12235. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  12236. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  12237. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  12238. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  12239. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  12240. "\xcc\xda\x27\x10"
  12241. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  12242. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  12243. .rlen = 76,
  12244. .np = 2,
  12245. .tap = { 32, 28 },
  12246. .anp = 2,
  12247. .atap = { 8, 12 }
  12248. }, {
  12249. .key = zeroed_string,
  12250. .klen = 32,
  12251. .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
  12252. "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
  12253. .rlen = 16,
  12254. }
  12255. };
  12256. static struct aead_testvec aes_gcm_dec_tv_template[] = {
  12257. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  12258. .key = zeroed_string,
  12259. .klen = 32,
  12260. .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
  12261. "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
  12262. "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
  12263. "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
  12264. .ilen = 32,
  12265. .result = zeroed_string,
  12266. .rlen = 16,
  12267. }, {
  12268. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12269. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12270. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12271. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  12272. .klen = 32,
  12273. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  12274. "\xde\xca\xf8\x88",
  12275. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  12276. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  12277. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  12278. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  12279. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  12280. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  12281. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  12282. "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
  12283. "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
  12284. "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
  12285. .ilen = 80,
  12286. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  12287. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  12288. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  12289. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  12290. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  12291. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  12292. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  12293. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  12294. .rlen = 64,
  12295. }, {
  12296. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12297. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12298. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12299. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  12300. .klen = 32,
  12301. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  12302. "\xde\xca\xf8\x88",
  12303. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  12304. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  12305. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  12306. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  12307. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  12308. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  12309. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  12310. "\xbc\xc9\xf6\x62"
  12311. "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
  12312. "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
  12313. .ilen = 76,
  12314. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  12315. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  12316. "\xab\xad\xda\xd2",
  12317. .alen = 20,
  12318. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  12319. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  12320. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  12321. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  12322. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  12323. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  12324. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  12325. "\xba\x63\x7b\x39",
  12326. .rlen = 60,
  12327. .np = 2,
  12328. .tap = { 48, 28 },
  12329. .anp = 3,
  12330. .atap = { 8, 8, 4 }
  12331. }, {
  12332. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12333. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  12334. .klen = 16,
  12335. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  12336. "\xde\xca\xf8\x88",
  12337. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  12338. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  12339. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  12340. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  12341. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  12342. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  12343. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  12344. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  12345. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  12346. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  12347. .ilen = 80,
  12348. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  12349. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  12350. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  12351. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  12352. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  12353. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  12354. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  12355. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  12356. .rlen = 64,
  12357. }, {
  12358. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12359. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  12360. .klen = 16,
  12361. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  12362. "\xde\xca\xf8\x88",
  12363. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  12364. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  12365. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  12366. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  12367. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  12368. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  12369. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  12370. "\x3d\x58\xe0\x91"
  12371. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  12372. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  12373. .ilen = 76,
  12374. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  12375. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  12376. "\xab\xad\xda\xd2",
  12377. .alen = 20,
  12378. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  12379. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  12380. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  12381. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  12382. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  12383. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  12384. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  12385. "\xba\x63\x7b\x39",
  12386. .rlen = 60,
  12387. }, {
  12388. .key = zeroed_string,
  12389. .klen = 24,
  12390. .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  12391. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  12392. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  12393. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  12394. .ilen = 32,
  12395. .result = zeroed_string,
  12396. .rlen = 16,
  12397. }, {
  12398. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12399. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12400. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  12401. .klen = 24,
  12402. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  12403. "\xde\xca\xf8\x88",
  12404. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  12405. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  12406. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  12407. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  12408. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  12409. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  12410. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  12411. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  12412. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  12413. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  12414. .ilen = 80,
  12415. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  12416. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  12417. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  12418. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  12419. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  12420. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  12421. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  12422. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  12423. .rlen = 64,
  12424. }, {
  12425. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12426. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12427. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  12428. .klen = 24,
  12429. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  12430. "\xde\xca\xf8\x88",
  12431. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  12432. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  12433. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  12434. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  12435. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  12436. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  12437. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  12438. "\xcc\xda\x27\x10"
  12439. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  12440. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  12441. .ilen = 76,
  12442. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  12443. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  12444. "\xab\xad\xda\xd2",
  12445. .alen = 20,
  12446. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  12447. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  12448. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  12449. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  12450. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  12451. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  12452. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  12453. "\xba\x63\x7b\x39",
  12454. .rlen = 60,
  12455. }
  12456. };
  12457. static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
  12458. { /* Generated using Crypto++ */
  12459. .key = zeroed_string,
  12460. .klen = 20,
  12461. .iv = zeroed_string,
  12462. .input = zeroed_string,
  12463. .ilen = 16,
  12464. .assoc = zeroed_string,
  12465. .alen = 8,
  12466. .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
  12467. "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
  12468. "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
  12469. "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
  12470. .rlen = 32,
  12471. },{
  12472. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12473. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12474. "\x00\x00\x00\x00",
  12475. .klen = 20,
  12476. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  12477. "\x00\x00\x00\x00",
  12478. .input = zeroed_string,
  12479. .ilen = 16,
  12480. .assoc = zeroed_string,
  12481. .alen = 8,
  12482. .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
  12483. "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
  12484. "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
  12485. "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
  12486. .rlen = 32,
  12487. }, {
  12488. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12489. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12490. "\x00\x00\x00\x00",
  12491. .klen = 20,
  12492. .iv = zeroed_string,
  12493. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  12494. "\x01\x01\x01\x01\x01\x01\x01\x01",
  12495. .ilen = 16,
  12496. .assoc = zeroed_string,
  12497. .alen = 8,
  12498. .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  12499. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  12500. "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
  12501. "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
  12502. .rlen = 32,
  12503. }, {
  12504. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12505. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12506. "\x00\x00\x00\x00",
  12507. .klen = 20,
  12508. .iv = zeroed_string,
  12509. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  12510. "\x01\x01\x01\x01\x01\x01\x01\x01",
  12511. .ilen = 16,
  12512. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  12513. .alen = 8,
  12514. .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  12515. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  12516. "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
  12517. "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
  12518. .rlen = 32,
  12519. }, {
  12520. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12521. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12522. "\x00\x00\x00\x00",
  12523. .klen = 20,
  12524. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  12525. "\x00\x00\x00\x00",
  12526. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  12527. "\x01\x01\x01\x01\x01\x01\x01\x01",
  12528. .ilen = 16,
  12529. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  12530. .alen = 8,
  12531. .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  12532. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  12533. "\x64\x50\xF9\x32\x13\xFB\x74\x61"
  12534. "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
  12535. .rlen = 32,
  12536. }, {
  12537. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12538. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12539. "\x00\x00\x00\x00",
  12540. .klen = 20,
  12541. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  12542. "\x00\x00\x00\x00",
  12543. .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
  12544. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12545. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12546. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12547. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12548. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12549. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12550. "\x01\x01\x01\x01\x01\x01\x01\x01",
  12551. .ilen = 64,
  12552. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  12553. .alen = 8,
  12554. .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  12555. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  12556. "\x98\x14\xA1\x42\x37\x80\xFD\x90"
  12557. "\x68\x12\x01\xA8\x91\x89\xB9\x83"
  12558. "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
  12559. "\x94\x5F\x18\x12\xBA\x27\x09\x39"
  12560. "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
  12561. "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
  12562. "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
  12563. "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
  12564. .rlen = 80,
  12565. }, {
  12566. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12567. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12568. "\x00\x00\x00\x00",
  12569. .klen = 20,
  12570. .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
  12571. "\x00\x00\x00\x00",
  12572. .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
  12573. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12574. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12575. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12576. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12577. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12578. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12579. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12580. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12581. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12582. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12583. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12584. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12585. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12586. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12587. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12588. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12589. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12590. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12591. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12592. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12593. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12594. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12595. "\xff\xff\xff\xff\xff\xff\xff\xff",
  12596. .ilen = 192,
  12597. .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  12598. "\xaa\xaa\xaa\xaa",
  12599. .alen = 12,
  12600. .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
  12601. "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
  12602. "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
  12603. "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
  12604. "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
  12605. "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
  12606. "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
  12607. "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
  12608. "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
  12609. "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
  12610. "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
  12611. "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
  12612. "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
  12613. "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
  12614. "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
  12615. "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
  12616. "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
  12617. "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
  12618. "\x7E\x13\x06\x82\x08\x17\xA4\x35"
  12619. "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
  12620. "\xA3\x05\x38\x95\x20\x1A\x47\x04"
  12621. "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
  12622. "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
  12623. "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
  12624. "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
  12625. "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
  12626. .rlen = 208,
  12627. }
  12628. };
  12629. static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
  12630. { /* Generated using Crypto++ */
  12631. .key = zeroed_string,
  12632. .klen = 20,
  12633. .iv = zeroed_string,
  12634. .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
  12635. "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
  12636. "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
  12637. "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
  12638. .ilen = 32,
  12639. .assoc = zeroed_string,
  12640. .alen = 8,
  12641. .result = zeroed_string,
  12642. .rlen = 16,
  12643. },{
  12644. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12645. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12646. "\x00\x00\x00\x00",
  12647. .klen = 20,
  12648. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  12649. "\x00\x00\x00\x00",
  12650. .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
  12651. "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
  12652. "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
  12653. "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
  12654. .ilen = 32,
  12655. .assoc = zeroed_string,
  12656. .alen = 8,
  12657. .result = zeroed_string,
  12658. .rlen = 16,
  12659. }, {
  12660. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12661. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12662. "\x00\x00\x00\x00",
  12663. .klen = 20,
  12664. .iv = zeroed_string,
  12665. .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  12666. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  12667. "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
  12668. "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
  12669. .ilen = 32,
  12670. .assoc = zeroed_string,
  12671. .alen = 8,
  12672. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  12673. "\x01\x01\x01\x01\x01\x01\x01\x01",
  12674. .rlen = 16,
  12675. }, {
  12676. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12677. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12678. "\x00\x00\x00\x00",
  12679. .klen = 20,
  12680. .iv = zeroed_string,
  12681. .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
  12682. "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
  12683. "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
  12684. "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
  12685. .ilen = 32,
  12686. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  12687. .alen = 8,
  12688. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  12689. "\x01\x01\x01\x01\x01\x01\x01\x01",
  12690. .rlen = 16,
  12691. }, {
  12692. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12693. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12694. "\x00\x00\x00\x00",
  12695. .klen = 20,
  12696. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  12697. "\x00\x00\x00\x00",
  12698. .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  12699. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  12700. "\x64\x50\xF9\x32\x13\xFB\x74\x61"
  12701. "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
  12702. .ilen = 32,
  12703. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  12704. .alen = 8,
  12705. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  12706. "\x01\x01\x01\x01\x01\x01\x01\x01",
  12707. .rlen = 16,
  12708. }, {
  12709. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  12710. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  12711. "\x00\x00\x00\x00",
  12712. .klen = 20,
  12713. .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
  12714. "\x00\x00\x00\x00",
  12715. .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
  12716. "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
  12717. "\x98\x14\xA1\x42\x37\x80\xFD\x90"
  12718. "\x68\x12\x01\xA8\x91\x89\xB9\x83"
  12719. "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
  12720. "\x94\x5F\x18\x12\xBA\x27\x09\x39"
  12721. "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
  12722. "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
  12723. "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
  12724. "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
  12725. .ilen = 80,
  12726. .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
  12727. .alen = 8,
  12728. .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
  12729. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12730. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12731. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12732. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12733. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12734. "\x01\x01\x01\x01\x01\x01\x01\x01"
  12735. "\x01\x01\x01\x01\x01\x01\x01\x01",
  12736. .rlen = 64,
  12737. }, {
  12738. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12739. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12740. "\x00\x00\x00\x00",
  12741. .klen = 20,
  12742. .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
  12743. "\x00\x00\x00\x00",
  12744. .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
  12745. "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
  12746. "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
  12747. "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
  12748. "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
  12749. "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
  12750. "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
  12751. "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
  12752. "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
  12753. "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
  12754. "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
  12755. "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
  12756. "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
  12757. "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
  12758. "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
  12759. "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
  12760. "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
  12761. "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
  12762. "\x7E\x13\x06\x82\x08\x17\xA4\x35"
  12763. "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
  12764. "\xA3\x05\x38\x95\x20\x1A\x47\x04"
  12765. "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
  12766. "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
  12767. "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
  12768. "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
  12769. "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
  12770. .ilen = 208,
  12771. .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  12772. "\xaa\xaa\xaa\xaa",
  12773. .alen = 12,
  12774. .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
  12775. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12776. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12777. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12778. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12779. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12780. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12781. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12782. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12783. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12784. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12785. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12786. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12787. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12788. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12789. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12790. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12791. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12792. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12793. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12794. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12795. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12796. "\xff\xff\xff\xff\xff\xff\xff\xff"
  12797. "\xff\xff\xff\xff\xff\xff\xff\xff",
  12798. .rlen = 192,
  12799. }
  12800. };
  12801. static struct aead_testvec aes_ccm_enc_tv_template[] = {
  12802. { /* From RFC 3610 */
  12803. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12804. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  12805. .klen = 16,
  12806. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  12807. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  12808. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  12809. .alen = 8,
  12810. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12811. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12812. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  12813. .ilen = 23,
  12814. .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  12815. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  12816. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  12817. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  12818. .rlen = 31,
  12819. }, {
  12820. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12821. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  12822. .klen = 16,
  12823. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  12824. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  12825. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12826. "\x08\x09\x0a\x0b",
  12827. .alen = 12,
  12828. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  12829. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  12830. "\x1c\x1d\x1e\x1f",
  12831. .ilen = 20,
  12832. .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  12833. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  12834. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  12835. "\x7d\x9c\x2d\x93",
  12836. .rlen = 28,
  12837. }, {
  12838. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12839. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  12840. .klen = 16,
  12841. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  12842. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  12843. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  12844. .alen = 8,
  12845. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12846. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12847. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12848. "\x20",
  12849. .ilen = 25,
  12850. .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  12851. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  12852. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  12853. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  12854. "\x7e\x5f\x4e",
  12855. .rlen = 35,
  12856. }, {
  12857. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12858. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  12859. .klen = 16,
  12860. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  12861. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  12862. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12863. "\x08\x09\x0a\x0b",
  12864. .alen = 12,
  12865. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  12866. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  12867. "\x1c\x1d\x1e",
  12868. .ilen = 19,
  12869. .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
  12870. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  12871. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  12872. "\x4d\x99\x99\x88\xdd",
  12873. .rlen = 29,
  12874. }, {
  12875. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  12876. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  12877. .klen = 16,
  12878. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  12879. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  12880. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  12881. .alen = 8,
  12882. .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  12883. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  12884. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  12885. .ilen = 24,
  12886. .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  12887. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  12888. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  12889. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  12890. .rlen = 32,
  12891. }, {
  12892. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  12893. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  12894. .klen = 16,
  12895. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  12896. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  12897. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  12898. "\x20\xea\x60\xc0",
  12899. .alen = 12,
  12900. .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  12901. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  12902. "\x3a\x80\x3b\xa8\x7f",
  12903. .ilen = 21,
  12904. .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  12905. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  12906. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  12907. "\x5a\xe0\x70\x45\x51",
  12908. .rlen = 29,
  12909. }, {
  12910. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  12911. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  12912. .klen = 16,
  12913. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  12914. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  12915. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  12916. .alen = 8,
  12917. .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  12918. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  12919. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  12920. .ilen = 23,
  12921. .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  12922. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  12923. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  12924. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  12925. "\xba",
  12926. .rlen = 33,
  12927. },
  12928. };
  12929. static struct aead_testvec aes_ccm_dec_tv_template[] = {
  12930. { /* From RFC 3610 */
  12931. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12932. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  12933. .klen = 16,
  12934. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  12935. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  12936. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  12937. .alen = 8,
  12938. .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  12939. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  12940. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  12941. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  12942. .ilen = 31,
  12943. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12944. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12945. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  12946. .rlen = 23,
  12947. }, {
  12948. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12949. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  12950. .klen = 16,
  12951. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  12952. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  12953. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12954. "\x08\x09\x0a\x0b",
  12955. .alen = 12,
  12956. .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  12957. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  12958. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  12959. "\x7d\x9c\x2d\x93",
  12960. .ilen = 28,
  12961. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  12962. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  12963. "\x1c\x1d\x1e\x1f",
  12964. .rlen = 20,
  12965. }, {
  12966. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12967. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  12968. .klen = 16,
  12969. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  12970. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  12971. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  12972. .alen = 8,
  12973. .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  12974. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  12975. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  12976. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  12977. "\x7e\x5f\x4e",
  12978. .ilen = 35,
  12979. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  12980. "\x10\x11\x12\x13\x14\x15\x16\x17"
  12981. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  12982. "\x20",
  12983. .rlen = 25,
  12984. }, {
  12985. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  12986. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  12987. .klen = 16,
  12988. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  12989. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  12990. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  12991. "\x08\x09\x0a\x0b",
  12992. .alen = 12,
  12993. .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
  12994. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  12995. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  12996. "\x4d\x99\x99\x88\xdd",
  12997. .ilen = 29,
  12998. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  12999. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  13000. "\x1c\x1d\x1e",
  13001. .rlen = 19,
  13002. }, {
  13003. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  13004. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  13005. .klen = 16,
  13006. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  13007. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  13008. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  13009. .alen = 8,
  13010. .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  13011. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  13012. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  13013. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  13014. .ilen = 32,
  13015. .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  13016. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  13017. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  13018. .rlen = 24,
  13019. }, {
  13020. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  13021. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  13022. .klen = 16,
  13023. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  13024. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  13025. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  13026. "\x20\xea\x60\xc0",
  13027. .alen = 12,
  13028. .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  13029. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  13030. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  13031. "\x5a\xe0\x70\x45\x51",
  13032. .ilen = 29,
  13033. .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  13034. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  13035. "\x3a\x80\x3b\xa8\x7f",
  13036. .rlen = 21,
  13037. }, {
  13038. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  13039. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  13040. .klen = 16,
  13041. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  13042. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  13043. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  13044. .alen = 8,
  13045. .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  13046. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  13047. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  13048. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  13049. "\xba",
  13050. .ilen = 33,
  13051. .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  13052. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  13053. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  13054. .rlen = 23,
  13055. },
  13056. };
  13057. /*
  13058. * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
  13059. * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
  13060. * Special Publication 800-38C's test vectors also use nonce lengths our
  13061. * implementation doesn't support. The following are taken from fips cavs
  13062. * fax files on hand at Red Hat.
  13063. *
  13064. * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
  13065. * part of the nonce which combine w/the iv, but need to be input this way.
  13066. */
  13067. static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
  13068. {
  13069. .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
  13070. "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
  13071. "\x96\xac\x59",
  13072. .klen = 19,
  13073. .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
  13074. .alen = 0,
  13075. .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
  13076. "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
  13077. "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
  13078. "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
  13079. .ilen = 32,
  13080. .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
  13081. "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
  13082. "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
  13083. "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
  13084. "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
  13085. "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
  13086. .rlen = 48,
  13087. }, {
  13088. .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
  13089. "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
  13090. "\x4f\xa3\x19",
  13091. .klen = 19,
  13092. .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
  13093. .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
  13094. "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
  13095. "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
  13096. "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
  13097. .alen = 32,
  13098. .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
  13099. "\xa9\x28\x63\xba\x12\xa3\x14\x85"
  13100. "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
  13101. "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
  13102. .ilen = 32,
  13103. .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
  13104. "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
  13105. "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
  13106. "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
  13107. "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
  13108. "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
  13109. .rlen = 48,
  13110. }, {
  13111. .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
  13112. "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
  13113. "\x53\x14\x73\x66\x8d\x88\xf6\x80"
  13114. "\xa0\x20\x35",
  13115. .klen = 27,
  13116. .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
  13117. .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
  13118. "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
  13119. "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
  13120. "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
  13121. .alen = 32,
  13122. .ilen = 0,
  13123. .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
  13124. "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
  13125. .rlen = 16,
  13126. }, {
  13127. .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
  13128. "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
  13129. "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
  13130. "\xd6\x3c\x8c",
  13131. .klen = 27,
  13132. .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
  13133. .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
  13134. "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
  13135. "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
  13136. "\xe3\x00\x73\x69\x84\x69\x87\x79",
  13137. .alen = 32,
  13138. .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
  13139. "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
  13140. "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
  13141. "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
  13142. .ilen = 32,
  13143. .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
  13144. "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
  13145. "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
  13146. "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
  13147. "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
  13148. "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
  13149. .rlen = 48,
  13150. }, {
  13151. .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
  13152. "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
  13153. "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
  13154. "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
  13155. "\x1e\x29\x91",
  13156. .klen = 35,
  13157. .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
  13158. .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
  13159. "\x78\x2b\x94\x02\x29\x0f\x42\x27"
  13160. "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
  13161. "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
  13162. .alen = 32,
  13163. .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
  13164. "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
  13165. "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
  13166. "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
  13167. .ilen = 32,
  13168. .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
  13169. "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
  13170. "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
  13171. "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
  13172. "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
  13173. .rlen = 40,
  13174. }, {
  13175. .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
  13176. "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
  13177. "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
  13178. "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
  13179. "\xf9\xd9\x4e",
  13180. .klen = 35,
  13181. .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
  13182. .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
  13183. "\x13\x02\x01\x0c\x83\x4c\x96\x35"
  13184. "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
  13185. "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
  13186. .alen = 32,
  13187. .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
  13188. "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
  13189. "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
  13190. "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
  13191. .ilen = 32,
  13192. .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
  13193. "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
  13194. "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
  13195. "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
  13196. "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
  13197. "\x7b\x72\x8a\xf7",
  13198. .rlen = 44,
  13199. }, {
  13200. .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
  13201. "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
  13202. "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
  13203. "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
  13204. "\x24\xa7\x8b",
  13205. .klen = 35,
  13206. .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
  13207. .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
  13208. "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
  13209. "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
  13210. "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
  13211. .alen = 32,
  13212. .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
  13213. "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
  13214. "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
  13215. "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
  13216. .ilen = 32,
  13217. .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
  13218. "\xef\xbb\x80\x21\x04\x6c\x58\x09"
  13219. "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
  13220. "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
  13221. "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
  13222. "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
  13223. .rlen = 48,
  13224. },
  13225. };
  13226. static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
  13227. {
  13228. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  13229. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  13230. "\xc6\xfb\x7d",
  13231. .klen = 19,
  13232. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  13233. .alen = 0,
  13234. .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
  13235. .ilen = 8,
  13236. .result = "\x00",
  13237. .rlen = 0,
  13238. .novrfy = 1,
  13239. }, {
  13240. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  13241. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  13242. "\xaf\x94\x87",
  13243. .klen = 19,
  13244. .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
  13245. .alen = 0,
  13246. .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
  13247. .ilen = 8,
  13248. .result = "\x00",
  13249. .rlen = 0,
  13250. }, {
  13251. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  13252. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  13253. "\xc6\xfb\x7d",
  13254. .klen = 19,
  13255. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  13256. .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
  13257. "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
  13258. "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
  13259. "\xd8\x94\x99\x91\x81\x54\x62\x57",
  13260. .alen = 32,
  13261. .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
  13262. "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
  13263. "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
  13264. "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
  13265. "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
  13266. "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
  13267. .ilen = 48,
  13268. .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
  13269. "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
  13270. "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
  13271. "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
  13272. .rlen = 32,
  13273. .novrfy = 1,
  13274. }, {
  13275. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  13276. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  13277. "\x05\xe0\xc9",
  13278. .klen = 19,
  13279. .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
  13280. .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
  13281. "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
  13282. "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
  13283. "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
  13284. .alen = 32,
  13285. .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
  13286. "\xad\x83\x52\x6d\x71\x03\x25\x1c"
  13287. "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
  13288. "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
  13289. "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
  13290. "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
  13291. .ilen = 48,
  13292. .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
  13293. "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
  13294. "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
  13295. "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
  13296. .rlen = 32,
  13297. }, {
  13298. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  13299. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  13300. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  13301. "\xee\x49\x83",
  13302. .klen = 27,
  13303. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  13304. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  13305. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  13306. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  13307. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  13308. .alen = 32,
  13309. .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
  13310. .ilen = 8,
  13311. .result = "\x00",
  13312. .rlen = 0,
  13313. }, {
  13314. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  13315. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  13316. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  13317. "\xee\x49\x83",
  13318. .klen = 27,
  13319. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  13320. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  13321. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  13322. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  13323. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  13324. .alen = 32,
  13325. .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
  13326. "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
  13327. "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
  13328. "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
  13329. "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
  13330. .ilen = 40,
  13331. .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
  13332. "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
  13333. "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
  13334. "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
  13335. .rlen = 32,
  13336. }, {
  13337. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  13338. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  13339. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  13340. "\xd1\xfc\x57",
  13341. .klen = 27,
  13342. .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
  13343. .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
  13344. "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
  13345. "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
  13346. "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
  13347. .alen = 32,
  13348. .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
  13349. "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
  13350. "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
  13351. "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
  13352. "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
  13353. "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
  13354. .ilen = 48,
  13355. .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
  13356. "\x99\x2a\xa8\xca\x04\x25\x45\x90"
  13357. "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
  13358. "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
  13359. .rlen = 32,
  13360. .novrfy = 1,
  13361. }, {
  13362. .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
  13363. "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
  13364. "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
  13365. "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
  13366. "\xee\x49\x83",
  13367. .klen = 35,
  13368. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  13369. .alen = 0,
  13370. .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
  13371. .ilen = 8,
  13372. .result = "\x00",
  13373. .rlen = 0,
  13374. }, {
  13375. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  13376. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  13377. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  13378. "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
  13379. "\x85\x34\x66",
  13380. .klen = 35,
  13381. .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
  13382. .alen = 0,
  13383. .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
  13384. "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
  13385. "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
  13386. "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
  13387. "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
  13388. "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
  13389. .ilen = 48,
  13390. .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
  13391. "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
  13392. "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
  13393. "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
  13394. .rlen = 32,
  13395. .novrfy = 1,
  13396. }, {
  13397. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  13398. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  13399. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  13400. "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
  13401. "\xcf\x76\x3f",
  13402. .klen = 35,
  13403. .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
  13404. .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
  13405. "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
  13406. "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
  13407. "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
  13408. .alen = 32,
  13409. .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
  13410. "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
  13411. "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
  13412. "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
  13413. "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
  13414. "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
  13415. .ilen = 48,
  13416. .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
  13417. "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
  13418. "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
  13419. "\x04\x49\x3b\x19\x93\x57\x25\x5d",
  13420. .rlen = 32,
  13421. },
  13422. };
  13423. /*
  13424. * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
  13425. * test vectors, taken from Appendix B.2.9 and B.2.10:
  13426. * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
  13427. * Only AES-128 is supported at this time.
  13428. */
  13429. #define ANSI_CPRNG_AES_TEST_VECTORS 6
  13430. static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
  13431. {
  13432. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  13433. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  13434. .klen = 16,
  13435. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  13436. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
  13437. .dtlen = 16,
  13438. .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
  13439. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13440. .vlen = 16,
  13441. .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
  13442. "\x84\x79\x66\x85\xc1\x2f\x76\x41",
  13443. .rlen = 16,
  13444. .loops = 1,
  13445. }, {
  13446. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  13447. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  13448. .klen = 16,
  13449. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  13450. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
  13451. .dtlen = 16,
  13452. .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
  13453. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13454. .vlen = 16,
  13455. .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
  13456. "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
  13457. .rlen = 16,
  13458. .loops = 1,
  13459. }, {
  13460. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  13461. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  13462. .klen = 16,
  13463. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  13464. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
  13465. .dtlen = 16,
  13466. .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
  13467. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13468. .vlen = 16,
  13469. .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
  13470. "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
  13471. .rlen = 16,
  13472. .loops = 1,
  13473. }, {
  13474. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  13475. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  13476. .klen = 16,
  13477. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  13478. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
  13479. .dtlen = 16,
  13480. .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
  13481. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13482. .vlen = 16,
  13483. .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
  13484. "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
  13485. .rlen = 16,
  13486. .loops = 1,
  13487. }, {
  13488. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  13489. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  13490. .klen = 16,
  13491. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  13492. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
  13493. .dtlen = 16,
  13494. .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
  13495. "\x00\x00\x00\x00\x00\x00\x00\x00",
  13496. .vlen = 16,
  13497. .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
  13498. "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
  13499. .rlen = 16,
  13500. .loops = 1,
  13501. }, { /* Monte Carlo Test */
  13502. .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
  13503. "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
  13504. .klen = 16,
  13505. .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
  13506. "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
  13507. .dtlen = 16,
  13508. .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
  13509. "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
  13510. .vlen = 16,
  13511. .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
  13512. "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
  13513. .rlen = 16,
  13514. .loops = 10000,
  13515. },
  13516. };
  13517. /* Cast5 test vectors from RFC 2144 */
  13518. #define CAST5_ENC_TEST_VECTORS 4
  13519. #define CAST5_DEC_TEST_VECTORS 4
  13520. #define CAST5_CBC_ENC_TEST_VECTORS 1
  13521. #define CAST5_CBC_DEC_TEST_VECTORS 1
  13522. #define CAST5_CTR_ENC_TEST_VECTORS 2
  13523. #define CAST5_CTR_DEC_TEST_VECTORS 2
  13524. static struct cipher_testvec cast5_enc_tv_template[] = {
  13525. {
  13526. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  13527. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  13528. .klen = 16,
  13529. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  13530. .ilen = 8,
  13531. .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  13532. .rlen = 8,
  13533. }, {
  13534. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  13535. "\x23\x45",
  13536. .klen = 10,
  13537. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  13538. .ilen = 8,
  13539. .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  13540. .rlen = 8,
  13541. }, {
  13542. .key = "\x01\x23\x45\x67\x12",
  13543. .klen = 5,
  13544. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  13545. .ilen = 8,
  13546. .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  13547. .rlen = 8,
  13548. }, { /* Generated from TF test vectors */
  13549. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  13550. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  13551. .klen = 16,
  13552. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  13553. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13554. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13555. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13556. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13557. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13558. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  13559. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  13560. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  13561. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  13562. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  13563. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  13564. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  13565. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  13566. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  13567. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  13568. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  13569. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  13570. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  13571. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  13572. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  13573. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  13574. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  13575. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  13576. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  13577. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  13578. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  13579. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  13580. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  13581. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  13582. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  13583. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  13584. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  13585. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  13586. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  13587. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  13588. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  13589. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  13590. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  13591. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  13592. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  13593. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  13594. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  13595. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  13596. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  13597. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  13598. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  13599. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  13600. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  13601. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  13602. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  13603. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  13604. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  13605. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  13606. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  13607. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  13608. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  13609. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  13610. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  13611. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  13612. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  13613. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  13614. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  13615. .ilen = 496,
  13616. .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
  13617. "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
  13618. "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
  13619. "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
  13620. "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
  13621. "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
  13622. "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
  13623. "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
  13624. "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
  13625. "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
  13626. "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
  13627. "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
  13628. "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
  13629. "\xED\x34\x35\x78\x6B\x91\xC9\x32"
  13630. "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
  13631. "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
  13632. "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
  13633. "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
  13634. "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
  13635. "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
  13636. "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
  13637. "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
  13638. "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
  13639. "\x78\x75\x37\x55\xC1\xF5\x90\x40"
  13640. "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
  13641. "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
  13642. "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
  13643. "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
  13644. "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
  13645. "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
  13646. "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
  13647. "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
  13648. "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
  13649. "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
  13650. "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
  13651. "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
  13652. "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
  13653. "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
  13654. "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
  13655. "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
  13656. "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
  13657. "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
  13658. "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
  13659. "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
  13660. "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
  13661. "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
  13662. "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
  13663. "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
  13664. "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
  13665. "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
  13666. "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
  13667. "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
  13668. "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
  13669. "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
  13670. "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
  13671. "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
  13672. "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
  13673. "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
  13674. "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
  13675. "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
  13676. "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
  13677. "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
  13678. .rlen = 496,
  13679. .also_non_np = 1,
  13680. .np = 2,
  13681. .tap = { 496 - 16, 16 },
  13682. },
  13683. };
  13684. static struct cipher_testvec cast5_dec_tv_template[] = {
  13685. {
  13686. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  13687. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  13688. .klen = 16,
  13689. .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  13690. .ilen = 8,
  13691. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  13692. .rlen = 8,
  13693. }, {
  13694. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  13695. "\x23\x45",
  13696. .klen = 10,
  13697. .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  13698. .ilen = 8,
  13699. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  13700. .rlen = 8,
  13701. }, {
  13702. .key = "\x01\x23\x45\x67\x12",
  13703. .klen = 5,
  13704. .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  13705. .ilen = 8,
  13706. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  13707. .rlen = 8,
  13708. }, { /* Generated from TF test vectors */
  13709. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  13710. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  13711. .klen = 16,
  13712. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  13713. .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
  13714. "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
  13715. "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
  13716. "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
  13717. "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
  13718. "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
  13719. "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
  13720. "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
  13721. "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
  13722. "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
  13723. "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
  13724. "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
  13725. "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
  13726. "\xED\x34\x35\x78\x6B\x91\xC9\x32"
  13727. "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
  13728. "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
  13729. "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
  13730. "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
  13731. "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
  13732. "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
  13733. "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
  13734. "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
  13735. "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
  13736. "\x78\x75\x37\x55\xC1\xF5\x90\x40"
  13737. "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
  13738. "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
  13739. "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
  13740. "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
  13741. "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
  13742. "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
  13743. "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
  13744. "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
  13745. "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
  13746. "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
  13747. "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
  13748. "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
  13749. "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
  13750. "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
  13751. "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
  13752. "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
  13753. "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
  13754. "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
  13755. "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
  13756. "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
  13757. "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
  13758. "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
  13759. "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
  13760. "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
  13761. "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
  13762. "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
  13763. "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
  13764. "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
  13765. "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
  13766. "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
  13767. "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
  13768. "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
  13769. "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
  13770. "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
  13771. "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
  13772. "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
  13773. "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
  13774. "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
  13775. .ilen = 496,
  13776. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13777. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13778. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13779. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13780. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13781. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  13782. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  13783. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  13784. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  13785. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  13786. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  13787. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  13788. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  13789. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  13790. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  13791. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  13792. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  13793. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  13794. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  13795. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  13796. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  13797. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  13798. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  13799. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  13800. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  13801. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  13802. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  13803. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  13804. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  13805. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  13806. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  13807. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  13808. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  13809. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  13810. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  13811. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  13812. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  13813. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  13814. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  13815. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  13816. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  13817. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  13818. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  13819. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  13820. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  13821. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  13822. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  13823. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  13824. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  13825. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  13826. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  13827. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  13828. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  13829. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  13830. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  13831. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  13832. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  13833. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  13834. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  13835. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  13836. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  13837. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  13838. .rlen = 496,
  13839. .also_non_np = 1,
  13840. .np = 2,
  13841. .tap = { 496 - 16, 16 },
  13842. },
  13843. };
  13844. static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
  13845. { /* Generated from TF test vectors */
  13846. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  13847. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  13848. .klen = 16,
  13849. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  13850. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  13851. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  13852. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  13853. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  13854. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  13855. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  13856. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  13857. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  13858. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  13859. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  13860. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  13861. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  13862. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  13863. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  13864. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  13865. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  13866. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  13867. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  13868. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  13869. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  13870. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  13871. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  13872. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  13873. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  13874. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  13875. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  13876. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  13877. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  13878. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  13879. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  13880. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  13881. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  13882. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  13883. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  13884. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  13885. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  13886. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  13887. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  13888. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  13889. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  13890. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  13891. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  13892. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  13893. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  13894. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  13895. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  13896. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  13897. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  13898. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  13899. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  13900. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  13901. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  13902. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  13903. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  13904. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  13905. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  13906. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  13907. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  13908. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  13909. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  13910. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  13911. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  13912. .ilen = 496,
  13913. .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
  13914. "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
  13915. "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
  13916. "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
  13917. "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
  13918. "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
  13919. "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
  13920. "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
  13921. "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
  13922. "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
  13923. "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
  13924. "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
  13925. "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
  13926. "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
  13927. "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
  13928. "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
  13929. "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
  13930. "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
  13931. "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
  13932. "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
  13933. "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
  13934. "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
  13935. "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
  13936. "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
  13937. "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
  13938. "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
  13939. "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
  13940. "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
  13941. "\x90\x12\x37\x49\x27\x98\x69\x18"
  13942. "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
  13943. "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
  13944. "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
  13945. "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
  13946. "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
  13947. "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
  13948. "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
  13949. "\x03\x55\x0E\x02\x41\x4A\x45\x06"
  13950. "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
  13951. "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
  13952. "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
  13953. "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
  13954. "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
  13955. "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
  13956. "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
  13957. "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
  13958. "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
  13959. "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
  13960. "\x11\xB4\x18\x17\x1A\x65\x92\x56"
  13961. "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
  13962. "\x1A\x01\x22\x45\x17\x62\x52\x6C"
  13963. "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
  13964. "\x32\x66\x6F\x23\x7F\x94\x36\x88"
  13965. "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
  13966. "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
  13967. "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
  13968. "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
  13969. "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
  13970. "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
  13971. "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
  13972. "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
  13973. "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
  13974. "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
  13975. .rlen = 496,
  13976. .also_non_np = 1,
  13977. .np = 2,
  13978. .tap = { 496 - 16, 16 },
  13979. },
  13980. };
  13981. static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
  13982. { /* Generated from TF test vectors */
  13983. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  13984. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  13985. .klen = 16,
  13986. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  13987. .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
  13988. "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
  13989. "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
  13990. "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
  13991. "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
  13992. "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
  13993. "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
  13994. "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
  13995. "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
  13996. "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
  13997. "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
  13998. "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
  13999. "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
  14000. "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
  14001. "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
  14002. "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
  14003. "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
  14004. "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
  14005. "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
  14006. "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
  14007. "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
  14008. "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
  14009. "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
  14010. "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
  14011. "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
  14012. "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
  14013. "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
  14014. "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
  14015. "\x90\x12\x37\x49\x27\x98\x69\x18"
  14016. "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
  14017. "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
  14018. "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
  14019. "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
  14020. "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
  14021. "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
  14022. "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
  14023. "\x03\x55\x0E\x02\x41\x4A\x45\x06"
  14024. "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
  14025. "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
  14026. "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
  14027. "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
  14028. "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
  14029. "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
  14030. "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
  14031. "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
  14032. "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
  14033. "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
  14034. "\x11\xB4\x18\x17\x1A\x65\x92\x56"
  14035. "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
  14036. "\x1A\x01\x22\x45\x17\x62\x52\x6C"
  14037. "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
  14038. "\x32\x66\x6F\x23\x7F\x94\x36\x88"
  14039. "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
  14040. "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
  14041. "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
  14042. "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
  14043. "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
  14044. "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
  14045. "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
  14046. "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
  14047. "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
  14048. "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
  14049. .ilen = 496,
  14050. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  14051. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  14052. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  14053. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  14054. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  14055. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  14056. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  14057. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  14058. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  14059. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  14060. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  14061. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  14062. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  14063. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  14064. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  14065. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  14066. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  14067. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  14068. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  14069. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  14070. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  14071. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  14072. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  14073. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  14074. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  14075. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  14076. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  14077. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  14078. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  14079. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  14080. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  14081. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  14082. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  14083. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  14084. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  14085. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  14086. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  14087. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  14088. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  14089. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  14090. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  14091. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  14092. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  14093. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  14094. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  14095. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  14096. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  14097. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  14098. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  14099. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  14100. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  14101. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  14102. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  14103. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  14104. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  14105. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  14106. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  14107. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  14108. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  14109. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  14110. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  14111. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  14112. .rlen = 496,
  14113. .also_non_np = 1,
  14114. .np = 2,
  14115. .tap = { 496 - 16, 16 },
  14116. },
  14117. };
  14118. static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
  14119. { /* Generated from TF test vectors */
  14120. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  14121. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  14122. .klen = 16,
  14123. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  14124. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  14125. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  14126. "\x3A",
  14127. .ilen = 17,
  14128. .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
  14129. "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
  14130. "\x0C",
  14131. .rlen = 17,
  14132. }, { /* Generated from TF test vectors */
  14133. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  14134. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  14135. .klen = 16,
  14136. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  14137. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  14138. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  14139. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  14140. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  14141. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  14142. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  14143. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  14144. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  14145. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  14146. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  14147. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  14148. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  14149. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  14150. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  14151. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  14152. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  14153. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  14154. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  14155. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  14156. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  14157. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  14158. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  14159. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  14160. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  14161. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  14162. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  14163. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  14164. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  14165. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  14166. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  14167. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  14168. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  14169. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  14170. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  14171. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  14172. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  14173. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  14174. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  14175. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  14176. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  14177. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  14178. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  14179. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  14180. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  14181. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  14182. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  14183. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  14184. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  14185. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  14186. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  14187. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  14188. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  14189. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  14190. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  14191. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  14192. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  14193. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  14194. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  14195. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  14196. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  14197. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  14198. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  14199. .ilen = 496,
  14200. .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
  14201. "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
  14202. "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
  14203. "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
  14204. "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
  14205. "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
  14206. "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
  14207. "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
  14208. "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
  14209. "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
  14210. "\x88\x18\x52\x56\x48\x58\xD1\x6B"
  14211. "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
  14212. "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
  14213. "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
  14214. "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
  14215. "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
  14216. "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
  14217. "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
  14218. "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
  14219. "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
  14220. "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
  14221. "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
  14222. "\x44\x67\x90\x20\xAC\x41\xDF\x43"
  14223. "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
  14224. "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
  14225. "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
  14226. "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
  14227. "\xAE\x59\x0F\x07\x88\x79\x53\x26"
  14228. "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
  14229. "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
  14230. "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
  14231. "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
  14232. "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
  14233. "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
  14234. "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
  14235. "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
  14236. "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
  14237. "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
  14238. "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
  14239. "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
  14240. "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
  14241. "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
  14242. "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
  14243. "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
  14244. "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
  14245. "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
  14246. "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
  14247. "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
  14248. "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
  14249. "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
  14250. "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
  14251. "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
  14252. "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
  14253. "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
  14254. "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
  14255. "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
  14256. "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
  14257. "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
  14258. "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
  14259. "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
  14260. "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
  14261. "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
  14262. .rlen = 496,
  14263. .also_non_np = 1,
  14264. .np = 2,
  14265. .tap = { 496 - 16, 16 },
  14266. },
  14267. };
  14268. static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
  14269. { /* Generated from TF test vectors */
  14270. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  14271. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  14272. .klen = 16,
  14273. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  14274. .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
  14275. "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
  14276. "\x0C",
  14277. .ilen = 17,
  14278. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  14279. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  14280. "\x3A",
  14281. .rlen = 17,
  14282. }, { /* Generated from TF test vectors */
  14283. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  14284. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
  14285. .klen = 16,
  14286. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
  14287. .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
  14288. "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
  14289. "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
  14290. "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
  14291. "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
  14292. "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
  14293. "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
  14294. "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
  14295. "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
  14296. "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
  14297. "\x88\x18\x52\x56\x48\x58\xD1\x6B"
  14298. "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
  14299. "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
  14300. "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
  14301. "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
  14302. "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
  14303. "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
  14304. "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
  14305. "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
  14306. "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
  14307. "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
  14308. "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
  14309. "\x44\x67\x90\x20\xAC\x41\xDF\x43"
  14310. "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
  14311. "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
  14312. "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
  14313. "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
  14314. "\xAE\x59\x0F\x07\x88\x79\x53\x26"
  14315. "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
  14316. "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
  14317. "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
  14318. "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
  14319. "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
  14320. "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
  14321. "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
  14322. "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
  14323. "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
  14324. "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
  14325. "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
  14326. "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
  14327. "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
  14328. "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
  14329. "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
  14330. "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
  14331. "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
  14332. "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
  14333. "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
  14334. "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
  14335. "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
  14336. "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
  14337. "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
  14338. "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
  14339. "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
  14340. "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
  14341. "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
  14342. "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
  14343. "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
  14344. "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
  14345. "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
  14346. "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
  14347. "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
  14348. "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
  14349. .ilen = 496,
  14350. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  14351. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  14352. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  14353. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  14354. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  14355. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  14356. "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
  14357. "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
  14358. "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
  14359. "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
  14360. "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
  14361. "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
  14362. "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
  14363. "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
  14364. "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
  14365. "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
  14366. "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
  14367. "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
  14368. "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
  14369. "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
  14370. "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
  14371. "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
  14372. "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
  14373. "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
  14374. "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
  14375. "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
  14376. "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
  14377. "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
  14378. "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
  14379. "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
  14380. "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
  14381. "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
  14382. "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
  14383. "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
  14384. "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
  14385. "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
  14386. "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
  14387. "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
  14388. "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
  14389. "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
  14390. "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
  14391. "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
  14392. "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
  14393. "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
  14394. "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
  14395. "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
  14396. "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
  14397. "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
  14398. "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
  14399. "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
  14400. "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
  14401. "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
  14402. "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
  14403. "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
  14404. "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
  14405. "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
  14406. "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
  14407. "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
  14408. "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
  14409. "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
  14410. "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
  14411. "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
  14412. .rlen = 496,
  14413. .also_non_np = 1,
  14414. .np = 2,
  14415. .tap = { 496 - 16, 16 },
  14416. },
  14417. };
  14418. /*
  14419. * ARC4 test vectors from OpenSSL
  14420. */
  14421. #define ARC4_ENC_TEST_VECTORS 7
  14422. #define ARC4_DEC_TEST_VECTORS 7
  14423. static struct cipher_testvec arc4_enc_tv_template[] = {
  14424. {
  14425. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  14426. .klen = 8,
  14427. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  14428. .ilen = 8,
  14429. .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  14430. .rlen = 8,
  14431. }, {
  14432. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  14433. .klen = 8,
  14434. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  14435. .ilen = 8,
  14436. .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  14437. .rlen = 8,
  14438. }, {
  14439. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  14440. .klen = 8,
  14441. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  14442. .ilen = 8,
  14443. .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  14444. .rlen = 8,
  14445. }, {
  14446. .key = "\xef\x01\x23\x45",
  14447. .klen = 4,
  14448. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14449. "\x00\x00\x00\x00\x00\x00\x00\x00"
  14450. "\x00\x00\x00\x00",
  14451. .ilen = 20,
  14452. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  14453. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  14454. "\x36\xb6\x78\x58",
  14455. .rlen = 20,
  14456. }, {
  14457. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  14458. .klen = 8,
  14459. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  14460. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  14461. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  14462. "\x12\x34\x56\x78",
  14463. .ilen = 28,
  14464. .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  14465. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  14466. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  14467. "\x40\x01\x1e\xcf",
  14468. .rlen = 28,
  14469. }, {
  14470. .key = "\xef\x01\x23\x45",
  14471. .klen = 4,
  14472. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14473. "\x00\x00",
  14474. .ilen = 10,
  14475. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  14476. "\xbd\x61",
  14477. .rlen = 10,
  14478. }, {
  14479. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  14480. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14481. .klen = 16,
  14482. .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  14483. .ilen = 8,
  14484. .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  14485. .rlen = 8,
  14486. },
  14487. };
  14488. static struct cipher_testvec arc4_dec_tv_template[] = {
  14489. {
  14490. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  14491. .klen = 8,
  14492. .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  14493. .ilen = 8,
  14494. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  14495. .rlen = 8,
  14496. }, {
  14497. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  14498. .klen = 8,
  14499. .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  14500. .ilen = 8,
  14501. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  14502. .rlen = 8,
  14503. }, {
  14504. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  14505. .klen = 8,
  14506. .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  14507. .ilen = 8,
  14508. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  14509. .rlen = 8,
  14510. }, {
  14511. .key = "\xef\x01\x23\x45",
  14512. .klen = 4,
  14513. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  14514. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  14515. "\x36\xb6\x78\x58",
  14516. .ilen = 20,
  14517. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14518. "\x00\x00\x00\x00\x00\x00\x00\x00"
  14519. "\x00\x00\x00\x00",
  14520. .rlen = 20,
  14521. }, {
  14522. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  14523. .klen = 8,
  14524. .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  14525. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  14526. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  14527. "\x40\x01\x1e\xcf",
  14528. .ilen = 28,
  14529. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  14530. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  14531. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  14532. "\x12\x34\x56\x78",
  14533. .rlen = 28,
  14534. }, {
  14535. .key = "\xef\x01\x23\x45",
  14536. .klen = 4,
  14537. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  14538. "\xbd\x61",
  14539. .ilen = 10,
  14540. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  14541. "\x00\x00",
  14542. .rlen = 10,
  14543. }, {
  14544. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  14545. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14546. .klen = 16,
  14547. .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  14548. .ilen = 8,
  14549. .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  14550. .rlen = 8,
  14551. },
  14552. };
  14553. /*
  14554. * TEA test vectors
  14555. */
  14556. #define TEA_ENC_TEST_VECTORS 4
  14557. #define TEA_DEC_TEST_VECTORS 4
  14558. static struct cipher_testvec tea_enc_tv_template[] = {
  14559. {
  14560. .key = zeroed_string,
  14561. .klen = 16,
  14562. .input = zeroed_string,
  14563. .ilen = 8,
  14564. .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  14565. .rlen = 8,
  14566. }, {
  14567. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  14568. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  14569. .klen = 16,
  14570. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  14571. .ilen = 8,
  14572. .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  14573. .rlen = 8,
  14574. }, {
  14575. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  14576. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  14577. .klen = 16,
  14578. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  14579. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  14580. .ilen = 16,
  14581. .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  14582. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  14583. .rlen = 16,
  14584. }, {
  14585. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  14586. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  14587. .klen = 16,
  14588. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  14589. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  14590. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  14591. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  14592. .ilen = 32,
  14593. .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  14594. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  14595. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  14596. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  14597. .rlen = 32,
  14598. }
  14599. };
  14600. static struct cipher_testvec tea_dec_tv_template[] = {
  14601. {
  14602. .key = zeroed_string,
  14603. .klen = 16,
  14604. .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  14605. .ilen = 8,
  14606. .result = zeroed_string,
  14607. .rlen = 8,
  14608. }, {
  14609. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  14610. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  14611. .klen = 16,
  14612. .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  14613. .ilen = 8,
  14614. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  14615. .rlen = 8,
  14616. }, {
  14617. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  14618. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  14619. .klen = 16,
  14620. .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  14621. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  14622. .ilen = 16,
  14623. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  14624. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  14625. .rlen = 16,
  14626. }, {
  14627. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  14628. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  14629. .klen = 16,
  14630. .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  14631. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  14632. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  14633. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  14634. .ilen = 32,
  14635. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  14636. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  14637. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  14638. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  14639. .rlen = 32,
  14640. }
  14641. };
  14642. /*
  14643. * XTEA test vectors
  14644. */
  14645. #define XTEA_ENC_TEST_VECTORS 4
  14646. #define XTEA_DEC_TEST_VECTORS 4
  14647. static struct cipher_testvec xtea_enc_tv_template[] = {
  14648. {
  14649. .key = zeroed_string,
  14650. .klen = 16,
  14651. .input = zeroed_string,
  14652. .ilen = 8,
  14653. .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  14654. .rlen = 8,
  14655. }, {
  14656. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  14657. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  14658. .klen = 16,
  14659. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  14660. .ilen = 8,
  14661. .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  14662. .rlen = 8,
  14663. }, {
  14664. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  14665. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  14666. .klen = 16,
  14667. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  14668. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  14669. .ilen = 16,
  14670. .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  14671. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  14672. .rlen = 16,
  14673. }, {
  14674. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  14675. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  14676. .klen = 16,
  14677. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  14678. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  14679. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  14680. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  14681. .ilen = 32,
  14682. .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  14683. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  14684. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  14685. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  14686. .rlen = 32,
  14687. }
  14688. };
  14689. static struct cipher_testvec xtea_dec_tv_template[] = {
  14690. {
  14691. .key = zeroed_string,
  14692. .klen = 16,
  14693. .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  14694. .ilen = 8,
  14695. .result = zeroed_string,
  14696. .rlen = 8,
  14697. }, {
  14698. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  14699. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  14700. .klen = 16,
  14701. .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  14702. .ilen = 8,
  14703. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  14704. .rlen = 8,
  14705. }, {
  14706. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  14707. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  14708. .klen = 16,
  14709. .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  14710. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  14711. .ilen = 16,
  14712. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  14713. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  14714. .rlen = 16,
  14715. }, {
  14716. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  14717. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  14718. .klen = 16,
  14719. .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  14720. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  14721. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  14722. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  14723. .ilen = 32,
  14724. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  14725. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  14726. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  14727. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  14728. .rlen = 32,
  14729. }
  14730. };
  14731. /*
  14732. * KHAZAD test vectors.
  14733. */
  14734. #define KHAZAD_ENC_TEST_VECTORS 5
  14735. #define KHAZAD_DEC_TEST_VECTORS 5
  14736. static struct cipher_testvec khazad_enc_tv_template[] = {
  14737. {
  14738. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  14739. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14740. .klen = 16,
  14741. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  14742. .ilen = 8,
  14743. .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  14744. .rlen = 8,
  14745. }, {
  14746. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  14747. "\x38\x38\x38\x38\x38\x38\x38\x38",
  14748. .klen = 16,
  14749. .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
  14750. .ilen = 8,
  14751. .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  14752. .rlen = 8,
  14753. }, {
  14754. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  14755. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  14756. .klen = 16,
  14757. .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  14758. .ilen = 8,
  14759. .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  14760. .rlen = 8,
  14761. }, {
  14762. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  14763. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  14764. .klen = 16,
  14765. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  14766. .ilen = 8,
  14767. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  14768. .rlen = 8,
  14769. }, {
  14770. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  14771. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  14772. .klen = 16,
  14773. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  14774. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  14775. .ilen = 16,
  14776. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  14777. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  14778. .rlen = 16,
  14779. },
  14780. };
  14781. static struct cipher_testvec khazad_dec_tv_template[] = {
  14782. {
  14783. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  14784. "\x00\x00\x00\x00\x00\x00\x00\x00",
  14785. .klen = 16,
  14786. .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  14787. .ilen = 8,
  14788. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  14789. .rlen = 8,
  14790. }, {
  14791. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  14792. "\x38\x38\x38\x38\x38\x38\x38\x38",
  14793. .klen = 16,
  14794. .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  14795. .ilen = 8,
  14796. .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
  14797. .rlen = 8,
  14798. }, {
  14799. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  14800. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  14801. .klen = 16,
  14802. .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  14803. .ilen = 8,
  14804. .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  14805. .rlen = 8,
  14806. }, {
  14807. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  14808. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  14809. .klen = 16,
  14810. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  14811. .ilen = 8,
  14812. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  14813. .rlen = 8,
  14814. }, {
  14815. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  14816. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  14817. .klen = 16,
  14818. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  14819. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  14820. .ilen = 16,
  14821. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  14822. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  14823. .rlen = 16,
  14824. },
  14825. };
  14826. /*
  14827. * Anubis test vectors.
  14828. */
  14829. #define ANUBIS_ENC_TEST_VECTORS 5
  14830. #define ANUBIS_DEC_TEST_VECTORS 5
  14831. #define ANUBIS_CBC_ENC_TEST_VECTORS 2
  14832. #define ANUBIS_CBC_DEC_TEST_VECTORS 2
  14833. static struct cipher_testvec anubis_enc_tv_template[] = {
  14834. {
  14835. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  14836. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  14837. .klen = 16,
  14838. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  14839. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  14840. .ilen = 16,
  14841. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  14842. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  14843. .rlen = 16,
  14844. }, {
  14845. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  14846. "\x03\x03\x03\x03\x03\x03\x03\x03"
  14847. "\x03\x03\x03\x03",
  14848. .klen = 20,
  14849. .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
  14850. "\x03\x03\x03\x03\x03\x03\x03\x03",
  14851. .ilen = 16,
  14852. .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  14853. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  14854. .rlen = 16,
  14855. }, {
  14856. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  14857. "\x24\x24\x24\x24\x24\x24\x24\x24"
  14858. "\x24\x24\x24\x24\x24\x24\x24\x24"
  14859. "\x24\x24\x24\x24",
  14860. .klen = 28,
  14861. .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
  14862. "\x24\x24\x24\x24\x24\x24\x24\x24",
  14863. .ilen = 16,
  14864. .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  14865. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  14866. .rlen = 16,
  14867. }, {
  14868. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  14869. "\x25\x25\x25\x25\x25\x25\x25\x25"
  14870. "\x25\x25\x25\x25\x25\x25\x25\x25"
  14871. "\x25\x25\x25\x25\x25\x25\x25\x25",
  14872. .klen = 32,
  14873. .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
  14874. "\x25\x25\x25\x25\x25\x25\x25\x25",
  14875. .ilen = 16,
  14876. .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  14877. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  14878. .rlen = 16,
  14879. }, {
  14880. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  14881. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14882. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14883. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14884. "\x35\x35\x35\x35\x35\x35\x35\x35",
  14885. .klen = 40,
  14886. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  14887. "\x35\x35\x35\x35\x35\x35\x35\x35",
  14888. .ilen = 16,
  14889. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  14890. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  14891. .rlen = 16,
  14892. },
  14893. };
  14894. static struct cipher_testvec anubis_dec_tv_template[] = {
  14895. {
  14896. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  14897. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  14898. .klen = 16,
  14899. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  14900. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  14901. .ilen = 16,
  14902. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  14903. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  14904. .rlen = 16,
  14905. }, {
  14906. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  14907. "\x03\x03\x03\x03\x03\x03\x03\x03"
  14908. "\x03\x03\x03\x03",
  14909. .klen = 20,
  14910. .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  14911. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  14912. .ilen = 16,
  14913. .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
  14914. "\x03\x03\x03\x03\x03\x03\x03\x03",
  14915. .rlen = 16,
  14916. }, {
  14917. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  14918. "\x24\x24\x24\x24\x24\x24\x24\x24"
  14919. "\x24\x24\x24\x24\x24\x24\x24\x24"
  14920. "\x24\x24\x24\x24",
  14921. .klen = 28,
  14922. .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  14923. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  14924. .ilen = 16,
  14925. .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
  14926. "\x24\x24\x24\x24\x24\x24\x24\x24",
  14927. .rlen = 16,
  14928. }, {
  14929. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  14930. "\x25\x25\x25\x25\x25\x25\x25\x25"
  14931. "\x25\x25\x25\x25\x25\x25\x25\x25"
  14932. "\x25\x25\x25\x25\x25\x25\x25\x25",
  14933. .klen = 32,
  14934. .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  14935. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  14936. .ilen = 16,
  14937. .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
  14938. "\x25\x25\x25\x25\x25\x25\x25\x25",
  14939. .rlen = 16,
  14940. }, {
  14941. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  14942. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14943. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14944. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14945. "\x35\x35\x35\x35\x35\x35\x35\x35",
  14946. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  14947. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  14948. .klen = 40,
  14949. .ilen = 16,
  14950. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  14951. "\x35\x35\x35\x35\x35\x35\x35\x35",
  14952. .rlen = 16,
  14953. },
  14954. };
  14955. static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
  14956. {
  14957. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  14958. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  14959. .klen = 16,
  14960. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  14961. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  14962. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  14963. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  14964. .ilen = 32,
  14965. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  14966. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  14967. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  14968. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  14969. .rlen = 32,
  14970. }, {
  14971. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  14972. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14973. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14974. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14975. "\x35\x35\x35\x35\x35\x35\x35\x35",
  14976. .klen = 40,
  14977. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  14978. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14979. "\x35\x35\x35\x35\x35\x35\x35\x35"
  14980. "\x35\x35\x35\x35\x35\x35\x35\x35",
  14981. .ilen = 32,
  14982. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  14983. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  14984. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  14985. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  14986. .rlen = 32,
  14987. },
  14988. };
  14989. static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
  14990. {
  14991. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  14992. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  14993. .klen = 16,
  14994. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  14995. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  14996. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  14997. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  14998. .ilen = 32,
  14999. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  15000. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  15001. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  15002. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  15003. .rlen = 32,
  15004. }, {
  15005. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  15006. "\x35\x35\x35\x35\x35\x35\x35\x35"
  15007. "\x35\x35\x35\x35\x35\x35\x35\x35"
  15008. "\x35\x35\x35\x35\x35\x35\x35\x35"
  15009. "\x35\x35\x35\x35\x35\x35\x35\x35",
  15010. .klen = 40,
  15011. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  15012. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  15013. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  15014. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  15015. .ilen = 32,
  15016. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  15017. "\x35\x35\x35\x35\x35\x35\x35\x35"
  15018. "\x35\x35\x35\x35\x35\x35\x35\x35"
  15019. "\x35\x35\x35\x35\x35\x35\x35\x35",
  15020. .rlen = 32,
  15021. },
  15022. };
  15023. /*
  15024. * XETA test vectors
  15025. */
  15026. #define XETA_ENC_TEST_VECTORS 4
  15027. #define XETA_DEC_TEST_VECTORS 4
  15028. static struct cipher_testvec xeta_enc_tv_template[] = {
  15029. {
  15030. .key = zeroed_string,
  15031. .klen = 16,
  15032. .input = zeroed_string,
  15033. .ilen = 8,
  15034. .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  15035. .rlen = 8,
  15036. }, {
  15037. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  15038. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  15039. .klen = 16,
  15040. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  15041. .ilen = 8,
  15042. .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  15043. .rlen = 8,
  15044. }, {
  15045. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  15046. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  15047. .klen = 16,
  15048. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  15049. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  15050. .ilen = 16,
  15051. .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  15052. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  15053. .rlen = 16,
  15054. }, {
  15055. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  15056. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  15057. .klen = 16,
  15058. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  15059. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  15060. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  15061. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  15062. .ilen = 32,
  15063. .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  15064. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  15065. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  15066. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  15067. .rlen = 32,
  15068. }
  15069. };
  15070. static struct cipher_testvec xeta_dec_tv_template[] = {
  15071. {
  15072. .key = zeroed_string,
  15073. .klen = 16,
  15074. .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  15075. .ilen = 8,
  15076. .result = zeroed_string,
  15077. .rlen = 8,
  15078. }, {
  15079. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  15080. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  15081. .klen = 16,
  15082. .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  15083. .ilen = 8,
  15084. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  15085. .rlen = 8,
  15086. }, {
  15087. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  15088. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  15089. .klen = 16,
  15090. .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  15091. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  15092. .ilen = 16,
  15093. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  15094. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  15095. .rlen = 16,
  15096. }, {
  15097. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  15098. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  15099. .klen = 16,
  15100. .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  15101. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  15102. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  15103. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  15104. .ilen = 32,
  15105. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  15106. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  15107. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  15108. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  15109. .rlen = 32,
  15110. }
  15111. };
  15112. /*
  15113. * FCrypt test vectors
  15114. */
  15115. #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
  15116. #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
  15117. static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
  15118. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  15119. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15120. .klen = 8,
  15121. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15122. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15123. .ilen = 8,
  15124. .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  15125. .rlen = 8,
  15126. }, {
  15127. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  15128. .klen = 8,
  15129. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15130. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  15131. .ilen = 8,
  15132. .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  15133. .rlen = 8,
  15134. }, { /* From Arla */
  15135. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  15136. .klen = 8,
  15137. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15138. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  15139. .ilen = 48,
  15140. .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  15141. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  15142. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  15143. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  15144. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  15145. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  15146. .rlen = 48,
  15147. }, {
  15148. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15149. .klen = 8,
  15150. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  15151. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  15152. .ilen = 48,
  15153. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  15154. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  15155. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  15156. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  15157. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  15158. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  15159. .rlen = 48,
  15160. }, { /* split-page version */
  15161. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15162. .klen = 8,
  15163. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  15164. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  15165. .ilen = 48,
  15166. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  15167. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  15168. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  15169. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  15170. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  15171. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  15172. .rlen = 48,
  15173. .np = 2,
  15174. .tap = { 20, 28 },
  15175. }
  15176. };
  15177. static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
  15178. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  15179. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15180. .klen = 8,
  15181. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15182. .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  15183. .ilen = 8,
  15184. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15185. .rlen = 8,
  15186. }, {
  15187. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  15188. .klen = 8,
  15189. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  15190. .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  15191. .ilen = 8,
  15192. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  15193. .rlen = 8,
  15194. }, { /* From Arla */
  15195. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  15196. .klen = 8,
  15197. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15198. .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  15199. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  15200. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  15201. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  15202. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  15203. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  15204. .ilen = 48,
  15205. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  15206. .rlen = 48,
  15207. }, {
  15208. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15209. .klen = 8,
  15210. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  15211. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  15212. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  15213. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  15214. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  15215. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  15216. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  15217. .ilen = 48,
  15218. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  15219. .rlen = 48,
  15220. }, { /* split-page version */
  15221. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15222. .klen = 8,
  15223. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  15224. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  15225. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  15226. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  15227. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  15228. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  15229. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  15230. .ilen = 48,
  15231. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  15232. .rlen = 48,
  15233. .np = 2,
  15234. .tap = { 20, 28 },
  15235. }
  15236. };
  15237. /*
  15238. * CAMELLIA test vectors.
  15239. */
  15240. #define CAMELLIA_ENC_TEST_VECTORS 4
  15241. #define CAMELLIA_DEC_TEST_VECTORS 4
  15242. #define CAMELLIA_CBC_ENC_TEST_VECTORS 3
  15243. #define CAMELLIA_CBC_DEC_TEST_VECTORS 3
  15244. #define CAMELLIA_CTR_ENC_TEST_VECTORS 2
  15245. #define CAMELLIA_CTR_DEC_TEST_VECTORS 2
  15246. #define CAMELLIA_LRW_ENC_TEST_VECTORS 8
  15247. #define CAMELLIA_LRW_DEC_TEST_VECTORS 8
  15248. #define CAMELLIA_XTS_ENC_TEST_VECTORS 5
  15249. #define CAMELLIA_XTS_DEC_TEST_VECTORS 5
  15250. static struct cipher_testvec camellia_enc_tv_template[] = {
  15251. {
  15252. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15253. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15254. .klen = 16,
  15255. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15256. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15257. .ilen = 16,
  15258. .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
  15259. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  15260. .rlen = 16,
  15261. }, {
  15262. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15263. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  15264. "\x00\x11\x22\x33\x44\x55\x66\x77",
  15265. .klen = 24,
  15266. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15267. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15268. .ilen = 16,
  15269. .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  15270. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  15271. .rlen = 16,
  15272. }, {
  15273. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15274. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  15275. "\x00\x11\x22\x33\x44\x55\x66\x77"
  15276. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  15277. .klen = 32,
  15278. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15279. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15280. .ilen = 16,
  15281. .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  15282. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  15283. .rlen = 16,
  15284. },
  15285. { /* Generated with Crypto++ */
  15286. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  15287. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  15288. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  15289. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  15290. .klen = 32,
  15291. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  15292. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  15293. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  15294. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  15295. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  15296. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  15297. .ilen = 48,
  15298. .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
  15299. "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
  15300. "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
  15301. "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
  15302. "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
  15303. "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
  15304. .rlen = 48,
  15305. .also_non_np = 1,
  15306. .np = 2,
  15307. .tap = { 48 - 16, 16 },
  15308. },
  15309. };
  15310. static struct cipher_testvec camellia_dec_tv_template[] = {
  15311. {
  15312. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15313. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15314. .klen = 16,
  15315. .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
  15316. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  15317. .ilen = 16,
  15318. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15319. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15320. .rlen = 16,
  15321. }, {
  15322. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15323. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  15324. "\x00\x11\x22\x33\x44\x55\x66\x77",
  15325. .klen = 24,
  15326. .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  15327. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  15328. .ilen = 16,
  15329. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15330. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15331. .rlen = 16,
  15332. }, {
  15333. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15334. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  15335. "\x00\x11\x22\x33\x44\x55\x66\x77"
  15336. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  15337. .klen = 32,
  15338. .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  15339. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  15340. .ilen = 16,
  15341. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  15342. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  15343. .rlen = 16,
  15344. },
  15345. { /* Generated with Crypto++ */
  15346. .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
  15347. "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
  15348. "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
  15349. "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
  15350. .klen = 32,
  15351. .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
  15352. "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
  15353. "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
  15354. "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
  15355. "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
  15356. "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
  15357. .ilen = 48,
  15358. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  15359. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  15360. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  15361. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  15362. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  15363. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  15364. .rlen = 48,
  15365. .also_non_np = 1,
  15366. .np = 2,
  15367. .tap = { 48 - 16, 16 },
  15368. },
  15369. };
  15370. static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
  15371. {
  15372. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  15373. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  15374. .klen = 16,
  15375. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  15376. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  15377. .input = "Single block msg",
  15378. .ilen = 16,
  15379. .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  15380. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  15381. .rlen = 16,
  15382. }, {
  15383. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  15384. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  15385. .klen = 16,
  15386. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  15387. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  15388. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  15389. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  15390. "\x10\x11\x12\x13\x14\x15\x16\x17"
  15391. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  15392. .ilen = 32,
  15393. .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  15394. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  15395. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  15396. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  15397. .rlen = 32,
  15398. },
  15399. { /* Generated with Crypto++ */
  15400. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  15401. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  15402. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  15403. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  15404. .klen = 32,
  15405. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  15406. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  15407. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  15408. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  15409. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  15410. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  15411. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  15412. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  15413. .ilen = 48,
  15414. .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
  15415. "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
  15416. "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
  15417. "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
  15418. "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
  15419. "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
  15420. .rlen = 48,
  15421. .also_non_np = 1,
  15422. .np = 2,
  15423. .tap = { 48 - 16, 16 },
  15424. },
  15425. };
  15426. static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
  15427. {
  15428. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  15429. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  15430. .klen = 16,
  15431. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  15432. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  15433. .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  15434. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  15435. .ilen = 16,
  15436. .result = "Single block msg",
  15437. .rlen = 16,
  15438. }, {
  15439. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  15440. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  15441. .klen = 16,
  15442. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  15443. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  15444. .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  15445. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  15446. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  15447. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  15448. .ilen = 32,
  15449. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  15450. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  15451. "\x10\x11\x12\x13\x14\x15\x16\x17"
  15452. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  15453. .rlen = 32,
  15454. },
  15455. { /* Generated with Crypto++ */
  15456. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  15457. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  15458. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  15459. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  15460. .klen = 32,
  15461. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  15462. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  15463. .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
  15464. "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
  15465. "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
  15466. "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
  15467. "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
  15468. "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
  15469. .ilen = 48,
  15470. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  15471. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  15472. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  15473. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  15474. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  15475. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  15476. .rlen = 48,
  15477. .also_non_np = 1,
  15478. .np = 2,
  15479. .tap = { 48 - 16, 16 },
  15480. },
  15481. };
  15482. static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
  15483. { /* Generated with Crypto++ */
  15484. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  15485. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  15486. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  15487. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  15488. .klen = 32,
  15489. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  15490. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  15491. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  15492. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  15493. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  15494. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  15495. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  15496. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  15497. .ilen = 48,
  15498. .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  15499. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  15500. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  15501. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  15502. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  15503. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
  15504. .rlen = 48,
  15505. },
  15506. { /* Generated with Crypto++ */
  15507. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  15508. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  15509. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  15510. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  15511. .klen = 32,
  15512. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  15513. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  15514. .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  15515. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  15516. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  15517. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  15518. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  15519. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  15520. "\xDF\x76\x0D",
  15521. .ilen = 51,
  15522. .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  15523. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  15524. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  15525. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  15526. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  15527. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
  15528. "\x1E\x43\xEF",
  15529. .rlen = 51,
  15530. .also_non_np = 1,
  15531. .np = 2,
  15532. .tap = { 51 - 16, 16 },
  15533. },
  15534. };
  15535. static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
  15536. { /* Generated with Crypto++ */
  15537. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  15538. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  15539. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  15540. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  15541. .klen = 32,
  15542. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  15543. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  15544. .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  15545. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  15546. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  15547. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  15548. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  15549. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
  15550. .ilen = 48,
  15551. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  15552. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  15553. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  15554. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  15555. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  15556. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
  15557. .rlen = 48,
  15558. },
  15559. { /* Generated with Crypto++ */
  15560. .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
  15561. "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
  15562. "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
  15563. "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
  15564. .klen = 32,
  15565. .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
  15566. "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
  15567. .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
  15568. "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
  15569. "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
  15570. "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
  15571. "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
  15572. "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
  15573. "\x1E\x43\xEF",
  15574. .ilen = 51,
  15575. .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
  15576. "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
  15577. "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
  15578. "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
  15579. "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
  15580. "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
  15581. "\xDF\x76\x0D",
  15582. .rlen = 51,
  15583. .also_non_np = 1,
  15584. .np = 2,
  15585. .tap = { 51 - 16, 16 },
  15586. },
  15587. };
  15588. static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
  15589. /* Generated from AES-LRW test vectors */
  15590. {
  15591. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  15592. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  15593. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  15594. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  15595. .klen = 32,
  15596. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15597. "\x00\x00\x00\x00\x00\x00\x00\x01",
  15598. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15599. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15600. .ilen = 16,
  15601. .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
  15602. "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
  15603. .rlen = 16,
  15604. }, {
  15605. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  15606. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  15607. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  15608. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  15609. .klen = 32,
  15610. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15611. "\x00\x00\x00\x00\x00\x00\x00\x02",
  15612. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15613. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15614. .ilen = 16,
  15615. .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
  15616. "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
  15617. .rlen = 16,
  15618. }, {
  15619. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  15620. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  15621. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  15622. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  15623. .klen = 32,
  15624. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15625. "\x00\x00\x00\x02\x00\x00\x00\x00",
  15626. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15627. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15628. .ilen = 16,
  15629. .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
  15630. "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
  15631. .rlen = 16,
  15632. }, {
  15633. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  15634. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  15635. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  15636. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  15637. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  15638. .klen = 40,
  15639. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15640. "\x00\x00\x00\x00\x00\x00\x00\x01",
  15641. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15642. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15643. .ilen = 16,
  15644. .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
  15645. "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
  15646. .rlen = 16,
  15647. }, {
  15648. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  15649. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  15650. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  15651. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  15652. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  15653. .klen = 40,
  15654. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15655. "\x00\x00\x00\x02\x00\x00\x00\x00",
  15656. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15657. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15658. .ilen = 16,
  15659. .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
  15660. "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
  15661. .rlen = 16,
  15662. }, {
  15663. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  15664. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  15665. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  15666. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  15667. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  15668. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  15669. .klen = 48,
  15670. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15671. "\x00\x00\x00\x00\x00\x00\x00\x01",
  15672. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15673. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15674. .ilen = 16,
  15675. .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
  15676. "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
  15677. .rlen = 16,
  15678. }, {
  15679. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  15680. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  15681. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  15682. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  15683. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  15684. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  15685. .klen = 48,
  15686. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15687. "\x00\x00\x00\x02\x00\x00\x00\x00",
  15688. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15689. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15690. .ilen = 16,
  15691. .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
  15692. "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
  15693. .rlen = 16,
  15694. }, {
  15695. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  15696. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  15697. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  15698. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  15699. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  15700. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  15701. .klen = 48,
  15702. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15703. "\x00\x00\x00\x00\x00\x00\x00\x01",
  15704. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  15705. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  15706. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  15707. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  15708. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  15709. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  15710. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  15711. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  15712. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  15713. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  15714. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  15715. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  15716. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  15717. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  15718. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  15719. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  15720. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  15721. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  15722. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  15723. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  15724. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  15725. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  15726. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  15727. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  15728. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  15729. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  15730. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  15731. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  15732. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  15733. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  15734. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  15735. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  15736. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  15737. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  15738. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  15739. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  15740. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  15741. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  15742. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  15743. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  15744. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  15745. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  15746. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  15747. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  15748. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  15749. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  15750. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  15751. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  15752. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  15753. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  15754. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  15755. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  15756. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  15757. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  15758. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  15759. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  15760. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  15761. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  15762. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  15763. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  15764. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  15765. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  15766. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  15767. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  15768. .ilen = 512,
  15769. .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
  15770. "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
  15771. "\x67\x76\xac\x2c\xd2\x63\x18\x93"
  15772. "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
  15773. "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
  15774. "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
  15775. "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
  15776. "\x62\xdd\x78\x81\xea\x1d\xef\x04"
  15777. "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
  15778. "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
  15779. "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
  15780. "\x40\x41\x69\xaa\x71\xc0\x37\xec"
  15781. "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
  15782. "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
  15783. "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
  15784. "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
  15785. "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
  15786. "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
  15787. "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
  15788. "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
  15789. "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
  15790. "\x42\x08\x40\x82\x06\x1c\x2d\x55"
  15791. "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
  15792. "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
  15793. "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
  15794. "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
  15795. "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
  15796. "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
  15797. "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
  15798. "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
  15799. "\xed\x14\xa9\x57\x19\x63\x40\x04"
  15800. "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
  15801. "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
  15802. "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
  15803. "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
  15804. "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
  15805. "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
  15806. "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
  15807. "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
  15808. "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
  15809. "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
  15810. "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
  15811. "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
  15812. "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
  15813. "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
  15814. "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
  15815. "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
  15816. "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
  15817. "\x35\xa5\x83\x04\x84\x01\x99\x56"
  15818. "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
  15819. "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
  15820. "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
  15821. "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
  15822. "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
  15823. "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
  15824. "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
  15825. "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
  15826. "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
  15827. "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
  15828. "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
  15829. "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
  15830. "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
  15831. "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
  15832. "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
  15833. .rlen = 512,
  15834. .also_non_np = 1,
  15835. .np = 2,
  15836. .tap = { 512 - 16, 16 },
  15837. },
  15838. };
  15839. static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
  15840. /* Generated from AES-LRW test vectors */
  15841. /* same as enc vectors with input and result reversed */
  15842. {
  15843. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  15844. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  15845. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  15846. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  15847. .klen = 32,
  15848. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15849. "\x00\x00\x00\x00\x00\x00\x00\x01",
  15850. .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
  15851. "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
  15852. .ilen = 16,
  15853. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15854. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15855. .rlen = 16,
  15856. }, {
  15857. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  15858. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  15859. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  15860. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  15861. .klen = 32,
  15862. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15863. "\x00\x00\x00\x00\x00\x00\x00\x02",
  15864. .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
  15865. "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
  15866. .ilen = 16,
  15867. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15868. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15869. .rlen = 16,
  15870. }, {
  15871. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  15872. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  15873. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  15874. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  15875. .klen = 32,
  15876. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15877. "\x00\x00\x00\x02\x00\x00\x00\x00",
  15878. .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
  15879. "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
  15880. .ilen = 16,
  15881. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15882. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15883. .rlen = 16,
  15884. }, {
  15885. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  15886. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  15887. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  15888. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  15889. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  15890. .klen = 40,
  15891. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15892. "\x00\x00\x00\x00\x00\x00\x00\x01",
  15893. .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
  15894. "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
  15895. .ilen = 16,
  15896. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15897. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15898. .rlen = 16,
  15899. }, {
  15900. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  15901. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  15902. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  15903. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  15904. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  15905. .klen = 40,
  15906. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15907. "\x00\x00\x00\x02\x00\x00\x00\x00",
  15908. .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
  15909. "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
  15910. .ilen = 16,
  15911. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15912. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15913. .rlen = 16,
  15914. }, {
  15915. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  15916. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  15917. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  15918. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  15919. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  15920. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  15921. .klen = 48,
  15922. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15923. "\x00\x00\x00\x00\x00\x00\x00\x01",
  15924. .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
  15925. "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
  15926. .ilen = 16,
  15927. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15928. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15929. .rlen = 16,
  15930. }, {
  15931. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  15932. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  15933. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  15934. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  15935. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  15936. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  15937. .klen = 48,
  15938. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15939. "\x00\x00\x00\x02\x00\x00\x00\x00",
  15940. .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
  15941. "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
  15942. .ilen = 16,
  15943. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  15944. "\x38\x39\x41\x42\x43\x44\x45\x46",
  15945. .rlen = 16,
  15946. }, {
  15947. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  15948. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  15949. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  15950. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  15951. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  15952. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  15953. .klen = 48,
  15954. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  15955. "\x00\x00\x00\x00\x00\x00\x00\x01",
  15956. .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
  15957. "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
  15958. "\x67\x76\xac\x2c\xd2\x63\x18\x93"
  15959. "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
  15960. "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
  15961. "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
  15962. "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
  15963. "\x62\xdd\x78\x81\xea\x1d\xef\x04"
  15964. "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
  15965. "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
  15966. "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
  15967. "\x40\x41\x69\xaa\x71\xc0\x37\xec"
  15968. "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
  15969. "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
  15970. "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
  15971. "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
  15972. "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
  15973. "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
  15974. "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
  15975. "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
  15976. "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
  15977. "\x42\x08\x40\x82\x06\x1c\x2d\x55"
  15978. "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
  15979. "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
  15980. "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
  15981. "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
  15982. "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
  15983. "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
  15984. "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
  15985. "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
  15986. "\xed\x14\xa9\x57\x19\x63\x40\x04"
  15987. "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
  15988. "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
  15989. "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
  15990. "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
  15991. "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
  15992. "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
  15993. "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
  15994. "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
  15995. "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
  15996. "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
  15997. "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
  15998. "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
  15999. "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
  16000. "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
  16001. "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
  16002. "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
  16003. "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
  16004. "\x35\xa5\x83\x04\x84\x01\x99\x56"
  16005. "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
  16006. "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
  16007. "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
  16008. "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
  16009. "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
  16010. "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
  16011. "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
  16012. "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
  16013. "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
  16014. "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
  16015. "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
  16016. "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
  16017. "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
  16018. "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
  16019. "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
  16020. .ilen = 512,
  16021. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  16022. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  16023. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  16024. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  16025. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  16026. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  16027. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  16028. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  16029. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  16030. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  16031. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  16032. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  16033. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  16034. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  16035. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  16036. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  16037. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  16038. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  16039. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  16040. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  16041. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  16042. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  16043. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  16044. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  16045. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  16046. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  16047. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  16048. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  16049. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  16050. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  16051. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  16052. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  16053. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  16054. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  16055. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  16056. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  16057. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  16058. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  16059. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  16060. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  16061. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  16062. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  16063. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  16064. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  16065. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  16066. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  16067. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  16068. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  16069. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  16070. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  16071. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  16072. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  16073. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  16074. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  16075. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  16076. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  16077. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  16078. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  16079. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  16080. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  16081. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  16082. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  16083. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  16084. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  16085. .rlen = 512,
  16086. .also_non_np = 1,
  16087. .np = 2,
  16088. .tap = { 512 - 16, 16 },
  16089. },
  16090. };
  16091. static struct cipher_testvec camellia_xts_enc_tv_template[] = {
  16092. /* Generated from AES-XTS test vectors */
  16093. {
  16094. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16095. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16096. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16097. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16098. .klen = 32,
  16099. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16100. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16101. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16102. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16103. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16104. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16105. .ilen = 32,
  16106. .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
  16107. "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
  16108. "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
  16109. "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
  16110. .rlen = 32,
  16111. }, {
  16112. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  16113. "\x11\x11\x11\x11\x11\x11\x11\x11"
  16114. "\x22\x22\x22\x22\x22\x22\x22\x22"
  16115. "\x22\x22\x22\x22\x22\x22\x22\x22",
  16116. .klen = 32,
  16117. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  16118. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16119. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  16120. "\x44\x44\x44\x44\x44\x44\x44\x44"
  16121. "\x44\x44\x44\x44\x44\x44\x44\x44"
  16122. "\x44\x44\x44\x44\x44\x44\x44\x44",
  16123. .ilen = 32,
  16124. .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
  16125. "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
  16126. "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
  16127. "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
  16128. .rlen = 32,
  16129. }, {
  16130. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  16131. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  16132. "\x22\x22\x22\x22\x22\x22\x22\x22"
  16133. "\x22\x22\x22\x22\x22\x22\x22\x22",
  16134. .klen = 32,
  16135. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  16136. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16137. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  16138. "\x44\x44\x44\x44\x44\x44\x44\x44"
  16139. "\x44\x44\x44\x44\x44\x44\x44\x44"
  16140. "\x44\x44\x44\x44\x44\x44\x44\x44",
  16141. .ilen = 32,
  16142. .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
  16143. "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
  16144. "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
  16145. "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
  16146. .rlen = 32,
  16147. }, {
  16148. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  16149. "\x23\x53\x60\x28\x74\x71\x35\x26"
  16150. "\x31\x41\x59\x26\x53\x58\x97\x93"
  16151. "\x23\x84\x62\x64\x33\x83\x27\x95",
  16152. .klen = 32,
  16153. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16154. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16155. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  16156. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  16157. "\x10\x11\x12\x13\x14\x15\x16\x17"
  16158. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  16159. "\x20\x21\x22\x23\x24\x25\x26\x27"
  16160. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  16161. "\x30\x31\x32\x33\x34\x35\x36\x37"
  16162. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  16163. "\x40\x41\x42\x43\x44\x45\x46\x47"
  16164. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  16165. "\x50\x51\x52\x53\x54\x55\x56\x57"
  16166. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  16167. "\x60\x61\x62\x63\x64\x65\x66\x67"
  16168. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  16169. "\x70\x71\x72\x73\x74\x75\x76\x77"
  16170. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  16171. "\x80\x81\x82\x83\x84\x85\x86\x87"
  16172. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  16173. "\x90\x91\x92\x93\x94\x95\x96\x97"
  16174. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  16175. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  16176. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  16177. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  16178. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  16179. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  16180. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  16181. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  16182. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  16183. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  16184. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  16185. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  16186. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  16187. "\x00\x01\x02\x03\x04\x05\x06\x07"
  16188. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  16189. "\x10\x11\x12\x13\x14\x15\x16\x17"
  16190. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  16191. "\x20\x21\x22\x23\x24\x25\x26\x27"
  16192. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  16193. "\x30\x31\x32\x33\x34\x35\x36\x37"
  16194. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  16195. "\x40\x41\x42\x43\x44\x45\x46\x47"
  16196. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  16197. "\x50\x51\x52\x53\x54\x55\x56\x57"
  16198. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  16199. "\x60\x61\x62\x63\x64\x65\x66\x67"
  16200. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  16201. "\x70\x71\x72\x73\x74\x75\x76\x77"
  16202. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  16203. "\x80\x81\x82\x83\x84\x85\x86\x87"
  16204. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  16205. "\x90\x91\x92\x93\x94\x95\x96\x97"
  16206. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  16207. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  16208. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  16209. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  16210. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  16211. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  16212. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  16213. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  16214. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  16215. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  16216. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  16217. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  16218. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  16219. .ilen = 512,
  16220. .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
  16221. "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
  16222. "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
  16223. "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
  16224. "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
  16225. "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
  16226. "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
  16227. "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
  16228. "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
  16229. "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
  16230. "\x08\xda\x76\x00\x65\xcf\x7b\x31"
  16231. "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
  16232. "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
  16233. "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
  16234. "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
  16235. "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
  16236. "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
  16237. "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
  16238. "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
  16239. "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
  16240. "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
  16241. "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
  16242. "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
  16243. "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
  16244. "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
  16245. "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
  16246. "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
  16247. "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
  16248. "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
  16249. "\x16\x31\xb2\x47\x91\x67\xaa\x28"
  16250. "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
  16251. "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
  16252. "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
  16253. "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
  16254. "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
  16255. "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
  16256. "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
  16257. "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
  16258. "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
  16259. "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
  16260. "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
  16261. "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
  16262. "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
  16263. "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
  16264. "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
  16265. "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
  16266. "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
  16267. "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
  16268. "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
  16269. "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
  16270. "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
  16271. "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
  16272. "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
  16273. "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
  16274. "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
  16275. "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
  16276. "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
  16277. "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
  16278. "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
  16279. "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
  16280. "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
  16281. "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
  16282. "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
  16283. "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
  16284. .rlen = 512,
  16285. }, {
  16286. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  16287. "\x23\x53\x60\x28\x74\x71\x35\x26"
  16288. "\x62\x49\x77\x57\x24\x70\x93\x69"
  16289. "\x99\x59\x57\x49\x66\x96\x76\x27"
  16290. "\x31\x41\x59\x26\x53\x58\x97\x93"
  16291. "\x23\x84\x62\x64\x33\x83\x27\x95"
  16292. "\x02\x88\x41\x97\x16\x93\x99\x37"
  16293. "\x51\x05\x82\x09\x74\x94\x45\x92",
  16294. .klen = 64,
  16295. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  16296. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16297. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  16298. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  16299. "\x10\x11\x12\x13\x14\x15\x16\x17"
  16300. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  16301. "\x20\x21\x22\x23\x24\x25\x26\x27"
  16302. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  16303. "\x30\x31\x32\x33\x34\x35\x36\x37"
  16304. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  16305. "\x40\x41\x42\x43\x44\x45\x46\x47"
  16306. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  16307. "\x50\x51\x52\x53\x54\x55\x56\x57"
  16308. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  16309. "\x60\x61\x62\x63\x64\x65\x66\x67"
  16310. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  16311. "\x70\x71\x72\x73\x74\x75\x76\x77"
  16312. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  16313. "\x80\x81\x82\x83\x84\x85\x86\x87"
  16314. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  16315. "\x90\x91\x92\x93\x94\x95\x96\x97"
  16316. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  16317. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  16318. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  16319. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  16320. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  16321. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  16322. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  16323. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  16324. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  16325. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  16326. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  16327. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  16328. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  16329. "\x00\x01\x02\x03\x04\x05\x06\x07"
  16330. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  16331. "\x10\x11\x12\x13\x14\x15\x16\x17"
  16332. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  16333. "\x20\x21\x22\x23\x24\x25\x26\x27"
  16334. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  16335. "\x30\x31\x32\x33\x34\x35\x36\x37"
  16336. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  16337. "\x40\x41\x42\x43\x44\x45\x46\x47"
  16338. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  16339. "\x50\x51\x52\x53\x54\x55\x56\x57"
  16340. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  16341. "\x60\x61\x62\x63\x64\x65\x66\x67"
  16342. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  16343. "\x70\x71\x72\x73\x74\x75\x76\x77"
  16344. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  16345. "\x80\x81\x82\x83\x84\x85\x86\x87"
  16346. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  16347. "\x90\x91\x92\x93\x94\x95\x96\x97"
  16348. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  16349. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  16350. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  16351. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  16352. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  16353. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  16354. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  16355. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  16356. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  16357. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  16358. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  16359. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  16360. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  16361. .ilen = 512,
  16362. .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
  16363. "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
  16364. "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
  16365. "\xf1\x74\xac\x96\x05\x7b\x32\xca"
  16366. "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
  16367. "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
  16368. "\x97\x07\x82\xf0\x07\x12\x38\x0a"
  16369. "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
  16370. "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
  16371. "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
  16372. "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
  16373. "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
  16374. "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
  16375. "\x41\x82\x0c\x45\x39\x35\xa8\x75"
  16376. "\x03\x29\x01\x84\x8c\xab\x48\xbe"
  16377. "\x11\x56\x22\x67\xb7\x67\x1a\x09"
  16378. "\xa1\x72\x25\x41\x3c\x39\x65\x80"
  16379. "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
  16380. "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
  16381. "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
  16382. "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
  16383. "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
  16384. "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
  16385. "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
  16386. "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
  16387. "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
  16388. "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
  16389. "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
  16390. "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
  16391. "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
  16392. "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
  16393. "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
  16394. "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
  16395. "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
  16396. "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
  16397. "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
  16398. "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
  16399. "\xef\x38\x52\x18\x0e\x29\x7e\xef"
  16400. "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
  16401. "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
  16402. "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
  16403. "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
  16404. "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
  16405. "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
  16406. "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
  16407. "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
  16408. "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
  16409. "\x21\x17\xf8\x59\x15\x24\x64\x22"
  16410. "\x57\x48\x80\xd5\x3d\x92\x30\x07"
  16411. "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
  16412. "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
  16413. "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
  16414. "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
  16415. "\x6b\x84\xf3\x00\xba\x52\x05\x02"
  16416. "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
  16417. "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
  16418. "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
  16419. "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
  16420. "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
  16421. "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
  16422. "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
  16423. "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
  16424. "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
  16425. "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
  16426. .rlen = 512,
  16427. .also_non_np = 1,
  16428. .np = 2,
  16429. .tap = { 512 - 16, 16 },
  16430. },
  16431. };
  16432. static struct cipher_testvec camellia_xts_dec_tv_template[] = {
  16433. /* Generated from AES-XTS test vectors */
  16434. /* same as enc vectors with input and result reversed */
  16435. {
  16436. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16437. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16438. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16439. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16440. .klen = 32,
  16441. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16442. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16443. .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
  16444. "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
  16445. "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
  16446. "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
  16447. .ilen = 32,
  16448. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16449. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16450. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16451. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16452. .rlen = 32,
  16453. }, {
  16454. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  16455. "\x11\x11\x11\x11\x11\x11\x11\x11"
  16456. "\x22\x22\x22\x22\x22\x22\x22\x22"
  16457. "\x22\x22\x22\x22\x22\x22\x22\x22",
  16458. .klen = 32,
  16459. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  16460. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16461. .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
  16462. "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
  16463. "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
  16464. "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
  16465. .ilen = 32,
  16466. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  16467. "\x44\x44\x44\x44\x44\x44\x44\x44"
  16468. "\x44\x44\x44\x44\x44\x44\x44\x44"
  16469. "\x44\x44\x44\x44\x44\x44\x44\x44",
  16470. .rlen = 32,
  16471. }, {
  16472. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  16473. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  16474. "\x22\x22\x22\x22\x22\x22\x22\x22"
  16475. "\x22\x22\x22\x22\x22\x22\x22\x22",
  16476. .klen = 32,
  16477. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  16478. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16479. .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
  16480. "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
  16481. "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
  16482. "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
  16483. .ilen = 32,
  16484. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  16485. "\x44\x44\x44\x44\x44\x44\x44\x44"
  16486. "\x44\x44\x44\x44\x44\x44\x44\x44"
  16487. "\x44\x44\x44\x44\x44\x44\x44\x44",
  16488. .rlen = 32,
  16489. }, {
  16490. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  16491. "\x23\x53\x60\x28\x74\x71\x35\x26"
  16492. "\x31\x41\x59\x26\x53\x58\x97\x93"
  16493. "\x23\x84\x62\x64\x33\x83\x27\x95",
  16494. .klen = 32,
  16495. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16496. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16497. .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
  16498. "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
  16499. "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
  16500. "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
  16501. "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
  16502. "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
  16503. "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
  16504. "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
  16505. "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
  16506. "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
  16507. "\x08\xda\x76\x00\x65\xcf\x7b\x31"
  16508. "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
  16509. "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
  16510. "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
  16511. "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
  16512. "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
  16513. "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
  16514. "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
  16515. "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
  16516. "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
  16517. "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
  16518. "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
  16519. "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
  16520. "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
  16521. "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
  16522. "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
  16523. "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
  16524. "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
  16525. "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
  16526. "\x16\x31\xb2\x47\x91\x67\xaa\x28"
  16527. "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
  16528. "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
  16529. "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
  16530. "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
  16531. "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
  16532. "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
  16533. "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
  16534. "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
  16535. "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
  16536. "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
  16537. "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
  16538. "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
  16539. "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
  16540. "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
  16541. "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
  16542. "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
  16543. "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
  16544. "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
  16545. "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
  16546. "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
  16547. "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
  16548. "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
  16549. "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
  16550. "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
  16551. "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
  16552. "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
  16553. "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
  16554. "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
  16555. "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
  16556. "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
  16557. "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
  16558. "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
  16559. "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
  16560. "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
  16561. .ilen = 512,
  16562. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  16563. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  16564. "\x10\x11\x12\x13\x14\x15\x16\x17"
  16565. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  16566. "\x20\x21\x22\x23\x24\x25\x26\x27"
  16567. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  16568. "\x30\x31\x32\x33\x34\x35\x36\x37"
  16569. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  16570. "\x40\x41\x42\x43\x44\x45\x46\x47"
  16571. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  16572. "\x50\x51\x52\x53\x54\x55\x56\x57"
  16573. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  16574. "\x60\x61\x62\x63\x64\x65\x66\x67"
  16575. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  16576. "\x70\x71\x72\x73\x74\x75\x76\x77"
  16577. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  16578. "\x80\x81\x82\x83\x84\x85\x86\x87"
  16579. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  16580. "\x90\x91\x92\x93\x94\x95\x96\x97"
  16581. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  16582. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  16583. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  16584. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  16585. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  16586. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  16587. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  16588. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  16589. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  16590. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  16591. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  16592. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  16593. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  16594. "\x00\x01\x02\x03\x04\x05\x06\x07"
  16595. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  16596. "\x10\x11\x12\x13\x14\x15\x16\x17"
  16597. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  16598. "\x20\x21\x22\x23\x24\x25\x26\x27"
  16599. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  16600. "\x30\x31\x32\x33\x34\x35\x36\x37"
  16601. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  16602. "\x40\x41\x42\x43\x44\x45\x46\x47"
  16603. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  16604. "\x50\x51\x52\x53\x54\x55\x56\x57"
  16605. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  16606. "\x60\x61\x62\x63\x64\x65\x66\x67"
  16607. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  16608. "\x70\x71\x72\x73\x74\x75\x76\x77"
  16609. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  16610. "\x80\x81\x82\x83\x84\x85\x86\x87"
  16611. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  16612. "\x90\x91\x92\x93\x94\x95\x96\x97"
  16613. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  16614. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  16615. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  16616. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  16617. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  16618. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  16619. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  16620. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  16621. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  16622. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  16623. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  16624. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  16625. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  16626. .rlen = 512,
  16627. }, {
  16628. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  16629. "\x23\x53\x60\x28\x74\x71\x35\x26"
  16630. "\x62\x49\x77\x57\x24\x70\x93\x69"
  16631. "\x99\x59\x57\x49\x66\x96\x76\x27"
  16632. "\x31\x41\x59\x26\x53\x58\x97\x93"
  16633. "\x23\x84\x62\x64\x33\x83\x27\x95"
  16634. "\x02\x88\x41\x97\x16\x93\x99\x37"
  16635. "\x51\x05\x82\x09\x74\x94\x45\x92",
  16636. .klen = 64,
  16637. .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
  16638. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16639. .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
  16640. "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
  16641. "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
  16642. "\xf1\x74\xac\x96\x05\x7b\x32\xca"
  16643. "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
  16644. "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
  16645. "\x97\x07\x82\xf0\x07\x12\x38\x0a"
  16646. "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
  16647. "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
  16648. "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
  16649. "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
  16650. "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
  16651. "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
  16652. "\x41\x82\x0c\x45\x39\x35\xa8\x75"
  16653. "\x03\x29\x01\x84\x8c\xab\x48\xbe"
  16654. "\x11\x56\x22\x67\xb7\x67\x1a\x09"
  16655. "\xa1\x72\x25\x41\x3c\x39\x65\x80"
  16656. "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
  16657. "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
  16658. "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
  16659. "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
  16660. "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
  16661. "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
  16662. "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
  16663. "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
  16664. "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
  16665. "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
  16666. "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
  16667. "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
  16668. "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
  16669. "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
  16670. "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
  16671. "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
  16672. "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
  16673. "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
  16674. "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
  16675. "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
  16676. "\xef\x38\x52\x18\x0e\x29\x7e\xef"
  16677. "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
  16678. "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
  16679. "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
  16680. "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
  16681. "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
  16682. "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
  16683. "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
  16684. "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
  16685. "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
  16686. "\x21\x17\xf8\x59\x15\x24\x64\x22"
  16687. "\x57\x48\x80\xd5\x3d\x92\x30\x07"
  16688. "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
  16689. "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
  16690. "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
  16691. "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
  16692. "\x6b\x84\xf3\x00\xba\x52\x05\x02"
  16693. "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
  16694. "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
  16695. "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
  16696. "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
  16697. "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
  16698. "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
  16699. "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
  16700. "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
  16701. "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
  16702. "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
  16703. .ilen = 512,
  16704. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  16705. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  16706. "\x10\x11\x12\x13\x14\x15\x16\x17"
  16707. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  16708. "\x20\x21\x22\x23\x24\x25\x26\x27"
  16709. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  16710. "\x30\x31\x32\x33\x34\x35\x36\x37"
  16711. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  16712. "\x40\x41\x42\x43\x44\x45\x46\x47"
  16713. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  16714. "\x50\x51\x52\x53\x54\x55\x56\x57"
  16715. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  16716. "\x60\x61\x62\x63\x64\x65\x66\x67"
  16717. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  16718. "\x70\x71\x72\x73\x74\x75\x76\x77"
  16719. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  16720. "\x80\x81\x82\x83\x84\x85\x86\x87"
  16721. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  16722. "\x90\x91\x92\x93\x94\x95\x96\x97"
  16723. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  16724. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  16725. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  16726. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  16727. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  16728. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  16729. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  16730. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  16731. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  16732. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  16733. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  16734. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  16735. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  16736. "\x00\x01\x02\x03\x04\x05\x06\x07"
  16737. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  16738. "\x10\x11\x12\x13\x14\x15\x16\x17"
  16739. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  16740. "\x20\x21\x22\x23\x24\x25\x26\x27"
  16741. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  16742. "\x30\x31\x32\x33\x34\x35\x36\x37"
  16743. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  16744. "\x40\x41\x42\x43\x44\x45\x46\x47"
  16745. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  16746. "\x50\x51\x52\x53\x54\x55\x56\x57"
  16747. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  16748. "\x60\x61\x62\x63\x64\x65\x66\x67"
  16749. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  16750. "\x70\x71\x72\x73\x74\x75\x76\x77"
  16751. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  16752. "\x80\x81\x82\x83\x84\x85\x86\x87"
  16753. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  16754. "\x90\x91\x92\x93\x94\x95\x96\x97"
  16755. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  16756. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  16757. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  16758. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  16759. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  16760. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  16761. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  16762. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  16763. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  16764. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  16765. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  16766. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  16767. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  16768. .rlen = 512,
  16769. .also_non_np = 1,
  16770. .np = 2,
  16771. .tap = { 512 - 16, 16 },
  16772. },
  16773. };
  16774. /*
  16775. * SEED test vectors
  16776. */
  16777. #define SEED_ENC_TEST_VECTORS 4
  16778. #define SEED_DEC_TEST_VECTORS 4
  16779. static struct cipher_testvec seed_enc_tv_template[] = {
  16780. {
  16781. .key = zeroed_string,
  16782. .klen = 16,
  16783. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  16784. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  16785. .ilen = 16,
  16786. .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  16787. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  16788. .rlen = 16,
  16789. }, {
  16790. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  16791. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  16792. .klen = 16,
  16793. .input = zeroed_string,
  16794. .ilen = 16,
  16795. .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  16796. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  16797. .rlen = 16,
  16798. }, {
  16799. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  16800. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  16801. .klen = 16,
  16802. .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  16803. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  16804. .ilen = 16,
  16805. .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  16806. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  16807. .rlen = 16,
  16808. }, {
  16809. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  16810. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  16811. .klen = 16,
  16812. .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  16813. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  16814. .ilen = 16,
  16815. .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  16816. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  16817. .rlen = 16,
  16818. }
  16819. };
  16820. static struct cipher_testvec seed_dec_tv_template[] = {
  16821. {
  16822. .key = zeroed_string,
  16823. .klen = 16,
  16824. .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  16825. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  16826. .ilen = 16,
  16827. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  16828. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  16829. .rlen = 16,
  16830. }, {
  16831. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  16832. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  16833. .klen = 16,
  16834. .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  16835. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  16836. .ilen = 16,
  16837. .result = zeroed_string,
  16838. .rlen = 16,
  16839. }, {
  16840. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  16841. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  16842. .klen = 16,
  16843. .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  16844. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  16845. .ilen = 16,
  16846. .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  16847. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  16848. .rlen = 16,
  16849. }, {
  16850. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  16851. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  16852. .klen = 16,
  16853. .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  16854. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  16855. .ilen = 16,
  16856. .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  16857. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  16858. .rlen = 16,
  16859. }
  16860. };
  16861. #define SALSA20_STREAM_ENC_TEST_VECTORS 5
  16862. static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
  16863. /*
  16864. * Testvectors from verified.test-vectors submitted to ECRYPT.
  16865. * They are truncated to size 39, 64, 111, 129 to test a variety
  16866. * of input length.
  16867. */
  16868. { /* Set 3, vector 0 */
  16869. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  16870. "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
  16871. .klen = 16,
  16872. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  16873. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16874. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16875. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16876. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16877. "\x00\x00\x00\x00\x00\x00\x00",
  16878. .ilen = 39,
  16879. .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
  16880. "\x68\x02\x41\x0C\x68\x86\x88\x89"
  16881. "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
  16882. "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
  16883. "\x58\x3F\x52\x79\x70\xEB\xC1",
  16884. .rlen = 39,
  16885. }, { /* Set 5, vector 0 */
  16886. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16887. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16888. .klen = 16,
  16889. .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
  16890. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16891. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16892. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16893. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16894. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16895. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16896. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16897. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16898. .ilen = 64,
  16899. .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
  16900. "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
  16901. "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
  16902. "\x46\x26\xBF\x44\x3F\x21\x97\x76"
  16903. "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
  16904. "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
  16905. "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
  16906. "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
  16907. .rlen = 64,
  16908. }, { /* Set 3, vector 27 */
  16909. .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
  16910. "\x23\x24\x25\x26\x27\x28\x29\x2A"
  16911. "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
  16912. "\x33\x34\x35\x36\x37\x38\x39\x3A",
  16913. .klen = 32,
  16914. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  16915. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16916. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16917. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16918. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16919. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16920. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16921. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16922. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16923. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16924. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16925. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16926. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16927. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16928. "\x00\x00\x00\x00\x00\x00\x00",
  16929. .ilen = 111,
  16930. .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
  16931. "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
  16932. "\x87\xD9\x47\xF8\x28\x91\x35\x98"
  16933. "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
  16934. "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
  16935. "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
  16936. "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
  16937. "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
  16938. "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
  16939. "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
  16940. "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
  16941. "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
  16942. "\x95\x46\x45\x54\xE9\x75\x03\x08"
  16943. "\x44\xAF\xE5\x8A\x81\x12\x09",
  16944. .rlen = 111,
  16945. }, { /* Set 5, vector 27 */
  16946. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16947. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16948. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16949. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16950. .klen = 32,
  16951. .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
  16952. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16953. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16954. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16955. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16956. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16957. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16958. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16959. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16960. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16961. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16962. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16963. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16964. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16965. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16966. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16967. "\x00\x00\x00\x00\x00\x00\x00\x00"
  16968. "\x00",
  16969. .ilen = 129,
  16970. .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
  16971. "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
  16972. "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
  16973. "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
  16974. "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
  16975. "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
  16976. "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
  16977. "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
  16978. "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
  16979. "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
  16980. "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
  16981. "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
  16982. "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
  16983. "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
  16984. "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
  16985. "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
  16986. "\x5A",
  16987. .rlen = 129,
  16988. }, { /* large test vector generated using Crypto++ */
  16989. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  16990. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  16991. "\x10\x11\x12\x13\x14\x15\x16\x17"
  16992. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  16993. .klen = 32,
  16994. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  16995. "\x00\x00\x00\x00\x00\x00\x00\x00",
  16996. .input =
  16997. "\x00\x01\x02\x03\x04\x05\x06\x07"
  16998. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  16999. "\x10\x11\x12\x13\x14\x15\x16\x17"
  17000. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  17001. "\x20\x21\x22\x23\x24\x25\x26\x27"
  17002. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  17003. "\x30\x31\x32\x33\x34\x35\x36\x37"
  17004. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  17005. "\x40\x41\x42\x43\x44\x45\x46\x47"
  17006. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  17007. "\x50\x51\x52\x53\x54\x55\x56\x57"
  17008. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  17009. "\x60\x61\x62\x63\x64\x65\x66\x67"
  17010. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  17011. "\x70\x71\x72\x73\x74\x75\x76\x77"
  17012. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  17013. "\x80\x81\x82\x83\x84\x85\x86\x87"
  17014. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  17015. "\x90\x91\x92\x93\x94\x95\x96\x97"
  17016. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  17017. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  17018. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  17019. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  17020. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  17021. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  17022. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  17023. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  17024. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  17025. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  17026. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  17027. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  17028. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  17029. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  17030. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  17031. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  17032. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  17033. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  17034. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  17035. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  17036. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  17037. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  17038. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  17039. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  17040. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  17041. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  17042. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  17043. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  17044. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  17045. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  17046. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  17047. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  17048. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  17049. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  17050. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  17051. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  17052. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  17053. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  17054. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  17055. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  17056. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  17057. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  17058. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  17059. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  17060. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  17061. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  17062. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  17063. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  17064. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  17065. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  17066. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  17067. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  17068. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  17069. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  17070. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  17071. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  17072. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  17073. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  17074. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  17075. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  17076. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  17077. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  17078. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  17079. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  17080. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  17081. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  17082. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  17083. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  17084. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  17085. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  17086. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  17087. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  17088. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  17089. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  17090. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  17091. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  17092. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  17093. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  17094. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  17095. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  17096. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  17097. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  17098. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  17099. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  17100. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  17101. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  17102. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  17103. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  17104. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  17105. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  17106. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  17107. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  17108. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  17109. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  17110. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  17111. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  17112. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  17113. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  17114. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  17115. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  17116. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  17117. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  17118. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  17119. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  17120. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  17121. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  17122. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  17123. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  17124. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  17125. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  17126. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  17127. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  17128. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  17129. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  17130. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  17131. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  17132. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  17133. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  17134. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  17135. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  17136. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  17137. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  17138. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  17139. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  17140. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  17141. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  17142. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  17143. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  17144. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  17145. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  17146. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  17147. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  17148. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  17149. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  17150. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  17151. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  17152. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  17153. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  17154. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  17155. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  17156. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  17157. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  17158. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  17159. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  17160. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  17161. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  17162. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  17163. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  17164. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  17165. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  17166. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  17167. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  17168. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  17169. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  17170. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  17171. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  17172. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  17173. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  17174. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  17175. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  17176. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  17177. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  17178. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  17179. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  17180. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  17181. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  17182. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  17183. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  17184. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  17185. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  17186. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  17187. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  17188. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  17189. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  17190. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  17191. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  17192. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  17193. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  17194. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  17195. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  17196. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  17197. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  17198. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  17199. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  17200. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  17201. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  17202. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  17203. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  17204. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  17205. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  17206. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  17207. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  17208. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  17209. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  17210. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  17211. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  17212. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  17213. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  17214. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  17215. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  17216. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  17217. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  17218. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  17219. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  17220. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  17221. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  17222. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  17223. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  17224. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  17225. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  17226. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  17227. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  17228. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  17229. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  17230. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  17231. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  17232. "\x28\x37\x46\x55\x64\x73\x82\x91"
  17233. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  17234. "\x18\x27\x36\x45\x54\x63\x72\x81"
  17235. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  17236. "\x08\x17\x26\x35\x44\x53\x62\x71"
  17237. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  17238. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  17239. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  17240. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  17241. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  17242. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  17243. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  17244. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  17245. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  17246. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  17247. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  17248. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  17249. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  17250. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  17251. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  17252. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  17253. "\x00\x11\x22\x33\x44\x55\x66\x77"
  17254. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  17255. "\x10\x21\x32\x43\x54\x65\x76\x87"
  17256. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  17257. "\x20\x31\x42\x53\x64\x75\x86\x97"
  17258. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  17259. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  17260. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  17261. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  17262. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  17263. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  17264. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  17265. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  17266. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  17267. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  17268. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  17269. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  17270. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  17271. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  17272. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  17273. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  17274. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  17275. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  17276. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  17277. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  17278. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  17279. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  17280. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  17281. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  17282. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  17283. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  17284. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  17285. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  17286. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  17287. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  17288. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  17289. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  17290. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  17291. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  17292. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  17293. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  17294. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  17295. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  17296. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  17297. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  17298. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  17299. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  17300. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  17301. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  17302. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  17303. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  17304. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  17305. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  17306. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  17307. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  17308. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  17309. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  17310. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  17311. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  17312. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  17313. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  17314. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  17315. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  17316. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  17317. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  17318. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  17319. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  17320. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  17321. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  17322. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  17323. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  17324. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  17325. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  17326. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  17327. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  17328. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  17329. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  17330. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  17331. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  17332. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  17333. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  17334. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  17335. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  17336. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  17337. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  17338. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  17339. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  17340. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  17341. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  17342. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  17343. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  17344. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  17345. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  17346. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  17347. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  17348. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  17349. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  17350. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  17351. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  17352. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  17353. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  17354. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  17355. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  17356. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  17357. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  17358. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  17359. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  17360. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  17361. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  17362. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  17363. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  17364. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  17365. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  17366. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  17367. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  17368. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  17369. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  17370. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  17371. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  17372. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  17373. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  17374. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  17375. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  17376. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  17377. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  17378. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  17379. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  17380. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  17381. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  17382. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  17383. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  17384. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  17385. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  17386. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  17387. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  17388. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  17389. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  17390. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  17391. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  17392. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  17393. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  17394. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  17395. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  17396. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  17397. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  17398. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  17399. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  17400. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  17401. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  17402. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  17403. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  17404. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  17405. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  17406. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  17407. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  17408. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  17409. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  17410. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  17411. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  17412. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  17413. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  17414. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  17415. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  17416. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  17417. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  17418. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  17419. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  17420. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  17421. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  17422. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  17423. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  17424. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  17425. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  17426. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  17427. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  17428. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  17429. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  17430. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  17431. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  17432. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  17433. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  17434. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  17435. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  17436. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  17437. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  17438. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  17439. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  17440. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  17441. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  17442. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  17443. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  17444. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  17445. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  17446. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  17447. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  17448. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  17449. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  17450. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  17451. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  17452. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  17453. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  17454. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  17455. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  17456. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  17457. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  17458. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  17459. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  17460. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  17461. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  17462. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  17463. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  17464. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  17465. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  17466. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  17467. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  17468. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  17469. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  17470. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  17471. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  17472. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  17473. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  17474. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  17475. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  17476. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  17477. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  17478. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  17479. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  17480. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  17481. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  17482. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  17483. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  17484. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  17485. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  17486. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  17487. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  17488. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  17489. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  17490. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  17491. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  17492. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  17493. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  17494. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  17495. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  17496. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  17497. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  17498. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  17499. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  17500. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  17501. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  17502. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  17503. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  17504. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  17505. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  17506. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  17507. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  17508. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  17509. "\x00\x21\x42\x63",
  17510. .ilen = 4100,
  17511. .result =
  17512. "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
  17513. "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
  17514. "\x29\x01\xce\x98\x55\x53\xf9\x0c"
  17515. "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
  17516. "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
  17517. "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
  17518. "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
  17519. "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
  17520. "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
  17521. "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
  17522. "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
  17523. "\xbb\xde\x56\x86\xab\x65\x21\x30"
  17524. "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
  17525. "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
  17526. "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
  17527. "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
  17528. "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
  17529. "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
  17530. "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
  17531. "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
  17532. "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
  17533. "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
  17534. "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
  17535. "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
  17536. "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
  17537. "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
  17538. "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
  17539. "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
  17540. "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
  17541. "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
  17542. "\x45\xff\x3f\xce\x55\xf6\x95\x10"
  17543. "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
  17544. "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
  17545. "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
  17546. "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
  17547. "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
  17548. "\x62\x08\x18\x7a\x25\x49\x28\xac"
  17549. "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
  17550. "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
  17551. "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
  17552. "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
  17553. "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
  17554. "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
  17555. "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
  17556. "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
  17557. "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
  17558. "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
  17559. "\x33\xee\x14\x19\x22\x52\x89\xa7"
  17560. "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
  17561. "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
  17562. "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
  17563. "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
  17564. "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
  17565. "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
  17566. "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
  17567. "\x04\x07\x08\x52\xe6\xc0\xda\x93"
  17568. "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
  17569. "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
  17570. "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
  17571. "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
  17572. "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
  17573. "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
  17574. "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
  17575. "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
  17576. "\x5a\x90\xae\x75\x0a\x74\x18\x89"
  17577. "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
  17578. "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
  17579. "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
  17580. "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
  17581. "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
  17582. "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
  17583. "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
  17584. "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
  17585. "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
  17586. "\x49\x97\x33\xab\x36\x14\x0a\x70"
  17587. "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
  17588. "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
  17589. "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
  17590. "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
  17591. "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
  17592. "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
  17593. "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
  17594. "\x47\x13\x28\x73\x3c\xbb\x00\x90"
  17595. "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
  17596. "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
  17597. "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
  17598. "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
  17599. "\xad\x04\x07\xae\x22\x90\x4a\x93"
  17600. "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
  17601. "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
  17602. "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
  17603. "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
  17604. "\x53\xf9\x80\x10\xde\x80\xa2\x41"
  17605. "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
  17606. "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
  17607. "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
  17608. "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
  17609. "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
  17610. "\xde\xff\x07\x44\xdd\x56\x1b\xad"
  17611. "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
  17612. "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
  17613. "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
  17614. "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
  17615. "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
  17616. "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
  17617. "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
  17618. "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
  17619. "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
  17620. "\x23\xf8\x66\x18\x14\x28\x34\x0f"
  17621. "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
  17622. "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
  17623. "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
  17624. "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
  17625. "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
  17626. "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
  17627. "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
  17628. "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
  17629. "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
  17630. "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
  17631. "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
  17632. "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
  17633. "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
  17634. "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
  17635. "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
  17636. "\xca\x8e\x61\x87\xde\xad\x80\xd2"
  17637. "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
  17638. "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
  17639. "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
  17640. "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
  17641. "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
  17642. "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
  17643. "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
  17644. "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
  17645. "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
  17646. "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
  17647. "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
  17648. "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
  17649. "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
  17650. "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
  17651. "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
  17652. "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
  17653. "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
  17654. "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
  17655. "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
  17656. "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
  17657. "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
  17658. "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
  17659. "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
  17660. "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
  17661. "\x54\xda\x24\x6a\xc4\x41\x65\x46"
  17662. "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
  17663. "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
  17664. "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
  17665. "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
  17666. "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
  17667. "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
  17668. "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
  17669. "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
  17670. "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
  17671. "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
  17672. "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
  17673. "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
  17674. "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
  17675. "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
  17676. "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
  17677. "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
  17678. "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
  17679. "\xef\xcc\xa7\xec\xab\x43\x09\x18"
  17680. "\xd3\xab\x68\xd1\x07\x99\x44\x47"
  17681. "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
  17682. "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
  17683. "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
  17684. "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
  17685. "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
  17686. "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
  17687. "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
  17688. "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
  17689. "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
  17690. "\x71\x6e\x9f\x58\x15\x67\x72\x87"
  17691. "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
  17692. "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
  17693. "\xba\x41\x54\xac\xf0\xfc\x59\x12"
  17694. "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
  17695. "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
  17696. "\x2e\x53\x49\x97\x94\x33\xae\x40"
  17697. "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
  17698. "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
  17699. "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
  17700. "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
  17701. "\xce\x87\xad\xcc\x72\x05\x00\x29"
  17702. "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
  17703. "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
  17704. "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
  17705. "\xac\xc0\x79\x50\x69\xca\x59\x32"
  17706. "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
  17707. "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
  17708. "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
  17709. "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
  17710. "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
  17711. "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
  17712. "\x05\x68\x6b\xab\xe3\x41\x49\xed"
  17713. "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
  17714. "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
  17715. "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
  17716. "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
  17717. "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
  17718. "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
  17719. "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
  17720. "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
  17721. "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
  17722. "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
  17723. "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
  17724. "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
  17725. "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
  17726. "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
  17727. "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
  17728. "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
  17729. "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
  17730. "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
  17731. "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
  17732. "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
  17733. "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
  17734. "\x85\x75\xe6\x43\xf6\x87\x08\x68"
  17735. "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
  17736. "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
  17737. "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
  17738. "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
  17739. "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
  17740. "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
  17741. "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
  17742. "\xaf\x55\xeb\x22\xac\x93\x68\x32"
  17743. "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
  17744. "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
  17745. "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
  17746. "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
  17747. "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
  17748. "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
  17749. "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
  17750. "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
  17751. "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
  17752. "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
  17753. "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
  17754. "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
  17755. "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
  17756. "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
  17757. "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
  17758. "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
  17759. "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
  17760. "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
  17761. "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
  17762. "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
  17763. "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
  17764. "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
  17765. "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
  17766. "\x38\x55\xab\x33\x26\xef\x9f\x43"
  17767. "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
  17768. "\x58\x09\x09\x1b\xc3\x65\x46\x46"
  17769. "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
  17770. "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
  17771. "\x63\x86\xf2\x03\x67\x45\xd2\x72"
  17772. "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
  17773. "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
  17774. "\x2b\x82\x39\xbd\x69\x54\xed\x62"
  17775. "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
  17776. "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
  17777. "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
  17778. "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
  17779. "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
  17780. "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
  17781. "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
  17782. "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
  17783. "\x55\xad\xa4\xd1\x22\x54\x70\x94"
  17784. "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
  17785. "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
  17786. "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
  17787. "\x62\x36\x43\xb2\x82\x15\x75\x50"
  17788. "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
  17789. "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
  17790. "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
  17791. "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
  17792. "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
  17793. "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
  17794. "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
  17795. "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
  17796. "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
  17797. "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
  17798. "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
  17799. "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
  17800. "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
  17801. "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
  17802. "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
  17803. "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
  17804. "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
  17805. "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
  17806. "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
  17807. "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
  17808. "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
  17809. "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
  17810. "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
  17811. "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
  17812. "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
  17813. "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
  17814. "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
  17815. "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
  17816. "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
  17817. "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
  17818. "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
  17819. "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
  17820. "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
  17821. "\x42\x19\x23\x7d\xc8\x73\xee\x25"
  17822. "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
  17823. "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
  17824. "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
  17825. "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
  17826. "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
  17827. "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
  17828. "\xdb\x87\xee\xef\x55\x89\x2a\x59"
  17829. "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
  17830. "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
  17831. "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
  17832. "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
  17833. "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
  17834. "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
  17835. "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
  17836. "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
  17837. "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
  17838. "\xae\xab\x86\x09\x89\xc9\xc2\x40"
  17839. "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
  17840. "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
  17841. "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
  17842. "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
  17843. "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
  17844. "\x95\xd9\x34\x34\x86\xc6\x41\x94"
  17845. "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
  17846. "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
  17847. "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
  17848. "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
  17849. "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
  17850. "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
  17851. "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
  17852. "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
  17853. "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
  17854. "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
  17855. "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
  17856. "\xa7\x33\x34\x86\xca\xe4\x96\x23"
  17857. "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
  17858. "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
  17859. "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
  17860. "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
  17861. "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
  17862. "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
  17863. "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
  17864. "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
  17865. "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
  17866. "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
  17867. "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
  17868. "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
  17869. "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
  17870. "\x68\xc8\x7f\x51\x22\x42\xef\x49"
  17871. "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
  17872. "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
  17873. "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
  17874. "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
  17875. "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
  17876. "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
  17877. "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
  17878. "\x73\x2e\x71\x79\x16\x06\x63\x28"
  17879. "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
  17880. "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
  17881. "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
  17882. "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
  17883. "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
  17884. "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
  17885. "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
  17886. "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
  17887. "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
  17888. "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
  17889. "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
  17890. "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
  17891. "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
  17892. "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
  17893. "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
  17894. "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
  17895. "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
  17896. "\x19\x07\xaf\x90\x62\x5c\x68\x98"
  17897. "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
  17898. "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
  17899. "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
  17900. "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
  17901. "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
  17902. "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
  17903. "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
  17904. "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
  17905. "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
  17906. "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
  17907. "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
  17908. "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
  17909. "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
  17910. "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
  17911. "\x21\x33\x44\xfe\x7f\x35\x32\x93"
  17912. "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
  17913. "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
  17914. "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
  17915. "\x64\xf0\x48\xe5\x57\x99\xee\x75"
  17916. "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
  17917. "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
  17918. "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
  17919. "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
  17920. "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
  17921. "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
  17922. "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
  17923. "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
  17924. "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
  17925. "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
  17926. "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
  17927. "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
  17928. "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
  17929. "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
  17930. "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
  17931. "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
  17932. "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
  17933. "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
  17934. "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
  17935. "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
  17936. "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
  17937. "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
  17938. "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
  17939. "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
  17940. "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
  17941. "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
  17942. "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
  17943. "\x56\xf5\x4e\x01\x35\x27\x45\x77"
  17944. "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
  17945. "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
  17946. "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
  17947. "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
  17948. "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
  17949. "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
  17950. "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
  17951. "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
  17952. "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
  17953. "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
  17954. "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
  17955. "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
  17956. "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
  17957. "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
  17958. "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
  17959. "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
  17960. "\x87\x8f\x03\x21\x28\x95\x0c\x89"
  17961. "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
  17962. "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
  17963. "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
  17964. "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
  17965. "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
  17966. "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
  17967. "\x85\x73\x78\x45\x20\x7f\xae\x13"
  17968. "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
  17969. "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
  17970. "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
  17971. "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
  17972. "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
  17973. "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
  17974. "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
  17975. "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
  17976. "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
  17977. "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
  17978. "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
  17979. "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
  17980. "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
  17981. "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
  17982. "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
  17983. "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
  17984. "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
  17985. "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
  17986. "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
  17987. "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
  17988. "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
  17989. "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
  17990. "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
  17991. "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
  17992. "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
  17993. "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
  17994. "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
  17995. "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
  17996. "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
  17997. "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
  17998. "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
  17999. "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
  18000. "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
  18001. "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
  18002. "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
  18003. "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
  18004. "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
  18005. "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
  18006. "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
  18007. "\x6e\x12\x17\x72\x63\x57\xc7\xba"
  18008. "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
  18009. "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
  18010. "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
  18011. "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
  18012. "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
  18013. "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
  18014. "\x0c\x24\x43\x31\x40\x57\xf1\x72"
  18015. "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
  18016. "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
  18017. "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
  18018. "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
  18019. "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
  18020. "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
  18021. "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
  18022. "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
  18023. "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
  18024. "\xaf\xdf\x11\x95",
  18025. .rlen = 4100,
  18026. .np = 2,
  18027. .tap = { 4064, 36 },
  18028. },
  18029. };
  18030. /*
  18031. * CTS (Cipher Text Stealing) mode tests
  18032. */
  18033. #define CTS_MODE_ENC_TEST_VECTORS 6
  18034. #define CTS_MODE_DEC_TEST_VECTORS 6
  18035. static struct cipher_testvec cts_mode_enc_tv_template[] = {
  18036. { /* from rfc3962 */
  18037. .klen = 16,
  18038. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18039. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18040. .ilen = 17,
  18041. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18042. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18043. "\x20",
  18044. .rlen = 17,
  18045. .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  18046. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  18047. "\x97",
  18048. }, {
  18049. .klen = 16,
  18050. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18051. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18052. .ilen = 31,
  18053. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18054. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18055. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  18056. "\x20\x47\x61\x75\x27\x73\x20",
  18057. .rlen = 31,
  18058. .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  18059. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  18060. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  18061. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  18062. }, {
  18063. .klen = 16,
  18064. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18065. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18066. .ilen = 32,
  18067. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18068. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18069. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  18070. "\x20\x47\x61\x75\x27\x73\x20\x43",
  18071. .rlen = 32,
  18072. .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  18073. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  18074. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  18075. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  18076. }, {
  18077. .klen = 16,
  18078. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18079. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18080. .ilen = 47,
  18081. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18082. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18083. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  18084. "\x20\x47\x61\x75\x27\x73\x20\x43"
  18085. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  18086. "\x70\x6c\x65\x61\x73\x65\x2c",
  18087. .rlen = 47,
  18088. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  18089. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  18090. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  18091. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  18092. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  18093. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  18094. }, {
  18095. .klen = 16,
  18096. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18097. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18098. .ilen = 48,
  18099. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18100. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18101. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  18102. "\x20\x47\x61\x75\x27\x73\x20\x43"
  18103. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  18104. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  18105. .rlen = 48,
  18106. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  18107. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  18108. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  18109. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  18110. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  18111. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  18112. }, {
  18113. .klen = 16,
  18114. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18115. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18116. .ilen = 64,
  18117. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18118. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18119. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  18120. "\x20\x47\x61\x75\x27\x73\x20\x43"
  18121. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  18122. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  18123. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  18124. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  18125. .rlen = 64,
  18126. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  18127. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  18128. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  18129. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  18130. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  18131. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  18132. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  18133. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  18134. }
  18135. };
  18136. static struct cipher_testvec cts_mode_dec_tv_template[] = {
  18137. { /* from rfc3962 */
  18138. .klen = 16,
  18139. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18140. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18141. .rlen = 17,
  18142. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18143. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18144. "\x20",
  18145. .ilen = 17,
  18146. .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  18147. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  18148. "\x97",
  18149. }, {
  18150. .klen = 16,
  18151. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18152. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18153. .rlen = 31,
  18154. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18155. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18156. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  18157. "\x20\x47\x61\x75\x27\x73\x20",
  18158. .ilen = 31,
  18159. .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  18160. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  18161. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  18162. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  18163. }, {
  18164. .klen = 16,
  18165. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18166. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18167. .rlen = 32,
  18168. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18169. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18170. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  18171. "\x20\x47\x61\x75\x27\x73\x20\x43",
  18172. .ilen = 32,
  18173. .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  18174. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  18175. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  18176. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  18177. }, {
  18178. .klen = 16,
  18179. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18180. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18181. .rlen = 47,
  18182. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18183. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18184. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  18185. "\x20\x47\x61\x75\x27\x73\x20\x43"
  18186. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  18187. "\x70\x6c\x65\x61\x73\x65\x2c",
  18188. .ilen = 47,
  18189. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  18190. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  18191. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  18192. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  18193. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  18194. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  18195. }, {
  18196. .klen = 16,
  18197. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18198. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18199. .rlen = 48,
  18200. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18201. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18202. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  18203. "\x20\x47\x61\x75\x27\x73\x20\x43"
  18204. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  18205. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  18206. .ilen = 48,
  18207. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  18208. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  18209. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  18210. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  18211. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  18212. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  18213. }, {
  18214. .klen = 16,
  18215. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  18216. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  18217. .rlen = 64,
  18218. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  18219. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  18220. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  18221. "\x20\x47\x61\x75\x27\x73\x20\x43"
  18222. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  18223. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  18224. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  18225. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  18226. .ilen = 64,
  18227. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  18228. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  18229. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  18230. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  18231. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  18232. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  18233. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  18234. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  18235. }
  18236. };
  18237. /*
  18238. * Compression stuff.
  18239. */
  18240. #define COMP_BUF_SIZE 512
  18241. struct comp_testvec {
  18242. int inlen, outlen;
  18243. char input[COMP_BUF_SIZE];
  18244. char output[COMP_BUF_SIZE];
  18245. };
  18246. struct pcomp_testvec {
  18247. void *params;
  18248. unsigned int paramsize;
  18249. int inlen, outlen;
  18250. char input[COMP_BUF_SIZE];
  18251. char output[COMP_BUF_SIZE];
  18252. };
  18253. /*
  18254. * Deflate test vectors (null-terminated strings).
  18255. * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
  18256. */
  18257. #define DEFLATE_COMP_TEST_VECTORS 2
  18258. #define DEFLATE_DECOMP_TEST_VECTORS 2
  18259. static struct comp_testvec deflate_comp_tv_template[] = {
  18260. {
  18261. .inlen = 70,
  18262. .outlen = 38,
  18263. .input = "Join us now and share the software "
  18264. "Join us now and share the software ",
  18265. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  18266. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  18267. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  18268. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  18269. "\x71\xbc\x08\x2b\x01\x00",
  18270. }, {
  18271. .inlen = 191,
  18272. .outlen = 122,
  18273. .input = "This document describes a compression method based on the DEFLATE"
  18274. "compression algorithm. This document defines the application of "
  18275. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  18276. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  18277. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  18278. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  18279. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  18280. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  18281. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  18282. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  18283. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  18284. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  18285. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  18286. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  18287. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  18288. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  18289. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  18290. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  18291. "\xfa\x02",
  18292. },
  18293. };
  18294. static struct comp_testvec deflate_decomp_tv_template[] = {
  18295. {
  18296. .inlen = 122,
  18297. .outlen = 191,
  18298. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  18299. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  18300. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  18301. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  18302. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  18303. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  18304. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  18305. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  18306. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  18307. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  18308. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  18309. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  18310. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  18311. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  18312. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  18313. "\xfa\x02",
  18314. .output = "This document describes a compression method based on the DEFLATE"
  18315. "compression algorithm. This document defines the application of "
  18316. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  18317. }, {
  18318. .inlen = 38,
  18319. .outlen = 70,
  18320. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  18321. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  18322. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  18323. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  18324. "\x71\xbc\x08\x2b\x01\x00",
  18325. .output = "Join us now and share the software "
  18326. "Join us now and share the software ",
  18327. },
  18328. };
  18329. #define ZLIB_COMP_TEST_VECTORS 2
  18330. #define ZLIB_DECOMP_TEST_VECTORS 2
  18331. static const struct {
  18332. struct nlattr nla;
  18333. int val;
  18334. } deflate_comp_params[] = {
  18335. {
  18336. .nla = {
  18337. .nla_len = NLA_HDRLEN + sizeof(int),
  18338. .nla_type = ZLIB_COMP_LEVEL,
  18339. },
  18340. .val = Z_DEFAULT_COMPRESSION,
  18341. }, {
  18342. .nla = {
  18343. .nla_len = NLA_HDRLEN + sizeof(int),
  18344. .nla_type = ZLIB_COMP_METHOD,
  18345. },
  18346. .val = Z_DEFLATED,
  18347. }, {
  18348. .nla = {
  18349. .nla_len = NLA_HDRLEN + sizeof(int),
  18350. .nla_type = ZLIB_COMP_WINDOWBITS,
  18351. },
  18352. .val = -11,
  18353. }, {
  18354. .nla = {
  18355. .nla_len = NLA_HDRLEN + sizeof(int),
  18356. .nla_type = ZLIB_COMP_MEMLEVEL,
  18357. },
  18358. .val = MAX_MEM_LEVEL,
  18359. }, {
  18360. .nla = {
  18361. .nla_len = NLA_HDRLEN + sizeof(int),
  18362. .nla_type = ZLIB_COMP_STRATEGY,
  18363. },
  18364. .val = Z_DEFAULT_STRATEGY,
  18365. }
  18366. };
  18367. static const struct {
  18368. struct nlattr nla;
  18369. int val;
  18370. } deflate_decomp_params[] = {
  18371. {
  18372. .nla = {
  18373. .nla_len = NLA_HDRLEN + sizeof(int),
  18374. .nla_type = ZLIB_DECOMP_WINDOWBITS,
  18375. },
  18376. .val = -11,
  18377. }
  18378. };
  18379. static struct pcomp_testvec zlib_comp_tv_template[] = {
  18380. {
  18381. .params = &deflate_comp_params,
  18382. .paramsize = sizeof(deflate_comp_params),
  18383. .inlen = 70,
  18384. .outlen = 38,
  18385. .input = "Join us now and share the software "
  18386. "Join us now and share the software ",
  18387. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  18388. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  18389. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  18390. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  18391. "\x71\xbc\x08\x2b\x01\x00",
  18392. }, {
  18393. .params = &deflate_comp_params,
  18394. .paramsize = sizeof(deflate_comp_params),
  18395. .inlen = 191,
  18396. .outlen = 122,
  18397. .input = "This document describes a compression method based on the DEFLATE"
  18398. "compression algorithm. This document defines the application of "
  18399. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  18400. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  18401. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  18402. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  18403. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  18404. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  18405. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  18406. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  18407. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  18408. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  18409. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  18410. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  18411. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  18412. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  18413. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  18414. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  18415. "\xfa\x02",
  18416. },
  18417. };
  18418. static struct pcomp_testvec zlib_decomp_tv_template[] = {
  18419. {
  18420. .params = &deflate_decomp_params,
  18421. .paramsize = sizeof(deflate_decomp_params),
  18422. .inlen = 122,
  18423. .outlen = 191,
  18424. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  18425. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  18426. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  18427. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  18428. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  18429. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  18430. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  18431. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  18432. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  18433. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  18434. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  18435. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  18436. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  18437. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  18438. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  18439. "\xfa\x02",
  18440. .output = "This document describes a compression method based on the DEFLATE"
  18441. "compression algorithm. This document defines the application of "
  18442. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  18443. }, {
  18444. .params = &deflate_decomp_params,
  18445. .paramsize = sizeof(deflate_decomp_params),
  18446. .inlen = 38,
  18447. .outlen = 70,
  18448. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  18449. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  18450. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  18451. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  18452. "\x71\xbc\x08\x2b\x01\x00",
  18453. .output = "Join us now and share the software "
  18454. "Join us now and share the software ",
  18455. },
  18456. };
  18457. /*
  18458. * LZO test vectors (null-terminated strings).
  18459. */
  18460. #define LZO_COMP_TEST_VECTORS 2
  18461. #define LZO_DECOMP_TEST_VECTORS 2
  18462. static struct comp_testvec lzo_comp_tv_template[] = {
  18463. {
  18464. .inlen = 70,
  18465. .outlen = 46,
  18466. .input = "Join us now and share the software "
  18467. "Join us now and share the software ",
  18468. .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  18469. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  18470. "\x64\x20\x73\x68\x61\x72\x65\x20"
  18471. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  18472. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  18473. "\x3d\x88\x00\x11\x00\x00",
  18474. }, {
  18475. .inlen = 159,
  18476. .outlen = 133,
  18477. .input = "This document describes a compression method based on the LZO "
  18478. "compression algorithm. This document defines the application of "
  18479. "the LZO algorithm used in UBIFS.",
  18480. .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  18481. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  18482. "\x64\x65\x73\x63\x72\x69\x62\x65"
  18483. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  18484. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  18485. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  18486. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  18487. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  18488. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  18489. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  18490. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  18491. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  18492. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  18493. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  18494. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  18495. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  18496. "\x53\x2e\x11\x00\x00",
  18497. },
  18498. };
  18499. static struct comp_testvec lzo_decomp_tv_template[] = {
  18500. {
  18501. .inlen = 133,
  18502. .outlen = 159,
  18503. .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  18504. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  18505. "\x64\x65\x73\x63\x72\x69\x62\x65"
  18506. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  18507. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  18508. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  18509. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  18510. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  18511. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  18512. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  18513. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  18514. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  18515. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  18516. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  18517. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  18518. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  18519. "\x53\x2e\x11\x00\x00",
  18520. .output = "This document describes a compression method based on the LZO "
  18521. "compression algorithm. This document defines the application of "
  18522. "the LZO algorithm used in UBIFS.",
  18523. }, {
  18524. .inlen = 46,
  18525. .outlen = 70,
  18526. .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  18527. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  18528. "\x64\x20\x73\x68\x61\x72\x65\x20"
  18529. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  18530. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  18531. "\x3d\x88\x00\x11\x00\x00",
  18532. .output = "Join us now and share the software "
  18533. "Join us now and share the software ",
  18534. },
  18535. };
  18536. /*
  18537. * Michael MIC test vectors from IEEE 802.11i
  18538. */
  18539. #define MICHAEL_MIC_TEST_VECTORS 6
  18540. static struct hash_testvec michael_mic_tv_template[] = {
  18541. {
  18542. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  18543. .ksize = 8,
  18544. .plaintext = zeroed_string,
  18545. .psize = 0,
  18546. .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  18547. },
  18548. {
  18549. .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  18550. .ksize = 8,
  18551. .plaintext = "M",
  18552. .psize = 1,
  18553. .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  18554. },
  18555. {
  18556. .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  18557. .ksize = 8,
  18558. .plaintext = "Mi",
  18559. .psize = 2,
  18560. .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  18561. },
  18562. {
  18563. .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  18564. .ksize = 8,
  18565. .plaintext = "Mic",
  18566. .psize = 3,
  18567. .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  18568. },
  18569. {
  18570. .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  18571. .ksize = 8,
  18572. .plaintext = "Mich",
  18573. .psize = 4,
  18574. .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  18575. },
  18576. {
  18577. .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  18578. .ksize = 8,
  18579. .plaintext = "Michael",
  18580. .psize = 7,
  18581. .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
  18582. }
  18583. };
  18584. /*
  18585. * CRC32C test vectors
  18586. */
  18587. #define CRC32C_TEST_VECTORS 14
  18588. static struct hash_testvec crc32c_tv_template[] = {
  18589. {
  18590. .psize = 0,
  18591. .digest = "\x00\x00\x00\x00",
  18592. },
  18593. {
  18594. .key = "\x87\xa9\xcb\xed",
  18595. .ksize = 4,
  18596. .psize = 0,
  18597. .digest = "\x78\x56\x34\x12",
  18598. },
  18599. {
  18600. .key = "\xff\xff\xff\xff",
  18601. .ksize = 4,
  18602. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  18603. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  18604. "\x11\x12\x13\x14\x15\x16\x17\x18"
  18605. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  18606. "\x21\x22\x23\x24\x25\x26\x27\x28",
  18607. .psize = 40,
  18608. .digest = "\x7f\x15\x2c\x0e",
  18609. },
  18610. {
  18611. .key = "\xff\xff\xff\xff",
  18612. .ksize = 4,
  18613. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  18614. "\x31\x32\x33\x34\x35\x36\x37\x38"
  18615. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  18616. "\x41\x42\x43\x44\x45\x46\x47\x48"
  18617. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  18618. .psize = 40,
  18619. .digest = "\xf6\xeb\x80\xe9",
  18620. },
  18621. {
  18622. .key = "\xff\xff\xff\xff",
  18623. .ksize = 4,
  18624. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  18625. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  18626. "\x61\x62\x63\x64\x65\x66\x67\x68"
  18627. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  18628. "\x71\x72\x73\x74\x75\x76\x77\x78",
  18629. .psize = 40,
  18630. .digest = "\xed\xbd\x74\xde",
  18631. },
  18632. {
  18633. .key = "\xff\xff\xff\xff",
  18634. .ksize = 4,
  18635. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  18636. "\x81\x82\x83\x84\x85\x86\x87\x88"
  18637. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  18638. "\x91\x92\x93\x94\x95\x96\x97\x98"
  18639. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  18640. .psize = 40,
  18641. .digest = "\x62\xc8\x79\xd5",
  18642. },
  18643. {
  18644. .key = "\xff\xff\xff\xff",
  18645. .ksize = 4,
  18646. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  18647. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  18648. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  18649. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  18650. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  18651. .psize = 40,
  18652. .digest = "\xd0\x9a\x97\xba",
  18653. },
  18654. {
  18655. .key = "\xff\xff\xff\xff",
  18656. .ksize = 4,
  18657. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  18658. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  18659. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  18660. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  18661. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  18662. .psize = 40,
  18663. .digest = "\x13\xd9\x29\x2b",
  18664. },
  18665. {
  18666. .key = "\x80\xea\xd3\xf1",
  18667. .ksize = 4,
  18668. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  18669. "\x31\x32\x33\x34\x35\x36\x37\x38"
  18670. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  18671. "\x41\x42\x43\x44\x45\x46\x47\x48"
  18672. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  18673. .psize = 40,
  18674. .digest = "\x0c\xb5\xe2\xa2",
  18675. },
  18676. {
  18677. .key = "\xf3\x4a\x1d\x5d",
  18678. .ksize = 4,
  18679. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  18680. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  18681. "\x61\x62\x63\x64\x65\x66\x67\x68"
  18682. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  18683. "\x71\x72\x73\x74\x75\x76\x77\x78",
  18684. .psize = 40,
  18685. .digest = "\xd1\x7f\xfb\xa6",
  18686. },
  18687. {
  18688. .key = "\x2e\x80\x04\x59",
  18689. .ksize = 4,
  18690. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  18691. "\x81\x82\x83\x84\x85\x86\x87\x88"
  18692. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  18693. "\x91\x92\x93\x94\x95\x96\x97\x98"
  18694. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  18695. .psize = 40,
  18696. .digest = "\x59\x33\xe6\x7a",
  18697. },
  18698. {
  18699. .key = "\xa6\xcc\x19\x85",
  18700. .ksize = 4,
  18701. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  18702. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  18703. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  18704. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  18705. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  18706. .psize = 40,
  18707. .digest = "\xbe\x03\x01\xd2",
  18708. },
  18709. {
  18710. .key = "\x41\xfc\xfe\x2d",
  18711. .ksize = 4,
  18712. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  18713. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  18714. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  18715. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  18716. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  18717. .psize = 40,
  18718. .digest = "\x75\xd3\xc5\x24",
  18719. },
  18720. {
  18721. .key = "\xff\xff\xff\xff",
  18722. .ksize = 4,
  18723. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  18724. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  18725. "\x11\x12\x13\x14\x15\x16\x17\x18"
  18726. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  18727. "\x21\x22\x23\x24\x25\x26\x27\x28"
  18728. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  18729. "\x31\x32\x33\x34\x35\x36\x37\x38"
  18730. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  18731. "\x41\x42\x43\x44\x45\x46\x47\x48"
  18732. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  18733. "\x51\x52\x53\x54\x55\x56\x57\x58"
  18734. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  18735. "\x61\x62\x63\x64\x65\x66\x67\x68"
  18736. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  18737. "\x71\x72\x73\x74\x75\x76\x77\x78"
  18738. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  18739. "\x81\x82\x83\x84\x85\x86\x87\x88"
  18740. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  18741. "\x91\x92\x93\x94\x95\x96\x97\x98"
  18742. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  18743. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  18744. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  18745. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  18746. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  18747. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  18748. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  18749. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  18750. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  18751. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  18752. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  18753. .psize = 240,
  18754. .digest = "\x75\xd3\xc5\x24",
  18755. .np = 2,
  18756. .tap = { 31, 209 }
  18757. },
  18758. };
  18759. /*
  18760. * Blakcifn CRC test vectors
  18761. */
  18762. #define BFIN_CRC_TEST_VECTORS 6
  18763. static struct hash_testvec bfin_crc_tv_template[] = {
  18764. {
  18765. .psize = 0,
  18766. .digest = "\x00\x00\x00\x00",
  18767. },
  18768. {
  18769. .key = "\x87\xa9\xcb\xed",
  18770. .ksize = 4,
  18771. .psize = 0,
  18772. .digest = "\x87\xa9\xcb\xed",
  18773. },
  18774. {
  18775. .key = "\xff\xff\xff\xff",
  18776. .ksize = 4,
  18777. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  18778. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  18779. "\x11\x12\x13\x14\x15\x16\x17\x18"
  18780. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  18781. "\x21\x22\x23\x24\x25\x26\x27\x28",
  18782. .psize = 40,
  18783. .digest = "\x84\x0c\x8d\xa2",
  18784. },
  18785. {
  18786. .key = "\xff\xff\xff\xff",
  18787. .ksize = 4,
  18788. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  18789. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  18790. "\x11\x12\x13\x14\x15\x16\x17\x18"
  18791. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  18792. "\x21\x22\x23\x24\x25\x26",
  18793. .psize = 38,
  18794. .digest = "\x8c\x58\xec\xb7",
  18795. },
  18796. {
  18797. .key = "\xff\xff\xff\xff",
  18798. .ksize = 4,
  18799. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  18800. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  18801. "\x11\x12\x13\x14\x15\x16\x17\x18"
  18802. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  18803. "\x21\x22\x23\x24\x25\x26\x27",
  18804. .psize = 39,
  18805. .digest = "\xdc\x50\x28\x7b",
  18806. },
  18807. {
  18808. .key = "\xff\xff\xff\xff",
  18809. .ksize = 4,
  18810. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  18811. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  18812. "\x11\x12\x13\x14\x15\x16\x17\x18"
  18813. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  18814. "\x21\x22\x23\x24\x25\x26\x27\x28"
  18815. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  18816. "\x31\x32\x33\x34\x35\x36\x37\x38"
  18817. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  18818. "\x41\x42\x43\x44\x45\x46\x47\x48"
  18819. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  18820. "\x51\x52\x53\x54\x55\x56\x57\x58"
  18821. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  18822. "\x61\x62\x63\x64\x65\x66\x67\x68"
  18823. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  18824. "\x71\x72\x73\x74\x75\x76\x77\x78"
  18825. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  18826. "\x81\x82\x83\x84\x85\x86\x87\x88"
  18827. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  18828. "\x91\x92\x93\x94\x95\x96\x97\x98"
  18829. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  18830. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  18831. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  18832. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  18833. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  18834. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  18835. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  18836. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  18837. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  18838. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  18839. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  18840. .psize = 240,
  18841. .digest = "\x10\x19\x4a\x5c",
  18842. .np = 2,
  18843. .tap = { 31, 209 }
  18844. },
  18845. };
  18846. #endif /* _CRYPTO_TESTMGR_H */