diff options
| author | Miloslav Trmač <mitr@redhat.com> | 2010-07-26 19:08:44 +0200 |
|---|---|---|
| committer | Miloslav Trmač <mitr@redhat.com> | 2010-07-26 19:08:44 +0200 |
| commit | afed807b11199877214ec2e5d81e96c230237759 (patch) | |
| tree | 8b01ef8a6f881656d78e4f54b60a9ea41187a175 /libtomcrypt | |
| parent | d750b60952619af570ac4d91cd650ffa6bbe311d (diff) | |
| parent | 935be4945512eb37461a226c51ede5e8b05cbe24 (diff) | |
| download | cryptodev-linux-afed807b11199877214ec2e5d81e96c230237759.tar.gz cryptodev-linux-afed807b11199877214ec2e5d81e96c230237759.tar.xz cryptodev-linux-afed807b11199877214ec2e5d81e96c230237759.zip | |
Merge branch 'master' into algorithm-speedup
Conflicts:
libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c
libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c
libtomcrypt/pk/rsa/rsa_decrypt_key.c
libtomcrypt/pk/rsa/rsa_encrypt_key.c
libtomcrypt/pk/rsa/rsa_sign_hash.c
libtomcrypt/pk/rsa/rsa_verify_hash.c
ncr-int.h
ncr-key.c
ncr-pk.c
ncr-sessions.c
Diffstat (limited to 'libtomcrypt')
| -rw-r--r-- | libtomcrypt/hashes/hash_get_oid.c | 2 | ||||
| -rw-r--r-- | libtomcrypt/hashes/hash_memory.c | 2 | ||||
| -rw-r--r-- | libtomcrypt/hashes/hash_memory_multi.c | 2 | ||||
| -rw-r--r-- | libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c | 2 | ||||
| -rw-r--r-- | libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c | 2 | ||||
| -rw-r--r-- | libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c | 2 | ||||
| -rw-r--r-- | libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c | 6 | ||||
| -rw-r--r-- | libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c | 6 | ||||
| -rw-r--r-- | libtomcrypt/pk/rsa/rsa_decrypt_key.c | 2 | ||||
| -rw-r--r-- | libtomcrypt/pk/rsa/rsa_encrypt_key.c | 2 | ||||
| -rw-r--r-- | libtomcrypt/pk/rsa/rsa_export.c | 2 | ||||
| -rw-r--r-- | libtomcrypt/pk/rsa/rsa_sign_hash.c | 2 | ||||
| -rw-r--r-- | libtomcrypt/pk/rsa/rsa_verify_hash.c | 2 |
13 files changed, 19 insertions, 15 deletions
diff --git a/libtomcrypt/hashes/hash_get_oid.c b/libtomcrypt/hashes/hash_get_oid.c index c6469ba..39f4372 100644 --- a/libtomcrypt/hashes/hash_get_oid.c +++ b/libtomcrypt/hashes/hash_get_oid.c @@ -8,7 +8,7 @@ * */ #include "tomcrypt.h" -#include <ncr_int.h> +#include <ncr-int.h> /* Returns the OID of the hash. diff --git a/libtomcrypt/hashes/hash_memory.c b/libtomcrypt/hashes/hash_memory.c index 5ba3bc6..a416de9 100644 --- a/libtomcrypt/hashes/hash_memory.c +++ b/libtomcrypt/hashes/hash_memory.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include <ncr_int.h> +#include <ncr-int.h> #include <cryptodev_int.h> /** diff --git a/libtomcrypt/hashes/hash_memory_multi.c b/libtomcrypt/hashes/hash_memory_multi.c index d772492..a914916 100644 --- a/libtomcrypt/hashes/hash_memory_multi.c +++ b/libtomcrypt/hashes/hash_memory_multi.c @@ -10,7 +10,7 @@ */ #include "tomcrypt.h" #include <stdarg.h> -#include <ncr_int.h> +#include <ncr-int.h> #include <cryptodev_int.h> /** diff --git a/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c b/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c index b09dd11..58052eb 100644 --- a/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c +++ b/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include <ncr_int.h> +#include <ncr-int.h> /** @file pkcs_1_mgf1.c diff --git a/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c b/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c index 60f76a0..5214a29 100644 --- a/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c +++ b/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include <ncr_int.h> +#include <ncr-int.h> /** @file pkcs_1_oaep_decode.c diff --git a/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c b/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c index c56e3b1..ef644f9 100644 --- a/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c +++ b/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include <ncr_int.h> +#include <ncr-int.h> /** @file pkcs_1_oaep_encode.c diff --git a/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c b/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c index 293d84f..b9ade4b 100644 --- a/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c +++ b/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include <ncr_int.h> +#include <ncr-int.h> /** @file pkcs_1_pss_decode.c @@ -130,8 +130,10 @@ int pkcs_1_pss_decode(const unsigned char *msghash, unsigned long msghashlen, goto LBL_ERR; } + zeromem(mask, 8); + /* M = (eight) 0x00 || msghash || salt, mask = H(M) */ - err = hash_memory_multi(hash_algo, mask, &hLen, mask, 8, msghash, (unsigned long)msghashlen, DB+x, (unsigned long)saltlen, NULL, 0); + err = hash_memory_multi(hash_algo, mask, &hLen, mask, (unsigned long)8, msghash, (unsigned long)msghashlen, DB+x, (unsigned long)saltlen, NULL, 0); if (err != CRYPT_OK) { goto LBL_ERR; } diff --git a/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c b/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c index d747b49..f8f763b 100644 --- a/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c +++ b/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include <ncr_int.h> +#include <ncr-int.h> /** @file pkcs_1_pss_encode.c @@ -81,9 +81,11 @@ int pkcs_1_pss_encode(const unsigned char *msghash, unsigned long msghashlen, if (saltlen > 0) { get_random_bytes(salt, saltlen); } + + zeromem(DB, 8); /* M = (eight) 0x00 || msghash || salt, hash = H(M) */ - err = hash_memory_multi(hash_algo, hash, &hLen, DB, 8, msghash, (unsigned long)msghashlen, salt, (unsigned long)saltlen, NULL, 0); + err = hash_memory_multi(hash_algo, hash, &hLen, DB, (unsigned long)8, msghash, (unsigned long)msghashlen, salt, (unsigned long)saltlen, NULL, 0); if (err != CRYPT_OK) { goto LBL_ERR; } diff --git a/libtomcrypt/pk/rsa/rsa_decrypt_key.c b/libtomcrypt/pk/rsa/rsa_decrypt_key.c index 989c935..a8f3ac4 100644 --- a/libtomcrypt/pk/rsa/rsa_decrypt_key.c +++ b/libtomcrypt/pk/rsa/rsa_decrypt_key.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include "ncr_int.h" +#include "ncr-int.h" /** @file rsa_decrypt_key.c diff --git a/libtomcrypt/pk/rsa/rsa_encrypt_key.c b/libtomcrypt/pk/rsa/rsa_encrypt_key.c index 4ce51a4..8d3f2db 100644 --- a/libtomcrypt/pk/rsa/rsa_encrypt_key.c +++ b/libtomcrypt/pk/rsa/rsa_encrypt_key.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include "ncr_int.h" +#include "ncr-int.h" /** @file rsa_encrypt_key.c diff --git a/libtomcrypt/pk/rsa/rsa_export.c b/libtomcrypt/pk/rsa/rsa_export.c index 33c222d..905bb6f 100644 --- a/libtomcrypt/pk/rsa/rsa_export.c +++ b/libtomcrypt/pk/rsa/rsa_export.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include <ncr_int.h> +#include <ncr-int.h> /** @file rsa_export.c Export RSA LTC_PKCS keys, Tom St Denis diff --git a/libtomcrypt/pk/rsa/rsa_sign_hash.c b/libtomcrypt/pk/rsa/rsa_sign_hash.c index 5a32d33..f27789d 100644 --- a/libtomcrypt/pk/rsa/rsa_sign_hash.c +++ b/libtomcrypt/pk/rsa/rsa_sign_hash.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include "ncr_int.h" +#include "ncr-int.h" /** @file rsa_sign_hash.c diff --git a/libtomcrypt/pk/rsa/rsa_verify_hash.c b/libtomcrypt/pk/rsa/rsa_verify_hash.c index 20f852e..c8a113d 100644 --- a/libtomcrypt/pk/rsa/rsa_verify_hash.c +++ b/libtomcrypt/pk/rsa/rsa_verify_hash.c @@ -9,7 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include "ncr_int.h" +#include "ncr-int.h" /** @file rsa_verify_hash.c |
