[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssl-users
Subject:    Re: [openssl-users] rsaOAEP OID in X509 certificate
From:       "Stephane van Hardeveld" <stephane () codingwizard ! nl>
Date:       2018-08-16 22:30:17
Message-ID: 04b701d435b0$b5663e80$2032bb80$ () codingwizard ! nl
[Download RAW message or body]

> > On Aug 14, 2018, at 4:55 PM, Stephane van Hardeveld
> <stephane@codingwizard.nl> wrote:
> >
> > If I would try this endeavour, what would be the best interface to set
this?
> > For creation, use the EVP_PKEY type with the EVP_PKEY_CTX, and set
> > attributes there?
> 
> You'll need a new EVP_PKEY type that is mostly like RSA, but specialized
> for OAEP.
Ok, makes sense
> 
> > Something like:
> > res = X509_set_pubkey(cert, contentKey);
> > EVP_DigestSignInit(ctx, &pkey_ctx, EVP_sha256(), NULL, contentKey);
> > EVP_PKEY_encrypt_init(pkey_ctx);
> > EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_OAEP_PADDING);
> > EVP_PKEY_CTX_set_signature_md(pkey_ctx, EVP_sha256());
> 
> Nothing in EVP_PKEY_CTX has any effect on the key.  The data flow
> is in the other direction.  Different key types lead to different
> EVP_PKEY_CTX objects that are used to process data with that key.
Thank you for clearing this up

Regards,
Stephane

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic