Skip to content
Commit e8829ef1 authored by Joachim Vandersmissen's avatar Joachim Vandersmissen Committed by Herbert Xu
Browse files

crypto: rsa - restrict plaintext/ciphertext values more



SP 800-56Br2, Section 7.1.1 [1] specifies that:
1. If m does not satisfy 1 < m < (n – 1), output an indication that m is
out of range, and exit without further processing.

Similarly, Section 7.1.2 of the same standard specifies that:
1. If the ciphertext c does not satisfy 1 < c < (n – 1), output an
indication that the ciphertext is out of range, and exit without further
processing.

This range is slightly more conservative than RFC3447, as it also
excludes RSA fixed points 0, 1, and n - 1.

[1] https://doi.org/10.6028/NIST.SP.800-56Br2

Signed-off-by: default avatarJoachim Vandersmissen <git@jvdsn.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 9567d3dc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment