export custom key in a PEM format

View: New views
2 Messages — Rating Filter:   Alert me  

export custom key in a PEM format

by denote23@libero.it :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all

I'm working with ID-based signature (SHAMIR 84) and I create a struct
as below:

struct sign
{
BIGNUM *s;
BIGNUM *d;
}

How do I export this key into
a file in a PEM format??

Thanks in advance
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@...
Automated List Manager                           majordomo@...

Re: export custom key in a PEM format

by Mounir IDRASSI :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

First, you must define a format for the PEM encoding/decoding. If you
don't have any interoperability constraints, you can choose a simple
format consisting of Sequence that contains two integers.
For that, I have written a sample that implements PEM reading/writing
for this simple format. Most of the work is done by the macros
DECLARE_PEM_rw_const and IMPLEMENT_PEM_rw_const. You can get the source
code from the following link :

http://www.idrix.fr/Root/Samples/custom_pem.c

I hope this will help.
Cheers,
--
Mounir IDRASSI
IDRIX
http://www.idrix.fr

denote23@... wrote:

> Hi all
>
> I'm working with ID-based signature (SHAMIR 84) and I create a struct
> as below:
>
> struct sign
> {
> BIGNUM *s;
> BIGNUM *d;
> }
>
> How do I export this key into
> a file in a PEM format??
>
> Thanks in advance
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@...
> Automated List Manager                           majordomo@...
>  
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@...
Automated List Manager                           majordomo@...