Hello.

We're trying to get as small RSA private key as possible, because we
are short in space (we want to store it on a smart card, so every byte
is important).

We found a way to cut it a bit by NULLing some pointers inside RSA
structure:

        RSA *key;

        key->p = NULL;
        key->q = NULL;
        key->dmp1 = NULL;
        key->dmq1 = NULL;
        key->iqmp = NULL;

and store  it in DER format:

        i2d_RSAPrivateKey(key, &bufp);

But, as you can see, it is a very hackish solution and we wonder if there
is no more standard and clean way to implement this.

-- 
Pawel Jakub Dawidek                       http://www.FreeBSD.org
[EMAIL PROTECTED]                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!

Attachment: pgpiCAbwVgkQv.pgp
Description: PGP signature

Reply via email to