]> git.tuebingen.mpg.de Git - paraslash.git/commit
gcrypt: Optionally use internal OAEP padding.
authorAndre Noll <maan@systemlinux.org>
Mon, 4 Jul 2011 23:04:34 +0000 (01:04 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 6 Jul 2011 06:47:34 +0000 (08:47 +0200)
commit0a0a577bb91b6ec4e26a9432c08974a3f1f611ac
tree59e7308f80d14f9f86b8bf53a47ba076c7cf5095
parent542c254a490d4d13ab581455ff4712f19d80e361
gcrypt: Optionally use internal OAEP padding.

libgcrypt supports OAEP padding since version 1.5.0, which has just
been released. Since want the paraslash gcrypt code to work also
for older gcrypt libraries, we check the library version at runtime
and fall back to the internal OAEP padding code if an old library
was detected.

This patch moves much of the rather ugly OAEP padding code into new
new helper decode_rsa() which reduces to a mere memcpy for newer
gcrypt versions. Much of the old code can be removed once all major
distributions ship libgcrypt-1.5.0 or later.
gcrypt.c