[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RSA sign/verify and hash generation functions
From: |
Nikos Mavrogiannopoulos |
Subject: |
Re: RSA sign/verify and hash generation functions |
Date: |
Thu, 16 Dec 2010 17:11:51 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
On 12/15/2010 06:47 PM, Murray S. Kucherawy wrote:
>> -----Original Message-----
>> From: address@hidden [mailto:address@hidden On Behalf Of Nikos
>> Mavrogiannopoulos
>> Sent: Tuesday, December 14, 2010 4:53 PM
>> To: Murray S. Kucherawy
>> Cc: address@hidden
>> Subject: Re: RSA sign/verify and hash generation functions
>>
>> Did you try the interface in abstract.h for public keys?
>
> Yep, that's working. Great stuff!
> One thing I need that this public key interface doesn't appear to have is a
> way to get the key size from a public key. Could that be added, or if it's
> there someplace, can you point me to it?
What do you mean by key size? The indicator returned by
gnutls_pubkey_get_pk_algorithm()?
> Also, I have a need to, given a private key already imported, output a public
> key in PEM format to a buffer. The code I have now is doing this:
> gnutls_x509_privkey_init(A)
> gnutls_x509_privkey_import(A)
> gnutls_x509_privkey_export_rsa_raw(A, m, e, otherstuff)
> gnutls_pubkey_init(B)
> gnutls_pubkey_import_rsa_raw(B, m, e)
> gnutls_pubkey_export(B, PEM, buf, &buflen)
> Should that give me what I want, or do you have another interface to
suggest?
I've just added (not tested yet) gnutls_pubkey_import_privkey() that
will import the public parameters from a gnutls_privkey_t structure.
Thus it would still be quite some calls, but you don't need to export
anything. How does it look?
gnutls_x509_privkey_init(A)
gnutls_x509_privkey_import(A)
gnutls_privkey_init(P)
gnutls_privkey_import_x509(P,A)
gnutls_pubkey_init(B)
gnutls_pubkey_import_privkey(B,P)
regards,
Nikos
- Re: RSA sign/verify and hash generation functions, (continued)
- Re: RSA sign/verify and hash generation functions, Alessandro Vesely, 2010/12/11
- Re: RSA sign/verify and hash generation functions, Nikos Mavrogiannopoulos, 2010/12/08
- RE: RSA sign/verify and hash generation functions, Murray S. Kucherawy, 2010/12/08
- Re: RSA sign/verify and hash generation functions, Nikos Mavrogiannopoulos, 2010/12/09
- RE: RSA sign/verify and hash generation functions, Murray S. Kucherawy, 2010/12/09
- Re: RSA sign/verify and hash generation functions, Nikos Mavrogiannopoulos, 2010/12/13
- RE: RSA sign/verify and hash generation functions, Murray S. Kucherawy, 2010/12/14
- Re: RSA sign/verify and hash generation functions, Nikos Mavrogiannopoulos, 2010/12/14
- RE: RSA sign/verify and hash generation functions, Murray S. Kucherawy, 2010/12/14
- RE: RSA sign/verify and hash generation functions, Murray S. Kucherawy, 2010/12/15
- Re: RSA sign/verify and hash generation functions,
Nikos Mavrogiannopoulos <=
- RE: RSA sign/verify and hash generation functions, Murray S. Kucherawy, 2010/12/16
- Re: RSA sign/verify and hash generation functions, Nikos Mavrogiannopoulos, 2010/12/16
- RE: RSA sign/verify and hash generation functions, Murray S. Kucherawy, 2010/12/16
- Re: RSA sign/verify and hash generation functions, Nikos Mavrogiannopoulos, 2010/12/18
- RE: RSA sign/verify and hash generation functions, Murray S. Kucherawy, 2010/12/20
- RE: RSA sign/verify and hash generation functions, Murray S. Kucherawy, 2010/12/08