]> git.tuebingen.mpg.de Git - paraslash.git/commit
Add alternative crypto implementation.
authorAndre Noll <maan@systemlinux.org>
Sat, 4 Jun 2011 13:26:15 +0000 (15:26 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 6 Jul 2011 06:41:26 +0000 (08:41 +0200)
commit1ecb886f1aa76e72bd11d45782210b5ca19bce42
tree190171c22be4ac034068c7b8a036d83d9f9e3a43
parent56e2e6b938e7e3d318964f095ffcabc151411446
Add alternative crypto implementation.

This fills gcrypt.c (which contained only dummy functions so far)
with contents.

The old openssl-based crypto API uses OAEP padding exclusively, as
this padding method is recommended for new applications which do not
have to care about backwards compatibility. Unfortunately, libcrypt
only supports the older pkcs1 padding method. Since we want older
para_client versions to be compatible with a newer para_server, even
if this para_server was compiled against libgcrypt, we must implement
our own OAEP padding functions. This turned out to be quite simple,
given the good documentation in rfc 3447.

This together with the fact that there is no ASN1 parser in libgcrypt
makes the patch quite large though.

On the other hand, SHA1, random numbers and RC4 were straight-forward
to implement using the primitives provided by libgcrypt.
error.h
gcrypt.c