summaryrefslogtreecommitdiffstats
path: root/libtomcrypt/pk/rsa/rsa_encrypt_key.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-07 10:40:37 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-07 10:41:04 +0200
commit115f165b6e3bb74f45e13a65c5f4f82f28664a2c (patch)
treeec55b63c736b5bef6061202c8bd31b08796fa2dc /libtomcrypt/pk/rsa/rsa_encrypt_key.c
parent58a20b797e5a987fc8f7c5bea3be24d754908bf5 (diff)
downloadcryptodev-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_encrypt_key.c')
-rw-r--r--libtomcrypt/pk/rsa/rsa_encrypt_key.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libtomcrypt/pk/rsa/rsa_encrypt_key.c b/libtomcrypt/pk/rsa/rsa_encrypt_key.c
index daa328a..d59699c 100644
--- a/libtomcrypt/pk/rsa/rsa_encrypt_key.c
+++ b/libtomcrypt/pk/rsa/rsa_encrypt_key.c
@@ -57,10 +57,10 @@ int rsa_encrypt_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 > *outlen) {
*outlen = modulus_bytelen;
return CRYPT_BUFFER_OVERFLOW;
@@ -85,7 +85,7 @@ int rsa_encrypt_key_ex(const unsigned char *in, unsigned long inlen,
}
/* rsa exptmod the OAEP or LTC_PKCS #1 v1.5 pad */
- return ltc_mp.rsa_me(out, x, out, outlen, PK_PUBLIC, key);
+ return rsa_exptmod(out, x, out, outlen, PK_PUBLIC, key);
}
#endif /* LTC_MRSA */