testmgr.h 301 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256
  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. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the Free
  11. * Software Foundation; either version 2 of the License, or (at your option)
  12. * any later version.
  13. *
  14. */
  15. #ifndef _CRYPTO_TESTMGR_H
  16. #define _CRYPTO_TESTMGR_H
  17. #include <linux/netlink.h>
  18. #include <linux/zlib.h>
  19. #include <crypto/compress.h>
  20. #define MAX_DIGEST_SIZE 64
  21. #define MAX_TAP 8
  22. #define MAX_KEYLEN 56
  23. #define MAX_IVLEN 32
  24. struct hash_testvec {
  25. /* only used with keyed hash algorithms */
  26. char *key;
  27. char *plaintext;
  28. char *digest;
  29. unsigned char tap[MAX_TAP];
  30. unsigned char psize;
  31. unsigned char np;
  32. unsigned char ksize;
  33. };
  34. struct cipher_testvec {
  35. char *key;
  36. char *iv;
  37. char *input;
  38. char *result;
  39. unsigned short tap[MAX_TAP];
  40. int np;
  41. unsigned char fail;
  42. unsigned char wk; /* weak key flag */
  43. unsigned char klen;
  44. unsigned short ilen;
  45. unsigned short rlen;
  46. };
  47. struct aead_testvec {
  48. char *key;
  49. char *iv;
  50. char *input;
  51. char *assoc;
  52. char *result;
  53. unsigned char tap[MAX_TAP];
  54. unsigned char atap[MAX_TAP];
  55. int np;
  56. int anp;
  57. unsigned char fail;
  58. unsigned char novrfy; /* ccm dec verification failure expected */
  59. unsigned char wk; /* weak key flag */
  60. unsigned char klen;
  61. unsigned short ilen;
  62. unsigned short alen;
  63. unsigned short rlen;
  64. };
  65. static char zeroed_string[48];
  66. /*
  67. * MD4 test vectors from RFC1320
  68. */
  69. #define MD4_TEST_VECTORS 7
  70. static struct hash_testvec md4_tv_template [] = {
  71. {
  72. .plaintext = "",
  73. .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
  74. "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
  75. }, {
  76. .plaintext = "a",
  77. .psize = 1,
  78. .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
  79. "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
  80. }, {
  81. .plaintext = "abc",
  82. .psize = 3,
  83. .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
  84. "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
  85. }, {
  86. .plaintext = "message digest",
  87. .psize = 14,
  88. .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
  89. "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
  90. }, {
  91. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  92. .psize = 26,
  93. .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
  94. "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
  95. .np = 2,
  96. .tap = { 13, 13 },
  97. }, {
  98. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  99. .psize = 62,
  100. .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
  101. "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
  102. }, {
  103. .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
  104. "45678901234567890",
  105. .psize = 80,
  106. .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
  107. "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
  108. },
  109. };
  110. /*
  111. * MD5 test vectors from RFC1321
  112. */
  113. #define MD5_TEST_VECTORS 7
  114. static struct hash_testvec md5_tv_template[] = {
  115. {
  116. .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
  117. "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
  118. }, {
  119. .plaintext = "a",
  120. .psize = 1,
  121. .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
  122. "\x31\xc3\x99\xe2\x69\x77\x26\x61",
  123. }, {
  124. .plaintext = "abc",
  125. .psize = 3,
  126. .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
  127. "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
  128. }, {
  129. .plaintext = "message digest",
  130. .psize = 14,
  131. .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
  132. "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
  133. }, {
  134. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  135. .psize = 26,
  136. .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
  137. "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
  138. .np = 2,
  139. .tap = {13, 13}
  140. }, {
  141. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  142. .psize = 62,
  143. .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
  144. "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
  145. }, {
  146. .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
  147. "345678901234567890",
  148. .psize = 80,
  149. .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
  150. "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
  151. }
  152. };
  153. /*
  154. * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
  155. */
  156. #define RMD128_TEST_VECTORS 10
  157. static struct hash_testvec rmd128_tv_template[] = {
  158. {
  159. .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
  160. "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
  161. }, {
  162. .plaintext = "a",
  163. .psize = 1,
  164. .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
  165. "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
  166. }, {
  167. .plaintext = "abc",
  168. .psize = 3,
  169. .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
  170. "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
  171. }, {
  172. .plaintext = "message digest",
  173. .psize = 14,
  174. .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
  175. "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
  176. }, {
  177. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  178. .psize = 26,
  179. .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
  180. "\x10\x71\x49\x22\xb3\x71\x83\x4e",
  181. }, {
  182. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  183. "fghijklmnopqrstuvwxyz0123456789",
  184. .psize = 62,
  185. .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
  186. "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
  187. }, {
  188. .plaintext = "1234567890123456789012345678901234567890"
  189. "1234567890123456789012345678901234567890",
  190. .psize = 80,
  191. .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
  192. "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
  193. }, {
  194. .plaintext = "abcdbcdecdefdefgefghfghighij"
  195. "hijkijkljklmklmnlmnomnopnopq",
  196. .psize = 56,
  197. .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
  198. "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
  199. .np = 2,
  200. .tap = { 28, 28 },
  201. }, {
  202. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  203. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  204. "lmnopqrsmnopqrstnopqrstu",
  205. .psize = 112,
  206. .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
  207. "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
  208. }, {
  209. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  210. .psize = 32,
  211. .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
  212. "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
  213. }
  214. };
  215. /*
  216. * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
  217. */
  218. #define RMD160_TEST_VECTORS 10
  219. static struct hash_testvec rmd160_tv_template[] = {
  220. {
  221. .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
  222. "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
  223. }, {
  224. .plaintext = "a",
  225. .psize = 1,
  226. .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
  227. "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
  228. }, {
  229. .plaintext = "abc",
  230. .psize = 3,
  231. .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
  232. "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
  233. }, {
  234. .plaintext = "message digest",
  235. .psize = 14,
  236. .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
  237. "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
  238. }, {
  239. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  240. .psize = 26,
  241. .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
  242. "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
  243. }, {
  244. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  245. "fghijklmnopqrstuvwxyz0123456789",
  246. .psize = 62,
  247. .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
  248. "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
  249. }, {
  250. .plaintext = "1234567890123456789012345678901234567890"
  251. "1234567890123456789012345678901234567890",
  252. .psize = 80,
  253. .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
  254. "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
  255. }, {
  256. .plaintext = "abcdbcdecdefdefgefghfghighij"
  257. "hijkijkljklmklmnlmnomnopnopq",
  258. .psize = 56,
  259. .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
  260. "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
  261. .np = 2,
  262. .tap = { 28, 28 },
  263. }, {
  264. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  265. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  266. "lmnopqrsmnopqrstnopqrstu",
  267. .psize = 112,
  268. .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
  269. "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
  270. }, {
  271. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  272. .psize = 32,
  273. .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
  274. "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
  275. }
  276. };
  277. /*
  278. * RIPEMD-256 test vectors
  279. */
  280. #define RMD256_TEST_VECTORS 8
  281. static struct hash_testvec rmd256_tv_template[] = {
  282. {
  283. .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
  284. "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
  285. "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
  286. "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
  287. }, {
  288. .plaintext = "a",
  289. .psize = 1,
  290. .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
  291. "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
  292. "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
  293. "\xcd\x88\x3a\x91\x34\x69\x29\x25",
  294. }, {
  295. .plaintext = "abc",
  296. .psize = 3,
  297. .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
  298. "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
  299. "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
  300. "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
  301. }, {
  302. .plaintext = "message digest",
  303. .psize = 14,
  304. .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
  305. "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
  306. "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
  307. "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
  308. }, {
  309. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  310. .psize = 26,
  311. .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
  312. "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
  313. "\x78\x96\x11\x8a\x51\x97\x96\x87"
  314. "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
  315. }, {
  316. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  317. "fghijklmnopqrstuvwxyz0123456789",
  318. .psize = 62,
  319. .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
  320. "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
  321. "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
  322. "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
  323. }, {
  324. .plaintext = "1234567890123456789012345678901234567890"
  325. "1234567890123456789012345678901234567890",
  326. .psize = 80,
  327. .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
  328. "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
  329. "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
  330. "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
  331. }, {
  332. .plaintext = "abcdbcdecdefdefgefghfghighij"
  333. "hijkijkljklmklmnlmnomnopnopq",
  334. .psize = 56,
  335. .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
  336. "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
  337. "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
  338. "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
  339. .np = 2,
  340. .tap = { 28, 28 },
  341. }
  342. };
  343. /*
  344. * RIPEMD-320 test vectors
  345. */
  346. #define RMD320_TEST_VECTORS 8
  347. static struct hash_testvec rmd320_tv_template[] = {
  348. {
  349. .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
  350. "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
  351. "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
  352. "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
  353. }, {
  354. .plaintext = "a",
  355. .psize = 1,
  356. .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
  357. "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
  358. "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
  359. "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
  360. }, {
  361. .plaintext = "abc",
  362. .psize = 3,
  363. .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
  364. "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
  365. "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
  366. "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
  367. }, {
  368. .plaintext = "message digest",
  369. .psize = 14,
  370. .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
  371. "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
  372. "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
  373. "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
  374. }, {
  375. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  376. .psize = 26,
  377. .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
  378. "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
  379. "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
  380. "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
  381. }, {
  382. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  383. "fghijklmnopqrstuvwxyz0123456789",
  384. .psize = 62,
  385. .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
  386. "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
  387. "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
  388. "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
  389. }, {
  390. .plaintext = "1234567890123456789012345678901234567890"
  391. "1234567890123456789012345678901234567890",
  392. .psize = 80,
  393. .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
  394. "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
  395. "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
  396. "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
  397. }, {
  398. .plaintext = "abcdbcdecdefdefgefghfghighij"
  399. "hijkijkljklmklmnlmnomnopnopq",
  400. .psize = 56,
  401. .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
  402. "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
  403. "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
  404. "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
  405. .np = 2,
  406. .tap = { 28, 28 },
  407. }
  408. };
  409. /*
  410. * SHA1 test vectors from from FIPS PUB 180-1
  411. */
  412. #define SHA1_TEST_VECTORS 2
  413. static struct hash_testvec sha1_tv_template[] = {
  414. {
  415. .plaintext = "abc",
  416. .psize = 3,
  417. .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
  418. "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
  419. }, {
  420. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  421. .psize = 56,
  422. .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
  423. "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
  424. .np = 2,
  425. .tap = { 28, 28 }
  426. }
  427. };
  428. /*
  429. * SHA224 test vectors from from FIPS PUB 180-2
  430. */
  431. #define SHA224_TEST_VECTORS 2
  432. static struct hash_testvec sha224_tv_template[] = {
  433. {
  434. .plaintext = "abc",
  435. .psize = 3,
  436. .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
  437. "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
  438. "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
  439. "\xE3\x6C\x9D\xA7",
  440. }, {
  441. .plaintext =
  442. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  443. .psize = 56,
  444. .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
  445. "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
  446. "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
  447. "\x52\x52\x25\x25",
  448. .np = 2,
  449. .tap = { 28, 28 }
  450. }
  451. };
  452. /*
  453. * SHA256 test vectors from from NIST
  454. */
  455. #define SHA256_TEST_VECTORS 2
  456. static struct hash_testvec sha256_tv_template[] = {
  457. {
  458. .plaintext = "abc",
  459. .psize = 3,
  460. .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
  461. "\x41\x41\x40\xde\x5d\xae\x22\x23"
  462. "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
  463. "\xb4\x10\xff\x61\xf2\x00\x15\xad",
  464. }, {
  465. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  466. .psize = 56,
  467. .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
  468. "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
  469. "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
  470. "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
  471. .np = 2,
  472. .tap = { 28, 28 }
  473. },
  474. };
  475. /*
  476. * SHA384 test vectors from from NIST and kerneli
  477. */
  478. #define SHA384_TEST_VECTORS 4
  479. static struct hash_testvec sha384_tv_template[] = {
  480. {
  481. .plaintext= "abc",
  482. .psize = 3,
  483. .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
  484. "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
  485. "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
  486. "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
  487. "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
  488. "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
  489. }, {
  490. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  491. .psize = 56,
  492. .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
  493. "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
  494. "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
  495. "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
  496. "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
  497. "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
  498. }, {
  499. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  500. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  501. .psize = 112,
  502. .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
  503. "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
  504. "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
  505. "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
  506. "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
  507. "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
  508. }, {
  509. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  510. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  511. .psize = 104,
  512. .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
  513. "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
  514. "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
  515. "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
  516. "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
  517. "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
  518. .np = 4,
  519. .tap = { 26, 26, 26, 26 }
  520. },
  521. };
  522. /*
  523. * SHA512 test vectors from from NIST and kerneli
  524. */
  525. #define SHA512_TEST_VECTORS 4
  526. static struct hash_testvec sha512_tv_template[] = {
  527. {
  528. .plaintext = "abc",
  529. .psize = 3,
  530. .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
  531. "\xcc\x41\x73\x49\xae\x20\x41\x31"
  532. "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
  533. "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
  534. "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
  535. "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
  536. "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
  537. "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
  538. }, {
  539. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  540. .psize = 56,
  541. .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
  542. "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
  543. "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
  544. "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
  545. "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
  546. "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
  547. "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
  548. "\x54\xec\x63\x12\x38\xca\x34\x45",
  549. }, {
  550. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  551. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  552. .psize = 112,
  553. .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
  554. "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
  555. "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
  556. "\x72\x99\xae\xad\xb6\x88\x90\x18"
  557. "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
  558. "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
  559. "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
  560. "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
  561. }, {
  562. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  563. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  564. .psize = 104,
  565. .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
  566. "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
  567. "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
  568. "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
  569. "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
  570. "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
  571. "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
  572. "\xed\xb4\x19\x87\x23\x28\x50\xc9",
  573. .np = 4,
  574. .tap = { 26, 26, 26, 26 }
  575. },
  576. };
  577. /*
  578. * WHIRLPOOL test vectors from Whirlpool package
  579. * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
  580. * submission
  581. */
  582. #define WP512_TEST_VECTORS 8
  583. static struct hash_testvec wp512_tv_template[] = {
  584. {
  585. .plaintext = "",
  586. .psize = 0,
  587. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  588. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  589. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  590. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  591. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  592. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
  593. "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
  594. "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
  595. }, {
  596. .plaintext = "a",
  597. .psize = 1,
  598. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  599. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  600. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  601. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  602. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  603. "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
  604. "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
  605. "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
  606. }, {
  607. .plaintext = "abc",
  608. .psize = 3,
  609. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  610. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  611. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  612. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  613. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  614. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
  615. "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
  616. "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
  617. }, {
  618. .plaintext = "message digest",
  619. .psize = 14,
  620. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  621. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  622. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  623. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  624. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  625. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
  626. "\x92\xED\x92\x00\x52\x83\x8F\x33"
  627. "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
  628. }, {
  629. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  630. .psize = 26,
  631. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  632. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  633. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  634. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  635. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  636. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
  637. "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
  638. "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
  639. }, {
  640. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  641. "abcdefghijklmnopqrstuvwxyz0123456789",
  642. .psize = 62,
  643. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  644. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  645. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  646. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  647. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  648. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
  649. "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
  650. "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
  651. }, {
  652. .plaintext = "1234567890123456789012345678901234567890"
  653. "1234567890123456789012345678901234567890",
  654. .psize = 80,
  655. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  656. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  657. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  658. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  659. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  660. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
  661. "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
  662. "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
  663. }, {
  664. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  665. .psize = 32,
  666. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  667. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  668. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  669. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  670. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  671. "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
  672. "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
  673. "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
  674. },
  675. };
  676. #define WP384_TEST_VECTORS 8
  677. static struct hash_testvec wp384_tv_template[] = {
  678. {
  679. .plaintext = "",
  680. .psize = 0,
  681. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  682. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  683. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  684. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  685. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  686. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
  687. }, {
  688. .plaintext = "a",
  689. .psize = 1,
  690. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  691. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  692. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  693. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  694. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  695. "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
  696. }, {
  697. .plaintext = "abc",
  698. .psize = 3,
  699. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  700. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  701. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  702. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  703. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  704. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
  705. }, {
  706. .plaintext = "message digest",
  707. .psize = 14,
  708. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  709. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  710. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  711. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  712. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  713. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
  714. }, {
  715. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  716. .psize = 26,
  717. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  718. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  719. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  720. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  721. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  722. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
  723. }, {
  724. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  725. "abcdefghijklmnopqrstuvwxyz0123456789",
  726. .psize = 62,
  727. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  728. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  729. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  730. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  731. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  732. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
  733. }, {
  734. .plaintext = "1234567890123456789012345678901234567890"
  735. "1234567890123456789012345678901234567890",
  736. .psize = 80,
  737. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  738. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  739. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  740. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  741. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  742. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
  743. }, {
  744. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  745. .psize = 32,
  746. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  747. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  748. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  749. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  750. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  751. "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
  752. },
  753. };
  754. #define WP256_TEST_VECTORS 8
  755. static struct hash_testvec wp256_tv_template[] = {
  756. {
  757. .plaintext = "",
  758. .psize = 0,
  759. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  760. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  761. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  762. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
  763. }, {
  764. .plaintext = "a",
  765. .psize = 1,
  766. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  767. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  768. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  769. "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
  770. }, {
  771. .plaintext = "abc",
  772. .psize = 3,
  773. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  774. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  775. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  776. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
  777. }, {
  778. .plaintext = "message digest",
  779. .psize = 14,
  780. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  781. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  782. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  783. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
  784. }, {
  785. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  786. .psize = 26,
  787. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  788. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  789. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  790. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
  791. }, {
  792. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  793. "abcdefghijklmnopqrstuvwxyz0123456789",
  794. .psize = 62,
  795. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  796. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  797. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  798. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
  799. }, {
  800. .plaintext = "1234567890123456789012345678901234567890"
  801. "1234567890123456789012345678901234567890",
  802. .psize = 80,
  803. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  804. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  805. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  806. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
  807. }, {
  808. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  809. .psize = 32,
  810. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  811. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  812. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  813. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
  814. },
  815. };
  816. /*
  817. * TIGER test vectors from Tiger website
  818. */
  819. #define TGR192_TEST_VECTORS 6
  820. static struct hash_testvec tgr192_tv_template[] = {
  821. {
  822. .plaintext = "",
  823. .psize = 0,
  824. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  825. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  826. "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
  827. }, {
  828. .plaintext = "abc",
  829. .psize = 3,
  830. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  831. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  832. "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
  833. }, {
  834. .plaintext = "Tiger",
  835. .psize = 5,
  836. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  837. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  838. "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
  839. }, {
  840. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  841. .psize = 64,
  842. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  843. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  844. "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
  845. }, {
  846. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  847. .psize = 64,
  848. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  849. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  850. "\x57\x89\x65\x65\x97\x5f\x91\x97",
  851. }, {
  852. .plaintext = "Tiger - A Fast New Hash Function, "
  853. "by Ross Anderson and Eli Biham, "
  854. "proceedings of Fast Software Encryption 3, "
  855. "Cambridge, 1996.",
  856. .psize = 125,
  857. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  858. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  859. "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
  860. },
  861. };
  862. #define TGR160_TEST_VECTORS 6
  863. static struct hash_testvec tgr160_tv_template[] = {
  864. {
  865. .plaintext = "",
  866. .psize = 0,
  867. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  868. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  869. "\xf3\x73\xde\x2d",
  870. }, {
  871. .plaintext = "abc",
  872. .psize = 3,
  873. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  874. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  875. "\x93\x5f\x7b\x95",
  876. }, {
  877. .plaintext = "Tiger",
  878. .psize = 5,
  879. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  880. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  881. "\x37\x79\x0c\x11",
  882. }, {
  883. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  884. .psize = 64,
  885. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  886. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  887. "\xb5\x86\x44\x50",
  888. }, {
  889. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  890. .psize = 64,
  891. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  892. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  893. "\x57\x89\x65\x65",
  894. }, {
  895. .plaintext = "Tiger - A Fast New Hash Function, "
  896. "by Ross Anderson and Eli Biham, "
  897. "proceedings of Fast Software Encryption 3, "
  898. "Cambridge, 1996.",
  899. .psize = 125,
  900. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  901. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  902. "\xdd\x68\x15\x1d",
  903. },
  904. };
  905. #define TGR128_TEST_VECTORS 6
  906. static struct hash_testvec tgr128_tv_template[] = {
  907. {
  908. .plaintext = "",
  909. .psize = 0,
  910. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  911. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
  912. }, {
  913. .plaintext = "abc",
  914. .psize = 3,
  915. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  916. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
  917. }, {
  918. .plaintext = "Tiger",
  919. .psize = 5,
  920. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  921. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
  922. }, {
  923. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  924. .psize = 64,
  925. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  926. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
  927. }, {
  928. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  929. .psize = 64,
  930. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  931. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
  932. }, {
  933. .plaintext = "Tiger - A Fast New Hash Function, "
  934. "by Ross Anderson and Eli Biham, "
  935. "proceedings of Fast Software Encryption 3, "
  936. "Cambridge, 1996.",
  937. .psize = 125,
  938. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  939. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
  940. },
  941. };
  942. /*
  943. * HMAC-MD5 test vectors from RFC2202
  944. * (These need to be fixed to not use strlen).
  945. */
  946. #define HMAC_MD5_TEST_VECTORS 7
  947. static struct hash_testvec hmac_md5_tv_template[] =
  948. {
  949. {
  950. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  951. .ksize = 16,
  952. .plaintext = "Hi There",
  953. .psize = 8,
  954. .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
  955. "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
  956. }, {
  957. .key = "Jefe",
  958. .ksize = 4,
  959. .plaintext = "what do ya want for nothing?",
  960. .psize = 28,
  961. .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
  962. "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
  963. .np = 2,
  964. .tap = {14, 14}
  965. }, {
  966. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  967. .ksize = 16,
  968. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  969. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  970. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  971. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  972. .psize = 50,
  973. .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
  974. "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
  975. }, {
  976. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  977. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  978. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  979. .ksize = 25,
  980. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  981. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  982. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  983. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  984. .psize = 50,
  985. .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
  986. "\x3a\x75\x16\x47\x46\xff\xaa\x79",
  987. }, {
  988. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  989. .ksize = 16,
  990. .plaintext = "Test With Truncation",
  991. .psize = 20,
  992. .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
  993. "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
  994. }, {
  995. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  996. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  997. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  998. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  999. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1000. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1001. "\xaa\xaa",
  1002. .ksize = 80,
  1003. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1004. .psize = 54,
  1005. .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
  1006. "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
  1007. }, {
  1008. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1009. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1010. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1011. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1012. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1013. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1014. "\xaa\xaa",
  1015. .ksize = 80,
  1016. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1017. "Block-Size Data",
  1018. .psize = 73,
  1019. .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
  1020. "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
  1021. },
  1022. };
  1023. /*
  1024. * HMAC-RIPEMD128 test vectors from RFC2286
  1025. */
  1026. #define HMAC_RMD128_TEST_VECTORS 7
  1027. static struct hash_testvec hmac_rmd128_tv_template[] = {
  1028. {
  1029. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1030. .ksize = 16,
  1031. .plaintext = "Hi There",
  1032. .psize = 8,
  1033. .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
  1034. "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
  1035. }, {
  1036. .key = "Jefe",
  1037. .ksize = 4,
  1038. .plaintext = "what do ya want for nothing?",
  1039. .psize = 28,
  1040. .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
  1041. "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
  1042. .np = 2,
  1043. .tap = { 14, 14 },
  1044. }, {
  1045. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1046. .ksize = 16,
  1047. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1048. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1049. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1050. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1051. .psize = 50,
  1052. .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
  1053. "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
  1054. }, {
  1055. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1056. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1057. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1058. .ksize = 25,
  1059. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1060. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1061. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1062. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1063. .psize = 50,
  1064. .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
  1065. "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
  1066. }, {
  1067. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1068. .ksize = 16,
  1069. .plaintext = "Test With Truncation",
  1070. .psize = 20,
  1071. .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
  1072. "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
  1073. }, {
  1074. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1075. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1076. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1077. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1078. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1079. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1080. "\xaa\xaa",
  1081. .ksize = 80,
  1082. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1083. .psize = 54,
  1084. .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
  1085. "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
  1086. }, {
  1087. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1088. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1089. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1090. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1091. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1092. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1093. "\xaa\xaa",
  1094. .ksize = 80,
  1095. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1096. "Block-Size Data",
  1097. .psize = 73,
  1098. .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
  1099. "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
  1100. },
  1101. };
  1102. /*
  1103. * HMAC-RIPEMD160 test vectors from RFC2286
  1104. */
  1105. #define HMAC_RMD160_TEST_VECTORS 7
  1106. static struct hash_testvec hmac_rmd160_tv_template[] = {
  1107. {
  1108. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1109. .ksize = 20,
  1110. .plaintext = "Hi There",
  1111. .psize = 8,
  1112. .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
  1113. "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
  1114. }, {
  1115. .key = "Jefe",
  1116. .ksize = 4,
  1117. .plaintext = "what do ya want for nothing?",
  1118. .psize = 28,
  1119. .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
  1120. "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
  1121. .np = 2,
  1122. .tap = { 14, 14 },
  1123. }, {
  1124. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1125. .ksize = 20,
  1126. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1127. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1128. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1129. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1130. .psize = 50,
  1131. .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
  1132. "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
  1133. }, {
  1134. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1135. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1136. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1137. .ksize = 25,
  1138. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1139. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1140. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1141. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1142. .psize = 50,
  1143. .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
  1144. "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
  1145. }, {
  1146. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1147. .ksize = 20,
  1148. .plaintext = "Test With Truncation",
  1149. .psize = 20,
  1150. .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
  1151. "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
  1152. }, {
  1153. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1154. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1155. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1156. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1157. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1158. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1159. "\xaa\xaa",
  1160. .ksize = 80,
  1161. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1162. .psize = 54,
  1163. .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
  1164. "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
  1165. }, {
  1166. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1167. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1168. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1169. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1170. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1171. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1172. "\xaa\xaa",
  1173. .ksize = 80,
  1174. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1175. "Block-Size Data",
  1176. .psize = 73,
  1177. .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
  1178. "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
  1179. },
  1180. };
  1181. /*
  1182. * HMAC-SHA1 test vectors from RFC2202
  1183. */
  1184. #define HMAC_SHA1_TEST_VECTORS 7
  1185. static struct hash_testvec hmac_sha1_tv_template[] = {
  1186. {
  1187. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1188. .ksize = 20,
  1189. .plaintext = "Hi There",
  1190. .psize = 8,
  1191. .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
  1192. "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
  1193. "\x46\xbe",
  1194. }, {
  1195. .key = "Jefe",
  1196. .ksize = 4,
  1197. .plaintext = "what do ya want for nothing?",
  1198. .psize = 28,
  1199. .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
  1200. "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
  1201. .np = 2,
  1202. .tap = { 14, 14 }
  1203. }, {
  1204. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1205. .ksize = 20,
  1206. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1207. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1208. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1209. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1210. .psize = 50,
  1211. .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
  1212. "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
  1213. }, {
  1214. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1215. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1216. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1217. .ksize = 25,
  1218. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1219. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1220. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1221. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1222. .psize = 50,
  1223. .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
  1224. "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
  1225. }, {
  1226. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1227. .ksize = 20,
  1228. .plaintext = "Test With Truncation",
  1229. .psize = 20,
  1230. .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
  1231. "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
  1232. }, {
  1233. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1234. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1235. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1236. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1237. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1238. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1239. "\xaa\xaa",
  1240. .ksize = 80,
  1241. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1242. .psize = 54,
  1243. .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
  1244. "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
  1245. }, {
  1246. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1247. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1248. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1249. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1250. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1251. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1252. "\xaa\xaa",
  1253. .ksize = 80,
  1254. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1255. "Block-Size Data",
  1256. .psize = 73,
  1257. .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
  1258. "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
  1259. },
  1260. };
  1261. /*
  1262. * SHA224 HMAC test vectors from RFC4231
  1263. */
  1264. #define HMAC_SHA224_TEST_VECTORS 4
  1265. static struct hash_testvec hmac_sha224_tv_template[] = {
  1266. {
  1267. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1268. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1269. "\x0b\x0b\x0b\x0b",
  1270. .ksize = 20,
  1271. /* ("Hi There") */
  1272. .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
  1273. .psize = 8,
  1274. .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
  1275. "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
  1276. "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
  1277. "\x53\x68\x4b\x22",
  1278. }, {
  1279. .key = "Jefe",
  1280. .ksize = 4,
  1281. /* ("what do ya want for nothing?") */
  1282. .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
  1283. "\x79\x61\x20\x77\x61\x6e\x74\x20"
  1284. "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
  1285. "\x69\x6e\x67\x3f",
  1286. .psize = 28,
  1287. .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
  1288. "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
  1289. "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
  1290. "\x8f\xd0\x5e\x44",
  1291. .np = 4,
  1292. .tap = { 7, 7, 7, 7 }
  1293. }, {
  1294. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1295. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1296. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1297. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1298. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1299. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1300. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1301. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1302. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1303. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1304. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1305. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1306. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1307. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1308. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1309. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1310. "\xaa\xaa\xaa",
  1311. .ksize = 131,
  1312. /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
  1313. .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
  1314. "\x6e\x67\x20\x4c\x61\x72\x67\x65"
  1315. "\x72\x20\x54\x68\x61\x6e\x20\x42"
  1316. "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
  1317. "\x65\x20\x4b\x65\x79\x20\x2d\x20"
  1318. "\x48\x61\x73\x68\x20\x4b\x65\x79"
  1319. "\x20\x46\x69\x72\x73\x74",
  1320. .psize = 54,
  1321. .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
  1322. "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
  1323. "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
  1324. "\x3f\xa6\x87\x0e",
  1325. }, {
  1326. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1327. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1328. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1329. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1330. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1331. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1332. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1333. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1334. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1335. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1336. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1337. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1338. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1339. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1340. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1341. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1342. "\xaa\xaa\xaa",
  1343. .ksize = 131,
  1344. /* ("This is a test using a larger than block-size key and a")
  1345. (" larger than block-size data. The key needs to be")
  1346. (" hashed before being used by the HMAC algorithm.") */
  1347. .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
  1348. "\x61\x20\x74\x65\x73\x74\x20\x75"
  1349. "\x73\x69\x6e\x67\x20\x61\x20\x6c"
  1350. "\x61\x72\x67\x65\x72\x20\x74\x68"
  1351. "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
  1352. "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
  1353. "\x79\x20\x61\x6e\x64\x20\x61\x20"
  1354. "\x6c\x61\x72\x67\x65\x72\x20\x74"
  1355. "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
  1356. "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
  1357. "\x61\x74\x61\x2e\x20\x54\x68\x65"
  1358. "\x20\x6b\x65\x79\x20\x6e\x65\x65"
  1359. "\x64\x73\x20\x74\x6f\x20\x62\x65"
  1360. "\x20\x68\x61\x73\x68\x65\x64\x20"
  1361. "\x62\x65\x66\x6f\x72\x65\x20\x62"
  1362. "\x65\x69\x6e\x67\x20\x75\x73\x65"
  1363. "\x64\x20\x62\x79\x20\x74\x68\x65"
  1364. "\x20\x48\x4d\x41\x43\x20\x61\x6c"
  1365. "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
  1366. .psize = 152,
  1367. .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
  1368. "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
  1369. "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
  1370. "\xf6\xf5\x65\xd1",
  1371. },
  1372. };
  1373. /*
  1374. * HMAC-SHA256 test vectors from
  1375. * draft-ietf-ipsec-ciph-sha-256-01.txt
  1376. */
  1377. #define HMAC_SHA256_TEST_VECTORS 10
  1378. static struct hash_testvec hmac_sha256_tv_template[] = {
  1379. {
  1380. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1381. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1382. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1383. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1384. .ksize = 32,
  1385. .plaintext = "abc",
  1386. .psize = 3,
  1387. .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
  1388. "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
  1389. "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
  1390. "\x92\x75\x90\x21\xcf\xab\x81\x81",
  1391. }, {
  1392. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1393. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1394. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1395. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1396. .ksize = 32,
  1397. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1398. .psize = 56,
  1399. .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
  1400. "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
  1401. "\xe6\x98\xe3\x61\x19\x42\x11\x49"
  1402. "\xea\x8c\x71\x24\x56\x69\x7d\x30",
  1403. }, {
  1404. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1405. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1406. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1407. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1408. .ksize = 32,
  1409. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
  1410. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1411. .psize = 112,
  1412. .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
  1413. "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
  1414. "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
  1415. "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
  1416. }, {
  1417. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1418. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1419. "\x0b\x0b\x0b\x0b\x0b\x0b",
  1420. .ksize = 32,
  1421. .plaintext = "Hi There",
  1422. .psize = 8,
  1423. .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
  1424. "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
  1425. "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
  1426. "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
  1427. }, {
  1428. .key = "Jefe",
  1429. .ksize = 4,
  1430. .plaintext = "what do ya want for nothing?",
  1431. .psize = 28,
  1432. .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
  1433. "\x6a\x04\x24\x26\x08\x95\x75\xc7"
  1434. "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
  1435. "\x9d\xec\x58\xb9\x64\xec\x38\x43",
  1436. .np = 2,
  1437. .tap = { 14, 14 }
  1438. }, {
  1439. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1440. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1441. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1442. .ksize = 32,
  1443. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1444. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1445. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1446. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1447. .psize = 50,
  1448. .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
  1449. "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
  1450. "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
  1451. "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
  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. "\x21\x22\x23\x24\x25",
  1458. .ksize = 37,
  1459. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1460. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1461. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1462. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1463. .psize = 50,
  1464. .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
  1465. "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
  1466. "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
  1467. "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
  1468. }, {
  1469. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1470. "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1471. "\x0c\x0c\x0c\x0c\x0c\x0c",
  1472. .ksize = 32,
  1473. .plaintext = "Test With Truncation",
  1474. .psize = 20,
  1475. .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
  1476. "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
  1477. "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
  1478. "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
  1479. }, {
  1480. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1481. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1482. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1483. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1484. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1485. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1486. "\xaa\xaa",
  1487. .ksize = 80,
  1488. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1489. .psize = 54,
  1490. .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
  1491. "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
  1492. "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
  1493. "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
  1494. }, {
  1495. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1496. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1497. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1498. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1499. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1500. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1501. "\xaa\xaa",
  1502. .ksize = 80,
  1503. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
  1504. "One Block-Size Data",
  1505. .psize = 73,
  1506. .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
  1507. "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
  1508. "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
  1509. "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
  1510. },
  1511. };
  1512. #define XCBC_AES_TEST_VECTORS 6
  1513. static struct hash_testvec aes_xcbc128_tv_template[] = {
  1514. {
  1515. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1516. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1517. .plaintext = zeroed_string,
  1518. .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
  1519. "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
  1520. .psize = 0,
  1521. .ksize = 16,
  1522. }, {
  1523. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1524. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1525. .plaintext = "\x00\x01\x02",
  1526. .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
  1527. "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
  1528. .psize = 3,
  1529. .ksize = 16,
  1530. } , {
  1531. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1532. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1533. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1534. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1535. .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
  1536. "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
  1537. .psize = 16,
  1538. .ksize = 16,
  1539. }, {
  1540. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1541. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1542. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1543. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1544. "\x10\x11\x12\x13",
  1545. .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
  1546. "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
  1547. .tap = { 10, 10 },
  1548. .psize = 20,
  1549. .np = 2,
  1550. .ksize = 16,
  1551. }, {
  1552. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1553. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1554. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1555. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1556. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1557. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  1558. .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
  1559. "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
  1560. .psize = 32,
  1561. .ksize = 16,
  1562. }, {
  1563. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1564. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1565. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1566. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1567. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1568. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  1569. "\x20\x21",
  1570. .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
  1571. "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
  1572. .tap = { 17, 17 },
  1573. .psize = 34,
  1574. .np = 2,
  1575. .ksize = 16,
  1576. }
  1577. };
  1578. /*
  1579. * SHA384 HMAC test vectors from RFC4231
  1580. */
  1581. #define HMAC_SHA384_TEST_VECTORS 4
  1582. static struct hash_testvec hmac_sha384_tv_template[] = {
  1583. {
  1584. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1585. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1586. "\x0b\x0b\x0b\x0b",
  1587. .ksize = 20,
  1588. .plaintext = "Hi There",
  1589. .psize = 8,
  1590. .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
  1591. "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
  1592. "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
  1593. "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
  1594. "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
  1595. "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
  1596. }, {
  1597. .key = "Jefe",
  1598. .ksize = 4,
  1599. .plaintext = "what do ya want for nothing?",
  1600. .psize = 28,
  1601. .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
  1602. "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
  1603. "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
  1604. "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
  1605. "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
  1606. "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
  1607. .np = 4,
  1608. .tap = { 7, 7, 7, 7 }
  1609. }, {
  1610. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1611. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1612. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1613. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1614. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1615. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1616. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1617. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1618. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1619. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1620. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1621. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1622. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1623. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1624. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1625. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1626. "\xaa\xaa\xaa",
  1627. .ksize = 131,
  1628. .plaintext = "Test Using Larger Than Block-Siz"
  1629. "e Key - Hash Key First",
  1630. .psize = 54,
  1631. .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
  1632. "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
  1633. "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
  1634. "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
  1635. "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
  1636. "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
  1637. }, {
  1638. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1639. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1640. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1641. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1642. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1643. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1644. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1645. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1646. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1647. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1648. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1649. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1650. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1651. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1652. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1653. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1654. "\xaa\xaa\xaa",
  1655. .ksize = 131,
  1656. .plaintext = "This is a test u"
  1657. "sing a larger th"
  1658. "an block-size ke"
  1659. "y and a larger t"
  1660. "han block-size d"
  1661. "ata. The key nee"
  1662. "ds to be hashed "
  1663. "before being use"
  1664. "d by the HMAC al"
  1665. "gorithm.",
  1666. .psize = 152,
  1667. .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
  1668. "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
  1669. "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
  1670. "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
  1671. "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
  1672. "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
  1673. },
  1674. };
  1675. /*
  1676. * SHA512 HMAC test vectors from RFC4231
  1677. */
  1678. #define HMAC_SHA512_TEST_VECTORS 4
  1679. static struct hash_testvec hmac_sha512_tv_template[] = {
  1680. {
  1681. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1682. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1683. "\x0b\x0b\x0b\x0b",
  1684. .ksize = 20,
  1685. .plaintext = "Hi There",
  1686. .psize = 8,
  1687. .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
  1688. "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
  1689. "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
  1690. "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
  1691. "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
  1692. "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
  1693. "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
  1694. "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
  1695. }, {
  1696. .key = "Jefe",
  1697. .ksize = 4,
  1698. .plaintext = "what do ya want for nothing?",
  1699. .psize = 28,
  1700. .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
  1701. "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
  1702. "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
  1703. "\x10\x27\x0c\xd7\xea\x25\x05\x54"
  1704. "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
  1705. "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
  1706. "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
  1707. "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
  1708. .np = 4,
  1709. .tap = { 7, 7, 7, 7 }
  1710. }, {
  1711. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1712. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1713. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1714. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1715. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1716. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1717. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1718. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1719. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1720. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1721. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1722. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1723. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1724. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1725. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1726. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1727. "\xaa\xaa\xaa",
  1728. .ksize = 131,
  1729. .plaintext = "Test Using Large"
  1730. "r Than Block-Siz"
  1731. "e Key - Hash Key"
  1732. " First",
  1733. .psize = 54,
  1734. .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
  1735. "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
  1736. "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
  1737. "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
  1738. "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
  1739. "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
  1740. "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
  1741. "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
  1742. }, {
  1743. .key = "\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\xaa\xaa\xaa\xaa\xaa"
  1758. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1759. "\xaa\xaa\xaa",
  1760. .ksize = 131,
  1761. .plaintext =
  1762. "This is a test u"
  1763. "sing a larger th"
  1764. "an block-size ke"
  1765. "y and a larger t"
  1766. "han block-size d"
  1767. "ata. The key nee"
  1768. "ds to be hashed "
  1769. "before being use"
  1770. "d by the HMAC al"
  1771. "gorithm.",
  1772. .psize = 152,
  1773. .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
  1774. "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
  1775. "\xde\xbd\x71\xf8\x86\x72\x89\x86"
  1776. "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
  1777. "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
  1778. "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
  1779. "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
  1780. "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
  1781. },
  1782. };
  1783. /*
  1784. * DES test vectors.
  1785. */
  1786. #define DES_ENC_TEST_VECTORS 10
  1787. #define DES_DEC_TEST_VECTORS 4
  1788. #define DES_CBC_ENC_TEST_VECTORS 5
  1789. #define DES_CBC_DEC_TEST_VECTORS 4
  1790. #define DES3_EDE_ENC_TEST_VECTORS 3
  1791. #define DES3_EDE_DEC_TEST_VECTORS 3
  1792. #define DES3_EDE_CBC_ENC_TEST_VECTORS 1
  1793. #define DES3_EDE_CBC_DEC_TEST_VECTORS 1
  1794. static struct cipher_testvec des_enc_tv_template[] = {
  1795. { /* From Applied Cryptography */
  1796. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1797. .klen = 8,
  1798. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1799. .ilen = 8,
  1800. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1801. .rlen = 8,
  1802. }, { /* Same key, different plaintext block */
  1803. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1804. .klen = 8,
  1805. .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
  1806. .ilen = 8,
  1807. .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1808. .rlen = 8,
  1809. }, { /* Sbox test from NBS */
  1810. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1811. .klen = 8,
  1812. .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1813. .ilen = 8,
  1814. .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1815. .rlen = 8,
  1816. }, { /* Three blocks */
  1817. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1818. .klen = 8,
  1819. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1820. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1821. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1822. .ilen = 24,
  1823. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1824. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1825. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1826. .rlen = 24,
  1827. }, { /* Weak key */
  1828. .fail = 1,
  1829. .wk = 1,
  1830. .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
  1831. .klen = 8,
  1832. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1833. .ilen = 8,
  1834. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1835. .rlen = 8,
  1836. }, { /* Two blocks -- for testing encryption across pages */
  1837. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1838. .klen = 8,
  1839. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1840. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1841. .ilen = 16,
  1842. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1843. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1844. .rlen = 16,
  1845. .np = 2,
  1846. .tap = { 8, 8 }
  1847. }, { /* Four blocks -- for testing encryption with chunking */
  1848. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1849. .klen = 8,
  1850. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1851. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1852. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
  1853. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1854. .ilen = 32,
  1855. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1856. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1857. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
  1858. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1859. .rlen = 32,
  1860. .np = 3,
  1861. .tap = { 14, 10, 8 }
  1862. }, {
  1863. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1864. .klen = 8,
  1865. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1866. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1867. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1868. .ilen = 24,
  1869. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1870. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1871. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1872. .rlen = 24,
  1873. .np = 4,
  1874. .tap = { 2, 1, 3, 18 }
  1875. }, {
  1876. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1877. .klen = 8,
  1878. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1879. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1880. .ilen = 16,
  1881. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1882. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1883. .rlen = 16,
  1884. .np = 5,
  1885. .tap = { 2, 2, 2, 2, 8 }
  1886. }, {
  1887. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1888. .klen = 8,
  1889. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1890. .ilen = 8,
  1891. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1892. .rlen = 8,
  1893. .np = 8,
  1894. .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
  1895. },
  1896. };
  1897. static struct cipher_testvec des_dec_tv_template[] = {
  1898. { /* From Applied Cryptography */
  1899. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1900. .klen = 8,
  1901. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1902. .ilen = 8,
  1903. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1904. .rlen = 8,
  1905. }, { /* Sbox test from NBS */
  1906. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1907. .klen = 8,
  1908. .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1909. .ilen = 8,
  1910. .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1911. .rlen = 8,
  1912. }, { /* Two blocks, for chunking test */
  1913. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1914. .klen = 8,
  1915. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1916. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1917. .ilen = 16,
  1918. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1919. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  1920. .rlen = 16,
  1921. .np = 2,
  1922. .tap = { 8, 8 }
  1923. }, {
  1924. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1925. .klen = 8,
  1926. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1927. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1928. .ilen = 16,
  1929. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1930. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  1931. .rlen = 16,
  1932. .np = 3,
  1933. .tap = { 3, 12, 1 }
  1934. },
  1935. };
  1936. static struct cipher_testvec des_cbc_enc_tv_template[] = {
  1937. { /* From OpenSSL */
  1938. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1939. .klen = 8,
  1940. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  1941. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  1942. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  1943. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  1944. .ilen = 24,
  1945. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  1946. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  1947. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  1948. .rlen = 24,
  1949. }, { /* FIPS Pub 81 */
  1950. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1951. .klen = 8,
  1952. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  1953. .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  1954. .ilen = 8,
  1955. .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1956. .rlen = 8,
  1957. }, {
  1958. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1959. .klen = 8,
  1960. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1961. .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  1962. .ilen = 8,
  1963. .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  1964. .rlen = 8,
  1965. }, {
  1966. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1967. .klen = 8,
  1968. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  1969. .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  1970. .ilen = 8,
  1971. .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  1972. .rlen = 8,
  1973. }, { /* Copy of openssl vector for chunk testing */
  1974. /* From OpenSSL */
  1975. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1976. .klen = 8,
  1977. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  1978. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  1979. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  1980. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  1981. .ilen = 24,
  1982. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  1983. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  1984. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  1985. .rlen = 24,
  1986. .np = 2,
  1987. .tap = { 13, 11 }
  1988. },
  1989. };
  1990. static struct cipher_testvec des_cbc_dec_tv_template[] = {
  1991. { /* FIPS Pub 81 */
  1992. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1993. .klen = 8,
  1994. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  1995. .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1996. .ilen = 8,
  1997. .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  1998. .rlen = 8,
  1999. }, {
  2000. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2001. .klen = 8,
  2002. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2003. .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2004. .ilen = 8,
  2005. .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2006. .rlen = 8,
  2007. }, {
  2008. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2009. .klen = 8,
  2010. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2011. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2012. .ilen = 8,
  2013. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2014. .rlen = 8,
  2015. }, { /* Copy of above, for chunk testing */
  2016. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2017. .klen = 8,
  2018. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2019. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2020. .ilen = 8,
  2021. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2022. .rlen = 8,
  2023. .np = 2,
  2024. .tap = { 4, 4 }
  2025. },
  2026. };
  2027. static struct cipher_testvec des3_ede_enc_tv_template[] = {
  2028. { /* These are from openssl */
  2029. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2030. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2031. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2032. .klen = 24,
  2033. .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2034. .ilen = 8,
  2035. .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2036. .rlen = 8,
  2037. }, {
  2038. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2039. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2040. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2041. .klen = 24,
  2042. .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2043. .ilen = 8,
  2044. .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2045. .rlen = 8,
  2046. }, {
  2047. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2048. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2049. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2050. .klen = 24,
  2051. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2052. .ilen = 8,
  2053. .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2054. .rlen = 8,
  2055. },
  2056. };
  2057. static struct cipher_testvec des3_ede_dec_tv_template[] = {
  2058. { /* These are from openssl */
  2059. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2060. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2061. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2062. .klen = 24,
  2063. .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2064. .ilen = 8,
  2065. .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2066. .rlen = 8,
  2067. }, {
  2068. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2069. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2070. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2071. .klen = 24,
  2072. .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2073. .ilen = 8,
  2074. .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2075. .rlen = 8,
  2076. }, {
  2077. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2078. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2079. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2080. .klen = 24,
  2081. .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2082. .ilen = 8,
  2083. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2084. .rlen = 8,
  2085. },
  2086. };
  2087. static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
  2088. { /* Generated from openssl */
  2089. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2090. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2091. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2092. .klen = 24,
  2093. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2094. .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2095. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2096. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2097. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2098. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2099. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2100. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2101. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2102. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2103. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2104. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2105. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2106. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2107. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2108. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2109. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2110. .ilen = 128,
  2111. .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2112. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2113. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2114. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2115. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2116. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2117. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2118. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2119. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2120. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2121. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2122. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2123. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2124. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2125. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2126. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2127. .rlen = 128,
  2128. },
  2129. };
  2130. static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
  2131. { /* Generated from openssl */
  2132. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2133. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2134. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2135. .klen = 24,
  2136. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2137. .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2138. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2139. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2140. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2141. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2142. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2143. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2144. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2145. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2146. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2147. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2148. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2149. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2150. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2151. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2152. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2153. .ilen = 128,
  2154. .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2155. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2156. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2157. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2158. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2159. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2160. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2161. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2162. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2163. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2164. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2165. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2166. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2167. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2168. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2169. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2170. .rlen = 128,
  2171. },
  2172. };
  2173. /*
  2174. * Blowfish test vectors.
  2175. */
  2176. #define BF_ENC_TEST_VECTORS 6
  2177. #define BF_DEC_TEST_VECTORS 6
  2178. #define BF_CBC_ENC_TEST_VECTORS 1
  2179. #define BF_CBC_DEC_TEST_VECTORS 1
  2180. static struct cipher_testvec bf_enc_tv_template[] = {
  2181. { /* DES test vectors from OpenSSL */
  2182. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2183. .klen = 8,
  2184. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2185. .ilen = 8,
  2186. .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2187. .rlen = 8,
  2188. }, {
  2189. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2190. .klen = 8,
  2191. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2192. .ilen = 8,
  2193. .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2194. .rlen = 8,
  2195. }, {
  2196. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2197. .klen = 8,
  2198. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2199. .ilen = 8,
  2200. .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2201. .rlen = 8,
  2202. }, { /* Vary the keylength... */
  2203. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2204. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2205. .klen = 16,
  2206. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2207. .ilen = 8,
  2208. .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2209. .rlen = 8,
  2210. }, {
  2211. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2212. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2213. "\x00\x11\x22\x33\x44",
  2214. .klen = 21,
  2215. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2216. .ilen = 8,
  2217. .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2218. .rlen = 8,
  2219. }, { /* Generated with bf488 */
  2220. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2221. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2222. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2223. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2224. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2225. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2226. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2227. .klen = 56,
  2228. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2229. .ilen = 8,
  2230. .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2231. .rlen = 8,
  2232. },
  2233. };
  2234. static struct cipher_testvec bf_dec_tv_template[] = {
  2235. { /* DES test vectors from OpenSSL */
  2236. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2237. .klen = 8,
  2238. .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2239. .ilen = 8,
  2240. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2241. .rlen = 8,
  2242. }, {
  2243. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2244. .klen = 8,
  2245. .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2246. .ilen = 8,
  2247. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2248. .rlen = 8,
  2249. }, {
  2250. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2251. .klen = 8,
  2252. .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2253. .ilen = 8,
  2254. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2255. .rlen = 8,
  2256. }, { /* Vary the keylength... */
  2257. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2258. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2259. .klen = 16,
  2260. .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2261. .ilen = 8,
  2262. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2263. .rlen = 8,
  2264. }, {
  2265. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2266. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2267. "\x00\x11\x22\x33\x44",
  2268. .klen = 21,
  2269. .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2270. .ilen = 8,
  2271. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2272. .rlen = 8,
  2273. }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
  2274. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2275. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2276. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2277. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2278. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2279. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2280. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2281. .klen = 56,
  2282. .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2283. .ilen = 8,
  2284. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2285. .rlen = 8,
  2286. },
  2287. };
  2288. static struct cipher_testvec bf_cbc_enc_tv_template[] = {
  2289. { /* From OpenSSL */
  2290. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2291. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2292. .klen = 16,
  2293. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2294. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2295. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2296. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2297. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2298. .ilen = 32,
  2299. .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2300. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2301. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2302. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2303. .rlen = 32,
  2304. },
  2305. };
  2306. static struct cipher_testvec bf_cbc_dec_tv_template[] = {
  2307. { /* From OpenSSL */
  2308. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2309. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2310. .klen = 16,
  2311. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2312. .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2313. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2314. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2315. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2316. .ilen = 32,
  2317. .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2318. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2319. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2320. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2321. .rlen = 32,
  2322. },
  2323. };
  2324. /*
  2325. * Twofish test vectors.
  2326. */
  2327. #define TF_ENC_TEST_VECTORS 3
  2328. #define TF_DEC_TEST_VECTORS 3
  2329. #define TF_CBC_ENC_TEST_VECTORS 4
  2330. #define TF_CBC_DEC_TEST_VECTORS 4
  2331. static struct cipher_testvec tf_enc_tv_template[] = {
  2332. {
  2333. .key = zeroed_string,
  2334. .klen = 16,
  2335. .input = zeroed_string,
  2336. .ilen = 16,
  2337. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2338. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2339. .rlen = 16,
  2340. }, {
  2341. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2342. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2343. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2344. .klen = 24,
  2345. .input = zeroed_string,
  2346. .ilen = 16,
  2347. .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2348. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2349. .rlen = 16,
  2350. }, {
  2351. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2352. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2353. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2354. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2355. .klen = 32,
  2356. .input = zeroed_string,
  2357. .ilen = 16,
  2358. .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2359. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2360. .rlen = 16,
  2361. },
  2362. };
  2363. static struct cipher_testvec tf_dec_tv_template[] = {
  2364. {
  2365. .key = zeroed_string,
  2366. .klen = 16,
  2367. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2368. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2369. .ilen = 16,
  2370. .result = zeroed_string,
  2371. .rlen = 16,
  2372. }, {
  2373. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2374. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2375. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2376. .klen = 24,
  2377. .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2378. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2379. .ilen = 16,
  2380. .result = zeroed_string,
  2381. .rlen = 16,
  2382. }, {
  2383. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2384. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2385. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2386. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2387. .klen = 32,
  2388. .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2389. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2390. .ilen = 16,
  2391. .result = zeroed_string,
  2392. .rlen = 16,
  2393. },
  2394. };
  2395. static struct cipher_testvec tf_cbc_enc_tv_template[] = {
  2396. { /* Generated with Nettle */
  2397. .key = zeroed_string,
  2398. .klen = 16,
  2399. .iv = zeroed_string,
  2400. .input = zeroed_string,
  2401. .ilen = 16,
  2402. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2403. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2404. .rlen = 16,
  2405. }, {
  2406. .key = zeroed_string,
  2407. .klen = 16,
  2408. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2409. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2410. .input = zeroed_string,
  2411. .ilen = 16,
  2412. .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2413. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2414. .rlen = 16,
  2415. }, {
  2416. .key = zeroed_string,
  2417. .klen = 16,
  2418. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2419. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2420. .input = zeroed_string,
  2421. .ilen = 16,
  2422. .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2423. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2424. .rlen = 16,
  2425. }, {
  2426. .key = zeroed_string,
  2427. .klen = 16,
  2428. .iv = zeroed_string,
  2429. .input = zeroed_string,
  2430. .ilen = 48,
  2431. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2432. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2433. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2434. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2435. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2436. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2437. .rlen = 48,
  2438. },
  2439. };
  2440. static struct cipher_testvec tf_cbc_dec_tv_template[] = {
  2441. { /* Reverse of the first four above */
  2442. .key = zeroed_string,
  2443. .klen = 16,
  2444. .iv = zeroed_string,
  2445. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2446. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2447. .ilen = 16,
  2448. .result = zeroed_string,
  2449. .rlen = 16,
  2450. }, {
  2451. .key = zeroed_string,
  2452. .klen = 16,
  2453. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2454. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2455. .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2456. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2457. .ilen = 16,
  2458. .result = zeroed_string,
  2459. .rlen = 16,
  2460. }, {
  2461. .key = zeroed_string,
  2462. .klen = 16,
  2463. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2464. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2465. .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2466. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2467. .ilen = 16,
  2468. .result = zeroed_string,
  2469. .rlen = 16,
  2470. }, {
  2471. .key = zeroed_string,
  2472. .klen = 16,
  2473. .iv = zeroed_string,
  2474. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2475. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2476. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2477. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2478. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2479. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2480. .ilen = 48,
  2481. .result = zeroed_string,
  2482. .rlen = 48,
  2483. },
  2484. };
  2485. /*
  2486. * Serpent test vectors. These are backwards because Serpent writes
  2487. * octet sequences in right-to-left mode.
  2488. */
  2489. #define SERPENT_ENC_TEST_VECTORS 4
  2490. #define SERPENT_DEC_TEST_VECTORS 4
  2491. #define TNEPRES_ENC_TEST_VECTORS 4
  2492. #define TNEPRES_DEC_TEST_VECTORS 4
  2493. static struct cipher_testvec serpent_enc_tv_template[] = {
  2494. {
  2495. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2496. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2497. .ilen = 16,
  2498. .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  2499. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  2500. .rlen = 16,
  2501. }, {
  2502. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2503. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2504. .klen = 16,
  2505. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2506. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2507. .ilen = 16,
  2508. .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  2509. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  2510. .rlen = 16,
  2511. }, {
  2512. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2513. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2514. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2515. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2516. .klen = 32,
  2517. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2518. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2519. .ilen = 16,
  2520. .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  2521. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  2522. .rlen = 16,
  2523. }, {
  2524. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2525. .klen = 16,
  2526. .input = zeroed_string,
  2527. .ilen = 16,
  2528. .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  2529. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  2530. .rlen = 16,
  2531. },
  2532. };
  2533. static struct cipher_testvec tnepres_enc_tv_template[] = {
  2534. { /* KeySize=128, PT=0, I=1 */
  2535. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2536. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2537. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2538. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2539. .klen = 16,
  2540. .ilen = 16,
  2541. .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
  2542. "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
  2543. .rlen = 16,
  2544. }, { /* KeySize=192, PT=0, I=1 */
  2545. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2546. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2547. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2548. .klen = 24,
  2549. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2550. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2551. .ilen = 16,
  2552. .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
  2553. "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
  2554. .rlen = 16,
  2555. }, { /* KeySize=256, PT=0, I=1 */
  2556. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2557. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2558. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2559. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2560. .klen = 32,
  2561. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2562. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2563. .ilen = 16,
  2564. .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
  2565. "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
  2566. .rlen = 16,
  2567. }, { /* KeySize=256, I=257 */
  2568. .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
  2569. "\x17\x16\x15\x14\x13\x12\x11\x10"
  2570. "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  2571. "\x07\x06\x05\x04\x03\x02\x01\x00",
  2572. .klen = 32,
  2573. .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  2574. "\x07\x06\x05\x04\x03\x02\x01\x00",
  2575. .ilen = 16,
  2576. .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
  2577. "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
  2578. .rlen = 16,
  2579. },
  2580. };
  2581. static struct cipher_testvec serpent_dec_tv_template[] = {
  2582. {
  2583. .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  2584. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  2585. .ilen = 16,
  2586. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2587. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2588. .rlen = 16,
  2589. }, {
  2590. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2591. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2592. .klen = 16,
  2593. .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  2594. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  2595. .ilen = 16,
  2596. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2597. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2598. .rlen = 16,
  2599. }, {
  2600. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2601. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2602. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2603. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2604. .klen = 32,
  2605. .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  2606. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  2607. .ilen = 16,
  2608. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2609. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2610. .rlen = 16,
  2611. }, {
  2612. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2613. .klen = 16,
  2614. .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  2615. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  2616. .ilen = 16,
  2617. .result = zeroed_string,
  2618. .rlen = 16,
  2619. },
  2620. };
  2621. static struct cipher_testvec tnepres_dec_tv_template[] = {
  2622. {
  2623. .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
  2624. "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
  2625. .ilen = 16,
  2626. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2627. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2628. .rlen = 16,
  2629. }, {
  2630. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2631. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2632. .klen = 16,
  2633. .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
  2634. "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
  2635. .ilen = 16,
  2636. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2637. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2638. .rlen = 16,
  2639. }, {
  2640. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2641. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2642. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2643. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2644. .klen = 32,
  2645. .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
  2646. "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
  2647. .ilen = 16,
  2648. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2649. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2650. .rlen = 16,
  2651. }, { /* KeySize=128, I=121 */
  2652. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2653. .klen = 16,
  2654. .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
  2655. "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
  2656. .ilen = 16,
  2657. .result = zeroed_string,
  2658. .rlen = 16,
  2659. },
  2660. };
  2661. /* Cast6 test vectors from RFC 2612 */
  2662. #define CAST6_ENC_TEST_VECTORS 3
  2663. #define CAST6_DEC_TEST_VECTORS 3
  2664. static struct cipher_testvec cast6_enc_tv_template[] = {
  2665. {
  2666. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2667. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  2668. .klen = 16,
  2669. .input = zeroed_string,
  2670. .ilen = 16,
  2671. .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  2672. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  2673. .rlen = 16,
  2674. }, {
  2675. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2676. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2677. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  2678. .klen = 24,
  2679. .input = zeroed_string,
  2680. .ilen = 16,
  2681. .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  2682. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  2683. .rlen = 16,
  2684. }, {
  2685. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2686. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2687. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  2688. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  2689. .klen = 32,
  2690. .input = zeroed_string,
  2691. .ilen = 16,
  2692. .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  2693. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  2694. .rlen = 16,
  2695. },
  2696. };
  2697. static struct cipher_testvec cast6_dec_tv_template[] = {
  2698. {
  2699. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2700. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  2701. .klen = 16,
  2702. .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  2703. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  2704. .ilen = 16,
  2705. .result = zeroed_string,
  2706. .rlen = 16,
  2707. }, {
  2708. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2709. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2710. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  2711. .klen = 24,
  2712. .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  2713. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  2714. .ilen = 16,
  2715. .result = zeroed_string,
  2716. .rlen = 16,
  2717. }, {
  2718. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2719. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2720. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  2721. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  2722. .klen = 32,
  2723. .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  2724. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  2725. .ilen = 16,
  2726. .result = zeroed_string,
  2727. .rlen = 16,
  2728. },
  2729. };
  2730. /*
  2731. * AES test vectors.
  2732. */
  2733. #define AES_ENC_TEST_VECTORS 3
  2734. #define AES_DEC_TEST_VECTORS 3
  2735. #define AES_CBC_ENC_TEST_VECTORS 4
  2736. #define AES_CBC_DEC_TEST_VECTORS 4
  2737. #define AES_LRW_ENC_TEST_VECTORS 8
  2738. #define AES_LRW_DEC_TEST_VECTORS 8
  2739. #define AES_XTS_ENC_TEST_VECTORS 4
  2740. #define AES_XTS_DEC_TEST_VECTORS 4
  2741. #define AES_CTR_ENC_TEST_VECTORS 7
  2742. #define AES_CTR_DEC_TEST_VECTORS 6
  2743. #define AES_GCM_ENC_TEST_VECTORS 9
  2744. #define AES_GCM_DEC_TEST_VECTORS 8
  2745. #define AES_CCM_ENC_TEST_VECTORS 7
  2746. #define AES_CCM_DEC_TEST_VECTORS 7
  2747. #define AES_CCM_4309_ENC_TEST_VECTORS 7
  2748. #define AES_CCM_4309_DEC_TEST_VECTORS 10
  2749. static struct cipher_testvec aes_enc_tv_template[] = {
  2750. { /* From FIPS-197 */
  2751. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2752. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2753. .klen = 16,
  2754. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2755. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2756. .ilen = 16,
  2757. .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  2758. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  2759. .rlen = 16,
  2760. }, {
  2761. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2762. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2763. "\x10\x11\x12\x13\x14\x15\x16\x17",
  2764. .klen = 24,
  2765. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2766. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2767. .ilen = 16,
  2768. .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  2769. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  2770. .rlen = 16,
  2771. }, {
  2772. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2773. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2774. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2775. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2776. .klen = 32,
  2777. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2778. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2779. .ilen = 16,
  2780. .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  2781. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  2782. .rlen = 16,
  2783. },
  2784. };
  2785. static struct cipher_testvec aes_dec_tv_template[] = {
  2786. { /* From FIPS-197 */
  2787. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2788. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2789. .klen = 16,
  2790. .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  2791. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  2792. .ilen = 16,
  2793. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2794. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2795. .rlen = 16,
  2796. }, {
  2797. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2798. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2799. "\x10\x11\x12\x13\x14\x15\x16\x17",
  2800. .klen = 24,
  2801. .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  2802. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  2803. .ilen = 16,
  2804. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2805. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2806. .rlen = 16,
  2807. }, {
  2808. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2809. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2810. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2811. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2812. .klen = 32,
  2813. .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  2814. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  2815. .ilen = 16,
  2816. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2817. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2818. .rlen = 16,
  2819. },
  2820. };
  2821. static struct cipher_testvec aes_cbc_enc_tv_template[] = {
  2822. { /* From RFC 3602 */
  2823. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  2824. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  2825. .klen = 16,
  2826. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  2827. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  2828. .input = "Single block msg",
  2829. .ilen = 16,
  2830. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  2831. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  2832. .rlen = 16,
  2833. }, {
  2834. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  2835. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  2836. .klen = 16,
  2837. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  2838. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  2839. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2840. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2841. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2842. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2843. .ilen = 32,
  2844. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  2845. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  2846. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  2847. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  2848. .rlen = 32,
  2849. }, { /* From NIST SP800-38A */
  2850. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  2851. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  2852. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  2853. .klen = 24,
  2854. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2855. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2856. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2857. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2858. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2859. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2860. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2861. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2862. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2863. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2864. .ilen = 64,
  2865. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  2866. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  2867. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  2868. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  2869. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  2870. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  2871. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  2872. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  2873. .rlen = 64,
  2874. }, {
  2875. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  2876. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  2877. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  2878. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  2879. .klen = 32,
  2880. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2881. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2882. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2883. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2884. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2885. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2886. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2887. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2888. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2889. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2890. .ilen = 64,
  2891. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  2892. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  2893. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  2894. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  2895. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  2896. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  2897. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  2898. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  2899. .rlen = 64,
  2900. },
  2901. };
  2902. static struct cipher_testvec aes_cbc_dec_tv_template[] = {
  2903. { /* From RFC 3602 */
  2904. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  2905. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  2906. .klen = 16,
  2907. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  2908. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  2909. .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  2910. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  2911. .ilen = 16,
  2912. .result = "Single block msg",
  2913. .rlen = 16,
  2914. }, {
  2915. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  2916. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  2917. .klen = 16,
  2918. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  2919. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  2920. .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  2921. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  2922. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  2923. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  2924. .ilen = 32,
  2925. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2926. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2927. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2928. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2929. .rlen = 32,
  2930. }, { /* From NIST SP800-38A */
  2931. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  2932. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  2933. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  2934. .klen = 24,
  2935. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2936. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2937. .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  2938. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  2939. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  2940. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  2941. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  2942. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  2943. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  2944. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  2945. .ilen = 64,
  2946. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2947. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2948. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2949. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2950. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2951. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2952. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2953. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2954. .rlen = 64,
  2955. }, {
  2956. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  2957. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  2958. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  2959. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  2960. .klen = 32,
  2961. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2962. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2963. .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  2964. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  2965. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  2966. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  2967. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  2968. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  2969. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  2970. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  2971. .ilen = 64,
  2972. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2973. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2974. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2975. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2976. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2977. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2978. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2979. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2980. .rlen = 64,
  2981. },
  2982. };
  2983. static struct cipher_testvec aes_lrw_enc_tv_template[] = {
  2984. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  2985. { /* LRW-32-AES 1 */
  2986. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  2987. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  2988. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  2989. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  2990. .klen = 32,
  2991. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2992. "\x00\x00\x00\x00\x00\x00\x00\x01",
  2993. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  2994. "\x38\x39\x41\x42\x43\x44\x45\x46",
  2995. .ilen = 16,
  2996. .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  2997. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  2998. .rlen = 16,
  2999. }, { /* LRW-32-AES 2 */
  3000. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3001. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3002. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3003. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3004. .klen = 32,
  3005. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3006. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3007. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3008. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3009. .ilen = 16,
  3010. .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  3011. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  3012. .rlen = 16,
  3013. }, { /* LRW-32-AES 3 */
  3014. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3015. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3016. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3017. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3018. .klen = 32,
  3019. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3020. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3021. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3022. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3023. .ilen = 16,
  3024. .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  3025. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  3026. .rlen = 16,
  3027. }, { /* LRW-32-AES 4 */
  3028. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3029. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3030. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3031. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3032. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3033. .klen = 40,
  3034. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3035. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3036. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3037. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3038. .ilen = 16,
  3039. .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  3040. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  3041. .rlen = 16,
  3042. }, { /* LRW-32-AES 5 */
  3043. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3044. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3045. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3046. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3047. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3048. .klen = 40,
  3049. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3050. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3051. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3052. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3053. .ilen = 16,
  3054. .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  3055. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  3056. .rlen = 16,
  3057. }, { /* LRW-32-AES 6 */
  3058. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3059. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3060. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3061. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3062. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3063. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3064. .klen = 48,
  3065. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3066. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3067. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3068. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3069. .ilen = 16,
  3070. .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  3071. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  3072. .rlen = 16,
  3073. }, { /* LRW-32-AES 7 */
  3074. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3075. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3076. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3077. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3078. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3079. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3080. .klen = 48,
  3081. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3082. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3083. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3084. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3085. .ilen = 16,
  3086. .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  3087. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  3088. .rlen = 16,
  3089. }, {
  3090. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  3091. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3092. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3093. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3094. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3095. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3096. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3097. .klen = 48,
  3098. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3099. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3100. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3101. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3102. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3103. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3104. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3105. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3106. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3107. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3108. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3109. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3110. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3111. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3112. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3113. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3114. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3115. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3116. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3117. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3118. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3119. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3120. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3121. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3122. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3123. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3124. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3125. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3126. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3127. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3128. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3129. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3130. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3131. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3132. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3133. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3134. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3135. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3136. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3137. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3138. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3139. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3140. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3141. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3142. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3143. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3144. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3145. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3146. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3147. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3148. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3149. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3150. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3151. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3152. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3153. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3154. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3155. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3156. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3157. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3158. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3159. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3160. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3161. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3162. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3163. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3164. .ilen = 512,
  3165. .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  3166. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  3167. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  3168. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  3169. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  3170. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  3171. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  3172. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  3173. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  3174. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  3175. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  3176. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  3177. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  3178. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  3179. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  3180. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  3181. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  3182. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  3183. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  3184. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  3185. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  3186. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  3187. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  3188. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  3189. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  3190. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  3191. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  3192. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  3193. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  3194. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  3195. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  3196. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  3197. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  3198. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  3199. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  3200. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  3201. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  3202. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  3203. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  3204. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  3205. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  3206. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  3207. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  3208. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  3209. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  3210. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  3211. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  3212. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  3213. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  3214. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  3215. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  3216. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  3217. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  3218. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  3219. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  3220. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  3221. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  3222. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  3223. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  3224. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  3225. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  3226. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  3227. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  3228. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  3229. .rlen = 512,
  3230. }
  3231. };
  3232. static struct cipher_testvec aes_lrw_dec_tv_template[] = {
  3233. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  3234. /* same as enc vectors with input and result reversed */
  3235. { /* LRW-32-AES 1 */
  3236. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3237. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3238. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3239. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3240. .klen = 32,
  3241. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3242. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3243. .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  3244. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  3245. .ilen = 16,
  3246. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3247. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3248. .rlen = 16,
  3249. }, { /* LRW-32-AES 2 */
  3250. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3251. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3252. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3253. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3254. .klen = 32,
  3255. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3256. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3257. .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  3258. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  3259. .ilen = 16,
  3260. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3261. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3262. .rlen = 16,
  3263. }, { /* LRW-32-AES 3 */
  3264. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3265. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3266. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3267. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3268. .klen = 32,
  3269. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3270. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3271. .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  3272. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  3273. .ilen = 16,
  3274. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3275. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3276. .rlen = 16,
  3277. }, { /* LRW-32-AES 4 */
  3278. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3279. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3280. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3281. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3282. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3283. .klen = 40,
  3284. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3285. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3286. .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  3287. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  3288. .ilen = 16,
  3289. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3290. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3291. .rlen = 16,
  3292. }, { /* LRW-32-AES 5 */
  3293. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3294. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3295. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3296. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3297. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3298. .klen = 40,
  3299. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3300. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3301. .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  3302. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  3303. .ilen = 16,
  3304. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3305. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3306. .rlen = 16,
  3307. }, { /* LRW-32-AES 6 */
  3308. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3309. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3310. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3311. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3312. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3313. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3314. .klen = 48,
  3315. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3316. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3317. .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  3318. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  3319. .ilen = 16,
  3320. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3321. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3322. .rlen = 16,
  3323. }, { /* LRW-32-AES 7 */
  3324. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3325. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3326. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3327. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3328. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3329. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3330. .klen = 48,
  3331. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3332. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3333. .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  3334. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  3335. .ilen = 16,
  3336. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3337. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3338. .rlen = 16,
  3339. }, {
  3340. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  3341. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3342. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3343. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3344. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3345. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3346. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3347. .klen = 48,
  3348. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3349. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3350. .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  3351. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  3352. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  3353. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  3354. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  3355. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  3356. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  3357. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  3358. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  3359. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  3360. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  3361. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  3362. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  3363. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  3364. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  3365. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  3366. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  3367. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  3368. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  3369. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  3370. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  3371. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  3372. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  3373. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  3374. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  3375. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  3376. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  3377. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  3378. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  3379. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  3380. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  3381. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  3382. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  3383. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  3384. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  3385. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  3386. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  3387. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  3388. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  3389. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  3390. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  3391. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  3392. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  3393. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  3394. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  3395. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  3396. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  3397. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  3398. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  3399. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  3400. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  3401. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  3402. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  3403. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  3404. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  3405. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  3406. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  3407. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  3408. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  3409. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  3410. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  3411. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  3412. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  3413. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  3414. .ilen = 512,
  3415. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3416. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3417. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3418. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3419. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3420. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3421. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3422. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3423. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3424. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3425. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3426. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3427. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3428. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3429. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3430. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3431. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3432. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3433. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3434. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3435. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3436. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3437. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3438. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3439. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3440. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3441. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3442. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3443. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3444. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3445. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3446. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3447. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3448. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3449. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3450. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3451. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3452. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3453. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3454. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3455. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3456. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3457. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3458. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3459. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3460. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3461. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3462. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3463. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3464. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3465. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3466. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3467. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3468. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3469. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3470. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3471. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3472. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3473. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3474. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3475. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3476. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3477. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3478. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3479. .rlen = 512,
  3480. }
  3481. };
  3482. static struct cipher_testvec aes_xts_enc_tv_template[] = {
  3483. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  3484. { /* XTS-AES 1 */
  3485. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3486. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3487. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3488. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3489. .klen = 32,
  3490. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3491. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3492. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3493. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3494. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3495. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3496. .ilen = 32,
  3497. .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  3498. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  3499. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  3500. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  3501. .rlen = 32,
  3502. }, { /* XTS-AES 2 */
  3503. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3504. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3505. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3506. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3507. .klen = 32,
  3508. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3509. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3510. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3511. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3512. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3513. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3514. .ilen = 32,
  3515. .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  3516. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  3517. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  3518. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  3519. .rlen = 32,
  3520. }, { /* XTS-AES 3 */
  3521. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3522. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3523. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3524. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3525. .klen = 32,
  3526. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3527. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3528. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3529. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3530. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3531. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3532. .ilen = 32,
  3533. .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  3534. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  3535. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  3536. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  3537. .rlen = 32,
  3538. }, { /* XTS-AES 4 */
  3539. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3540. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3541. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3542. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3543. .klen = 32,
  3544. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3545. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3546. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3547. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3548. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3549. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3550. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3551. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3552. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3553. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3554. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3555. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3556. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3557. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3558. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3559. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3560. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3561. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3562. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3563. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3564. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3565. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3566. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3567. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3568. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3569. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3570. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3571. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3572. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3573. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3574. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3575. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3576. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3577. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3578. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3579. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3580. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3581. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3582. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3583. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3584. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3585. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3586. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3587. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3588. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3589. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3590. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3591. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3592. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3593. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3594. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3595. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3596. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3597. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3598. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3599. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3600. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3601. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3602. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3603. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3604. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3605. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3606. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3607. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3608. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3609. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3610. .ilen = 512,
  3611. .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  3612. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  3613. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  3614. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  3615. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  3616. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  3617. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  3618. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  3619. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  3620. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  3621. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  3622. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  3623. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  3624. "\x22\x97\x61\x46\xae\x20\xce\x84"
  3625. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  3626. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  3627. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  3628. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  3629. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  3630. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  3631. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  3632. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  3633. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  3634. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  3635. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  3636. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  3637. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  3638. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  3639. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  3640. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  3641. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  3642. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  3643. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  3644. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  3645. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  3646. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  3647. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  3648. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  3649. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  3650. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  3651. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  3652. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  3653. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  3654. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  3655. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  3656. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  3657. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  3658. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  3659. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  3660. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  3661. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  3662. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  3663. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  3664. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  3665. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  3666. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  3667. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  3668. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  3669. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  3670. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  3671. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  3672. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  3673. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  3674. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  3675. .rlen = 512,
  3676. }
  3677. };
  3678. static struct cipher_testvec aes_xts_dec_tv_template[] = {
  3679. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  3680. { /* XTS-AES 1 */
  3681. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3682. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3683. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3684. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3685. .klen = 32,
  3686. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3687. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3688. .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  3689. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  3690. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  3691. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  3692. .ilen = 32,
  3693. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3694. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3695. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3696. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3697. .rlen = 32,
  3698. }, { /* XTS-AES 2 */
  3699. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3700. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3701. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3702. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3703. .klen = 32,
  3704. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3705. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3706. .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  3707. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  3708. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  3709. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  3710. .ilen = 32,
  3711. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3712. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3713. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3714. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3715. .rlen = 32,
  3716. }, { /* XTS-AES 3 */
  3717. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3718. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3719. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3720. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3721. .klen = 32,
  3722. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3723. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3724. .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  3725. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  3726. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  3727. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  3728. .ilen = 32,
  3729. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3730. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3731. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3732. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3733. .rlen = 32,
  3734. }, { /* XTS-AES 4 */
  3735. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3736. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3737. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3738. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3739. .klen = 32,
  3740. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3741. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3742. .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  3743. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  3744. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  3745. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  3746. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  3747. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  3748. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  3749. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  3750. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  3751. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  3752. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  3753. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  3754. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  3755. "\x22\x97\x61\x46\xae\x20\xce\x84"
  3756. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  3757. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  3758. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  3759. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  3760. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  3761. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  3762. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  3763. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  3764. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  3765. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  3766. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  3767. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  3768. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  3769. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  3770. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  3771. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  3772. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  3773. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  3774. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  3775. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  3776. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  3777. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  3778. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  3779. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  3780. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  3781. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  3782. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  3783. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  3784. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  3785. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  3786. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  3787. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  3788. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  3789. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  3790. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  3791. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  3792. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  3793. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  3794. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  3795. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  3796. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  3797. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  3798. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  3799. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  3800. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  3801. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  3802. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  3803. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  3804. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  3805. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  3806. .ilen = 512,
  3807. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3808. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3809. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3810. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3811. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3812. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3813. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3814. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3815. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3816. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3817. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3818. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3819. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3820. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3821. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3822. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3823. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3824. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3825. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3826. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3827. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3828. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3829. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3830. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3831. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3832. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3833. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3834. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3835. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3836. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3837. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3838. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3839. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3840. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3841. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3842. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3843. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3844. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3845. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3846. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3847. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3848. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3849. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3850. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3851. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3852. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3853. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3854. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3855. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3856. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3857. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3858. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3859. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3860. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3861. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3862. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3863. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3864. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3865. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3866. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3867. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3868. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3869. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3870. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3871. .rlen = 512,
  3872. }
  3873. };
  3874. static struct cipher_testvec aes_ctr_enc_tv_template[] = {
  3875. { /* From RFC 3686 */
  3876. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  3877. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  3878. "\x00\x00\x00\x30",
  3879. .klen = 20,
  3880. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  3881. .input = "Single block msg",
  3882. .ilen = 16,
  3883. .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  3884. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  3885. .rlen = 16,
  3886. }, {
  3887. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  3888. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  3889. "\x00\x6c\xb6\xdb",
  3890. .klen = 20,
  3891. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  3892. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3893. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3894. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3895. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3896. .ilen = 32,
  3897. .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  3898. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  3899. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  3900. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  3901. .rlen = 32,
  3902. }, {
  3903. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  3904. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  3905. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  3906. "\x00\x00\x00\x48",
  3907. .klen = 28,
  3908. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  3909. .input = "Single block msg",
  3910. .ilen = 16,
  3911. .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  3912. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  3913. .rlen = 16,
  3914. }, {
  3915. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  3916. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  3917. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  3918. "\x00\x96\xb0\x3b",
  3919. .klen = 28,
  3920. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  3921. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3922. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3923. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3924. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3925. .ilen = 32,
  3926. .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  3927. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  3928. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  3929. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  3930. .rlen = 32,
  3931. }, {
  3932. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  3933. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  3934. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  3935. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  3936. "\x00\x00\x00\x60",
  3937. .klen = 36,
  3938. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  3939. .input = "Single block msg",
  3940. .ilen = 16,
  3941. .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  3942. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  3943. .rlen = 16,
  3944. }, {
  3945. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  3946. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  3947. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  3948. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  3949. "\x00\xfa\xac\x24",
  3950. .klen = 36,
  3951. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  3952. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3953. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3954. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3955. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  3956. .ilen = 32,
  3957. .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  3958. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  3959. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  3960. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  3961. .rlen = 32,
  3962. }, {
  3963. // generated using Crypto++
  3964. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3965. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3966. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3967. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3968. "\x00\x00\x00\x00",
  3969. .klen = 32 + 4,
  3970. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  3971. .input =
  3972. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3973. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3974. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3975. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3976. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3977. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3978. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3979. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3980. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3981. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3982. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3983. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3984. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3985. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3986. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3987. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3988. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3989. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3990. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3991. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3992. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3993. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3994. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3995. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3996. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3997. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3998. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3999. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4000. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4001. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4002. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4003. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4004. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  4005. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  4006. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  4007. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  4008. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  4009. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  4010. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  4011. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  4012. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  4013. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  4014. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  4015. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  4016. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  4017. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  4018. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  4019. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  4020. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  4021. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  4022. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  4023. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  4024. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  4025. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  4026. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  4027. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  4028. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  4029. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  4030. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  4031. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  4032. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  4033. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  4034. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  4035. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  4036. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  4037. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  4038. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  4039. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  4040. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  4041. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  4042. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  4043. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  4044. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  4045. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  4046. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  4047. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  4048. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  4049. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  4050. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  4051. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  4052. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  4053. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  4054. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  4055. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  4056. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  4057. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  4058. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  4059. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  4060. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  4061. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  4062. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  4063. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  4064. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  4065. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  4066. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  4067. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  4068. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  4069. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  4070. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  4071. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  4072. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  4073. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  4074. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  4075. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  4076. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  4077. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  4078. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  4079. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  4080. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  4081. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  4082. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  4083. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  4084. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  4085. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  4086. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  4087. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  4088. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  4089. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  4090. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  4091. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  4092. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  4093. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  4094. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  4095. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  4096. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  4097. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  4098. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  4099. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  4100. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  4101. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  4102. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  4103. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  4104. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  4105. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  4106. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  4107. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  4108. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  4109. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  4110. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  4111. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  4112. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  4113. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  4114. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  4115. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  4116. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  4117. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  4118. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  4119. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  4120. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  4121. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  4122. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  4123. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  4124. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  4125. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  4126. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  4127. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  4128. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  4129. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  4130. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  4131. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  4132. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  4133. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  4134. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  4135. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  4136. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  4137. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  4138. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  4139. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  4140. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  4141. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  4142. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  4143. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  4144. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  4145. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  4146. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  4147. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  4148. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  4149. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  4150. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  4151. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  4152. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  4153. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  4154. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  4155. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  4156. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  4157. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  4158. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  4159. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  4160. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  4161. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  4162. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  4163. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  4164. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  4165. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  4166. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  4167. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  4168. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  4169. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  4170. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  4171. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  4172. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  4173. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  4174. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  4175. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  4176. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  4177. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  4178. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  4179. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  4180. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  4181. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  4182. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  4183. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  4184. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  4185. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  4186. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  4187. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  4188. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  4189. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  4190. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  4191. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  4192. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  4193. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  4194. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  4195. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  4196. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  4197. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  4198. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  4199. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  4200. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  4201. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  4202. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  4203. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  4204. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  4205. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  4206. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  4207. "\x28\x37\x46\x55\x64\x73\x82\x91"
  4208. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  4209. "\x18\x27\x36\x45\x54\x63\x72\x81"
  4210. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  4211. "\x08\x17\x26\x35\x44\x53\x62\x71"
  4212. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  4213. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  4214. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  4215. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  4216. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  4217. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  4218. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  4219. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  4220. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  4221. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  4222. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  4223. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  4224. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  4225. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  4226. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  4227. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  4228. "\x00\x11\x22\x33\x44\x55\x66\x77"
  4229. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  4230. "\x10\x21\x32\x43\x54\x65\x76\x87"
  4231. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  4232. "\x20\x31\x42\x53\x64\x75\x86\x97"
  4233. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  4234. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  4235. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  4236. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  4237. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  4238. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  4239. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  4240. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  4241. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  4242. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  4243. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  4244. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  4245. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  4246. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  4247. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  4248. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  4249. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  4250. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  4251. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  4252. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  4253. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  4254. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  4255. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  4256. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  4257. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  4258. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  4259. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  4260. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  4261. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  4262. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  4263. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  4264. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  4265. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  4266. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  4267. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  4268. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  4269. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  4270. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  4271. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  4272. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  4273. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  4274. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  4275. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  4276. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  4277. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  4278. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  4279. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  4280. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  4281. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  4282. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  4283. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  4284. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  4285. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  4286. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  4287. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  4288. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  4289. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  4290. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  4291. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  4292. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  4293. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  4294. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  4295. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  4296. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  4297. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  4298. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  4299. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  4300. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  4301. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  4302. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  4303. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  4304. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  4305. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  4306. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  4307. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  4308. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  4309. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  4310. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  4311. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  4312. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  4313. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  4314. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  4315. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  4316. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  4317. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  4318. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  4319. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  4320. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  4321. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  4322. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  4323. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  4324. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  4325. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  4326. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  4327. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  4328. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  4329. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  4330. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  4331. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  4332. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  4333. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  4334. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  4335. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  4336. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  4337. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  4338. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  4339. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  4340. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  4341. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  4342. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  4343. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  4344. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  4345. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  4346. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  4347. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  4348. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  4349. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  4350. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  4351. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  4352. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  4353. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  4354. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  4355. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  4356. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  4357. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  4358. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  4359. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  4360. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  4361. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  4362. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  4363. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  4364. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  4365. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  4366. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  4367. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  4368. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  4369. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  4370. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  4371. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  4372. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  4373. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  4374. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  4375. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  4376. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  4377. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  4378. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  4379. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  4380. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  4381. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  4382. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  4383. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  4384. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  4385. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  4386. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  4387. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  4388. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  4389. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  4390. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  4391. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  4392. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  4393. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  4394. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  4395. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  4396. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  4397. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  4398. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  4399. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  4400. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  4401. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  4402. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  4403. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  4404. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  4405. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  4406. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  4407. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  4408. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  4409. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  4410. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  4411. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  4412. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  4413. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  4414. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  4415. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  4416. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  4417. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  4418. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  4419. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  4420. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  4421. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  4422. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  4423. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  4424. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  4425. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  4426. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  4427. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  4428. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  4429. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  4430. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  4431. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  4432. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  4433. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  4434. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  4435. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  4436. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  4437. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  4438. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  4439. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  4440. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  4441. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  4442. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  4443. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  4444. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  4445. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  4446. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  4447. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  4448. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  4449. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  4450. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  4451. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  4452. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  4453. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  4454. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  4455. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  4456. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  4457. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  4458. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  4459. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  4460. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  4461. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  4462. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  4463. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  4464. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  4465. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  4466. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  4467. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  4468. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  4469. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  4470. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  4471. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  4472. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  4473. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  4474. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  4475. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  4476. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  4477. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  4478. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  4479. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  4480. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  4481. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  4482. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  4483. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  4484. "\x00\x21\x42\x63",
  4485. .ilen = 4100,
  4486. .result =
  4487. "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
  4488. "\xae\xff\x91\x3a\x44\xcf\x38\x32"
  4489. "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
  4490. "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
  4491. "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
  4492. "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
  4493. "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
  4494. "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
  4495. "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
  4496. "\x18\xff\x75\x6d\x06\x2d\x00\xab"
  4497. "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
  4498. "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
  4499. "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
  4500. "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
  4501. "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
  4502. "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
  4503. "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
  4504. "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
  4505. "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
  4506. "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
  4507. "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
  4508. "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
  4509. "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
  4510. "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
  4511. "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
  4512. "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
  4513. "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
  4514. "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
  4515. "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
  4516. "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
  4517. "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
  4518. "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
  4519. "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
  4520. "\x6a\x25\x15\x33\x4e\x45\x08\xec"
  4521. "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
  4522. "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
  4523. "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
  4524. "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
  4525. "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
  4526. "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
  4527. "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
  4528. "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
  4529. "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
  4530. "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
  4531. "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
  4532. "\x04\x02\xef\xd3\x44\xde\x76\x31"
  4533. "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
  4534. "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
  4535. "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
  4536. "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
  4537. "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
  4538. "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
  4539. "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
  4540. "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
  4541. "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
  4542. "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
  4543. "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
  4544. "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
  4545. "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
  4546. "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
  4547. "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
  4548. "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
  4549. "\x32\x03\xed\xf0\x50\x1c\x56\x39"
  4550. "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
  4551. "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
  4552. "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
  4553. "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
  4554. "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
  4555. "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
  4556. "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
  4557. "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
  4558. "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
  4559. "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
  4560. "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
  4561. "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
  4562. "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
  4563. "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
  4564. "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
  4565. "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
  4566. "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
  4567. "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
  4568. "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
  4569. "\x69\x3a\x29\x23\xac\x86\x32\xa5"
  4570. "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
  4571. "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
  4572. "\x59\x6a\xd3\x50\x59\x43\x59\xde"
  4573. "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
  4574. "\x18\x34\x0d\x1a\x63\x33\xed\x10"
  4575. "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
  4576. "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
  4577. "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
  4578. "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
  4579. "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
  4580. "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
  4581. "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
  4582. "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
  4583. "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
  4584. "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
  4585. "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
  4586. "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
  4587. "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
  4588. "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
  4589. "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
  4590. "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
  4591. "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
  4592. "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
  4593. "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
  4594. "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
  4595. "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
  4596. "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
  4597. "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
  4598. "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
  4599. "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
  4600. "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
  4601. "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
  4602. "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
  4603. "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
  4604. "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
  4605. "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
  4606. "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
  4607. "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
  4608. "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
  4609. "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
  4610. "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
  4611. "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
  4612. "\x26\x39\x83\x94\xef\x27\xd8\x53"
  4613. "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
  4614. "\x43\x7c\x95\x0a\x53\xef\x66\xda"
  4615. "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
  4616. "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
  4617. "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
  4618. "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
  4619. "\x88\xee\x73\xcf\x66\x2f\x52\x56"
  4620. "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
  4621. "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
  4622. "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
  4623. "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
  4624. "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
  4625. "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
  4626. "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
  4627. "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
  4628. "\xba\x61\x34\x38\x7c\xda\x48\x3e"
  4629. "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
  4630. "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
  4631. "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
  4632. "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
  4633. "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
  4634. "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
  4635. "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
  4636. "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
  4637. "\x35\x12\xe3\x36\x28\x27\x36\x58"
  4638. "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
  4639. "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
  4640. "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
  4641. "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
  4642. "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
  4643. "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
  4644. "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
  4645. "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
  4646. "\x89\xf3\x78\x35\x44\x62\x78\x72"
  4647. "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
  4648. "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
  4649. "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
  4650. "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
  4651. "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
  4652. "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
  4653. "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
  4654. "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
  4655. "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
  4656. "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
  4657. "\xd2\x49\x77\x81\x6d\x90\x70\xae"
  4658. "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
  4659. "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
  4660. "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
  4661. "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
  4662. "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
  4663. "\x45\x42\x27\x75\x50\xe5\xee\xb8"
  4664. "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
  4665. "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
  4666. "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
  4667. "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
  4668. "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
  4669. "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
  4670. "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
  4671. "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
  4672. "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
  4673. "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
  4674. "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
  4675. "\xa9\x21\x2b\x92\x94\x87\x62\x57"
  4676. "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
  4677. "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
  4678. "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
  4679. "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
  4680. "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
  4681. "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
  4682. "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
  4683. "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
  4684. "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
  4685. "\x69\x34\x78\x61\x24\x21\x9c\x8a"
  4686. "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
  4687. "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
  4688. "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
  4689. "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
  4690. "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
  4691. "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
  4692. "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
  4693. "\xb1\x95\x28\x86\x20\xe9\x17\x49"
  4694. "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
  4695. "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
  4696. "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
  4697. "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
  4698. "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
  4699. "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
  4700. "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
  4701. "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
  4702. "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
  4703. "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
  4704. "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
  4705. "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
  4706. "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
  4707. "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
  4708. "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
  4709. "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
  4710. "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
  4711. "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
  4712. "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
  4713. "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
  4714. "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
  4715. "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
  4716. "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
  4717. "\x29\x90\x46\x30\x92\x69\x7d\x13"
  4718. "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
  4719. "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
  4720. "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
  4721. "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
  4722. "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
  4723. "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
  4724. "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
  4725. "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
  4726. "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
  4727. "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
  4728. "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
  4729. "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
  4730. "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
  4731. "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
  4732. "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
  4733. "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
  4734. "\x77\x65\x08\x60\x11\x76\x4c\x8d"
  4735. "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
  4736. "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
  4737. "\x03\xd1\x24\x95\xec\x6d\xab\x38"
  4738. "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
  4739. "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
  4740. "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
  4741. "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
  4742. "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
  4743. "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
  4744. "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
  4745. "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
  4746. "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
  4747. "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
  4748. "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
  4749. "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
  4750. "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
  4751. "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
  4752. "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
  4753. "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
  4754. "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
  4755. "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
  4756. "\xe5\x79\x81\x73\xcd\x43\x59\x68"
  4757. "\x73\x02\x3b\x78\x21\x72\x43\x00"
  4758. "\x49\x17\xf7\x00\xaf\x68\x24\x53"
  4759. "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
  4760. "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
  4761. "\x11\x94\x13\x69\x51\x09\x28\xde"
  4762. "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
  4763. "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
  4764. "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
  4765. "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
  4766. "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
  4767. "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
  4768. "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
  4769. "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
  4770. "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
  4771. "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
  4772. "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
  4773. "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
  4774. "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
  4775. "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
  4776. "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
  4777. "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
  4778. "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
  4779. "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
  4780. "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
  4781. "\x69\xdc\xab\x24\x57\x60\x47\xc1"
  4782. "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
  4783. "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
  4784. "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
  4785. "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
  4786. "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
  4787. "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
  4788. "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
  4789. "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
  4790. "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
  4791. "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
  4792. "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
  4793. "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
  4794. "\x85\x62\x82\x70\x18\xe2\x9a\x78"
  4795. "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
  4796. "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
  4797. "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
  4798. "\x35\xf3\x61\x06\x72\x84\xc4\x32"
  4799. "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
  4800. "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
  4801. "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
  4802. "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
  4803. "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
  4804. "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
  4805. "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
  4806. "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
  4807. "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
  4808. "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
  4809. "\x4f\x73\x38\x09\x75\x64\x48\xe0"
  4810. "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
  4811. "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
  4812. "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
  4813. "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
  4814. "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
  4815. "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
  4816. "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
  4817. "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
  4818. "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
  4819. "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
  4820. "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
  4821. "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
  4822. "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
  4823. "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
  4824. "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
  4825. "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
  4826. "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
  4827. "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
  4828. "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
  4829. "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
  4830. "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
  4831. "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
  4832. "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
  4833. "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
  4834. "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
  4835. "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
  4836. "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
  4837. "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
  4838. "\xce\x4d\x5f\x18\x60\xce\x87\x22"
  4839. "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
  4840. "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
  4841. "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
  4842. "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
  4843. "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
  4844. "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
  4845. "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
  4846. "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
  4847. "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
  4848. "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
  4849. "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
  4850. "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
  4851. "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
  4852. "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
  4853. "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
  4854. "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
  4855. "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
  4856. "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
  4857. "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
  4858. "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
  4859. "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
  4860. "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
  4861. "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
  4862. "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
  4863. "\xce\x54\xf9\x18\x58\xb5\xff\x44"
  4864. "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
  4865. "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
  4866. "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
  4867. "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
  4868. "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
  4869. "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
  4870. "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
  4871. "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
  4872. "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
  4873. "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
  4874. "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
  4875. "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
  4876. "\x0c\xd6\x04\x14\xde\x51\x74\x75"
  4877. "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
  4878. "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
  4879. "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
  4880. "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
  4881. "\x75\x46\x65\x4e\x07\x34\x37\xa3"
  4882. "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
  4883. "\x69\x24\x0e\x38\x67\x43\x8c\xde"
  4884. "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
  4885. "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
  4886. "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
  4887. "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
  4888. "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
  4889. "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
  4890. "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
  4891. "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
  4892. "\x91\x7d\x62\x64\x96\x72\xde\xfc"
  4893. "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
  4894. "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
  4895. "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
  4896. "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
  4897. "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
  4898. "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
  4899. "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
  4900. "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
  4901. "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
  4902. "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
  4903. "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
  4904. "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
  4905. "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
  4906. "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
  4907. "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
  4908. "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
  4909. "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
  4910. "\xae\xed\x39\x88\x42\x11\x3c\xed"
  4911. "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
  4912. "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
  4913. "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
  4914. "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
  4915. "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
  4916. "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
  4917. "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
  4918. "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
  4919. "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
  4920. "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
  4921. "\x34\x17\xde\xba\x47\xf1\x06\x18"
  4922. "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
  4923. "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
  4924. "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
  4925. "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
  4926. "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
  4927. "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
  4928. "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
  4929. "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
  4930. "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
  4931. "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
  4932. "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
  4933. "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
  4934. "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
  4935. "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
  4936. "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
  4937. "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
  4938. "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
  4939. "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
  4940. "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
  4941. "\x2c\x56\x39\x79\x0f\x69\x44\x75"
  4942. "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
  4943. "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
  4944. "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
  4945. "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
  4946. "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
  4947. "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
  4948. "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
  4949. "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
  4950. "\x63\x9b\xce\x61\x24\x79\xc0\x70"
  4951. "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
  4952. "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
  4953. "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
  4954. "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
  4955. "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
  4956. "\x74\x56\x58\x40\x02\x37\x52\x2c"
  4957. "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
  4958. "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
  4959. "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
  4960. "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
  4961. "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
  4962. "\xed\x38\x80\x36\x72\x43\x27\x49"
  4963. "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
  4964. "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
  4965. "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
  4966. "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
  4967. "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
  4968. "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
  4969. "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
  4970. "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
  4971. "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
  4972. "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
  4973. "\x12\xee\x30\xfe\xd8\x30\xef\x34"
  4974. "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
  4975. "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
  4976. "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
  4977. "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
  4978. "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
  4979. "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
  4980. "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
  4981. "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
  4982. "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
  4983. "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
  4984. "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
  4985. "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
  4986. "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
  4987. "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
  4988. "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
  4989. "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
  4990. "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
  4991. "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
  4992. "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
  4993. "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
  4994. "\x44\x12\xfb\x73\x77\xd4\x13\x39"
  4995. "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
  4996. "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
  4997. "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
  4998. "\x4b\xef\x31\x18\xea\xac\xb1\x84"
  4999. "\x21\xed\xda\x86",
  5000. .rlen = 4100,
  5001. .np = 2,
  5002. .tap = { 4064, 36 },
  5003. },
  5004. };
  5005. static struct cipher_testvec aes_ctr_dec_tv_template[] = {
  5006. { /* From RFC 3686 */
  5007. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  5008. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  5009. "\x00\x00\x00\x30",
  5010. .klen = 20,
  5011. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5012. .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  5013. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  5014. .ilen = 16,
  5015. .result = "Single block msg",
  5016. .rlen = 16,
  5017. }, {
  5018. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  5019. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  5020. "\x00\x6c\xb6\xdb",
  5021. .klen = 20,
  5022. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  5023. .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  5024. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  5025. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  5026. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  5027. .ilen = 32,
  5028. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5029. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5030. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5031. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5032. .rlen = 32,
  5033. }, {
  5034. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  5035. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  5036. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  5037. "\x00\x00\x00\x48",
  5038. .klen = 28,
  5039. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  5040. .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  5041. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  5042. .ilen = 16,
  5043. .result = "Single block msg",
  5044. .rlen = 16,
  5045. }, {
  5046. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  5047. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  5048. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  5049. "\x00\x96\xb0\x3b",
  5050. .klen = 28,
  5051. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  5052. .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  5053. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  5054. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  5055. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  5056. .ilen = 32,
  5057. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5058. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5059. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5060. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5061. .rlen = 32,
  5062. }, {
  5063. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  5064. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  5065. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  5066. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  5067. "\x00\x00\x00\x60",
  5068. .klen = 36,
  5069. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  5070. .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  5071. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  5072. .ilen = 16,
  5073. .result = "Single block msg",
  5074. .rlen = 16,
  5075. }, {
  5076. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  5077. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  5078. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  5079. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  5080. "\x00\xfa\xac\x24",
  5081. .klen = 36,
  5082. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  5083. .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  5084. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  5085. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  5086. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  5087. .ilen = 32,
  5088. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5089. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5090. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5091. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5092. .rlen = 32,
  5093. },
  5094. };
  5095. static struct aead_testvec aes_gcm_enc_tv_template[] = {
  5096. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  5097. .key = zeroed_string,
  5098. .klen = 16,
  5099. .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
  5100. "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
  5101. .rlen = 16,
  5102. }, {
  5103. .key = zeroed_string,
  5104. .klen = 16,
  5105. .input = zeroed_string,
  5106. .ilen = 16,
  5107. .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
  5108. "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
  5109. "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
  5110. "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
  5111. .rlen = 32,
  5112. }, {
  5113. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5114. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5115. .klen = 16,
  5116. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5117. "\xde\xca\xf8\x88",
  5118. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5119. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5120. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5121. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5122. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5123. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5124. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5125. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5126. .ilen = 64,
  5127. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5128. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5129. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5130. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5131. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5132. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5133. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5134. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  5135. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  5136. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  5137. .rlen = 80,
  5138. }, {
  5139. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5140. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5141. .klen = 16,
  5142. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5143. "\xde\xca\xf8\x88",
  5144. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5145. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5146. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5147. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5148. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5149. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5150. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5151. "\xba\x63\x7b\x39",
  5152. .ilen = 60,
  5153. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5154. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5155. "\xab\xad\xda\xd2",
  5156. .alen = 20,
  5157. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5158. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5159. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5160. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5161. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5162. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5163. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5164. "\x3d\x58\xe0\x91"
  5165. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  5166. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  5167. .rlen = 76,
  5168. }, {
  5169. .key = zeroed_string,
  5170. .klen = 24,
  5171. .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
  5172. "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
  5173. .rlen = 16,
  5174. }, {
  5175. .key = zeroed_string,
  5176. .klen = 24,
  5177. .input = zeroed_string,
  5178. .ilen = 16,
  5179. .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  5180. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  5181. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  5182. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  5183. .rlen = 32,
  5184. }, {
  5185. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5186. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5187. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5188. .klen = 24,
  5189. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5190. "\xde\xca\xf8\x88",
  5191. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5192. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5193. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5194. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5195. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5196. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5197. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5198. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5199. .ilen = 64,
  5200. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5201. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5202. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5203. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5204. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5205. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5206. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5207. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  5208. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  5209. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  5210. .rlen = 80,
  5211. }, {
  5212. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5213. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5214. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5215. .klen = 24,
  5216. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5217. "\xde\xca\xf8\x88",
  5218. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5219. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5220. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5221. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5222. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5223. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5224. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5225. "\xba\x63\x7b\x39",
  5226. .ilen = 60,
  5227. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5228. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5229. "\xab\xad\xda\xd2",
  5230. .alen = 20,
  5231. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5232. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5233. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5234. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5235. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5236. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5237. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5238. "\xcc\xda\x27\x10"
  5239. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  5240. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  5241. .rlen = 76,
  5242. .np = 2,
  5243. .tap = { 32, 28 },
  5244. .anp = 2,
  5245. .atap = { 8, 12 }
  5246. }, {
  5247. .key = zeroed_string,
  5248. .klen = 32,
  5249. .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
  5250. "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
  5251. .rlen = 16,
  5252. }
  5253. };
  5254. static struct aead_testvec aes_gcm_dec_tv_template[] = {
  5255. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  5256. .key = zeroed_string,
  5257. .klen = 32,
  5258. .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
  5259. "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
  5260. "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
  5261. "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
  5262. .ilen = 32,
  5263. .result = zeroed_string,
  5264. .rlen = 16,
  5265. }, {
  5266. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5267. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5268. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5269. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5270. .klen = 32,
  5271. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5272. "\xde\xca\xf8\x88",
  5273. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  5274. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  5275. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  5276. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  5277. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  5278. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  5279. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  5280. "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
  5281. "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
  5282. "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
  5283. .ilen = 80,
  5284. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5285. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5286. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5287. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5288. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5289. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5290. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5291. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5292. .rlen = 64,
  5293. }, {
  5294. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5295. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5296. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5297. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5298. .klen = 32,
  5299. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5300. "\xde\xca\xf8\x88",
  5301. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  5302. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  5303. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  5304. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  5305. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  5306. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  5307. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  5308. "\xbc\xc9\xf6\x62"
  5309. "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
  5310. "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
  5311. .ilen = 76,
  5312. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5313. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5314. "\xab\xad\xda\xd2",
  5315. .alen = 20,
  5316. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5317. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5318. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5319. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5320. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5321. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5322. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5323. "\xba\x63\x7b\x39",
  5324. .rlen = 60,
  5325. .np = 2,
  5326. .tap = { 48, 28 },
  5327. .anp = 3,
  5328. .atap = { 8, 8, 4 }
  5329. }, {
  5330. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5331. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5332. .klen = 16,
  5333. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5334. "\xde\xca\xf8\x88",
  5335. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5336. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5337. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5338. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5339. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5340. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5341. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5342. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  5343. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  5344. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  5345. .ilen = 80,
  5346. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5347. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5348. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5349. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5350. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5351. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5352. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5353. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5354. .rlen = 64,
  5355. }, {
  5356. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5357. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5358. .klen = 16,
  5359. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5360. "\xde\xca\xf8\x88",
  5361. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5362. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5363. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5364. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5365. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5366. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5367. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5368. "\x3d\x58\xe0\x91"
  5369. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  5370. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  5371. .ilen = 76,
  5372. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5373. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5374. "\xab\xad\xda\xd2",
  5375. .alen = 20,
  5376. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5377. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5378. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5379. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5380. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5381. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5382. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5383. "\xba\x63\x7b\x39",
  5384. .rlen = 60,
  5385. }, {
  5386. .key = zeroed_string,
  5387. .klen = 24,
  5388. .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  5389. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  5390. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  5391. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  5392. .ilen = 32,
  5393. .result = zeroed_string,
  5394. .rlen = 16,
  5395. }, {
  5396. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5397. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5398. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5399. .klen = 24,
  5400. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5401. "\xde\xca\xf8\x88",
  5402. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5403. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5404. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5405. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5406. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5407. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5408. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5409. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  5410. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  5411. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  5412. .ilen = 80,
  5413. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5414. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5415. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5416. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5417. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5418. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5419. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5420. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5421. .rlen = 64,
  5422. }, {
  5423. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5424. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5425. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5426. .klen = 24,
  5427. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5428. "\xde\xca\xf8\x88",
  5429. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5430. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5431. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5432. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5433. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5434. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5435. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5436. "\xcc\xda\x27\x10"
  5437. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  5438. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  5439. .ilen = 76,
  5440. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5441. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5442. "\xab\xad\xda\xd2",
  5443. .alen = 20,
  5444. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5445. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5446. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5447. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5448. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5449. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5450. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5451. "\xba\x63\x7b\x39",
  5452. .rlen = 60,
  5453. }
  5454. };
  5455. static struct aead_testvec aes_ccm_enc_tv_template[] = {
  5456. { /* From RFC 3610 */
  5457. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5458. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5459. .klen = 16,
  5460. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  5461. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5462. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5463. .alen = 8,
  5464. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5465. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5466. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  5467. .ilen = 23,
  5468. .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  5469. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  5470. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  5471. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  5472. .rlen = 31,
  5473. }, {
  5474. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5475. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5476. .klen = 16,
  5477. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  5478. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5479. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5480. "\x08\x09\x0a\x0b",
  5481. .alen = 12,
  5482. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5483. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5484. "\x1c\x1d\x1e\x1f",
  5485. .ilen = 20,
  5486. .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  5487. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  5488. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  5489. "\x7d\x9c\x2d\x93",
  5490. .rlen = 28,
  5491. }, {
  5492. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5493. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5494. .klen = 16,
  5495. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  5496. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5497. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5498. .alen = 8,
  5499. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5500. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5501. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5502. "\x20",
  5503. .ilen = 25,
  5504. .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  5505. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  5506. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  5507. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  5508. "\x7e\x5f\x4e",
  5509. .rlen = 35,
  5510. }, {
  5511. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5512. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5513. .klen = 16,
  5514. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  5515. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5516. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5517. "\x08\x09\x0a\x0b",
  5518. .alen = 12,
  5519. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5520. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5521. "\x1c\x1d\x1e",
  5522. .ilen = 19,
  5523. .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
  5524. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  5525. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  5526. "\x4d\x99\x99\x88\xdd",
  5527. .rlen = 29,
  5528. }, {
  5529. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5530. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5531. .klen = 16,
  5532. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  5533. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5534. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  5535. .alen = 8,
  5536. .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  5537. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  5538. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  5539. .ilen = 24,
  5540. .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  5541. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  5542. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  5543. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  5544. .rlen = 32,
  5545. }, {
  5546. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5547. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5548. .klen = 16,
  5549. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  5550. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5551. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  5552. "\x20\xea\x60\xc0",
  5553. .alen = 12,
  5554. .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  5555. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  5556. "\x3a\x80\x3b\xa8\x7f",
  5557. .ilen = 21,
  5558. .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  5559. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  5560. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  5561. "\x5a\xe0\x70\x45\x51",
  5562. .rlen = 29,
  5563. }, {
  5564. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5565. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5566. .klen = 16,
  5567. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  5568. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5569. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  5570. .alen = 8,
  5571. .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  5572. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  5573. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  5574. .ilen = 23,
  5575. .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  5576. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  5577. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  5578. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  5579. "\xba",
  5580. .rlen = 33,
  5581. },
  5582. };
  5583. static struct aead_testvec aes_ccm_dec_tv_template[] = {
  5584. { /* From RFC 3610 */
  5585. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5586. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5587. .klen = 16,
  5588. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  5589. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5590. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5591. .alen = 8,
  5592. .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  5593. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  5594. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  5595. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  5596. .ilen = 31,
  5597. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5598. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5599. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  5600. .rlen = 23,
  5601. }, {
  5602. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5603. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5604. .klen = 16,
  5605. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  5606. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5607. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5608. "\x08\x09\x0a\x0b",
  5609. .alen = 12,
  5610. .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  5611. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  5612. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  5613. "\x7d\x9c\x2d\x93",
  5614. .ilen = 28,
  5615. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5616. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5617. "\x1c\x1d\x1e\x1f",
  5618. .rlen = 20,
  5619. }, {
  5620. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5621. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5622. .klen = 16,
  5623. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  5624. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5625. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5626. .alen = 8,
  5627. .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  5628. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  5629. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  5630. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  5631. "\x7e\x5f\x4e",
  5632. .ilen = 35,
  5633. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5634. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5635. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5636. "\x20",
  5637. .rlen = 25,
  5638. }, {
  5639. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5640. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5641. .klen = 16,
  5642. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  5643. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5644. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5645. "\x08\x09\x0a\x0b",
  5646. .alen = 12,
  5647. .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
  5648. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  5649. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  5650. "\x4d\x99\x99\x88\xdd",
  5651. .ilen = 29,
  5652. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5653. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5654. "\x1c\x1d\x1e",
  5655. .rlen = 19,
  5656. }, {
  5657. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5658. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5659. .klen = 16,
  5660. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  5661. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5662. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  5663. .alen = 8,
  5664. .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  5665. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  5666. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  5667. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  5668. .ilen = 32,
  5669. .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  5670. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  5671. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  5672. .rlen = 24,
  5673. }, {
  5674. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5675. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5676. .klen = 16,
  5677. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  5678. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5679. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  5680. "\x20\xea\x60\xc0",
  5681. .alen = 12,
  5682. .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  5683. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  5684. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  5685. "\x5a\xe0\x70\x45\x51",
  5686. .ilen = 29,
  5687. .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  5688. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  5689. "\x3a\x80\x3b\xa8\x7f",
  5690. .rlen = 21,
  5691. }, {
  5692. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5693. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5694. .klen = 16,
  5695. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  5696. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5697. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  5698. .alen = 8,
  5699. .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  5700. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  5701. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  5702. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  5703. "\xba",
  5704. .ilen = 33,
  5705. .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  5706. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  5707. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  5708. .rlen = 23,
  5709. },
  5710. };
  5711. /*
  5712. * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
  5713. * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
  5714. * Special Publication 800-38C's test vectors also use nonce lengths our
  5715. * implementation doesn't support. The following are taken from fips cavs
  5716. * fax files on hand at Red Hat.
  5717. *
  5718. * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
  5719. * part of the nonce which combine w/the iv, but need to be input this way.
  5720. */
  5721. static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
  5722. {
  5723. .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
  5724. "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
  5725. "\x96\xac\x59",
  5726. .klen = 19,
  5727. .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
  5728. .alen = 0,
  5729. .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
  5730. "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
  5731. "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
  5732. "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
  5733. .ilen = 32,
  5734. .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
  5735. "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
  5736. "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
  5737. "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
  5738. "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
  5739. "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
  5740. .rlen = 48,
  5741. }, {
  5742. .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
  5743. "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
  5744. "\x4f\xa3\x19",
  5745. .klen = 19,
  5746. .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
  5747. .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
  5748. "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
  5749. "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
  5750. "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
  5751. .alen = 32,
  5752. .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
  5753. "\xa9\x28\x63\xba\x12\xa3\x14\x85"
  5754. "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
  5755. "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
  5756. .ilen = 32,
  5757. .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
  5758. "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
  5759. "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
  5760. "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
  5761. "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
  5762. "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
  5763. .rlen = 48,
  5764. }, {
  5765. .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
  5766. "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
  5767. "\x53\x14\x73\x66\x8d\x88\xf6\x80"
  5768. "\xa0\x20\x35",
  5769. .klen = 27,
  5770. .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
  5771. .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
  5772. "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
  5773. "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
  5774. "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
  5775. .alen = 32,
  5776. .ilen = 0,
  5777. .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
  5778. "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
  5779. .rlen = 16,
  5780. }, {
  5781. .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
  5782. "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
  5783. "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
  5784. "\xd6\x3c\x8c",
  5785. .klen = 27,
  5786. .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
  5787. .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
  5788. "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
  5789. "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
  5790. "\xe3\x00\x73\x69\x84\x69\x87\x79",
  5791. .alen = 32,
  5792. .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
  5793. "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
  5794. "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
  5795. "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
  5796. .ilen = 32,
  5797. .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
  5798. "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
  5799. "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
  5800. "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
  5801. "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
  5802. "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
  5803. .rlen = 48,
  5804. }, {
  5805. .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
  5806. "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
  5807. "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
  5808. "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
  5809. "\x1e\x29\x91",
  5810. .klen = 35,
  5811. .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
  5812. .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
  5813. "\x78\x2b\x94\x02\x29\x0f\x42\x27"
  5814. "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
  5815. "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
  5816. .alen = 32,
  5817. .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
  5818. "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
  5819. "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
  5820. "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
  5821. .ilen = 32,
  5822. .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
  5823. "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
  5824. "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
  5825. "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
  5826. "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
  5827. .rlen = 40,
  5828. }, {
  5829. .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
  5830. "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
  5831. "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
  5832. "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
  5833. "\xf9\xd9\x4e",
  5834. .klen = 35,
  5835. .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
  5836. .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
  5837. "\x13\x02\x01\x0c\x83\x4c\x96\x35"
  5838. "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
  5839. "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
  5840. .alen = 32,
  5841. .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
  5842. "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
  5843. "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
  5844. "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
  5845. .ilen = 32,
  5846. .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
  5847. "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
  5848. "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
  5849. "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
  5850. "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
  5851. "\x7b\x72\x8a\xf7",
  5852. .rlen = 44,
  5853. }, {
  5854. .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
  5855. "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
  5856. "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
  5857. "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
  5858. "\x24\xa7\x8b",
  5859. .klen = 35,
  5860. .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
  5861. .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
  5862. "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
  5863. "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
  5864. "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
  5865. .alen = 32,
  5866. .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
  5867. "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
  5868. "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
  5869. "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
  5870. .ilen = 32,
  5871. .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
  5872. "\xef\xbb\x80\x21\x04\x6c\x58\x09"
  5873. "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
  5874. "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
  5875. "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
  5876. "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
  5877. .rlen = 48,
  5878. },
  5879. };
  5880. static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
  5881. {
  5882. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  5883. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  5884. "\xc6\xfb\x7d",
  5885. .klen = 19,
  5886. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  5887. .alen = 0,
  5888. .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
  5889. .ilen = 8,
  5890. .result = "\x00",
  5891. .rlen = 0,
  5892. .novrfy = 1,
  5893. }, {
  5894. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  5895. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  5896. "\xaf\x94\x87",
  5897. .klen = 19,
  5898. .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
  5899. .alen = 0,
  5900. .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
  5901. .ilen = 8,
  5902. .result = "\x00",
  5903. .rlen = 0,
  5904. }, {
  5905. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  5906. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  5907. "\xc6\xfb\x7d",
  5908. .klen = 19,
  5909. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  5910. .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
  5911. "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
  5912. "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
  5913. "\xd8\x94\x99\x91\x81\x54\x62\x57",
  5914. .alen = 32,
  5915. .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
  5916. "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
  5917. "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
  5918. "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
  5919. "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
  5920. "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
  5921. .ilen = 48,
  5922. .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
  5923. "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
  5924. "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
  5925. "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
  5926. .rlen = 32,
  5927. .novrfy = 1,
  5928. }, {
  5929. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  5930. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  5931. "\x05\xe0\xc9",
  5932. .klen = 19,
  5933. .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
  5934. .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
  5935. "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
  5936. "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
  5937. "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
  5938. .alen = 32,
  5939. .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
  5940. "\xad\x83\x52\x6d\x71\x03\x25\x1c"
  5941. "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
  5942. "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
  5943. "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
  5944. "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
  5945. .ilen = 48,
  5946. .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
  5947. "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
  5948. "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
  5949. "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
  5950. .rlen = 32,
  5951. }, {
  5952. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  5953. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  5954. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  5955. "\xee\x49\x83",
  5956. .klen = 27,
  5957. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  5958. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  5959. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  5960. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  5961. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  5962. .alen = 32,
  5963. .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
  5964. .ilen = 8,
  5965. .result = "\x00",
  5966. .rlen = 0,
  5967. }, {
  5968. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  5969. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  5970. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  5971. "\xee\x49\x83",
  5972. .klen = 27,
  5973. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  5974. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  5975. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  5976. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  5977. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  5978. .alen = 32,
  5979. .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
  5980. "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
  5981. "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
  5982. "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
  5983. "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
  5984. .ilen = 40,
  5985. .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
  5986. "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
  5987. "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
  5988. "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
  5989. .rlen = 32,
  5990. }, {
  5991. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  5992. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  5993. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  5994. "\xd1\xfc\x57",
  5995. .klen = 27,
  5996. .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
  5997. .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
  5998. "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
  5999. "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
  6000. "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
  6001. .alen = 32,
  6002. .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
  6003. "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
  6004. "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
  6005. "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
  6006. "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
  6007. "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
  6008. .ilen = 48,
  6009. .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
  6010. "\x99\x2a\xa8\xca\x04\x25\x45\x90"
  6011. "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
  6012. "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
  6013. .rlen = 32,
  6014. .novrfy = 1,
  6015. }, {
  6016. .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
  6017. "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
  6018. "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
  6019. "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
  6020. "\xee\x49\x83",
  6021. .klen = 35,
  6022. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  6023. .alen = 0,
  6024. .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
  6025. .ilen = 8,
  6026. .result = "\x00",
  6027. .rlen = 0,
  6028. }, {
  6029. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  6030. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  6031. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  6032. "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
  6033. "\x85\x34\x66",
  6034. .klen = 35,
  6035. .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
  6036. .alen = 0,
  6037. .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
  6038. "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
  6039. "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
  6040. "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
  6041. "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
  6042. "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
  6043. .ilen = 48,
  6044. .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
  6045. "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
  6046. "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
  6047. "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
  6048. .rlen = 32,
  6049. .novrfy = 1,
  6050. }, {
  6051. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  6052. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  6053. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  6054. "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
  6055. "\xcf\x76\x3f",
  6056. .klen = 35,
  6057. .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
  6058. .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
  6059. "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
  6060. "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
  6061. "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
  6062. .alen = 32,
  6063. .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
  6064. "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
  6065. "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
  6066. "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
  6067. "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
  6068. "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
  6069. .ilen = 48,
  6070. .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
  6071. "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
  6072. "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
  6073. "\x04\x49\x3b\x19\x93\x57\x25\x5d",
  6074. .rlen = 32,
  6075. },
  6076. };
  6077. /* Cast5 test vectors from RFC 2144 */
  6078. #define CAST5_ENC_TEST_VECTORS 3
  6079. #define CAST5_DEC_TEST_VECTORS 3
  6080. static struct cipher_testvec cast5_enc_tv_template[] = {
  6081. {
  6082. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6083. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  6084. .klen = 16,
  6085. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6086. .ilen = 8,
  6087. .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  6088. .rlen = 8,
  6089. }, {
  6090. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6091. "\x23\x45",
  6092. .klen = 10,
  6093. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6094. .ilen = 8,
  6095. .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  6096. .rlen = 8,
  6097. }, {
  6098. .key = "\x01\x23\x45\x67\x12",
  6099. .klen = 5,
  6100. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6101. .ilen = 8,
  6102. .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  6103. .rlen = 8,
  6104. },
  6105. };
  6106. static struct cipher_testvec cast5_dec_tv_template[] = {
  6107. {
  6108. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6109. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  6110. .klen = 16,
  6111. .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  6112. .ilen = 8,
  6113. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6114. .rlen = 8,
  6115. }, {
  6116. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6117. "\x23\x45",
  6118. .klen = 10,
  6119. .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  6120. .ilen = 8,
  6121. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6122. .rlen = 8,
  6123. }, {
  6124. .key = "\x01\x23\x45\x67\x12",
  6125. .klen = 5,
  6126. .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  6127. .ilen = 8,
  6128. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6129. .rlen = 8,
  6130. },
  6131. };
  6132. /*
  6133. * ARC4 test vectors from OpenSSL
  6134. */
  6135. #define ARC4_ENC_TEST_VECTORS 7
  6136. #define ARC4_DEC_TEST_VECTORS 7
  6137. static struct cipher_testvec arc4_enc_tv_template[] = {
  6138. {
  6139. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6140. .klen = 8,
  6141. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6142. .ilen = 8,
  6143. .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  6144. .rlen = 8,
  6145. }, {
  6146. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6147. .klen = 8,
  6148. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6149. .ilen = 8,
  6150. .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  6151. .rlen = 8,
  6152. }, {
  6153. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6154. .klen = 8,
  6155. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6156. .ilen = 8,
  6157. .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  6158. .rlen = 8,
  6159. }, {
  6160. .key = "\xef\x01\x23\x45",
  6161. .klen = 4,
  6162. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6163. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6164. "\x00\x00\x00\x00",
  6165. .ilen = 20,
  6166. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6167. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  6168. "\x36\xb6\x78\x58",
  6169. .rlen = 20,
  6170. }, {
  6171. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6172. .klen = 8,
  6173. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6174. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6175. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6176. "\x12\x34\x56\x78",
  6177. .ilen = 28,
  6178. .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  6179. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  6180. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  6181. "\x40\x01\x1e\xcf",
  6182. .rlen = 28,
  6183. }, {
  6184. .key = "\xef\x01\x23\x45",
  6185. .klen = 4,
  6186. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6187. "\x00\x00",
  6188. .ilen = 10,
  6189. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6190. "\xbd\x61",
  6191. .rlen = 10,
  6192. }, {
  6193. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  6194. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6195. .klen = 16,
  6196. .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  6197. .ilen = 8,
  6198. .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  6199. .rlen = 8,
  6200. },
  6201. };
  6202. static struct cipher_testvec arc4_dec_tv_template[] = {
  6203. {
  6204. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6205. .klen = 8,
  6206. .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  6207. .ilen = 8,
  6208. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6209. .rlen = 8,
  6210. }, {
  6211. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6212. .klen = 8,
  6213. .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  6214. .ilen = 8,
  6215. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6216. .rlen = 8,
  6217. }, {
  6218. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6219. .klen = 8,
  6220. .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  6221. .ilen = 8,
  6222. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6223. .rlen = 8,
  6224. }, {
  6225. .key = "\xef\x01\x23\x45",
  6226. .klen = 4,
  6227. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6228. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  6229. "\x36\xb6\x78\x58",
  6230. .ilen = 20,
  6231. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6232. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6233. "\x00\x00\x00\x00",
  6234. .rlen = 20,
  6235. }, {
  6236. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6237. .klen = 8,
  6238. .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  6239. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  6240. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  6241. "\x40\x01\x1e\xcf",
  6242. .ilen = 28,
  6243. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6244. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6245. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6246. "\x12\x34\x56\x78",
  6247. .rlen = 28,
  6248. }, {
  6249. .key = "\xef\x01\x23\x45",
  6250. .klen = 4,
  6251. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6252. "\xbd\x61",
  6253. .ilen = 10,
  6254. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6255. "\x00\x00",
  6256. .rlen = 10,
  6257. }, {
  6258. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  6259. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6260. .klen = 16,
  6261. .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  6262. .ilen = 8,
  6263. .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  6264. .rlen = 8,
  6265. },
  6266. };
  6267. /*
  6268. * TEA test vectors
  6269. */
  6270. #define TEA_ENC_TEST_VECTORS 4
  6271. #define TEA_DEC_TEST_VECTORS 4
  6272. static struct cipher_testvec tea_enc_tv_template[] = {
  6273. {
  6274. .key = zeroed_string,
  6275. .klen = 16,
  6276. .input = zeroed_string,
  6277. .ilen = 8,
  6278. .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  6279. .rlen = 8,
  6280. }, {
  6281. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6282. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6283. .klen = 16,
  6284. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6285. .ilen = 8,
  6286. .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  6287. .rlen = 8,
  6288. }, {
  6289. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6290. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6291. .klen = 16,
  6292. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6293. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6294. .ilen = 16,
  6295. .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  6296. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  6297. .rlen = 16,
  6298. }, {
  6299. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6300. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6301. .klen = 16,
  6302. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6303. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6304. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6305. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6306. .ilen = 32,
  6307. .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  6308. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  6309. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  6310. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  6311. .rlen = 32,
  6312. }
  6313. };
  6314. static struct cipher_testvec tea_dec_tv_template[] = {
  6315. {
  6316. .key = zeroed_string,
  6317. .klen = 16,
  6318. .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  6319. .ilen = 8,
  6320. .result = zeroed_string,
  6321. .rlen = 8,
  6322. }, {
  6323. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6324. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6325. .klen = 16,
  6326. .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  6327. .ilen = 8,
  6328. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6329. .rlen = 8,
  6330. }, {
  6331. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6332. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6333. .klen = 16,
  6334. .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  6335. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  6336. .ilen = 16,
  6337. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6338. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6339. .rlen = 16,
  6340. }, {
  6341. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6342. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6343. .klen = 16,
  6344. .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  6345. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  6346. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  6347. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  6348. .ilen = 32,
  6349. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6350. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6351. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6352. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6353. .rlen = 32,
  6354. }
  6355. };
  6356. /*
  6357. * XTEA test vectors
  6358. */
  6359. #define XTEA_ENC_TEST_VECTORS 4
  6360. #define XTEA_DEC_TEST_VECTORS 4
  6361. static struct cipher_testvec xtea_enc_tv_template[] = {
  6362. {
  6363. .key = zeroed_string,
  6364. .klen = 16,
  6365. .input = zeroed_string,
  6366. .ilen = 8,
  6367. .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  6368. .rlen = 8,
  6369. }, {
  6370. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6371. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6372. .klen = 16,
  6373. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6374. .ilen = 8,
  6375. .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  6376. .rlen = 8,
  6377. }, {
  6378. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6379. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6380. .klen = 16,
  6381. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6382. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6383. .ilen = 16,
  6384. .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  6385. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  6386. .rlen = 16,
  6387. }, {
  6388. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6389. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6390. .klen = 16,
  6391. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6392. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6393. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6394. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6395. .ilen = 32,
  6396. .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  6397. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  6398. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  6399. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  6400. .rlen = 32,
  6401. }
  6402. };
  6403. static struct cipher_testvec xtea_dec_tv_template[] = {
  6404. {
  6405. .key = zeroed_string,
  6406. .klen = 16,
  6407. .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  6408. .ilen = 8,
  6409. .result = zeroed_string,
  6410. .rlen = 8,
  6411. }, {
  6412. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6413. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6414. .klen = 16,
  6415. .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  6416. .ilen = 8,
  6417. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6418. .rlen = 8,
  6419. }, {
  6420. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6421. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6422. .klen = 16,
  6423. .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  6424. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  6425. .ilen = 16,
  6426. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6427. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6428. .rlen = 16,
  6429. }, {
  6430. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6431. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6432. .klen = 16,
  6433. .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  6434. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  6435. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  6436. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  6437. .ilen = 32,
  6438. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6439. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6440. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6441. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6442. .rlen = 32,
  6443. }
  6444. };
  6445. /*
  6446. * KHAZAD test vectors.
  6447. */
  6448. #define KHAZAD_ENC_TEST_VECTORS 5
  6449. #define KHAZAD_DEC_TEST_VECTORS 5
  6450. static struct cipher_testvec khazad_enc_tv_template[] = {
  6451. {
  6452. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  6453. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6454. .klen = 16,
  6455. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6456. .ilen = 8,
  6457. .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  6458. .rlen = 8,
  6459. }, {
  6460. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  6461. "\x38\x38\x38\x38\x38\x38\x38\x38",
  6462. .klen = 16,
  6463. .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
  6464. .ilen = 8,
  6465. .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  6466. .rlen = 8,
  6467. }, {
  6468. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  6469. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6470. .klen = 16,
  6471. .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6472. .ilen = 8,
  6473. .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  6474. .rlen = 8,
  6475. }, {
  6476. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6477. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6478. .klen = 16,
  6479. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6480. .ilen = 8,
  6481. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6482. .rlen = 8,
  6483. }, {
  6484. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6485. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6486. .klen = 16,
  6487. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6488. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6489. .ilen = 16,
  6490. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  6491. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6492. .rlen = 16,
  6493. },
  6494. };
  6495. static struct cipher_testvec khazad_dec_tv_template[] = {
  6496. {
  6497. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  6498. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6499. .klen = 16,
  6500. .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  6501. .ilen = 8,
  6502. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6503. .rlen = 8,
  6504. }, {
  6505. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  6506. "\x38\x38\x38\x38\x38\x38\x38\x38",
  6507. .klen = 16,
  6508. .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  6509. .ilen = 8,
  6510. .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
  6511. .rlen = 8,
  6512. }, {
  6513. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  6514. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6515. .klen = 16,
  6516. .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  6517. .ilen = 8,
  6518. .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6519. .rlen = 8,
  6520. }, {
  6521. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6522. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6523. .klen = 16,
  6524. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6525. .ilen = 8,
  6526. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6527. .rlen = 8,
  6528. }, {
  6529. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6530. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6531. .klen = 16,
  6532. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  6533. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6534. .ilen = 16,
  6535. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6536. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6537. .rlen = 16,
  6538. },
  6539. };
  6540. /*
  6541. * Anubis test vectors.
  6542. */
  6543. #define ANUBIS_ENC_TEST_VECTORS 5
  6544. #define ANUBIS_DEC_TEST_VECTORS 5
  6545. #define ANUBIS_CBC_ENC_TEST_VECTORS 2
  6546. #define ANUBIS_CBC_DEC_TEST_VECTORS 2
  6547. static struct cipher_testvec anubis_enc_tv_template[] = {
  6548. {
  6549. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6550. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6551. .klen = 16,
  6552. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6553. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6554. .ilen = 16,
  6555. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6556. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  6557. .rlen = 16,
  6558. }, {
  6559. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6560. "\x03\x03\x03\x03\x03\x03\x03\x03"
  6561. "\x03\x03\x03\x03",
  6562. .klen = 20,
  6563. .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6564. "\x03\x03\x03\x03\x03\x03\x03\x03",
  6565. .ilen = 16,
  6566. .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  6567. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  6568. .rlen = 16,
  6569. }, {
  6570. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6571. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6572. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6573. "\x24\x24\x24\x24",
  6574. .klen = 28,
  6575. .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6576. "\x24\x24\x24\x24\x24\x24\x24\x24",
  6577. .ilen = 16,
  6578. .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  6579. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  6580. .rlen = 16,
  6581. }, {
  6582. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6583. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6584. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6585. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6586. .klen = 32,
  6587. .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6588. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6589. .ilen = 16,
  6590. .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  6591. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  6592. .rlen = 16,
  6593. }, {
  6594. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6595. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6596. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6597. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6598. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6599. .klen = 40,
  6600. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6601. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6602. .ilen = 16,
  6603. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6604. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  6605. .rlen = 16,
  6606. },
  6607. };
  6608. static struct cipher_testvec anubis_dec_tv_template[] = {
  6609. {
  6610. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6611. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6612. .klen = 16,
  6613. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6614. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  6615. .ilen = 16,
  6616. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6617. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6618. .rlen = 16,
  6619. }, {
  6620. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6621. "\x03\x03\x03\x03\x03\x03\x03\x03"
  6622. "\x03\x03\x03\x03",
  6623. .klen = 20,
  6624. .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  6625. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  6626. .ilen = 16,
  6627. .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6628. "\x03\x03\x03\x03\x03\x03\x03\x03",
  6629. .rlen = 16,
  6630. }, {
  6631. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6632. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6633. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6634. "\x24\x24\x24\x24",
  6635. .klen = 28,
  6636. .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  6637. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  6638. .ilen = 16,
  6639. .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6640. "\x24\x24\x24\x24\x24\x24\x24\x24",
  6641. .rlen = 16,
  6642. }, {
  6643. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6644. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6645. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6646. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6647. .klen = 32,
  6648. .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  6649. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  6650. .ilen = 16,
  6651. .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6652. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6653. .rlen = 16,
  6654. }, {
  6655. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6656. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6657. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6658. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6659. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6660. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6661. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  6662. .klen = 40,
  6663. .ilen = 16,
  6664. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6665. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6666. .rlen = 16,
  6667. },
  6668. };
  6669. static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
  6670. {
  6671. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6672. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6673. .klen = 16,
  6674. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6675. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6676. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6677. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6678. .ilen = 32,
  6679. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6680. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  6681. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  6682. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  6683. .rlen = 32,
  6684. }, {
  6685. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6686. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6687. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6688. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6689. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6690. .klen = 40,
  6691. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6692. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6693. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6694. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6695. .ilen = 32,
  6696. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6697. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  6698. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  6699. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  6700. .rlen = 32,
  6701. },
  6702. };
  6703. static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
  6704. {
  6705. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6706. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6707. .klen = 16,
  6708. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6709. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  6710. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  6711. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  6712. .ilen = 32,
  6713. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6714. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6715. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6716. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6717. .rlen = 32,
  6718. }, {
  6719. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6720. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6721. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6722. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6723. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6724. .klen = 40,
  6725. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6726. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  6727. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  6728. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  6729. .ilen = 32,
  6730. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6731. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6732. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6733. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6734. .rlen = 32,
  6735. },
  6736. };
  6737. /*
  6738. * XETA test vectors
  6739. */
  6740. #define XETA_ENC_TEST_VECTORS 4
  6741. #define XETA_DEC_TEST_VECTORS 4
  6742. static struct cipher_testvec xeta_enc_tv_template[] = {
  6743. {
  6744. .key = zeroed_string,
  6745. .klen = 16,
  6746. .input = zeroed_string,
  6747. .ilen = 8,
  6748. .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  6749. .rlen = 8,
  6750. }, {
  6751. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6752. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6753. .klen = 16,
  6754. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6755. .ilen = 8,
  6756. .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  6757. .rlen = 8,
  6758. }, {
  6759. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6760. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6761. .klen = 16,
  6762. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6763. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6764. .ilen = 16,
  6765. .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  6766. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  6767. .rlen = 16,
  6768. }, {
  6769. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6770. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6771. .klen = 16,
  6772. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6773. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6774. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6775. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6776. .ilen = 32,
  6777. .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  6778. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  6779. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  6780. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  6781. .rlen = 32,
  6782. }
  6783. };
  6784. static struct cipher_testvec xeta_dec_tv_template[] = {
  6785. {
  6786. .key = zeroed_string,
  6787. .klen = 16,
  6788. .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  6789. .ilen = 8,
  6790. .result = zeroed_string,
  6791. .rlen = 8,
  6792. }, {
  6793. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6794. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6795. .klen = 16,
  6796. .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  6797. .ilen = 8,
  6798. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6799. .rlen = 8,
  6800. }, {
  6801. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6802. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6803. .klen = 16,
  6804. .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  6805. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  6806. .ilen = 16,
  6807. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6808. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6809. .rlen = 16,
  6810. }, {
  6811. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6812. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6813. .klen = 16,
  6814. .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  6815. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  6816. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  6817. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  6818. .ilen = 32,
  6819. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6820. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6821. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6822. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6823. .rlen = 32,
  6824. }
  6825. };
  6826. /*
  6827. * FCrypt test vectors
  6828. */
  6829. #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
  6830. #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
  6831. static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
  6832. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  6833. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6834. .klen = 8,
  6835. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6836. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6837. .ilen = 8,
  6838. .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  6839. .rlen = 8,
  6840. }, {
  6841. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  6842. .klen = 8,
  6843. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6844. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  6845. .ilen = 8,
  6846. .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  6847. .rlen = 8,
  6848. }, { /* From Arla */
  6849. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6850. .klen = 8,
  6851. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6852. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  6853. .ilen = 48,
  6854. .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  6855. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  6856. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  6857. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  6858. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  6859. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  6860. .rlen = 48,
  6861. }, {
  6862. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6863. .klen = 8,
  6864. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6865. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  6866. .ilen = 48,
  6867. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  6868. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  6869. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  6870. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  6871. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  6872. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  6873. .rlen = 48,
  6874. }, { /* split-page version */
  6875. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6876. .klen = 8,
  6877. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6878. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  6879. .ilen = 48,
  6880. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  6881. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  6882. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  6883. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  6884. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  6885. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  6886. .rlen = 48,
  6887. .np = 2,
  6888. .tap = { 20, 28 },
  6889. }
  6890. };
  6891. static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
  6892. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  6893. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6894. .klen = 8,
  6895. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6896. .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  6897. .ilen = 8,
  6898. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6899. .rlen = 8,
  6900. }, {
  6901. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  6902. .klen = 8,
  6903. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6904. .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  6905. .ilen = 8,
  6906. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  6907. .rlen = 8,
  6908. }, { /* From Arla */
  6909. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6910. .klen = 8,
  6911. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6912. .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  6913. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  6914. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  6915. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  6916. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  6917. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  6918. .ilen = 48,
  6919. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  6920. .rlen = 48,
  6921. }, {
  6922. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6923. .klen = 8,
  6924. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6925. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  6926. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  6927. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  6928. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  6929. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  6930. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  6931. .ilen = 48,
  6932. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  6933. .rlen = 48,
  6934. }, { /* split-page version */
  6935. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6936. .klen = 8,
  6937. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  6938. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  6939. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  6940. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  6941. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  6942. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  6943. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  6944. .ilen = 48,
  6945. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  6946. .rlen = 48,
  6947. .np = 2,
  6948. .tap = { 20, 28 },
  6949. }
  6950. };
  6951. /*
  6952. * CAMELLIA test vectors.
  6953. */
  6954. #define CAMELLIA_ENC_TEST_VECTORS 3
  6955. #define CAMELLIA_DEC_TEST_VECTORS 3
  6956. #define CAMELLIA_CBC_ENC_TEST_VECTORS 2
  6957. #define CAMELLIA_CBC_DEC_TEST_VECTORS 2
  6958. static struct cipher_testvec camellia_enc_tv_template[] = {
  6959. {
  6960. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6961. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6962. .klen = 16,
  6963. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6964. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6965. .ilen = 16,
  6966. .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
  6967. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  6968. .rlen = 16,
  6969. }, {
  6970. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6971. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  6972. "\x00\x11\x22\x33\x44\x55\x66\x77",
  6973. .klen = 24,
  6974. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6975. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6976. .ilen = 16,
  6977. .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  6978. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  6979. .rlen = 16,
  6980. }, {
  6981. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6982. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  6983. "\x00\x11\x22\x33\x44\x55\x66\x77"
  6984. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  6985. .klen = 32,
  6986. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6987. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6988. .ilen = 16,
  6989. .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  6990. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  6991. .rlen = 16,
  6992. },
  6993. };
  6994. static struct cipher_testvec camellia_dec_tv_template[] = {
  6995. {
  6996. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  6997. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  6998. .klen = 16,
  6999. .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
  7000. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  7001. .ilen = 16,
  7002. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7003. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7004. .rlen = 16,
  7005. }, {
  7006. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7007. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  7008. "\x00\x11\x22\x33\x44\x55\x66\x77",
  7009. .klen = 24,
  7010. .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  7011. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  7012. .ilen = 16,
  7013. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7014. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7015. .rlen = 16,
  7016. }, {
  7017. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7018. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  7019. "\x00\x11\x22\x33\x44\x55\x66\x77"
  7020. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  7021. .klen = 32,
  7022. .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  7023. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  7024. .ilen = 16,
  7025. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7026. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7027. .rlen = 16,
  7028. },
  7029. };
  7030. static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
  7031. {
  7032. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  7033. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  7034. .klen = 16,
  7035. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  7036. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  7037. .input = "Single block msg",
  7038. .ilen = 16,
  7039. .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  7040. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  7041. .rlen = 16,
  7042. }, {
  7043. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  7044. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  7045. .klen = 16,
  7046. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  7047. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  7048. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7049. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7050. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7051. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7052. .ilen = 32,
  7053. .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  7054. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  7055. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  7056. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  7057. .rlen = 32,
  7058. },
  7059. };
  7060. static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
  7061. {
  7062. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  7063. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  7064. .klen = 16,
  7065. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  7066. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  7067. .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  7068. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  7069. .ilen = 16,
  7070. .result = "Single block msg",
  7071. .rlen = 16,
  7072. }, {
  7073. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  7074. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  7075. .klen = 16,
  7076. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  7077. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  7078. .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  7079. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  7080. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  7081. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  7082. .ilen = 32,
  7083. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7084. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7085. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7086. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7087. .rlen = 32,
  7088. },
  7089. };
  7090. /*
  7091. * SEED test vectors
  7092. */
  7093. #define SEED_ENC_TEST_VECTORS 4
  7094. #define SEED_DEC_TEST_VECTORS 4
  7095. static struct cipher_testvec seed_enc_tv_template[] = {
  7096. {
  7097. .key = zeroed_string,
  7098. .klen = 16,
  7099. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7100. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7101. .ilen = 16,
  7102. .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  7103. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  7104. .rlen = 16,
  7105. }, {
  7106. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7107. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7108. .klen = 16,
  7109. .input = zeroed_string,
  7110. .ilen = 16,
  7111. .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  7112. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  7113. .rlen = 16,
  7114. }, {
  7115. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  7116. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  7117. .klen = 16,
  7118. .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  7119. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  7120. .ilen = 16,
  7121. .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  7122. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  7123. .rlen = 16,
  7124. }, {
  7125. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  7126. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  7127. .klen = 16,
  7128. .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  7129. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  7130. .ilen = 16,
  7131. .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  7132. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  7133. .rlen = 16,
  7134. }
  7135. };
  7136. static struct cipher_testvec seed_dec_tv_template[] = {
  7137. {
  7138. .key = zeroed_string,
  7139. .klen = 16,
  7140. .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  7141. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  7142. .ilen = 16,
  7143. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7144. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7145. .rlen = 16,
  7146. }, {
  7147. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7148. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7149. .klen = 16,
  7150. .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  7151. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  7152. .ilen = 16,
  7153. .result = zeroed_string,
  7154. .rlen = 16,
  7155. }, {
  7156. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  7157. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  7158. .klen = 16,
  7159. .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  7160. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  7161. .ilen = 16,
  7162. .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  7163. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  7164. .rlen = 16,
  7165. }, {
  7166. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  7167. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  7168. .klen = 16,
  7169. .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  7170. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  7171. .ilen = 16,
  7172. .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  7173. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  7174. .rlen = 16,
  7175. }
  7176. };
  7177. #define SALSA20_STREAM_ENC_TEST_VECTORS 5
  7178. static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
  7179. /*
  7180. * Testvectors from verified.test-vectors submitted to ECRYPT.
  7181. * They are truncated to size 39, 64, 111, 129 to test a variety
  7182. * of input length.
  7183. */
  7184. { /* Set 3, vector 0 */
  7185. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7186. "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
  7187. .klen = 16,
  7188. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7189. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7190. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7191. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7192. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7193. "\x00\x00\x00\x00\x00\x00\x00",
  7194. .ilen = 39,
  7195. .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
  7196. "\x68\x02\x41\x0C\x68\x86\x88\x89"
  7197. "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
  7198. "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
  7199. "\x58\x3F\x52\x79\x70\xEB\xC1",
  7200. .rlen = 39,
  7201. }, { /* Set 5, vector 0 */
  7202. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7203. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7204. .klen = 16,
  7205. .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
  7206. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7207. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7208. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7209. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7210. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7211. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7212. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7213. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7214. .ilen = 64,
  7215. .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
  7216. "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
  7217. "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
  7218. "\x46\x26\xBF\x44\x3F\x21\x97\x76"
  7219. "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
  7220. "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
  7221. "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
  7222. "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
  7223. .rlen = 64,
  7224. }, { /* Set 3, vector 27 */
  7225. .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
  7226. "\x23\x24\x25\x26\x27\x28\x29\x2A"
  7227. "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
  7228. "\x33\x34\x35\x36\x37\x38\x39\x3A",
  7229. .klen = 32,
  7230. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7231. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7232. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7233. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7234. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7235. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7236. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7237. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7238. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7239. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7240. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7241. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7242. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7243. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7244. "\x00\x00\x00\x00\x00\x00\x00",
  7245. .ilen = 111,
  7246. .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
  7247. "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
  7248. "\x87\xD9\x47\xF8\x28\x91\x35\x98"
  7249. "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
  7250. "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
  7251. "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
  7252. "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
  7253. "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
  7254. "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
  7255. "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
  7256. "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
  7257. "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
  7258. "\x95\x46\x45\x54\xE9\x75\x03\x08"
  7259. "\x44\xAF\xE5\x8A\x81\x12\x09",
  7260. .rlen = 111,
  7261. }, { /* Set 5, vector 27 */
  7262. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7263. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7264. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7265. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7266. .klen = 32,
  7267. .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
  7268. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7269. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7270. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7271. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7272. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7273. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7274. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7275. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7276. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7277. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7278. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7279. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7280. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7281. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7282. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7283. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7284. "\x00",
  7285. .ilen = 129,
  7286. .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
  7287. "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
  7288. "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
  7289. "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
  7290. "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
  7291. "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
  7292. "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
  7293. "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
  7294. "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
  7295. "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
  7296. "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
  7297. "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
  7298. "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
  7299. "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
  7300. "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
  7301. "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
  7302. "\x5A",
  7303. .rlen = 129,
  7304. }, { /* large test vector generated using Crypto++ */
  7305. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7306. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7307. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7308. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7309. .klen = 32,
  7310. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7311. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7312. .input =
  7313. "\x00\x01\x02\x03\x04\x05\x06\x07"
  7314. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7315. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7316. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7317. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7318. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7319. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7320. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7321. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7322. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7323. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7324. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7325. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7326. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7327. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7328. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7329. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7330. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7331. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7332. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7333. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7334. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7335. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7336. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7337. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7338. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7339. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7340. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7341. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7342. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7343. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7344. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  7345. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  7346. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  7347. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  7348. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  7349. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  7350. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  7351. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  7352. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  7353. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  7354. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  7355. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  7356. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  7357. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  7358. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  7359. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  7360. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  7361. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  7362. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  7363. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  7364. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  7365. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  7366. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  7367. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  7368. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  7369. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  7370. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  7371. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  7372. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  7373. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  7374. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  7375. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  7376. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  7377. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  7378. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  7379. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  7380. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  7381. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  7382. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  7383. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  7384. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  7385. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  7386. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  7387. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  7388. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  7389. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  7390. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  7391. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  7392. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  7393. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  7394. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  7395. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  7396. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  7397. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  7398. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  7399. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  7400. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  7401. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  7402. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  7403. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  7404. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  7405. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  7406. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  7407. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  7408. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  7409. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  7410. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  7411. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  7412. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  7413. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  7414. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  7415. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  7416. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  7417. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  7418. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  7419. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  7420. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  7421. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  7422. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  7423. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  7424. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  7425. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  7426. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  7427. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  7428. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  7429. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  7430. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  7431. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  7432. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  7433. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  7434. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  7435. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  7436. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  7437. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  7438. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  7439. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  7440. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  7441. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  7442. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  7443. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  7444. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  7445. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  7446. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  7447. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  7448. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  7449. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  7450. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  7451. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  7452. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  7453. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  7454. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  7455. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  7456. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  7457. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  7458. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  7459. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  7460. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  7461. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  7462. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  7463. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  7464. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  7465. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  7466. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  7467. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  7468. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  7469. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  7470. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  7471. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  7472. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  7473. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  7474. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  7475. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  7476. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  7477. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  7478. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  7479. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  7480. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  7481. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  7482. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  7483. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  7484. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  7485. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  7486. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  7487. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  7488. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  7489. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  7490. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  7491. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  7492. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  7493. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  7494. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  7495. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  7496. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  7497. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  7498. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  7499. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  7500. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  7501. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  7502. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  7503. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  7504. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  7505. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  7506. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  7507. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  7508. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  7509. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  7510. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  7511. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  7512. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  7513. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  7514. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  7515. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  7516. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  7517. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  7518. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  7519. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  7520. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  7521. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  7522. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  7523. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  7524. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  7525. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  7526. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  7527. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  7528. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  7529. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  7530. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  7531. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  7532. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  7533. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  7534. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  7535. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  7536. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  7537. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  7538. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  7539. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  7540. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  7541. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  7542. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  7543. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  7544. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  7545. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  7546. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  7547. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  7548. "\x28\x37\x46\x55\x64\x73\x82\x91"
  7549. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  7550. "\x18\x27\x36\x45\x54\x63\x72\x81"
  7551. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  7552. "\x08\x17\x26\x35\x44\x53\x62\x71"
  7553. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  7554. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  7555. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  7556. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  7557. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  7558. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  7559. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  7560. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  7561. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  7562. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  7563. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  7564. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  7565. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  7566. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  7567. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  7568. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  7569. "\x00\x11\x22\x33\x44\x55\x66\x77"
  7570. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  7571. "\x10\x21\x32\x43\x54\x65\x76\x87"
  7572. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  7573. "\x20\x31\x42\x53\x64\x75\x86\x97"
  7574. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  7575. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  7576. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  7577. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  7578. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  7579. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  7580. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  7581. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  7582. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  7583. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  7584. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  7585. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  7586. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  7587. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  7588. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  7589. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  7590. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  7591. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  7592. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  7593. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  7594. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  7595. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  7596. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  7597. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  7598. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  7599. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  7600. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  7601. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  7602. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  7603. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  7604. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  7605. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  7606. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  7607. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  7608. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  7609. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  7610. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  7611. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  7612. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  7613. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  7614. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  7615. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  7616. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  7617. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  7618. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  7619. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  7620. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  7621. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  7622. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  7623. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  7624. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  7625. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  7626. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  7627. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  7628. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  7629. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  7630. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  7631. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  7632. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  7633. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  7634. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  7635. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  7636. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  7637. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  7638. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  7639. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  7640. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  7641. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  7642. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  7643. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  7644. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  7645. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  7646. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  7647. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  7648. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  7649. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  7650. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  7651. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  7652. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  7653. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  7654. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  7655. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  7656. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  7657. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  7658. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  7659. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  7660. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  7661. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  7662. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  7663. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  7664. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  7665. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  7666. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  7667. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  7668. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  7669. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  7670. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  7671. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  7672. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  7673. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  7674. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  7675. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  7676. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  7677. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  7678. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  7679. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  7680. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  7681. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  7682. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  7683. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  7684. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  7685. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  7686. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  7687. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  7688. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  7689. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  7690. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  7691. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  7692. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  7693. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  7694. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  7695. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  7696. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  7697. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  7698. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  7699. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  7700. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  7701. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  7702. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  7703. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  7704. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  7705. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  7706. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  7707. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  7708. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  7709. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  7710. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  7711. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  7712. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  7713. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  7714. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  7715. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  7716. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  7717. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  7718. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  7719. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  7720. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  7721. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  7722. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  7723. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  7724. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  7725. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  7726. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  7727. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  7728. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  7729. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  7730. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  7731. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  7732. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  7733. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  7734. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  7735. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  7736. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  7737. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  7738. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  7739. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  7740. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  7741. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  7742. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  7743. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  7744. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  7745. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  7746. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  7747. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  7748. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  7749. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  7750. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  7751. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  7752. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  7753. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  7754. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  7755. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  7756. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  7757. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  7758. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  7759. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  7760. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  7761. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  7762. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  7763. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  7764. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  7765. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  7766. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  7767. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  7768. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  7769. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  7770. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  7771. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  7772. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  7773. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  7774. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  7775. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  7776. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  7777. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  7778. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  7779. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  7780. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  7781. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  7782. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  7783. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  7784. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  7785. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  7786. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  7787. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  7788. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  7789. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  7790. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  7791. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  7792. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  7793. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  7794. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  7795. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  7796. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  7797. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  7798. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  7799. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  7800. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  7801. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  7802. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  7803. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  7804. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  7805. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  7806. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  7807. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  7808. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  7809. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  7810. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  7811. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  7812. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  7813. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  7814. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  7815. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  7816. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  7817. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  7818. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  7819. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  7820. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  7821. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  7822. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  7823. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  7824. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  7825. "\x00\x21\x42\x63",
  7826. .ilen = 4100,
  7827. .result =
  7828. "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
  7829. "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
  7830. "\x29\x01\xce\x98\x55\x53\xf9\x0c"
  7831. "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
  7832. "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
  7833. "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
  7834. "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
  7835. "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
  7836. "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
  7837. "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
  7838. "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
  7839. "\xbb\xde\x56\x86\xab\x65\x21\x30"
  7840. "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
  7841. "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
  7842. "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
  7843. "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
  7844. "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
  7845. "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
  7846. "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
  7847. "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
  7848. "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
  7849. "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
  7850. "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
  7851. "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
  7852. "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
  7853. "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
  7854. "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
  7855. "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
  7856. "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
  7857. "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
  7858. "\x45\xff\x3f\xce\x55\xf6\x95\x10"
  7859. "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
  7860. "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
  7861. "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
  7862. "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
  7863. "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
  7864. "\x62\x08\x18\x7a\x25\x49\x28\xac"
  7865. "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
  7866. "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
  7867. "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
  7868. "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
  7869. "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
  7870. "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
  7871. "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
  7872. "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
  7873. "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
  7874. "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
  7875. "\x33\xee\x14\x19\x22\x52\x89\xa7"
  7876. "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
  7877. "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
  7878. "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
  7879. "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
  7880. "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
  7881. "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
  7882. "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
  7883. "\x04\x07\x08\x52\xe6\xc0\xda\x93"
  7884. "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
  7885. "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
  7886. "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
  7887. "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
  7888. "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
  7889. "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
  7890. "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
  7891. "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
  7892. "\x5a\x90\xae\x75\x0a\x74\x18\x89"
  7893. "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
  7894. "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
  7895. "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
  7896. "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
  7897. "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
  7898. "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
  7899. "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
  7900. "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
  7901. "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
  7902. "\x49\x97\x33\xab\x36\x14\x0a\x70"
  7903. "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
  7904. "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
  7905. "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
  7906. "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
  7907. "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
  7908. "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
  7909. "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
  7910. "\x47\x13\x28\x73\x3c\xbb\x00\x90"
  7911. "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
  7912. "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
  7913. "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
  7914. "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
  7915. "\xad\x04\x07\xae\x22\x90\x4a\x93"
  7916. "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
  7917. "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
  7918. "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
  7919. "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
  7920. "\x53\xf9\x80\x10\xde\x80\xa2\x41"
  7921. "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
  7922. "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
  7923. "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
  7924. "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
  7925. "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
  7926. "\xde\xff\x07\x44\xdd\x56\x1b\xad"
  7927. "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
  7928. "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
  7929. "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
  7930. "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
  7931. "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
  7932. "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
  7933. "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
  7934. "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
  7935. "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
  7936. "\x23\xf8\x66\x18\x14\x28\x34\x0f"
  7937. "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
  7938. "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
  7939. "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
  7940. "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
  7941. "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
  7942. "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
  7943. "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
  7944. "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
  7945. "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
  7946. "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
  7947. "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
  7948. "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
  7949. "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
  7950. "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
  7951. "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
  7952. "\xca\x8e\x61\x87\xde\xad\x80\xd2"
  7953. "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
  7954. "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
  7955. "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
  7956. "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
  7957. "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
  7958. "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
  7959. "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
  7960. "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
  7961. "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
  7962. "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
  7963. "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
  7964. "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
  7965. "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
  7966. "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
  7967. "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
  7968. "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
  7969. "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
  7970. "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
  7971. "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
  7972. "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
  7973. "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
  7974. "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
  7975. "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
  7976. "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
  7977. "\x54\xda\x24\x6a\xc4\x41\x65\x46"
  7978. "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
  7979. "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
  7980. "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
  7981. "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
  7982. "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
  7983. "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
  7984. "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
  7985. "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
  7986. "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
  7987. "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
  7988. "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
  7989. "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
  7990. "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
  7991. "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
  7992. "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
  7993. "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
  7994. "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
  7995. "\xef\xcc\xa7\xec\xab\x43\x09\x18"
  7996. "\xd3\xab\x68\xd1\x07\x99\x44\x47"
  7997. "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
  7998. "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
  7999. "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
  8000. "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
  8001. "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
  8002. "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
  8003. "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
  8004. "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
  8005. "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
  8006. "\x71\x6e\x9f\x58\x15\x67\x72\x87"
  8007. "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
  8008. "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
  8009. "\xba\x41\x54\xac\xf0\xfc\x59\x12"
  8010. "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
  8011. "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
  8012. "\x2e\x53\x49\x97\x94\x33\xae\x40"
  8013. "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
  8014. "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
  8015. "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
  8016. "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
  8017. "\xce\x87\xad\xcc\x72\x05\x00\x29"
  8018. "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
  8019. "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
  8020. "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
  8021. "\xac\xc0\x79\x50\x69\xca\x59\x32"
  8022. "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
  8023. "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
  8024. "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
  8025. "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
  8026. "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
  8027. "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
  8028. "\x05\x68\x6b\xab\xe3\x41\x49\xed"
  8029. "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
  8030. "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
  8031. "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
  8032. "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
  8033. "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
  8034. "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
  8035. "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
  8036. "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
  8037. "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
  8038. "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
  8039. "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
  8040. "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
  8041. "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
  8042. "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
  8043. "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
  8044. "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
  8045. "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
  8046. "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
  8047. "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
  8048. "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
  8049. "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
  8050. "\x85\x75\xe6\x43\xf6\x87\x08\x68"
  8051. "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
  8052. "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
  8053. "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
  8054. "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
  8055. "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
  8056. "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
  8057. "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
  8058. "\xaf\x55\xeb\x22\xac\x93\x68\x32"
  8059. "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
  8060. "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
  8061. "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
  8062. "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
  8063. "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
  8064. "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
  8065. "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
  8066. "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
  8067. "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
  8068. "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
  8069. "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
  8070. "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
  8071. "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
  8072. "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
  8073. "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
  8074. "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
  8075. "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
  8076. "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
  8077. "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
  8078. "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
  8079. "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
  8080. "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
  8081. "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
  8082. "\x38\x55\xab\x33\x26\xef\x9f\x43"
  8083. "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
  8084. "\x58\x09\x09\x1b\xc3\x65\x46\x46"
  8085. "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
  8086. "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
  8087. "\x63\x86\xf2\x03\x67\x45\xd2\x72"
  8088. "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
  8089. "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
  8090. "\x2b\x82\x39\xbd\x69\x54\xed\x62"
  8091. "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
  8092. "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
  8093. "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
  8094. "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
  8095. "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
  8096. "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
  8097. "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
  8098. "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
  8099. "\x55\xad\xa4\xd1\x22\x54\x70\x94"
  8100. "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
  8101. "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
  8102. "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
  8103. "\x62\x36\x43\xb2\x82\x15\x75\x50"
  8104. "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
  8105. "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
  8106. "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
  8107. "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
  8108. "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
  8109. "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
  8110. "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
  8111. "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
  8112. "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
  8113. "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
  8114. "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
  8115. "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
  8116. "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
  8117. "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
  8118. "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
  8119. "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
  8120. "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
  8121. "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
  8122. "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
  8123. "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
  8124. "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
  8125. "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
  8126. "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
  8127. "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
  8128. "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
  8129. "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
  8130. "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
  8131. "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
  8132. "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
  8133. "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
  8134. "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
  8135. "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
  8136. "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
  8137. "\x42\x19\x23\x7d\xc8\x73\xee\x25"
  8138. "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
  8139. "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
  8140. "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
  8141. "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
  8142. "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
  8143. "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
  8144. "\xdb\x87\xee\xef\x55\x89\x2a\x59"
  8145. "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
  8146. "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
  8147. "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
  8148. "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
  8149. "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
  8150. "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
  8151. "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
  8152. "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
  8153. "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
  8154. "\xae\xab\x86\x09\x89\xc9\xc2\x40"
  8155. "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
  8156. "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
  8157. "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
  8158. "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
  8159. "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
  8160. "\x95\xd9\x34\x34\x86\xc6\x41\x94"
  8161. "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
  8162. "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
  8163. "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
  8164. "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
  8165. "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
  8166. "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
  8167. "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
  8168. "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
  8169. "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
  8170. "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
  8171. "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
  8172. "\xa7\x33\x34\x86\xca\xe4\x96\x23"
  8173. "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
  8174. "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
  8175. "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
  8176. "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
  8177. "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
  8178. "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
  8179. "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
  8180. "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
  8181. "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
  8182. "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
  8183. "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
  8184. "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
  8185. "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
  8186. "\x68\xc8\x7f\x51\x22\x42\xef\x49"
  8187. "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
  8188. "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
  8189. "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
  8190. "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
  8191. "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
  8192. "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
  8193. "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
  8194. "\x73\x2e\x71\x79\x16\x06\x63\x28"
  8195. "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
  8196. "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
  8197. "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
  8198. "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
  8199. "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
  8200. "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
  8201. "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
  8202. "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
  8203. "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
  8204. "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
  8205. "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
  8206. "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
  8207. "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
  8208. "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
  8209. "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
  8210. "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
  8211. "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
  8212. "\x19\x07\xaf\x90\x62\x5c\x68\x98"
  8213. "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
  8214. "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
  8215. "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
  8216. "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
  8217. "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
  8218. "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
  8219. "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
  8220. "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
  8221. "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
  8222. "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
  8223. "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
  8224. "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
  8225. "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
  8226. "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
  8227. "\x21\x33\x44\xfe\x7f\x35\x32\x93"
  8228. "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
  8229. "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
  8230. "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
  8231. "\x64\xf0\x48\xe5\x57\x99\xee\x75"
  8232. "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
  8233. "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
  8234. "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
  8235. "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
  8236. "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
  8237. "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
  8238. "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
  8239. "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
  8240. "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
  8241. "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
  8242. "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
  8243. "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
  8244. "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
  8245. "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
  8246. "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
  8247. "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
  8248. "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
  8249. "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
  8250. "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
  8251. "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
  8252. "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
  8253. "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
  8254. "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
  8255. "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
  8256. "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
  8257. "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
  8258. "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
  8259. "\x56\xf5\x4e\x01\x35\x27\x45\x77"
  8260. "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
  8261. "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
  8262. "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
  8263. "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
  8264. "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
  8265. "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
  8266. "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
  8267. "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
  8268. "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
  8269. "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
  8270. "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
  8271. "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
  8272. "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
  8273. "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
  8274. "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
  8275. "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
  8276. "\x87\x8f\x03\x21\x28\x95\x0c\x89"
  8277. "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
  8278. "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
  8279. "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
  8280. "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
  8281. "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
  8282. "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
  8283. "\x85\x73\x78\x45\x20\x7f\xae\x13"
  8284. "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
  8285. "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
  8286. "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
  8287. "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
  8288. "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
  8289. "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
  8290. "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
  8291. "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
  8292. "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
  8293. "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
  8294. "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
  8295. "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
  8296. "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
  8297. "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
  8298. "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
  8299. "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
  8300. "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
  8301. "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
  8302. "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
  8303. "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
  8304. "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
  8305. "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
  8306. "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
  8307. "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
  8308. "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
  8309. "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
  8310. "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
  8311. "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
  8312. "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
  8313. "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
  8314. "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
  8315. "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
  8316. "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
  8317. "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
  8318. "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
  8319. "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
  8320. "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
  8321. "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
  8322. "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
  8323. "\x6e\x12\x17\x72\x63\x57\xc7\xba"
  8324. "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
  8325. "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
  8326. "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
  8327. "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
  8328. "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
  8329. "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
  8330. "\x0c\x24\x43\x31\x40\x57\xf1\x72"
  8331. "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
  8332. "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
  8333. "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
  8334. "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
  8335. "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
  8336. "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
  8337. "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
  8338. "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
  8339. "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
  8340. "\xaf\xdf\x11\x95",
  8341. .rlen = 4100,
  8342. .np = 2,
  8343. .tap = { 4064, 36 },
  8344. },
  8345. };
  8346. /*
  8347. * CTS (Cipher Text Stealing) mode tests
  8348. */
  8349. #define CTS_MODE_ENC_TEST_VECTORS 6
  8350. #define CTS_MODE_DEC_TEST_VECTORS 6
  8351. static struct cipher_testvec cts_mode_enc_tv_template[] = {
  8352. { /* from rfc3962 */
  8353. .klen = 16,
  8354. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8355. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8356. .ilen = 17,
  8357. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8358. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8359. "\x20",
  8360. .rlen = 17,
  8361. .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  8362. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  8363. "\x97",
  8364. }, {
  8365. .klen = 16,
  8366. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8367. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8368. .ilen = 31,
  8369. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8370. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8371. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8372. "\x20\x47\x61\x75\x27\x73\x20",
  8373. .rlen = 31,
  8374. .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  8375. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  8376. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8377. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  8378. }, {
  8379. .klen = 16,
  8380. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8381. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8382. .ilen = 32,
  8383. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8384. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8385. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8386. "\x20\x47\x61\x75\x27\x73\x20\x43",
  8387. .rlen = 32,
  8388. .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8389. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8390. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8391. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  8392. }, {
  8393. .klen = 16,
  8394. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8395. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8396. .ilen = 47,
  8397. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8398. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8399. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8400. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8401. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8402. "\x70\x6c\x65\x61\x73\x65\x2c",
  8403. .rlen = 47,
  8404. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8405. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8406. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  8407. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  8408. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8409. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  8410. }, {
  8411. .klen = 16,
  8412. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8413. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8414. .ilen = 48,
  8415. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8416. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8417. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8418. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8419. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8420. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  8421. .rlen = 48,
  8422. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8423. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8424. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8425. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  8426. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8427. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  8428. }, {
  8429. .klen = 16,
  8430. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8431. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8432. .ilen = 64,
  8433. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8434. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8435. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8436. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8437. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8438. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  8439. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  8440. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  8441. .rlen = 64,
  8442. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8443. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8444. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8445. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8446. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  8447. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  8448. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8449. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  8450. }
  8451. };
  8452. static struct cipher_testvec cts_mode_dec_tv_template[] = {
  8453. { /* from rfc3962 */
  8454. .klen = 16,
  8455. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8456. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8457. .rlen = 17,
  8458. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8459. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8460. "\x20",
  8461. .ilen = 17,
  8462. .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  8463. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  8464. "\x97",
  8465. }, {
  8466. .klen = 16,
  8467. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8468. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8469. .rlen = 31,
  8470. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8471. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8472. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8473. "\x20\x47\x61\x75\x27\x73\x20",
  8474. .ilen = 31,
  8475. .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  8476. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  8477. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8478. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  8479. }, {
  8480. .klen = 16,
  8481. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8482. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8483. .rlen = 32,
  8484. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8485. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8486. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8487. "\x20\x47\x61\x75\x27\x73\x20\x43",
  8488. .ilen = 32,
  8489. .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8490. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8491. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8492. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  8493. }, {
  8494. .klen = 16,
  8495. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8496. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8497. .rlen = 47,
  8498. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8499. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8500. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8501. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8502. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8503. "\x70\x6c\x65\x61\x73\x65\x2c",
  8504. .ilen = 47,
  8505. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8506. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8507. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  8508. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  8509. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8510. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  8511. }, {
  8512. .klen = 16,
  8513. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8514. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8515. .rlen = 48,
  8516. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8517. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8518. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8519. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8520. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8521. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  8522. .ilen = 48,
  8523. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8524. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8525. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8526. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  8527. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8528. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  8529. }, {
  8530. .klen = 16,
  8531. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8532. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8533. .rlen = 64,
  8534. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8535. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8536. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8537. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8538. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8539. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  8540. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  8541. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  8542. .ilen = 64,
  8543. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8544. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8545. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8546. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8547. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  8548. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  8549. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8550. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  8551. }
  8552. };
  8553. /*
  8554. * Compression stuff.
  8555. */
  8556. #define COMP_BUF_SIZE 512
  8557. struct comp_testvec {
  8558. int inlen, outlen;
  8559. char input[COMP_BUF_SIZE];
  8560. char output[COMP_BUF_SIZE];
  8561. };
  8562. struct pcomp_testvec {
  8563. void *params;
  8564. unsigned int paramsize;
  8565. int inlen, outlen;
  8566. char input[COMP_BUF_SIZE];
  8567. char output[COMP_BUF_SIZE];
  8568. };
  8569. /*
  8570. * Deflate test vectors (null-terminated strings).
  8571. * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
  8572. */
  8573. #define DEFLATE_COMP_TEST_VECTORS 2
  8574. #define DEFLATE_DECOMP_TEST_VECTORS 2
  8575. static struct comp_testvec deflate_comp_tv_template[] = {
  8576. {
  8577. .inlen = 70,
  8578. .outlen = 38,
  8579. .input = "Join us now and share the software "
  8580. "Join us now and share the software ",
  8581. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8582. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8583. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8584. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8585. "\x71\xbc\x08\x2b\x01\x00",
  8586. }, {
  8587. .inlen = 191,
  8588. .outlen = 122,
  8589. .input = "This document describes a compression method based on the DEFLATE"
  8590. "compression algorithm. This document defines the application of "
  8591. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8592. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8593. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8594. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8595. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8596. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8597. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  8598. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  8599. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  8600. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  8601. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  8602. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  8603. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  8604. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  8605. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  8606. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  8607. "\xfa\x02",
  8608. },
  8609. };
  8610. static struct comp_testvec deflate_decomp_tv_template[] = {
  8611. {
  8612. .inlen = 122,
  8613. .outlen = 191,
  8614. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8615. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8616. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8617. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8618. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8619. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  8620. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  8621. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  8622. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  8623. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  8624. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  8625. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  8626. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  8627. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  8628. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  8629. "\xfa\x02",
  8630. .output = "This document describes a compression method based on the DEFLATE"
  8631. "compression algorithm. This document defines the application of "
  8632. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8633. }, {
  8634. .inlen = 38,
  8635. .outlen = 70,
  8636. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8637. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8638. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8639. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8640. "\x71\xbc\x08\x2b\x01\x00",
  8641. .output = "Join us now and share the software "
  8642. "Join us now and share the software ",
  8643. },
  8644. };
  8645. #define ZLIB_COMP_TEST_VECTORS 2
  8646. #define ZLIB_DECOMP_TEST_VECTORS 2
  8647. static const struct {
  8648. struct nlattr nla;
  8649. int val;
  8650. } deflate_comp_params[] = {
  8651. {
  8652. .nla = {
  8653. .nla_len = NLA_HDRLEN + sizeof(int),
  8654. .nla_type = ZLIB_COMP_LEVEL,
  8655. },
  8656. .val = Z_DEFAULT_COMPRESSION,
  8657. }, {
  8658. .nla = {
  8659. .nla_len = NLA_HDRLEN + sizeof(int),
  8660. .nla_type = ZLIB_COMP_METHOD,
  8661. },
  8662. .val = Z_DEFLATED,
  8663. }, {
  8664. .nla = {
  8665. .nla_len = NLA_HDRLEN + sizeof(int),
  8666. .nla_type = ZLIB_COMP_WINDOWBITS,
  8667. },
  8668. .val = -11,
  8669. }, {
  8670. .nla = {
  8671. .nla_len = NLA_HDRLEN + sizeof(int),
  8672. .nla_type = ZLIB_COMP_MEMLEVEL,
  8673. },
  8674. .val = MAX_MEM_LEVEL,
  8675. }, {
  8676. .nla = {
  8677. .nla_len = NLA_HDRLEN + sizeof(int),
  8678. .nla_type = ZLIB_COMP_STRATEGY,
  8679. },
  8680. .val = Z_DEFAULT_STRATEGY,
  8681. }
  8682. };
  8683. static const struct {
  8684. struct nlattr nla;
  8685. int val;
  8686. } deflate_decomp_params[] = {
  8687. {
  8688. .nla = {
  8689. .nla_len = NLA_HDRLEN + sizeof(int),
  8690. .nla_type = ZLIB_DECOMP_WINDOWBITS,
  8691. },
  8692. .val = -11,
  8693. }
  8694. };
  8695. static struct pcomp_testvec zlib_comp_tv_template[] = {
  8696. {
  8697. .params = &deflate_comp_params,
  8698. .paramsize = sizeof(deflate_comp_params),
  8699. .inlen = 70,
  8700. .outlen = 38,
  8701. .input = "Join us now and share the software "
  8702. "Join us now and share the software ",
  8703. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8704. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8705. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8706. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8707. "\x71\xbc\x08\x2b\x01\x00",
  8708. }, {
  8709. .params = &deflate_comp_params,
  8710. .paramsize = sizeof(deflate_comp_params),
  8711. .inlen = 191,
  8712. .outlen = 122,
  8713. .input = "This document describes a compression method based on the DEFLATE"
  8714. "compression algorithm. This document defines the application of "
  8715. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8716. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8717. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8718. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8719. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8720. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8721. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  8722. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  8723. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  8724. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  8725. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  8726. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  8727. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  8728. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  8729. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  8730. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  8731. "\xfa\x02",
  8732. },
  8733. };
  8734. static struct pcomp_testvec zlib_decomp_tv_template[] = {
  8735. {
  8736. .params = &deflate_decomp_params,
  8737. .paramsize = sizeof(deflate_decomp_params),
  8738. .inlen = 122,
  8739. .outlen = 191,
  8740. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8741. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8742. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8743. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8744. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8745. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  8746. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  8747. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  8748. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  8749. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  8750. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  8751. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  8752. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  8753. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  8754. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  8755. "\xfa\x02",
  8756. .output = "This document describes a compression method based on the DEFLATE"
  8757. "compression algorithm. This document defines the application of "
  8758. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8759. }, {
  8760. .params = &deflate_decomp_params,
  8761. .paramsize = sizeof(deflate_decomp_params),
  8762. .inlen = 38,
  8763. .outlen = 70,
  8764. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8765. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8766. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8767. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8768. "\x71\xbc\x08\x2b\x01\x00",
  8769. .output = "Join us now and share the software "
  8770. "Join us now and share the software ",
  8771. },
  8772. };
  8773. /*
  8774. * LZO test vectors (null-terminated strings).
  8775. */
  8776. #define LZO_COMP_TEST_VECTORS 2
  8777. #define LZO_DECOMP_TEST_VECTORS 2
  8778. static struct comp_testvec lzo_comp_tv_template[] = {
  8779. {
  8780. .inlen = 70,
  8781. .outlen = 46,
  8782. .input = "Join us now and share the software "
  8783. "Join us now and share the software ",
  8784. .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  8785. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  8786. "\x64\x20\x73\x68\x61\x72\x65\x20"
  8787. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  8788. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  8789. "\x3d\x88\x00\x11\x00\x00",
  8790. }, {
  8791. .inlen = 159,
  8792. .outlen = 133,
  8793. .input = "This document describes a compression method based on the LZO "
  8794. "compression algorithm. This document defines the application of "
  8795. "the LZO algorithm used in UBIFS.",
  8796. .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  8797. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  8798. "\x64\x65\x73\x63\x72\x69\x62\x65"
  8799. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  8800. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  8801. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  8802. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  8803. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  8804. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  8805. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  8806. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  8807. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  8808. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  8809. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  8810. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  8811. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  8812. "\x53\x2e\x11\x00\x00",
  8813. },
  8814. };
  8815. static struct comp_testvec lzo_decomp_tv_template[] = {
  8816. {
  8817. .inlen = 133,
  8818. .outlen = 159,
  8819. .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  8820. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  8821. "\x64\x65\x73\x63\x72\x69\x62\x65"
  8822. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  8823. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  8824. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  8825. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  8826. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  8827. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  8828. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  8829. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  8830. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  8831. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  8832. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  8833. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  8834. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  8835. "\x53\x2e\x11\x00\x00",
  8836. .output = "This document describes a compression method based on the LZO "
  8837. "compression algorithm. This document defines the application of "
  8838. "the LZO algorithm used in UBIFS.",
  8839. }, {
  8840. .inlen = 46,
  8841. .outlen = 70,
  8842. .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  8843. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  8844. "\x64\x20\x73\x68\x61\x72\x65\x20"
  8845. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  8846. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  8847. "\x3d\x88\x00\x11\x00\x00",
  8848. .output = "Join us now and share the software "
  8849. "Join us now and share the software ",
  8850. },
  8851. };
  8852. /*
  8853. * Michael MIC test vectors from IEEE 802.11i
  8854. */
  8855. #define MICHAEL_MIC_TEST_VECTORS 6
  8856. static struct hash_testvec michael_mic_tv_template[] = {
  8857. {
  8858. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  8859. .ksize = 8,
  8860. .plaintext = zeroed_string,
  8861. .psize = 0,
  8862. .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  8863. },
  8864. {
  8865. .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  8866. .ksize = 8,
  8867. .plaintext = "M",
  8868. .psize = 1,
  8869. .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  8870. },
  8871. {
  8872. .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  8873. .ksize = 8,
  8874. .plaintext = "Mi",
  8875. .psize = 2,
  8876. .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  8877. },
  8878. {
  8879. .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  8880. .ksize = 8,
  8881. .plaintext = "Mic",
  8882. .psize = 3,
  8883. .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  8884. },
  8885. {
  8886. .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  8887. .ksize = 8,
  8888. .plaintext = "Mich",
  8889. .psize = 4,
  8890. .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  8891. },
  8892. {
  8893. .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  8894. .ksize = 8,
  8895. .plaintext = "Michael",
  8896. .psize = 7,
  8897. .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
  8898. }
  8899. };
  8900. /*
  8901. * CRC32C test vectors
  8902. */
  8903. #define CRC32C_TEST_VECTORS 14
  8904. static struct hash_testvec crc32c_tv_template[] = {
  8905. {
  8906. .psize = 0,
  8907. .digest = "\x00\x00\x00\x00",
  8908. },
  8909. {
  8910. .key = "\x87\xa9\xcb\xed",
  8911. .ksize = 4,
  8912. .psize = 0,
  8913. .digest = "\x78\x56\x34\x12",
  8914. },
  8915. {
  8916. .key = "\xff\xff\xff\xff",
  8917. .ksize = 4,
  8918. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  8919. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  8920. "\x11\x12\x13\x14\x15\x16\x17\x18"
  8921. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  8922. "\x21\x22\x23\x24\x25\x26\x27\x28",
  8923. .psize = 40,
  8924. .digest = "\x7f\x15\x2c\x0e",
  8925. },
  8926. {
  8927. .key = "\xff\xff\xff\xff",
  8928. .ksize = 4,
  8929. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  8930. "\x31\x32\x33\x34\x35\x36\x37\x38"
  8931. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  8932. "\x41\x42\x43\x44\x45\x46\x47\x48"
  8933. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  8934. .psize = 40,
  8935. .digest = "\xf6\xeb\x80\xe9",
  8936. },
  8937. {
  8938. .key = "\xff\xff\xff\xff",
  8939. .ksize = 4,
  8940. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  8941. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  8942. "\x61\x62\x63\x64\x65\x66\x67\x68"
  8943. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  8944. "\x71\x72\x73\x74\x75\x76\x77\x78",
  8945. .psize = 40,
  8946. .digest = "\xed\xbd\x74\xde",
  8947. },
  8948. {
  8949. .key = "\xff\xff\xff\xff",
  8950. .ksize = 4,
  8951. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  8952. "\x81\x82\x83\x84\x85\x86\x87\x88"
  8953. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  8954. "\x91\x92\x93\x94\x95\x96\x97\x98"
  8955. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  8956. .psize = 40,
  8957. .digest = "\x62\xc8\x79\xd5",
  8958. },
  8959. {
  8960. .key = "\xff\xff\xff\xff",
  8961. .ksize = 4,
  8962. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  8963. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  8964. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  8965. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  8966. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  8967. .psize = 40,
  8968. .digest = "\xd0\x9a\x97\xba",
  8969. },
  8970. {
  8971. .key = "\xff\xff\xff\xff",
  8972. .ksize = 4,
  8973. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  8974. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  8975. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  8976. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  8977. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  8978. .psize = 40,
  8979. .digest = "\x13\xd9\x29\x2b",
  8980. },
  8981. {
  8982. .key = "\x80\xea\xd3\xf1",
  8983. .ksize = 4,
  8984. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  8985. "\x31\x32\x33\x34\x35\x36\x37\x38"
  8986. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  8987. "\x41\x42\x43\x44\x45\x46\x47\x48"
  8988. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  8989. .psize = 40,
  8990. .digest = "\x0c\xb5\xe2\xa2",
  8991. },
  8992. {
  8993. .key = "\xf3\x4a\x1d\x5d",
  8994. .ksize = 4,
  8995. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  8996. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  8997. "\x61\x62\x63\x64\x65\x66\x67\x68"
  8998. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  8999. "\x71\x72\x73\x74\x75\x76\x77\x78",
  9000. .psize = 40,
  9001. .digest = "\xd1\x7f\xfb\xa6",
  9002. },
  9003. {
  9004. .key = "\x2e\x80\x04\x59",
  9005. .ksize = 4,
  9006. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  9007. "\x81\x82\x83\x84\x85\x86\x87\x88"
  9008. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  9009. "\x91\x92\x93\x94\x95\x96\x97\x98"
  9010. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  9011. .psize = 40,
  9012. .digest = "\x59\x33\xe6\x7a",
  9013. },
  9014. {
  9015. .key = "\xa6\xcc\x19\x85",
  9016. .ksize = 4,
  9017. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  9018. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  9019. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  9020. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  9021. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  9022. .psize = 40,
  9023. .digest = "\xbe\x03\x01\xd2",
  9024. },
  9025. {
  9026. .key = "\x41\xfc\xfe\x2d",
  9027. .ksize = 4,
  9028. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  9029. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  9030. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  9031. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  9032. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  9033. .psize = 40,
  9034. .digest = "\x75\xd3\xc5\x24",
  9035. },
  9036. {
  9037. .key = "\xff\xff\xff\xff",
  9038. .ksize = 4,
  9039. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  9040. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  9041. "\x11\x12\x13\x14\x15\x16\x17\x18"
  9042. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  9043. "\x21\x22\x23\x24\x25\x26\x27\x28"
  9044. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  9045. "\x31\x32\x33\x34\x35\x36\x37\x38"
  9046. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  9047. "\x41\x42\x43\x44\x45\x46\x47\x48"
  9048. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  9049. "\x51\x52\x53\x54\x55\x56\x57\x58"
  9050. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  9051. "\x61\x62\x63\x64\x65\x66\x67\x68"
  9052. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  9053. "\x71\x72\x73\x74\x75\x76\x77\x78"
  9054. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  9055. "\x81\x82\x83\x84\x85\x86\x87\x88"
  9056. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  9057. "\x91\x92\x93\x94\x95\x96\x97\x98"
  9058. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  9059. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  9060. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  9061. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  9062. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  9063. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  9064. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  9065. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  9066. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  9067. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  9068. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  9069. .psize = 240,
  9070. .digest = "\x75\xd3\xc5\x24",
  9071. .np = 2,
  9072. .tap = { 31, 209 }
  9073. },
  9074. };
  9075. #endif /* _CRYPTO_TESTMGR_H */