mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 13:23:25 -07:00
Emv4 - more additions to hf emv exec
* added rsa polarssl and changed sha1 location to polarssl dir * deleted old sha1 * added emv-tools pk files * added polarrssl wrapper sketch to emv_tols * added test command * added crypto polarssl with sda test * added crypto tests and crypto_polarssl sha logic * added SDA,DDA,fDDA,CDA
This commit is contained in:
parent
69f98ec91e
commit
d03fb293bc
40 changed files with 9983 additions and 191 deletions
65
client/emv/test/cryptotest.c
Normal file
65
client/emv/test/cryptotest.c
Normal file
|
@ -0,0 +1,65 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2017 Merlok
|
||||
//
|
||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||
// the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// Crypto algorithms testing
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "cryptotest.h"
|
||||
#include "util.h"
|
||||
#include "ui.h"
|
||||
|
||||
#include "bignum.h"
|
||||
#include "aes.h"
|
||||
#include "des.h"
|
||||
#include "rsa.h"
|
||||
#include "sha1.h"
|
||||
|
||||
#include "crypto_test.h"
|
||||
#include "sda_test.h"
|
||||
#include "dda_test.h"
|
||||
#include "cda_test.h"
|
||||
|
||||
int ExecuteCryptoTests(bool verbose) {
|
||||
int res;
|
||||
bool TestFail = false;
|
||||
|
||||
res = mpi_self_test(verbose);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = aes_self_test(verbose);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = des_self_test(verbose);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = sha1_self_test(verbose);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = rsa_self_test(verbose);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = exec_sda_test(verbose);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = exec_dda_test(verbose);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = exec_cda_test(verbose);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = exec_crypto_test(verbose);
|
||||
if (res) TestFail = true;
|
||||
|
||||
PrintAndLog("\n--------------------------");
|
||||
if (TestFail)
|
||||
PrintAndLog("Test(s) [ERROR].");
|
||||
else
|
||||
PrintAndLog("Tests [OK].");
|
||||
|
||||
return TestFail;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue