From 115f165b6e3bb74f45e13a65c5f4f82f28664a2c Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 7 Jul 2010 10:40:37 +0200 Subject: Added a modified libtomcrypt with DSA and RSA algorithms. --- libtomcrypt/pk/rsa/rsa_encrypt_key.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libtomcrypt/pk/rsa/rsa_encrypt_key.c') 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 */ -- cgit