mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
1e562deace
A sig_alg backend has just been introduced with the intent of moving all asymmetric sign/verify algorithms to it one by one. Migrate the sign/verify operations from rsa-pkcs1pad.c to a separate rsassa-pkcs1.c which uses the new backend. Consequently there are now two templates which build on the "rsa" akcipher_alg: * The existing "pkcs1pad" template, which is instantiated as an akcipher_instance and retains the encrypt/decrypt operations of RSAES-PKCS1-v1_5 (RFC 8017 sec 7.2). * The new "pkcs1" template, which is instantiated as a sig_instance and contains the sign/verify operations of RSASSA-PKCS1-v1_5 (RFC 8017 sec 8.2). In a separate step, rsa-pkcs1pad.c could optionally be renamed to rsaes-pkcs1.c for clarity. Additional "oaep" and "pss" templates could be added for RSAES-OAEP and RSASSA-PSS. Note that it's currently allowed to allocate a "pkcs1pad(rsa)" transform without specifying a hash algorithm. That makes sense if the transform is only used for encrypt/decrypt and continues to be supported. But for sign/verify, such transforms previously did not insert the Full Hash Prefix into the padding. The resulting message encoding was incompliant with EMSA-PKCS1-v1_5 (RFC 8017 sec 9.2) and therefore nonsensical. From here on in, it is no longer allowed to allocate a transform without specifying a hash algorithm if the transform is used for sign/verify operations. This simplifies the code because the insertion of the Full Hash Prefix is no longer optional, so various "if (digest_info)" clauses can be removed. There has been a previous attempt to forbid transform allocation without specifying a hash algorithm, namely by commit |
||
---|---|---|
.. | ||
internal | ||
acompress.h | ||
aead.h | ||
aes.h | ||
akcipher.h | ||
algapi.h | ||
arc4.h | ||
aria.h | ||
authenc.h | ||
b128ops.h | ||
blake2b.h | ||
blake2s.h | ||
blowfish.h | ||
cast5.h | ||
cast6.h | ||
cast_common.h | ||
chacha20poly1305.h | ||
chacha.h | ||
cryptd.h | ||
ctr.h | ||
curve25519.h | ||
des.h | ||
dh.h | ||
drbg.h | ||
ecc_curve.h | ||
ecdh.h | ||
engine.h | ||
gcm.h | ||
gf128mul.h | ||
ghash.h | ||
hash_info.h | ||
hash.h | ||
hmac.h | ||
if_alg.h | ||
kdf_sp800108.h | ||
kpp.h | ||
md5.h | ||
nhpoly1305.h | ||
null.h | ||
padlock.h | ||
pcrypt.h | ||
pkcs7.h | ||
poly1305.h | ||
polyval.h | ||
public_key.h | ||
rng.h | ||
scatterwalk.h | ||
serpent.h | ||
sha1_base.h | ||
sha1.h | ||
sha2.h | ||
sha3.h | ||
sha256_base.h | ||
sha512_base.h | ||
sig.h | ||
skcipher.h | ||
sm3_base.h | ||
sm3.h | ||
sm4.h | ||
streebog.h | ||
twofish.h | ||
utils.h | ||
xts.h |