Class ConstraintUtils
java.lang.Object
org.bouncycastle.crypto.constraints.ConstraintUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intReturn the bits of security for the passed in RSA modulus or DH/DSA group value.static intbitsOfSecurityFor(ECCurve curve) Return the bits of security for the passed in Elliptic Curve.static intbitsOfSecurityForFF(int strength) static booleanReturn true if the service is one of the quantum-vulnerable public-key algorithms: the integer factorisation and discrete logarithm schemes NIST IR 8547 deprecates after 2030 and disallows after 2035 (RSA, DSA, DH/MQV, ECDSA/ECDH and their variants, EdDSA, X25519/X448, ElGamal, Cramer-Shoup, Naccache-Stern and the KEMs and key agreements built on them).
-
Constructor Details
-
ConstraintUtils
public ConstraintUtils()
-
-
Method Details
-
isQuantumVulnerable
Return true if the service is one of the quantum-vulnerable public-key algorithms: the integer factorisation and discrete logarithm schemes NIST IR 8547 deprecates after 2030 and disallows after 2035 (RSA, DSA, DH/MQV, ECDSA/ECDH and their variants, EdDSA, X25519/X448, ElGamal, Cramer-Shoup, Naccache-Stern and the KEMs and key agreements built on them). The decision is made on the key or domain parameters the service reports where it reports any, and otherwise on its name. The post-quantum algorithms and symmetric services are never quantum-vulnerable.- Parameters:
service- the service properties passed to the constraint.- Returns:
- true if the service relies on a quantum-vulnerable public-key algorithm, false otherwise.
-
bitsOfSecurityFor
Return the bits of security for the passed in RSA modulus or DH/DSA group value.- Parameters:
p- a modulus or group value- Returns:
- the security strength in bits.
-
bitsOfSecurityFor
Return the bits of security for the passed in Elliptic Curve.- Parameters:
curve- the ECCurve of interest.- Returns:
- the security strength in bits.
-
bitsOfSecurityForFF
public static int bitsOfSecurityForFF(int strength)
-