From fb13f884a9fc9111dd400bbfb874a5f0714b38b1 Mon Sep 17 00:00:00 2001 From: ruslan Date: Mon, 21 May 2018 09:10:21 -0400 Subject: [PATCH 1/7] Add SHA224, SHA384, SHA512 implementation --- .gitignore | 7 + .../implementation/implementor_mbedtls.xml | 53 +++- library/CMakeLists.txt | 36 ++- .../{vsf_decrypt_api.h => vsf_sha224_impl.h} | 35 +-- .../include/virgil/private/vsf_sha384_impl.h | 103 +++++++ .../include/virgil/private/vsf_sha512_impl.h | 103 +++++++ library/include/virgil/vsf_impl.h | 5 +- library/include/virgil/vsf_sha224.h | 184 ++++++++++++ library/include/virgil/vsf_sha384.h | 184 ++++++++++++ library/include/virgil/vsf_sha512.h | 184 ++++++++++++ library/src/vsf_sha224.c | 145 +++++++++ .../{vsf_decrypt_api.c => vsf_sha224_impl.c} | 7 +- library/src/vsf_sha224_internal.c | 282 ++++++++++++++++++ library/src/vsf_sha224_internal.h | 97 ++++++ library/src/{vsf_cipher.c => vsf_sha384.c} | 95 +++--- library/src/vsf_sha384_impl.c | 68 +++++ library/src/vsf_sha384_internal.c | 282 ++++++++++++++++++ library/src/vsf_sha384_internal.h | 97 ++++++ library/src/vsf_sha512.c | 146 +++++++++ library/src/vsf_sha512_impl.c | 68 +++++ library/src/vsf_sha512_internal.c | 282 ++++++++++++++++++ library/src/vsf_sha512_internal.h | 97 ++++++ 22 files changed, 2477 insertions(+), 83 deletions(-) rename library/include/virgil/private/{vsf_decrypt_api.h => vsf_sha224_impl.h} (80%) create mode 100644 library/include/virgil/private/vsf_sha384_impl.h create mode 100644 library/include/virgil/private/vsf_sha512_impl.h create mode 100644 library/include/virgil/vsf_sha224.h create mode 100644 library/include/virgil/vsf_sha384.h create mode 100644 library/include/virgil/vsf_sha512.h create mode 100644 library/src/vsf_sha224.c rename library/src/{vsf_decrypt_api.c => vsf_sha224_impl.c} (92%) create mode 100644 library/src/vsf_sha224_internal.c create mode 100644 library/src/vsf_sha224_internal.h rename library/src/{vsf_cipher.c => vsf_sha384.c} (62%) create mode 100644 library/src/vsf_sha384_impl.c create mode 100644 library/src/vsf_sha384_internal.c create mode 100644 library/src/vsf_sha384_internal.h create mode 100644 library/src/vsf_sha512.c create mode 100644 library/src/vsf_sha512_impl.c create mode 100644 library/src/vsf_sha512_internal.c create mode 100644 library/src/vsf_sha512_internal.h diff --git a/.gitignore b/.gitignore index 1f78f4b27..13398c8cb 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,10 @@ cmake-build-*/ #### # Sublime Text 3 *.sublime-workspace + +#### +# Visual Studio (VisualGDB) +Debug*/ +gcc* +virgil-crypto-c.* +virgil-crypto-c-* diff --git a/codegen/implementation/implementor_mbedtls.xml b/codegen/implementation/implementor_mbedtls.xml index 41419903b..7dfdda1cf 100644 --- a/codegen/implementation/implementor_mbedtls.xml +++ b/codegen/implementation/implementor_mbedtls.xml @@ -3,6 +3,23 @@ + + This is MbedTLS implementation of SHA224. + + + + + + + + + + + + + + + This is MbedTLS implementation of SHA256. @@ -20,7 +37,41 @@ -