mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
d43de6c780
Move the RSA EMSA-PKCS1-v1_5 encoding from the asymmetric-key public_key subtype to the rsa crypto module's pkcs1pad template. This means that the public_key subtype no longer has any dependencies on public key type. To make this work, the following changes have been made: (1) The rsa pkcs1pad template is now used for RSA keys. This strips off the padding and returns just the message hash. (2) In a previous patch, the pkcs1pad template gained an optional second parameter that, if given, specifies the hash used. We now give this, and pkcs1pad checks the encoded message E(M) for the EMSA-PKCS1-v1_5 encoding and verifies that the correct digest OID is present. (3) The crypto driver in crypto/asymmetric_keys/rsa.c is now reduced to something that doesn't care about what the encryption actually does and and has been merged into public_key.c. (4) CONFIG_PUBLIC_KEY_ALGO_RSA is gone. Module signing must set CONFIG_CRYPTO_RSA=y instead. Thoughts: (*) Should the encoding style (eg. raw, EMSA-PKCS1-v1_5) also be passed to the padding template? Should there be multiple padding templates registered that share most of the code? Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> |
||
---|---|---|
.. | ||
internal | ||
ablk_helper.h | ||
aead.h | ||
aes.h | ||
akcipher.h | ||
algapi.h | ||
authenc.h | ||
b128ops.h | ||
blowfish.h | ||
cast5.h | ||
cast6.h | ||
cast_common.h | ||
chacha20.h | ||
compress.h | ||
cryptd.h | ||
crypto_wq.h | ||
ctr.h | ||
des.h | ||
drbg.h | ||
gf128mul.h | ||
hash_info.h | ||
hash.h | ||
if_alg.h | ||
lrw.h | ||
mcryptd.h | ||
md5.h | ||
null.h | ||
padlock.h | ||
pcrypt.h | ||
pkcs7.h | ||
poly1305.h | ||
public_key.h | ||
rng.h | ||
scatterwalk.h | ||
serpent.h | ||
sha1_base.h | ||
sha256_base.h | ||
sha512_base.h | ||
sha.h | ||
skcipher.h | ||
twofish.h | ||
vmac.h | ||
xts.h |