Class CryptoSpec
java.lang.Object
de.xima.fc.certificate.mgmt.CryptoSpec
- All Implemented Interfaces:
Serializable
This class represents the specifications for various key algorithms used in the XIMA formcycle certificate module. It
provides information about secure key sizes, default key sizes, and supported signature algorithms for RSA, DSA and
ECDSA algorithms.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCryptoSpec(String bsiTechnicalGuideline, Set<EKeyAlgorithm> supportedKeyAlgorithms, EKeyAlgorithm defaultKeyAlgorithm, List<Integer> supportedKeySizesRSA, int defaultKeySizeRSA, List<ESignatureType> supportedSignatureAlgorithmsRSA, ESignatureType defaultSignatureAlgorithmRSA, List<Integer> supportedKeySizesDSA, int defaultKeySizeDSA, List<ESignatureType> supportedSignatureAlgorithmsDSA, ESignatureType defaultSignatureAlgorithmDSA, List<Integer> supportedKeySizesEC, int defaultKeySizeEC, List<String> ecCurves, List<ESignatureType> supportedSignatureAlgorithmsEC, ESignatureType defaultSignatureAlgorithmEC, String defaultEcCurve, int nearExpirationDays, Duration defaultValidityPeriod, Duration maxValidityPeriod, ECertificateFileType defaultCertificateExportFileType, boolean failCertificateUpdateOnSubjectMissmatch, boolean failCertificateUpdateOnCertificateUsageMissmatch) Creates a newCryptoSpecinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe name of the BSI technical guideline that defines the cryptographic standards followed by this specification.The default export file type for certificates.The default Elliptic curve (EC) for EC algorithm.The default key algorithm for the certificate module.intgetDefaultKeySize(EKeyAlgorithm keyAlgorithm) The default key size for the specified key algorithm.intThe default key size for DSA algorithm.intThe default key size for EC algorithm.intThe default key size for RSA algorithm.The default signature algorithm for DSA algorithm.The default signature algorithm for EC algorithm.The default signature algorithm for RSA algorithm.getDefaultSignatureType(EKeyAlgorithm keyAlgorithm) The default signature algorithm for the specified key algorithm.The default validity period for certificates.A list of supported elliptic curves for EC algorithm.The maximum validity period for certificates.getMinKeySizeForAlgorithm(String strKeyAlgo) Returns the minimum key size for the given key algorithm.intThe number of days before expiration to consider a certificate as "near expiration".A set of supported key algorithms for the certificate module.A list of supported key sizes for DSA algorithm.A list of secure key sizes for EC algorithm.A list of supported key sizes for RSA algorithm.getSupportedSignatureAlgorithms(EKeyAlgorithm keyAlgorithm) A list of supported key sizes for the specified key algorithm.A list of supported signature algorithms for DSA algorithm.A list of supported signature algorithms for EC algorithm.A list of supported signature algorithms for RSA algorithm.inthashCode()booleanIf true, the import will fail if the usage of the imported certificate does not match.booleanIf true, the import will fail if the subject of the imported certificate does not match.booleanisSecureKeyAlgorithm(String strKeyAlgorithm) Checks if the given key algorithm is considered secure according to the specifications.booleanisSecureKeySize(String strKeyAlgorithm, int keySize) Checks if the given key size is considered secure for the specified key algorithm according to the specifications.toString()
-
Constructor Details
-
CryptoSpec
public CryptoSpec(String bsiTechnicalGuideline, Set<EKeyAlgorithm> supportedKeyAlgorithms, EKeyAlgorithm defaultKeyAlgorithm, List<Integer> supportedKeySizesRSA, int defaultKeySizeRSA, List<ESignatureType> supportedSignatureAlgorithmsRSA, ESignatureType defaultSignatureAlgorithmRSA, List<Integer> supportedKeySizesDSA, int defaultKeySizeDSA, List<ESignatureType> supportedSignatureAlgorithmsDSA, ESignatureType defaultSignatureAlgorithmDSA, List<Integer> supportedKeySizesEC, int defaultKeySizeEC, List<String> ecCurves, List<ESignatureType> supportedSignatureAlgorithmsEC, ESignatureType defaultSignatureAlgorithmEC, String defaultEcCurve, int nearExpirationDays, Duration defaultValidityPeriod, Duration maxValidityPeriod, ECertificateFileType defaultCertificateExportFileType, boolean failCertificateUpdateOnSubjectMissmatch, boolean failCertificateUpdateOnCertificateUsageMissmatch) Creates a newCryptoSpecinstance.- Parameters:
bsiTechnicalGuideline- The name of the BSI technical guideline that defines the cryptographic standards followed by this specification.supportedKeyAlgorithms- A set of supported key algorithms for the certificate module.defaultKeyAlgorithm- The default key algorithm for the certificate module.supportedKeySizesRSA- A list of supported key sizes for RSA algorithm.defaultKeySizeRSA- The default key size for RSA algorithm.supportedSignatureAlgorithmsRSA- A list of supported signature algorithms for RSA algorithm.defaultSignatureAlgorithmRSA- The default signature algorithm for RSA algorithm.supportedKeySizesDSA- A list of supported key sizes for DSA algorithm.defaultKeySizeDSA- The default key size for DSA algorithm.supportedSignatureAlgorithmsDSA- A list of supported signature algorithms for DSA algorithm.defaultSignatureAlgorithmDSA- The default signature algorithm for DSA algorithm.supportedKeySizesEC- A list of secure key sizes for EC algorithm.defaultKeySizeEC- The default key size for EC algorithm.ecCurves- A list of supported elliptic curves for EC algorithm.supportedSignatureAlgorithmsEC- A list of supported signature algorithms for EC algorithm.defaultSignatureAlgorithmEC- The default signature algorithm for EC algorithm.defaultEcCurve- The default Elliptic curve (EC) for EC algorithm.nearExpirationDays- The number of days before expiration to consider a certificate as "near expiration".defaultValidityPeriod- The default validity period for certificates.maxValidityPeriod- The maximum validity period for certificates.defaultCertificateExportFileType- The default export file type for certificates.failCertificateUpdateOnSubjectMissmatch- If true, the import will fail if the subject of the imported certificate does not match.failCertificateUpdateOnCertificateUsageMissmatch- If true, the import will fail if the usage of the imported certificate does not match.
-
-
Method Details
-
getDefaultKeySize
The default key size for the specified key algorithm.- Parameters:
keyAlgorithm- the key algorithm- Returns:
- the default key size for the specified key algorithm
-
getDefaultSignatureType
The default signature algorithm for the specified key algorithm.- Parameters:
keyAlgorithm- the key algorithm- Returns:
- the default signature algorithm for the specified key algorithm
-
getMinKeySizeForAlgorithm
Returns the minimum key size for the given key algorithm.- Parameters:
strKeyAlgo- The key algorithm as a string.- Returns:
- The minimum key size for the given key algorithm, or
nullif the algorithm is not supported or does not have a defined minimum key size.
-
getSupportedSignatureAlgorithms
A list of supported key sizes for the specified key algorithm.- Parameters:
keyAlgorithm- the key algorithm- Returns:
- a list of supported key sizes for the specified key algorithm
-
isSecureKeyAlgorithm
Checks if the given key algorithm is considered secure according to the specifications.- Parameters:
strKeyAlgorithm- the key algorithm as a string- Returns:
- true if the key algorithm is secure, false otherwise
-
isSecureKeySize
Checks if the given key size is considered secure for the specified key algorithm according to the specifications.- Parameters:
strKeyAlgorithm- the key algorithm as a stringkeySize- the key size to check- Returns:
- true if the key size is secure for the specified key algorithm, false otherwise
-
getBsiTechnicalGuideline
The name of the BSI technical guideline that defines the cryptographic standards followed by this specification. -
getSupportedKeyAlgorithms
A set of supported key algorithms for the certificate module. -
getDefaultKeyAlgorithm
The default key algorithm for the certificate module. -
getSupportedKeySizesRSA
-
getDefaultKeySizeRSA
public int getDefaultKeySizeRSA()The default key size for RSA algorithm. -
getSupportedSignatureAlgorithmsRSA
A list of supported signature algorithms for RSA algorithm. -
getDefaultSignatureAlgorithmRSA
The default signature algorithm for RSA algorithm. -
getSupportedKeySizesDSA
-
getDefaultKeySizeDSA
public int getDefaultKeySizeDSA()The default key size for DSA algorithm. -
getSupportedSignatureAlgorithmsDSA
A list of supported signature algorithms for DSA algorithm. -
getDefaultSignatureAlgorithmDSA
The default signature algorithm for DSA algorithm. -
getSupportedKeySizesEC
-
getDefaultKeySizeEC
public int getDefaultKeySizeEC()The default key size for EC algorithm. -
getEcCurves
-
getSupportedSignatureAlgorithmsEC
A list of supported signature algorithms for EC algorithm. -
getDefaultSignatureAlgorithmEC
The default signature algorithm for EC algorithm. -
getDefaultEcCurve
The default Elliptic curve (EC) for EC algorithm. -
getNearExpirationDays
public int getNearExpirationDays()The number of days before expiration to consider a certificate as "near expiration". -
getDefaultValidityPeriod
The default validity period for certificates. -
getMaxValidityPeriod
The maximum validity period for certificates. -
getDefaultCertificateExportFileType
The default export file type for certificates. -
isFailCertificateUpdateOnSubjectMissmatch
public boolean isFailCertificateUpdateOnSubjectMissmatch()If true, the import will fail if the subject of the imported certificate does not match. -
isFailCertificateUpdateOnCertificateUsageMissmatch
public boolean isFailCertificateUpdateOnCertificateUsageMissmatch()If true, the import will fail if the usage of the imported certificate does not match. -
equals
-
canEqual
-
hashCode
-
toString
-