Hi Herbert, > >> -----Original Message----- > >> >+++ b/drivers/crypto/caam/caam_rsaprivkey.asn1 > >> >@@ -0,0 +1,11 @@ > >> >+RsaPrivKey ::= SEQUENCE { > >> >+ version INTEGER, > >> >+ n INTEGER ({ caam_rsa_get_n }), > >> >+ e INTEGER ({ caam_rsa_get_e }), > >> >+ d INTEGER ({ caam_rsa_get_d }), > >> >+ prime1 INTEGER, > >> >+ prime2 INTEGER, > >> >+ exponent1 INTEGER, > >> >+ exponent2 INTEGER, > >> >+ coefficient INTEGER > >> >+} > >> > >> Why do you define your own ASN.1 sequence? Why not using the common > >> crypto/rsaprivkey.asn1? > >> > > > > [ta] The functions indicated in crypto/rsaprivkey.asn1 return the key > members in MPI format. Our hardware expects the keys as u8 buffers; > retrieving the key members in MPI format and then writing them to u8 > buffers would be an unnecessary step. > > Is there any reason why we can't change it to return the raw > integer and make the software RSA implementation do the MPI parsing > instead? You will have a duplicate key allocation for the RSA software implementation. One when returning the raw integer and the other when doing the MPI parsing. Can we live with the duplicate allocation? Thanks, ta -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html