Class QuantumVulnerableConstraint
- All Implemented Interfaces:
CryptoServicesConstraints
The no-argument constructor applies the NIST dates: deprecated after 2030, disallowed after 2035. Any other policy is expressed by passing the dates explicitly; a date in the past deprecates or disallows the algorithms immediately, a date far in the future turns that step off. Services named in the exceptions set are not checked at all.
Three fixed policies are available without dates: logOnly() logs every use of a
quantum-vulnerable service and refuses nothing, legacyUseOnly() refuses new protection
(key generation, signing, encryption and key agreement) while allowing verification and
decryption, and rejectAll() refuses every use, legacy use included. One of them, or the
NIST timetable, can also be installed as the default constraint through the
Properties.CONSTRAINTS_QUANTUM_VULNERABLE property; see
forPolicy(String).
Which services count as quantum-vulnerable is decided by
ConstraintUtils.isQuantumVulnerable(CryptoServiceProperties); the post-quantum
algorithms (ML-KEM, ML-DSA, SLH-DSA, LMS/HSS, XMSS and the candidates) are never affected. Note
that a service reporting the purpose CryptoServicePurpose.ANY cannot be told from a
legacy use and is treated as one where legacy use is allowed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Date1 January 2031, 00:00 UTC: NIST IR 8547 deprecates the quantum-vulnerable public-key algorithms after 2030.static final Date1 January 2036, 00:00 UTC: NIST IR 8547 disallows the quantum-vulnerable public-key algorithms after 2035.static final StringThe policy name selectinglegacyUseOnly().static final StringThe policy name selectinglogOnly().static final StringThe policy name selecting the NIST IR 8547 timetable,QuantumVulnerableConstraint().static final StringThe policy name selecting no constraint at all.static final StringThe policy name selectingrejectAll().Fields inherited from class ServicesConstraint
LOG -
Constructor Summary
ConstructorsConstructorDescriptionApply the NIST IR 8547 timetable: deprecated after 2030, disallowed after 2035.QuantumVulnerableConstraint(Date deprecatedAfter, Date disallowedAfter) Apply an explicit timetable.QuantumVulnerableConstraint(Date deprecatedAfter, Date disallowedAfter, boolean allowLegacyUse, Set<String> exceptions) Apply an explicit timetable, choosing whether legacy use survives the disallow date.QuantumVulnerableConstraint(Date deprecatedAfter, Date disallowedAfter, Set<String> exceptions) Apply an explicit timetable with a set of service names that are not checked.QuantumVulnerableConstraint(Set<String> exceptions) Apply the NIST IR 8547 timetable with a set of service names that are not checked. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(CryptoServiceProperties service) static QuantumVulnerableConstraintReturn the constraint a policy name selects:POLICY_NISTfor the NIST IR 8547 timetable,POLICY_LOGforlogOnly(),POLICY_LEGACYforlegacyUseOnly(),POLICY_REJECTforrejectAll()andPOLICY_NONEfor no constraint.static QuantumVulnerableConstraintReturn a constraint that refuses a quantum-vulnerable service for key generation, signing, encryption and key agreement, and allows it, logged, for verification and decryption - the SP 800-131A "legacy use".static QuantumVulnerableConstraintlegacyUseOnly(Set<String> exceptions) Return a constraint that refuses a quantum-vulnerable service for key generation, signing, encryption and key agreement, and allows it, logged, for verification and decryption - the SP 800-131A "legacy use".static QuantumVulnerableConstraintlogOnly()Return a constraint that logs every use of a quantum-vulnerable service, at level INFO, and refuses nothing.static QuantumVulnerableConstraintReturn a constraint that logs every use of a quantum-vulnerable service, at level INFO, and refuses nothing.static QuantumVulnerableConstraintReturn a constraint that refuses every use of a quantum-vulnerable service, verification and decryption included.static QuantumVulnerableConstraintReturn a constraint that refuses every use of a quantum-vulnerable service, verification and decryption included.Methods inherited from class ServicesConstraint
isException
-
Field Details
-
NIST_DEPRECATED_AFTER
1 January 2031, 00:00 UTC: NIST IR 8547 deprecates the quantum-vulnerable public-key algorithms after 2030. -
NIST_DISALLOWED_AFTER
1 January 2036, 00:00 UTC: NIST IR 8547 disallows the quantum-vulnerable public-key algorithms after 2035. -
POLICY_NIST
The policy name selecting the NIST IR 8547 timetable,QuantumVulnerableConstraint().- See Also:
-
POLICY_LOG
-
POLICY_LEGACY
-
POLICY_REJECT
-
POLICY_NONE
-
-
Constructor Details
-
QuantumVulnerableConstraint
public QuantumVulnerableConstraint()Apply the NIST IR 8547 timetable: deprecated after 2030, disallowed after 2035. -
QuantumVulnerableConstraint
-
QuantumVulnerableConstraint
Apply an explicit timetable.- Parameters:
deprecatedAfter- the instant from which use of a quantum-vulnerable service is logged.disallowedAfter- the instant from which a quantum-vulnerable service is refused for anything other than legacy use.
-
QuantumVulnerableConstraint
public QuantumVulnerableConstraint(Date deprecatedAfter, Date disallowedAfter, Set<String> exceptions) Apply an explicit timetable with a set of service names that are not checked.- Parameters:
deprecatedAfter- the instant from which use of a quantum-vulnerable service is logged.disallowedAfter- the instant from which a quantum-vulnerable service is refused for anything other than legacy use.exceptions- set of service names which are exceptions to the rules.
-
QuantumVulnerableConstraint
public QuantumVulnerableConstraint(Date deprecatedAfter, Date disallowedAfter, boolean allowLegacyUse, Set<String> exceptions) Apply an explicit timetable, choosing whether legacy use survives the disallow date.- Parameters:
deprecatedAfter- the instant from which use of a quantum-vulnerable service is logged.disallowedAfter- the instant from which a quantum-vulnerable service is refused.allowLegacyUse- true if verification and decryption are still allowed after the disallow date, false if they are refused along with everything else.exceptions- set of service names which are exceptions to the rules.
-
-
Method Details
-
logOnly
Return a constraint that logs every use of a quantum-vulnerable service, at level INFO, and refuses nothing.- Returns:
- a log-only constraint.
-
logOnly
Return a constraint that logs every use of a quantum-vulnerable service, at level INFO, and refuses nothing.- Parameters:
exceptions- set of service names which are not logged.- Returns:
- a log-only constraint.
-
legacyUseOnly
Return a constraint that refuses a quantum-vulnerable service for key generation, signing, encryption and key agreement, and allows it, logged, for verification and decryption - the SP 800-131A "legacy use".- Returns:
- a legacy-use-only constraint.
-
legacyUseOnly
Return a constraint that refuses a quantum-vulnerable service for key generation, signing, encryption and key agreement, and allows it, logged, for verification and decryption - the SP 800-131A "legacy use".- Parameters:
exceptions- set of service names which are not checked.- Returns:
- a legacy-use-only constraint.
-
rejectAll
Return a constraint that refuses every use of a quantum-vulnerable service, verification and decryption included.- Returns:
- a reject-all constraint.
-
rejectAll
Return a constraint that refuses every use of a quantum-vulnerable service, verification and decryption included.- Parameters:
exceptions- set of service names which are not checked.- Returns:
- a reject-all constraint.
-
forPolicy
Return the constraint a policy name selects:POLICY_NISTfor the NIST IR 8547 timetable,POLICY_LOGforlogOnly(),POLICY_LEGACYforlegacyUseOnly(),POLICY_REJECTforrejectAll()andPOLICY_NONEfor no constraint. The names are case-insensitive and surrounding white space is ignored. This is how the value of theProperties.CONSTRAINTS_QUANTUM_VULNERABLEproperty is read.- Parameters:
policy- the policy name.- Returns:
- the constraint, or null for
POLICY_NONE. - Throws:
IllegalArgumentException- if the name is not one of the above.
-
check
-