summaryrefslogtreecommitdiffstats
path: root/libtomcrypt/pk/rsa/rsa_encrypt_key.c
diff options
context:
space:
mode:
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 */