Thread (33 messages) flat view 33 messages, 3 authors, 2015-06-16

Re: [PATCH RFC v5 2/4] crypto: add PKE API

From: Tadeusz Struk <hidden>
Date: 2015-06-16 02:41:26
Also in: lkml

On 06/15/2015 07:27 PM, Herbert Xu wrote:
quoted
The two functions will be almost identical. We can do it this way if we want to check
quoted
if all the required elements of the key are provided. Currently I'm checking this in the
actual operation.
Right now your RSA setkey function only works if you supply both
the public key and the private key.  If the user supplies only one
key how are you going to tell whether it's public or private?
User can supply only public key and invoke encrypt() or verify() without any problem.
When the user invokes decrypt() or sign() then it will work only after the setkey was
given a private key. This is checked in the actual operation.
So the user is responsible for providing an appropriate key for given operation.
We can split it if you think this is the right thing to do, but currently it works fine.

 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help