f4ef9b517e
Currently, we correctly refuse to parse version 0 multi-prime keys, but we still parse version 1 two-prime keys. Both should be rejected. I missed an additional clause in the spec originally. It seems otherPrimeInfos is marked OPTIONAL not because it is actually optional, but because they wanted the two RSAPrivateKey forms to share one definition. The prose rules following the definition imply that otherPrimeInfos' presence is entirely determined by the version: * version is the version number, for compatibility with future revisions of this document. It shall be 0 for this version of the document, unless multi-prime is used, in which case it shall be 1. Version ::= INTEGER { two-prime(0), multi(1) } (CONSTRAINED BY {-- version must be multi if otherPrimeInfos present --}) and: * otherPrimeInfos contains the information for the additional primes r_3, ..., r_u, in order. It shall be omitted if version is 0 and shall contain at least one instance of OtherPrimeInfo if version is 1. Change-Id: I458232a2e20ed68fddcc39c4c45333f33441f70b Reviewed-on: https://boringssl-review.googlesource.com/7143 Reviewed-by: Adam Langley <agl@google.com> |
||
---|---|---|
.. | ||
blinding.c | ||
CMakeLists.txt | ||
internal.h | ||
padding.c | ||
rsa_asn1.c | ||
rsa_impl.c | ||
rsa_test.cc | ||
rsa.c |