mbedtls/tests/suites/test_suite_mpi.data
Paul Bakker 367dae44b2 - Added CMake makefiles as alternative to regular Makefiles.
- Added preliminary Code Coverage tests for AES, ARC4, Base64, MPI, SHA-family, MD-family and  HMAC-SHA-family.
2009-06-28 21:50:27 +00:00

342 lines
19 KiB
Plaintext

Base test mpi_read_write_string #1
mpi_read_write_string:10:"128":10:"128"
Base test mpi_read_write_string #2
mpi_read_write_string:10:"128":16:"80"
Base test mpi_read_write_string #3 (Read zero)
mpi_read_write_string:10:"0":10:"0"
Base test mpi_read_write_string #3 (Negative decimal)
mpi_read_write_string:10:"-23":10:"-23"
Base test mpi_read_write_string #3 (Negative hex)
mpi_read_write_string:16:"-20":10:"-32"
Base test mpi_read_write_string #3 (Negative decimal)
mpi_read_write_string:16:"-23":16:"-23"
Base test mpi_cmp_int #1
mpi_cmp_int:693:693:0
Base test mpi_cmp_int #2
mpi_cmp_int:693:692:1
Base test mpi_cmp_int #3
mpi_cmp_int:693:694:-1
Base test mpi_cmp_int (Negative values) #1
mpi_cmp_int:-2:-2:0
Base test mpi_cmp_int (Negative values) #2
mpi_cmp_int:-2:-3:1
Base test mpi_cmp_int (Negative values) #3
mpi_cmp_int:-2:-1:-1
Base test mpi_cmp_mpi #1
mpi_cmp_mpi:10:"693":10:"693":0
Base test mpi_cmp_mpi #2
mpi_cmp_mpi:10:"693":10:"692":1
Base test mpi_cmp_mpi #3
mpi_cmp_mpi:10:"693":10:"694":-1
Base test mpi_cmp_mpi (Negative values) #1
mpi_cmp_mpi:10:"-2":10:"-2":0
Base test mpi_cmp_mpi (Negative values) #2
mpi_cmp_mpi:10:"-2":10:"-3":1
Base test mpi_cmp_mpi (Negative values) #3
mpi_cmp_mpi:10:"-2":10:"-1":-1
Base test mpi_cmp_abs #1
mpi_cmp_abs:10:"693":10:"693":0
Base test mpi_cmp_abs #2
mpi_cmp_abs:10:"693":10:"692":1
Base test mpi_cmp_abs #3
mpi_cmp_abs:10:"693":10:"694":-1
Base test mpi_cmp_abs (Negative values) #1
mpi_cmp_abs:10:"-2":10:"-2":0
Base test mpi_cmp_abs (Negative values) #2
mpi_cmp_abs:10:"-2":10:"-3":-1
Base test mpi_cmp_abs (Negative values) #3
mpi_cmp_abs:10:"-2":10:"-1":1
Base test mpi_cmp_abs (Mix values) #1
mpi_cmp_abs:10:"-2":10:"2":0
Base test mpi_cmp_abs (Mix values) #2
mpi_cmp_abs:10:"2":10:"-3":-1
Base test mpi_cmp_abs (Mix values) #3
mpi_cmp_abs:10:"-2":10:"1":1
Base test mpi_copy #1
mpi_copy:0:1500
Base test mpi_swap #1
mpi_swap:0:1500
Base test mpi_add_abs #1
mpi_add_abs:10:"12345678":10:"642531":10:"12988209"
Base test mpi_add_abs #2
mpi_add_abs:10:"-12345678":10:"642531":10:"12988209"
Base test mpi_add_abs #3
mpi_add_abs:10:"12345678":10:"-642531":10:"12988209"
Base test mpi_add_abs #4
mpi_add_abs:10:"-12345678":10:"-642531":10:"12988209"
Test mpi_add_abs #1
mpi_add_abs:10:"-643808006803554439230129854961492699151386107534013432918073439524138264842370630061369715394739134090922937332590384720397133335969549256322620979036686633213903952966175107096769180017646161851573147596390153":10:"56125680981752282333498088313568935051383833838594899821664631784577337171193624243181360054669678410455329112434552942717084003541384594864129940145043086760031292483340068923506115878221189886491132772739661669044958531131327771":10:"56125680981752282334141896320372489490613963693556392520816017892111350604111697682705498319512049040516698827829292076808006940873974979584527073481012636016353913462376755556720019831187364993587901952757307830896531678727717924"
Base test mpi_add_mpi #1
mpi_add_mpi:10:"12345678":10:"642531":10:"12988209"
Base test mpi_add_mpi #2
mpi_add_mpi:10:"-12345678":10:"642531":10:"-11703147"
Base test mpi_add_mpi #3
mpi_add_mpi:10:"12345678":10:"-642531":10:"11703147"
Base test mpi_add_mpi #4
mpi_add_mpi:10:"-12345678":10:"-642531":10:"-12988209"
Test mpi_add_mpi #1
mpi_add_mpi:10:"203956878356401977405765866929034577280193993314348263094772646453283062722701277632936616063144088173312372882677123879538709400158306567338328279154499698366071906766440037074217117805690872792848149112022286332144876183376326512083574821647933992961249917319836219304274280243803104015000563790123":10:"531872289054204184185084734375133399408303613982130856645299464930952178606045848877129147820387996428175564228204785846141207532462936339834139412401975338705794646595487324365194792822189473092273993580587964571659678084484152603881094176995594813302284232006001752128168901293560051833646881436219":10:"735829167410606161590850601304167976688497607296479119740072111384235241328747126510065763883532084601487937110881909725679916932621242907172467691556475037071866553361927361439411910627880345885122142692610250903804554267860479115964668998643528806263534149325837971432443181537363155848647445226342"
Test mpi_add_mpi #2
mpi_add_mpi:10:"643808006803554439230129854961492699151386107534013432918073439524138264842370630061369715394739134090922937332590384720397133335969549256322620979036686633213903952966175107096769180017646161851573147596390153":10:"56125680981752282333498088313568935051383833838594899821664631784577337171193624243181360054669678410455329112434552942717084003541384594864129940145043086760031292483340068923506115878221189886491132772739661669044958531131327771":10:"56125680981752282334141896320372489490613963693556392520816017892111350604111697682705498319512049040516698827829292076808006940873974979584527073481012636016353913462376755556720019831187364993587901952757307830896531678727717924"
Test mpi_add_int #1
mpi_add_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":9871232:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227022647561"
Test mpi_add_int #2
mpi_add_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":-9871232:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227002905097"
Base test mpi_sub_abs #1 (Test with larger second input)
mpi_sub_abs:10:"5":10:"7":10:"0":POLARSSL_ERR_MPI_NEGATIVE_VALUE
Base test mpi_sub_abs #2 (Test with larger second input)
mpi_sub_abs:10:"-5":10:"-7":10:"0":POLARSSL_ERR_MPI_NEGATIVE_VALUE
Base test mpi_sub_abs #3 (Test with larger second input)
mpi_sub_abs:10:"-5":10:"7":10:"0":POLARSSL_ERR_MPI_NEGATIVE_VALUE
Base test mpi_sub_abs #4 (Test with larger second input)
mpi_sub_abs:10:"5":10:"-7":10:"0":POLARSSL_ERR_MPI_NEGATIVE_VALUE
Base test mpi_sub_abs #1
mpi_sub_abs:10:"7":10:"5":10:"2":0
Base test mpi_sub_abs #2
mpi_sub_abs:10:"-7":10:"-5":10:"2":0
Base test mpi_sub_abs #3
mpi_sub_abs:10:"-7":10:"5":10:"2":0
Base test mpi_sub_abs #4
mpi_sub_abs:10:"7":10:"-5":10:"2":0
Base test mpi_sub_mpi #1 (Test with negative result)
mpi_sub_mpi:10:"5":10:"7":10:"-2"
Base test mpi_sub_mpi #2 (Test with negative inputs)
mpi_sub_mpi:10:"-5":10:"-7":10:"2"
Base test mpi_sub_mpi #3 (Test with negative base)
mpi_sub_mpi:10:"-5":10:"7":10:"-12"
Base test mpi_sub_mpi #4 (Test with negative substraction)
mpi_sub_mpi:10:"5":10:"-7":10:"12"
Test mpi_sub_mpi #1
mpi_sub_mpi:10:"531872289054204184185084734375133399408303613982130856645299464930952178606045848877129147820387996428175564228204785846141207532462936339834139412401975338705794646595487324365194792822189473092273993580587964571659678084484152603881094176995594813302284232006001752128168901293560051833646881436219":10:"203956878356401977405765866929034577280193993314348263094772646453283062722701277632936616063144088173312372882677123879538709400158306567338328279154499698366071906766440037074217117805690872792848149112022286332144876183376326512083574821647933992961249917319836219304274280243803104015000563790123":10:"327915410697802206779318867446098822128109620667782593550526818477669115883344571244192531757243908254863191345527661966602498132304629772495811133247475640339722739829047287290977675016498600299425844468565678239514801901107826091797519355347660820341034314686165532823894621049756947818646317646096"
Test mpi_sub_mpi #2 (Test for negative result)
mpi_sub_mpi:10:"643808006803554439230129854961492699151386107534013432918073439524138264842370630061369715394739134090922937332590384720397133335969549256322620979036686633213903952966175107096769180017646161851573147596390153":10:"56125680981752282333498088313568935051383833838594899821664631784577337171193624243181360054669678410455329112434552942717084003541384594864129940145043086760031292483340068923506115878221189886491132772739661669044958531131327771":10:"-56125680981752282332854280306765380612153703983633407122513245677043323738275550803657221789827307780393959397039813808626161066208794210143732806809073537503708671504303382290292211925255014779394363592722015507193385383534937618"
Test mpi_sub_int #1
mpi_sub_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":-9871232:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227022647561"
Test mpi_sub_int #2
mpi_sub_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":9871232:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227002905097"
Test mpi_shift_l #1
mpi_shift_l:10:"64":1:10:"128"
Test mpi_shift_l #2
mpi_shift_l:10:"658385546911733550164516088405238961461880256029834598831972039469421755117818013653494814438931957316403111689187691446941406788869098983929874080332195117465344344350008880118042764943201875870917468833709791733282363323948005998269792207":37:10:"90487820548639020691922304619723076305400961610119884872723190678642804168382367856686134531865643066983017249846286450251272364365605022750900439437595355052945035915579216557330505438734955340526145476988250171181404966718289259743378883640981192704"
Test mpi_shift_r #1
mpi_shift_r:10:"128":1:10:"64"
Test mpi_shift_r #2
mpi_shift_r:10:"120815570979701484704906977000760567182871429114712069861589084706550626575967516787438008593490722779337547394120718248995900363209947025063336882559539208430319216688889117222633155838468458047056355241515415159736436403445579777425189969":45:10:"3433785053053426415343295076376096153094051405637175942660777670498379921354157795219578264137985649407981651226029903483433269093721578004287291678324982297860947730012217028349628999378309630601971640587504883789518896817457"
Base test mpi_mul_mpi #1
mpi_mul_mpi:10:"5":10:"7":10:"35"
Base test mpi_mul_mpi #2
mpi_mul_mpi:10:"-5":10:"7":10:"-35"
Base test mpi_mul_mpi #3
mpi_mul_mpi:10:"5":10:"-7":10:"-35"
Base test mpi_mul_mpi #4
mpi_mul_mpi:10:"-5":10:"-7":10:"35"
Test mpi_mul_mpi #1
mpi_mul_mpi:10:"28911710017320205966167820725313234361535259163045867986277478145081076845846493521348693253530011243988160148063424837895971948244167867236923919506962312185829914482993478947657472351461336729641485069323635424692930278888923450060546465883490944265147851036817433970984747733020522259537":10:"16471581891701794764704009719057349996270239948993452268812975037240586099924712715366967486587417803753916334331355573776945238871512026832810626226164346328807407669366029926221415383560814338828449642265377822759768011406757061063524768140567867350208554439342320410551341675119078050953":10:"476221599179424887669515829231223263939342135681791605842540429321038144633323941248706405375723482912535192363845116154236465184147599697841273424891410002781967962186252583311115708128167171262206919514587899883547279647025952837516324649656913580411611297312678955801899536937577476819667861053063432906071315727948826276092545739432005962781562403795455162483159362585281248265005441715080197800335757871588045959754547836825977169125866324128449699877076762316768127816074587766799018626179199776188490087103869164122906791440101822594139648973454716256383294690817576188761"
Test mpi_mul_int #1
mpi_mul_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":9871232:10:"20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":==
Test mpi_mul_int #2 (Unsigned, thus failure)
mpi_mul_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":-9871232:10:"-20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":!=
Test mpi_mul_int #3
mpi_mul_int:10:"-2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":9871232:10:"-20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":==
Test mpi_mul_int #4 (Unsigned, thus failure)
mpi_mul_int:10:"-2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":-9871232:10:"20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":!=
Base test mpi_div_mpi #1
mpi_div_mpi:10:"1000":10:"13":10:"76":10:"12":0
Base test mpi_div_mpi #2 (Divide by zero)
mpi_div_mpi:10:"1000":10:"0":10:"1":10:"1":POLARSSL_ERR_MPI_DIVISION_BY_ZERO
Base test mpi_div_mpi #3
mpi_div_mpi:10:"1000":10:"-13":10:"-76":10:"12":0
Test mpi_div_mpi #1
mpi_div_mpi:10:"20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":10:"34":10:"592148724779947824773845002981655249516095268533053127589864347174804198178334111238460803":10:"26":0
Test mpi_div_mpi #2
mpi_div_mpi:10:"476221599179424887669515829231223263939342135681791605842540429321038144633323941248706405375723482912535192363845116154236465184147599697841273424891410002781967962186252583311115708128167171262206919514587899883547279647025952837516324649656913580411611297312678955801899536937577476819667861053063432906071315727948826276092545739432005962781562403795455162483159362585281248265005441715080197800335757871588045959754547836825977169125866324128449699877076762316768127816074587766799018626179199776188490087103869164122906791440101822594139648973454716256383294690817576188762":10:"28911710017320205966167820725313234361535259163045867986277478145081076845846493521348693253530011243988160148063424837895971948244167867236923919506962312185829914482993478947657472351461336729641485069323635424692930278888923450060546465883490944265147851036817433970984747733020522259537":10:"16471581891701794764704009719057349996270239948993452268812975037240586099924712715366967486587417803753916334331355573776945238871512026832810626226164346328807407669366029926221415383560814338828449642265377822759768011406757061063524768140567867350208554439342320410551341675119078050953":10:"1":0
Base test mpi_div_int #1
mpi_div_int:10:"1000":13:10:"76":10:"12":0
Base test mpi_div_mpi #2 (Divide by zero)
mpi_div_int:10:"1000":0:10:"1":10:"1":POLARSSL_ERR_MPI_DIVISION_BY_ZERO
Base test mpi_div_int #3
mpi_div_int:10:"1000":-13:10:"-76":10:"12":0
Test mpi_div_int #1
mpi_div_int:10:"20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":34:10:"592148724779947824773845002981655249516095268533053127589864347174804198178334111238460803":10:"26":0
Test mpi_div_int #2
mpi_div_int:10:"20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":-34:10:"-592148724779947824773845002981655249516095268533053127589864347174804198178334111238460803":10:"26":0
Base test mpi_mod_mpi #1
mpi_mod_mpi:10:"1000":10:"13":10:"12":0
Base test mpi_mod_mpi #2 (Divide by zero)
mpi_mod_mpi:10:"1000":10:"0":10:"0":POLARSSL_ERR_MPI_DIVISION_BY_ZERO
Base test mpi_mod_mpi #3
mpi_mod_mpi:10:"-1000":10:"13":10:"1":0
Base test mpi_mod_mpi #4 (Negative modulo)
mpi_mod_mpi:10:"1000":10:"-13":10:"-1":POLARSSL_ERR_MPI_NEGATIVE_VALUE
Base test mpi_mod_mpi #5 (Negative modulo)
mpi_mod_mpi:10:"-1000":10:"-13":10:"-12":POLARSSL_ERR_MPI_NEGATIVE_VALUE
Base test mpi_mod_int #1
mpi_mod_int:10:"1000":13:12:0
Base test mpi_mod_int #2 (Divide by zero)
mpi_mod_int:10:"1000":0:0:POLARSSL_ERR_MPI_DIVISION_BY_ZERO
Base test mpi_mod_int #3
mpi_mod_int:10:"-1000":13:1:0
Base test mpi_mod_int #4 (Negative modulo)
mpi_mod_int:10:"1000":-13:0:POLARSSL_ERR_MPI_NEGATIVE_VALUE
Base test mpi_mod_int #5 (Negative modulo)
mpi_mod_int:10:"-1000":-13:0:POLARSSL_ERR_MPI_NEGATIVE_VALUE
Base test mpi_exp_mod #1
mpi_exp_mod:10:"23":10:"13":10:"29":10:"":10:"24":0
Base test mpi_exp_mod #2
mpi_exp_mod:10:"23":10:"13":10:"30":10:"":10:"0":POLARSSL_ERR_MPI_BAD_INPUT_DATA
Base test mpi_exp_mod #3
mpi_exp_mod:10:"23":10:"13":10:"-29":10:"":10:"24":POLARSSL_ERR_MPI_BAD_INPUT_DATA
Test mpi_exp_mod #1
mpi_exp_mod:10:"433019240910377478217373572959560109819648647016096560523769010881172869083338285573756574557395862965095016483867813043663981946477698466501451832407592327356331263124555137732393938242285782144928753919588632679050799198937132922145084847":10:"5781538327977828897150909166778407659250458379645823062042492461576758526757490910073628008613977550546382774775570888130029763571528699574717583228939535960234464230882573615930384979100379102915657483866755371559811718767760594919456971354184113721":10:"583137007797276923956891216216022144052044091311388601652961409557516421612874571554415606746479105795833145583959622117418531166391184939066520869800857530421873250114773204354963864729386957427276448683092491947566992077136553066273207777134303397724679138833126700957":10:"":10:"114597449276684355144920670007147953232659436380163461553186940113929777196018164149703566472936578890991049344459204199888254907113495794730452699842273939581048142004834330369483813876618772578869083248061616444392091693787039636316845512292127097865026290173004860736":0
Base test GCD #1
mpi_gcd:10:"693":10:"609":10:"21"
Base test GCD #2
mpi_gcd:10:"1764":10:"868":10:"28"
Base test GCD #3
mpi_gcd:10:"768454923":10:"542167814":10:"1"
Test GCD #1
mpi_gcd:10:"433019240910377478217373572959560109819648647016096560523769010881172869083338285573756574557395862965095016483867813043663981946477698466501451832407592327356331263124555137732393938242285782144928753919588632679050799198937132922145084847":10:"5781538327977828897150909166778407659250458379645823062042492461576758526757490910073628008613977550546382774775570888130029763571528699574717583228939535960234464230882573615930384979100379102915657483866755371559811718767760594919456971354184113721":10:"1"
Base test mpi_inv_mod #1
mpi_inv_mod:10:"3":10:"11":10:"4":0
Base test mpi_inv_mod #2
mpi_inv_mod:10:"3":10:"0":10:"0":POLARSSL_ERR_MPI_BAD_INPUT_DATA
Base test mpi_inv_mod #3
mpi_inv_mod:10:"3":10:"-11":10:"4":POLARSSL_ERR_MPI_BAD_INPUT_DATA
Base test mpi_inv_mod #4
mpi_inv_mod:10:"2":10:"4":10:"0":POLARSSL_ERR_MPI_NOT_ACCEPTABLE
Test mpi_inv_mod #1
mpi_inv_mod:16:"aa4df5cb14b4c31237f98bd1faf527c283c2d0f3eec89718664ba33f9762907c":16:"fffbbd660b94412ae61ead9c2906a344116e316a256fd387874c6c675b1d587d":16:"8d6a5c1d7adeae3e94b9bcd2c47e0d46e778bc8804a2cc25c02d775dc3d05b0c":0
Base test mpi_is_prime #1
mpi_is_prime:10:"0":POLARSSL_ERR_MPI_NOT_ACCEPTABLE
Base test mpi_is_prime #2
mpi_is_prime:10:"1":POLARSSL_ERR_MPI_NOT_ACCEPTABLE
Base test mpi_is_prime #3
mpi_is_prime:10:"2":0
Base test mpi_is_prime #4
mpi_is_prime:10:"3":0
Base test mpi_is_prime #5
mpi_is_prime:10:"4":POLARSSL_ERR_MPI_NOT_ACCEPTABLE
Base test mpi_is_prime #6
mpi_is_prime:10:"5":0
Base test mpi_is_prime #7
mpi_is_prime:10:"27":POLARSSL_ERR_MPI_NOT_ACCEPTABLE
Base test mpi_is_prime #8
mpi_is_prime:10:"47":0
Test mpi_is_prime #1
mpi_is_prime:10:"827131507221654563937832686696200995595835694437983658840870036586124168186967796809117749047430768825822857042432722828096779098498192459819306321073968735177531164565305635281198148032612029767584644305912099":0
Test mpi_is_prime #2
mpi_is_prime:10:"827131507221654563937832686696200995595835694437983658840870036586124168186967796809117749047430768825822857042432722828096779098498192459819306321073968735177531164565305635281198148032612029767584644305912001":POLARSSL_ERR_MPI_NOT_ACCEPTABLE