Am Sonntag, 2. August 2015, 22:28:33 schrieb Marcel Holtmann: Hi Marcel, >Hi Tadeusz, > >I think we need to split the akcipher_alg setkey callback into a setkey and >setpubkey. > >diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h >index 69d163e39101..ca93952b6d19 100644 >--- a/include/crypto/akcipher.h >+++ b/include/crypto/akcipher.h >@@ -91,6 +91,8 @@ struct akcipher_alg { > int (*decrypt)(struct akcipher_request *req); > int (*setkey)(struct crypto_akcipher *tfm, const void *key, > unsigned int keylen); >+ int (*setpubkey)(struct crypto_akcipher *tfm, const void *key, >+ unsigned int keylen); > int (*init)(struct crypto_akcipher *tfm); > void (*exit)(struct crypto_akcipher *tfm); > >If the cipher actually uses two different formats for the public + private The public key is n + e. The private key is n + d. Both are encoded in the BER structure the current API requires. It is perfectly valid to provide only n + e when you do public key operations. Please see in the testmgr.h for the 2048 bit key test vector (i.e. the one with public_key_vec = true). The BER structure has nice comments from Tadeusz to indicate it only contains n and e without d. Thus, I do not currently understand your request. May I ask you to give more explanation why the use of BER is insufficient? Ciao Stephan -- 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