openssl/doc/man1
Hubert Kario 7fc67e0a33 rsa: add implicit rejection in PKCS#1 v1.5
The RSA decryption as implemented before required very careful handling
of both the exit code returned by OpenSSL and the potentially returned
ciphertext. Looking at the recent security vulnerabilities
(CVE-2020-25659 and CVE-2020-25657) it is unlikely that most users of
OpenSSL do it correctly.

Given that correct code requires side channel secure programming in
application code, we can classify the existing RSA decryption methods
as CWE-676, which in turn likely causes CWE-208 and CWE-385 in
application code.

To prevent that, we can use a technique called "implicit rejection".
For that we generate a random message to be returned in case the
padding check fails. We generate the message based on static secret
data (the private exponent) and the provided ciphertext (so that the
attacker cannot determine that the returned value is randomly generated
instead of result of decryption and de-padding). We return it in case
any part of padding check fails.

The upshot of this approach is that then not only is the length of the
returned message useless as the Bleichenbacher oracle, so are the
actual bytes of the returned message. So application code doesn't have
to perform any operations on the returned message in side-channel free
way to remain secure against Bleichenbacher attacks.

Note: this patch implements a specific algorithm, shared with Mozilla
NSS, so that the attacker cannot use one library as an oracle against the
other in heterogeneous environments.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13817)
2022-12-12 11:30:52 +01:00
..
build.info
CA.pl.pod
openssl-asn1parse.pod.in
openssl-ca.pod.in APPS: Move load_csr_autofmt() from apps/cmp.c to apps.c and use it also for apps, too 2022-09-20 20:59:50 +02:00
openssl-ciphers.pod.in
openssl-cmds.pod.in
openssl-cmp.pod.in CMP: correct handling of fallback subject in OSSL_CMP_CTX_setup_CRM() and its doc 2022-08-24 11:29:40 +02:00
openssl-cms.pod.in Change all references to OpenSSL 3.1 to OpenSSL 3.2 in the master branch 2022-10-07 10:05:50 +02:00
openssl-crl2pkcs7.pod.in
openssl-crl.pod.in
openssl-dgst.pod.in
openssl-dhparam.pod.in
openssl-dsa.pod.in
openssl-dsaparam.pod.in
openssl-ec.pod.in
openssl-ecparam.pod.in Remove '=for openssl ifdef' 2021-05-19 10:34:43 +10:00
openssl-enc.pod.in
openssl-engine.pod.in
openssl-errstr.pod.in
openssl-fipsinstall.pod.in fipsinstall: add -self_test_oninstall option. 2022-11-02 08:42:46 +11:00
openssl-format-options.pod
openssl-gendsa.pod.in
openssl-genpkey.pod.in
openssl-genrsa.pod.in
openssl-info.pod.in
openssl-kdf.pod.in
openssl-list.pod.in openssl list: Fix help text about -cipher-algorithms option 2022-10-24 11:04:23 +01:00
openssl-mac.pod.in Update documentation, standard input is expected to be in binary format too 2022-09-20 08:18:25 +01:00
openssl-namedisplay-options.pod
openssl-nseq.pod.in
openssl-ocsp.pod.in
openssl-passphrase-options.pod
openssl-passwd.pod.in
openssl-pkcs7.pod.in
openssl-pkcs8.pod.in
openssl-pkcs12.pod.in Fix man page to indicate SHA256 MAC for PKCS12 2022-08-30 11:36:36 +02:00
openssl-pkey.pod.in
openssl-pkeyparam.pod.in
openssl-pkeyutl.pod.in rsa: add implicit rejection in PKCS#1 v1.5 2022-12-12 11:30:52 +01:00
openssl-prime.pod.in
openssl-rand.pod.in
openssl-rehash.pod.in
openssl-req.pod.in Change all references to OpenSSL 3.1 to OpenSSL 3.2 in the master branch 2022-10-07 10:05:50 +02:00
openssl-rsa.pod.in
openssl-rsautl.pod.in rsa: add implicit rejection in PKCS#1 v1.5 2022-12-12 11:30:52 +01:00
openssl-s_client.pod.in Add support for compressed certificates (RFC8879) 2022-10-18 09:30:22 -04:00
openssl-s_server.pod.in Add support for KTLS zerocopy sendfile on Linux 2022-11-24 13:19:37 +01:00
openssl-s_time.pod.in
openssl-sess_id.pod.in
openssl-smime.pod.in
openssl-speed.pod.in apps/speed.c: Lock buffer in memory 2022-09-29 09:06:04 +10:00
openssl-spkac.pod.in
openssl-srp.pod.in
openssl-storeutl.pod.in
openssl-ts.pod.in
openssl-verification-options.pod
openssl-verify.pod.in
openssl-version.pod.in
openssl-x509.pod.in Fix typo in openssl-x509.pod.in 2022-11-25 11:36:35 +11:00
openssl.pod APPS HTTP server: trace requests and responses when enabled 2022-09-07 23:04:25 +02:00
tsget.pod