Dear all,

we've come across a strange behaviour of the pkcs15-lib in OpenSC when
we generate an EC key pair:

After generating an fresh EC key pair, our code returns a
sc_pkcs15_pubkey containing the EC public key and DER encoded domain
parameter. The public key is then encoded in sc_pkcs15init_generate_key
and added to the DF in the framework when it's immediately decoded again.

During this encode / decode step the domain parameter are lost.

I'm wondering why this encode / decode step is done ?

If it is required for some reason, then I would rather encode the public
key in SubjectPublicKey structure that would also preserve the domain
parameter in AlgorithmIdentifier.

Andreas

-- 

    ---------    CardContact Software & System Consulting
   |.##> <##.|   Andreas Schwier
   |#       #|   Schülerweg 38
   |#       #|   32429 Minden, Germany
   |'##> <##'|   Phone +49 171 8334920
    ---------    http://www.cardcontact.de
                 http://www.tscons.de
                 http://www.openscdp.org

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to