Re: [PATCH 3/3] crypto: caam - add support for RSA algorithm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tudor-Dan Ambarus <tudor-dan.ambarus@xxxxxxx> wrote:
> Hi Stephan,
> 
>> -----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?

As hardware RSA implementations are likely to want to use raw
integers we don't really want everyone to have their own parser.

I know qat has already gone in with its own parser but we should
fix it too.

Thanks,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux