aboutsummaryrefslogtreecommitdiffstats
path: root/test/crypto/ref
diff options
context:
space:
mode:
authorareviu <areviu.info@gmail.com>2017-11-30 21:12:58 +0000
committerareviu <areviu.info@gmail.com>2017-11-30 21:12:58 +0000
commit2ebbe6eb870313331bba48884112675107a6b866 (patch)
treef2eb4b050f057c5ebddb6a48cb1e511296940544 /test/crypto/ref
parent5b31410098434a2aff0c0729621fee6c6f2b3519 (diff)
downloadChibiOS-2ebbe6eb870313331bba48884112675107a6b866.tar.gz
ChibiOS-2ebbe6eb870313331bba48884112675107a6b866.tar.bz2
ChibiOS-2ebbe6eb870313331bba48884112675107a6b866.zip
update sha and trng lld
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11091 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/crypto/ref')
-rw-r--r--test/crypto/ref/gen_cfiles.bat1
-rw-r--r--test/crypto/ref/gen_testref.bat5
-rw-r--r--test/crypto/ref/sha_ref.bat20
3 files changed, 26 insertions, 0 deletions
diff --git a/test/crypto/ref/gen_cfiles.bat b/test/crypto/ref/gen_cfiles.bat
index d0bc19ff9..d63807b38 100644
--- a/test/crypto/ref/gen_cfiles.bat
+++ b/test/crypto/ref/gen_cfiles.bat
@@ -2,3 +2,4 @@
%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_3,sha_sha1_56,sha_sha256_3,sha_sha256_56,sha_sha512_3,sha_sha512_56 -o ref_sha -p ../source/testref
diff --git a/test/crypto/ref/gen_testref.bat b/test/crypto/ref/gen_testref.bat
index 311376773..38c329606 100644
--- a/test/crypto/ref/gen_testref.bat
+++ b/test/crypto/ref/gen_testref.bat
@@ -6,7 +6,12 @@ del *.enc
%PYTHON%\python -c "print 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et pellentesque risus. Sed id gravida elit. Proin eget accumsan mi. Aliquam vitae dui porta, euismod velit viverra, elementum lacus. Nunc turpis orci, venenatis vel vulputate nec, luctus sitamet urna. Ut et nunc purus. Aliquam erat volutpat. Vestibulum nulla dolor, cursus vitae cursus eget, dapibus eget sapien. Integer justo eros, commodo ut massa eu, bibendum elementum tellus. Nam quis dolor in libero placerat congue. Sed sodales urna scelerisque dui faucibus, vitae malesuada dui fermentum. Proin ultricies sit amet justo at ornare. Suspendisse efficitur purus nullam.'.decode('ascii')" > plaintext
+echo|set /p="hi!" > plaintext_2
+
+echo|set /p="abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" > plaintext_3
+
call aes_ref.bat
call des_ref.bat
+call sha_ref.bat
call gen_cfiles.bat \ No newline at end of file
diff --git a/test/crypto/ref/sha_ref.bat b/test/crypto/ref/sha_ref.bat
new file mode 100644
index 000000000..9eaa96463
--- /dev/null
+++ b/test/crypto/ref/sha_ref.bat
@@ -0,0 +1,20 @@
+
+call %OPENSSL%\openssl dgst -sha1 -c -binary -out sha_sha1_3 plaintext_2
+ren sha_sha1_3 sha_sha1_3.enc
+
+call %OPENSSL%\openssl dgst -sha1 -c -binary -out sha_sha1_56 plaintext_3
+ren sha_sha1_56 sha_sha1_56.enc
+
+call %OPENSSL%\openssl dgst -sha256 -c -binary -out sha_sha256_3 plaintext_2
+ren sha_sha256_3 sha_sha256_3.enc
+
+call %OPENSSL%\openssl dgst -sha256 -c -binary -out sha_sha256_56 plaintext_3
+ren sha_sha256_56 sha_sha256_56.enc
+
+
+call %OPENSSL%\openssl dgst -sha512 -c -binary -out sha_sha512_3 plaintext_2
+ren sha_sha512_3 sha_sha512_3.enc
+
+
+call %OPENSSL%\openssl dgst -sha512 -c -binary -out sha_sha512_56 plaintext_3
+ren sha_sha512_56 sha_sha512_56.enc \ No newline at end of file