Re: RSA OAEP with sha256

2012-08-16 Thread Mounir IDRASSI
Hi Martin, In OpenSSL implementation of OAEP, MGF1 is hardcoded with SHA-1 (look at the end of the file rsa_oaep.c). Moreover, the function RSA_padding_add_PKCS1_OAEP is using explicitly SHA-1 as the unique possible hash. That's why your results are incorrect. Personally, I overcame these li

Re: RSA OAEP with sha256

2012-08-16 Thread Dr. Stephen Henson
On Thu, Aug 16, 2012, Martin Kaiser wrote: > Dear all, > > I'd like to encrypt some bytes using RSA OAEP with MGF1. Both OAEP and > MGF1 should use sha256 instead of the default sha1. > > Does openssl support this at all? I tried something along the lines of > >size_t outlen; >int ret;

RSA OAEP with sha256

2012-08-16 Thread Martin Kaiser
Dear all, I'd like to encrypt some bytes using RSA OAEP with MGF1. Both OAEP and MGF1 should use sha256 instead of the default sha1. Does openssl support this at all? I tried something along the lines of size_t outlen; int ret; EVP_PKEY_CTX *ctx; unsigned char in[] = { some byte