[PATCH] OAEP support

Daiki Ueno ueno at unixuser.org
Tue Aug 25 01:15:30 CEST 2009


Hi,

The attached is the current version of the OAEP patch, reflecting your
suggestion for the interface.  Since I think the patch still lacks
polish, further comments and suggestions are appreciated.

>>>>> In <87ab3prmgk.fsf at broken.deisui.org> 
>>>>>	Daiki Ueno <ueno at unixuser.org> wrote:
> > I would like to keep the flags list a real flags list without
> > parameters.  Would anything speak against:

> >    (data
> >      (flags oaep)
> >      (hash sha1)
> >      (label "test")
> >      (value #11223344556677889900AA#))

> > I can do this change if you agree.

Done.  I renamed "hash" to "hash-algo" since "hash" is used in different
meaning.  The current interface is as follows:

* gcry_pk_encrypt takes the following sexp:

(data
  (flags oaep)
  (hash-algo sha1)
  (label "test")
  (value #11223344556677889900AA#))

and returns:

(enc-val (rsa ...))

* gcry_pk_decrypt takes the following sexp:

(enc-val
  (flags oaep unpad)
  (hash-algo sha1)
  (label "test")
  (rsa ...))

and returns:

(data (value ...))

* Both functions do padding internally.  Note that "unpad" in flags,
which indicates the output plaintext is un-padded, while the library
currently do not handle un-padding.

* Q: Can I implement PSS similarly?  RFC3447 insists that, there is a
patent pending by the University of California, but they promises(?)
that they will freely license confirming implementation, once PSS is
standardised.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: oaep-2009-08-25.diff
Type: text/x-diff
Size: 27057 bytes
Desc: not available
URL: </pipermail/attachments/20090825/de280301/attachment-0001.diff>
-------------- next part --------------

Regards,
-- 
Daiki Ueno


More information about the Gcrypt-devel mailing list