Re: How can i get Montgomery constants from a RSA key ?

2004-02-06 Thread murari
I think the RSA structure contains reference to montgomery context structure which in turn has the montgomery constats. Bear in mind, montgomery constant R is always 2^{num of bits of n} if you are doing modulo n arithmetic. Hope this helps. Quoting [EMAIL PROTECTED]: Hi, I'm working with

BN_mod_sqrt()

2004-01-08 Thread murari
Hi, I am using crypto library to do some calculations. I need to calculate the sqare root of a 1024 bit number and round it to nearest integer. The BN_mod_sqrt() function would only calculate the sqare root if the input BigNum passed to it is a perfect square. Is the any easy work around to do

RSA key from a file

2003-12-14 Thread murari
Hi.. I am using crypto library of openssl. I need to generate a RSA key using RSA_generate_key() and then store the key into a file and later read it from a file when I need it. As far as my knowledge of openssl goes... I generate the key, store it in a file using RSA_print_fp() which stores the

RSA Encryption

2003-11-03 Thread murari
Hi.. I am using Crypto library of openSSL for RSA encryption and decryption. I am generating RSA parameters for public modulus size of 1024. if I use RSA_public_encrypt() using PKCS1 padding and give an input string to encrypt of lenght 128, I get the following error: 5977:error:0406D06E:rsa

RSA decryption problem

2003-10-29 Thread murari
Hi, I have implemented a simple TCP client and server processes such that..server generates the RSA keys and send the public modulus and public exponent to the client. The client process uses these values to encrypt a user entered string and sends it back to server. The server then decrypts the