aboutsummaryrefslogtreecommitdiffstats
path: root/test/crypto/ref
diff options
context:
space:
mode:
authorareviu <areviu.info@gmail.com>2018-05-19 13:15:06 +0000
committerareviu <areviu.info@gmail.com>2018-05-19 13:15:06 +0000
commit7454fa6ad5597582688495252c801c8daeeaf07e (patch)
tree48d89549877a21be7d22fe922d45ff70a2c65df4 /test/crypto/ref
parente9399566d7eaa76ca6114d108d1b7bf34fca157b (diff)
downloadChibiOS-7454fa6ad5597582688495252c801c8daeeaf07e.tar.gz
ChibiOS-7454fa6ad5597582688495252c801c8daeeaf07e.tar.bz2
ChibiOS-7454fa6ad5597582688495252c801c8daeeaf07e.zip
added SAMA HMAC + fixed TRNG 128 bit generation
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12042 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'test/crypto/ref')
-rw-r--r--test/crypto/ref/gen_cfiles.bat3
-rw-r--r--test/crypto/ref/gen_testref.bat6
-rw-r--r--test/crypto/ref/hmac_ref.bat13
3 files changed, 21 insertions, 1 deletions
diff --git a/test/crypto/ref/gen_cfiles.bat b/test/crypto/ref/gen_cfiles.bat
index 9d09a3f82..2269f91f3 100644
--- a/test/crypto/ref/gen_cfiles.bat
+++ b/test/crypto/ref/gen_cfiles.bat
@@ -3,3 +3,6 @@
%PYTHON%\python genfile.py -f des_ecb_8,tdes_ecb_16,tdes_ecb_24,tdes_cbc_16,tdes_cbc_24 -o ref_des -p ../source/testref
%PYTHON%\python genfile.py -f sha_sha1_empty,sha_sha1_3,sha_sha1_56,sha_sha1_64,sha_sha1_128,sha_sha256_3,sha_sha256_56,sha_sha256_64,sha_sha256_128,sha_sha512_3,sha_sha512_56,sha_sha512_64,sha_sha512_128 -o ref_sha -p ../source/testref
+
+
+%PYTHON%\python genfile.py -f hmac_hmac256_1,hmac_hmac256_2,hmac_hmac512_1,hmac_hmac512_2 -o ref_hmac -p ../source/testref \ No newline at end of file
diff --git a/test/crypto/ref/gen_testref.bat b/test/crypto/ref/gen_testref.bat
index 17abaaae9..ac8e90dbc 100644
--- a/test/crypto/ref/gen_testref.bat
+++ b/test/crypto/ref/gen_testref.bat
@@ -14,8 +14,12 @@ echo|set /p="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" >
echo|set /p="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" > plaintext_5
+echo|set /p="Hi There" > plaintext_6
+
+echo|set /p="what do ya want for nothing?" > plaintext_7
+
call aes_ref.bat
call des_ref.bat
call sha_ref.bat
-
+call hmac_ref.bat
call gen_cfiles.bat \ No newline at end of file
diff --git a/test/crypto/ref/hmac_ref.bat b/test/crypto/ref/hmac_ref.bat
new file mode 100644
index 000000000..78eb88b00
--- /dev/null
+++ b/test/crypto/ref/hmac_ref.bat
@@ -0,0 +1,13 @@
+
+
+call %OPENSSL%\openssl dgst -sha256 -hmac " " -c -binary -out hmac_hmac256_1 plaintext_6
+ren hmac_hmac256_1 hmac_hmac256_1.enc
+
+call %OPENSSL%\openssl dgst -sha256 -hmac "Jefe" -c -binary -out hmac_hmac256_2 plaintext_7
+ren hmac_hmac256_2 hmac_hmac256_2.enc
+
+call %OPENSSL%\openssl dgst -sha512 -hmac " " -c -binary -out hmac_hmac512_1 plaintext_6
+ren hmac_hmac512_1 hmac_hmac512_1.enc
+
+call %OPENSSL%\openssl dgst -sha512 -hmac "Jefe" -c -binary -out hmac_hmac512_2 plaintext_7
+ren hmac_hmac512_2 hmac_hmac512_2.enc