heimdal and raw rsa parameters

Love Hörnquist Åstrand lha at kth.se
Thu Sep 30 22:58:41 MDT 2010


This seems ok do do it, I'm fine with adding a type field to _hx509_parse_private_key() and rsa_private_key_import so it can handle your format too. Today it only does DER.


28 sep 2010 kl. 00.49 skrev Matthieu Patou:

> Hi Love,
> First I really enjoyed meeting you at the SNIA plugfest was a real pleasure hope to see you next year !
> Otherwise, my current usage of heimdal is pretty good and it seems to cover most of my needs.
> The last bit I'm starting is using and storing the private key in the format MS AD do, this imply working with RSA raw parameter like modulus, private exponent, public exponent, ... all of this stored in the little endian format.
> So basically I'll have a function that will create a function to transform the microsoft format to a RSA hx509_private_key like this
>        hx509_context hctx;
>        RSA *rsa;
>        hx509_context_init(&hctx);
>        pk = talloc(mem_ctx, hx509_private_key);
>        rsa = RSA_new();
>        rsa->n = BN_bin2bn(keypair->modulus.data, keypair->modulus.length, NULL);
> .../...
>        mp_invmod(&q, &p, &iqmp);
>        rsa->iqmp = mpz2BN(&iqmp)
>        _hx509_private_key_assign_rsa(*pk, &rsa);
> And mostly the opposite for the other way round (that I plan to do a bit later this week).
> Matthieu.
> -- 
> Matthieu Patou
> Samba Team        http://samba.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3815 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101001/ccc97ab9/attachment.bin>

More information about the samba-technical mailing list