Decompose the standard algorithm name into sub-elements.
Decompose the standard algorithm name into sub-elements.
For example, we need to decompose "SHA1WithRSA" into "SHA1" and "RSA" so that we can check the "SHA1" and "RSA" algorithm constraints separately.
Please override the method if need to support more name pattern.
Disabled key algorithms are applied to all certificates, including the root CAs.
Disabled key algorithms are applied to all certificates, including the root CAs.
"RSA keySize < 2048, DSA keySize < 2048, EC keySize < 224"
Disabled signature algorithms are applied to signed certificates in a certificate chain, not including CA certs.
Disabled signature algorithms are applied to signed certificates in a certificate chain, not including CA certs.
"MD2, MD4, MD5"
Returns the keySize of the given key, or None if no key exists.
This singleton object provides the code needed to check for minimum standards of an X.509 certificate. Over 95% of trusted leaf certificates and 95% of trusted signing certificates use NIST recommended key sizes. Play supports Java 1.6, which does not have built in certificate strength checking, so we roll our own here.
The default settings here are based off NIST SP 800-57, using Dates for Phasing out MD5-based signatures and 1024-bit moduli as a practical guide.
Note that the key sizes are checked on root CA certificates in the trust store. As the Mozilla document says:
Relevant key sizes:
Relevant signature algorithms:
The known weak signature algorithms are "MD2, MD4, MD5".
SHA-1 is considered too weak for new certificates, but is still allowed for verifying old certificates in the chain. The TLS and NIST'S Policy on Hash Functions blog post by one of the JSSE authors has more details, in particular the "Put it into practice" section.