diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-07 10:40:37 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-07 10:41:04 +0200 |
commit | 115f165b6e3bb74f45e13a65c5f4f82f28664a2c (patch) | |
tree | ec55b63c736b5bef6061202c8bd31b08796fa2dc /libtomcrypt/pk/rsa/rsa_decrypt_key.c | |
parent | 58a20b797e5a987fc8f7c5bea3be24d754908bf5 (diff) | |
download | cryptodev-linux-115f165b6e3bb74f45e13a65c5f4f82f28664a2c.tar.gz cryptodev-linux-115f165b6e3bb74f45e13a65c5f4f82f28664a2c.tar.xz cryptodev-linux-115f165b6e3bb74f45e13a65c5f4f82f28664a2c.zip |
Added a modified libtomcrypt with DSA and RSA algorithms.
Diffstat (limited to 'libtomcrypt/pk/rsa/rsa_decrypt_key.c')
-rw-r--r-- | libtomcrypt/pk/rsa/rsa_decrypt_key.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libtomcrypt/pk/rsa/rsa_decrypt_key.c b/libtomcrypt/pk/rsa/rsa_decrypt_key.c index f3b8c48..52885e8 100644 --- a/libtomcrypt/pk/rsa/rsa_decrypt_key.c +++ b/libtomcrypt/pk/rsa/rsa_decrypt_key.c @@ -64,10 +64,10 @@ int rsa_decrypt_key_ex(const unsigned char *in, unsigned long inlen, } /* get modulus len in bits */ - modulus_bitlen = mp_count_bits( (key->N)); + modulus_bitlen = mp_count_bits( (&key->N)); /* outlen must be at least the size of the modulus */ - modulus_bytelen = mp_unsigned_bin_size( (key->N)); + modulus_bytelen = mp_unsigned_bin_size( (&key->N)); if (modulus_bytelen != inlen) { return CRYPT_INVALID_PACKET; } @@ -80,7 +80,7 @@ int rsa_decrypt_key_ex(const unsigned char *in, unsigned long inlen, /* rsa decode the packet */ x = inlen; - if ((err = ltc_mp.rsa_me(in, inlen, tmp, &x, PK_PRIVATE, key)) != CRYPT_OK) { + if ((err = rsa_exptmod(in, inlen, tmp, &x, PK_PRIVATE, key)) != CRYPT_OK) { XFREE(tmp); return err; } |