Raw RSA encryption

Mads Kiilerich mads at kiilerich.com
Sat Jul 24 03:07:34 CEST 2010


  Hi

The new gnutls/crypto.h exposes fine functionality for using 
stream/block ciphers and hash algorithms directly.

But I also need raw RSA encryption and can't figure out how to do it - 
or if it is possible. I just need the basic modulo-exponentiation, for 
example with values from gnutls_x509_crt_get_pk_rsa_raw.

It seems like it is possible to register such a function with 
gnutls_crypto_pk_register2, but there is no way to retrieve the internal 
implementation? Or is it OK to use _gnutls_pk_ops.encrypt?

Or should I access gcrypt directly, possibly by duplicating the content 
of _wrap_gcry_pk_encrypt?

(In either case it seems like I need to figure out how the simple 
bigendian format of gnutls_datum_t from gnutls_x509_crt_get_pk_rsa_raw 
relates to bigint_t?)

/Mads





More information about the Gnutls-help mailing list