]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - client/emv/test/cryptotest.c
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2017 Merlok
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
7 //-----------------------------------------------------------------------------
8 // Crypto algorithms testing
9 //-----------------------------------------------------------------------------
11 #include "cryptotest.h"
21 #include "crypto_test.h"
26 int ExecuteCryptoTests(bool verbose
) {
28 bool TestFail
= false;
30 res
= mpi_self_test(verbose
);
31 if (res
) TestFail
= true;
33 res
= aes_self_test(verbose
);
34 if (res
) TestFail
= true;
36 res
= des_self_test(verbose
);
37 if (res
) TestFail
= true;
39 res
= sha1_self_test(verbose
);
40 if (res
) TestFail
= true;
42 res
= rsa_self_test(verbose
);
43 if (res
) TestFail
= true;
45 res
= exec_sda_test(verbose
);
46 if (res
) TestFail
= true;
48 res
= exec_dda_test(verbose
);
49 if (res
) TestFail
= true;
51 res
= exec_cda_test(verbose
);
52 if (res
) TestFail
= true;
54 res
= exec_crypto_test(verbose
);
55 if (res
) TestFail
= true;
57 PrintAndLog("\n--------------------------");
59 PrintAndLog("Test(s) [ERROR].");
61 PrintAndLog("Tests [OK].");