This class provides default implementations for everything. If you need to customise it, extend the class and override the appropriate methods.
| Modifier and Type | Field and Description |
|---|---|
| private final SecureRandom | |
| private final JcaJceHelper | |
| private final SecureRandom | |
| private final Hashtable | |
| private final Hashtable | |
| private final Hashtable |
| Access | Constructor and Description |
|---|---|
| protected | JcaTlsCrypto(JcaJceHelper
a JCA/JCE helper configured for the class's default provider. helper, SecureRandom primary entropy source, used for key generation. entropySource, SecureRandom secondary entropy source, used for nonce and IV generation. nonceEntropySource)Base constructor. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv JceTlsSecret | |
| public byte[] | calculateKeyAgreement(String agreementAlgorithm, PrivateKey privateKey, PublicKey publicKey, String secretAlgorithm)
|
| protected TlsAEADCipherImpl | Returns: an AEAD cipher.the full name of the cipher (algorithm/mode/padding) cipherName, String the base algorithm name algorithm, int keySize (in bytes) for the cipher key. keySize, boolean true if the cipher is for encryption, false otherwise. isEncrypting)If you want to create your own versions of the AEAD ciphers required, override this method. |
| protected TlsBlockCipherImpl | Returns: a block cipher.the full name of the cipher (algorithm/mode/padding) cipherName, String the base algorithm name algorithm, int keySize (in bytes) for the cipher key. keySize, boolean true if the cipher is for encryption, false otherwise. isEncrypting)If you want to create your own versions of the block ciphers required, override this method. |
| protected TlsBlockCipherImpl | Returns: a block cipher.the full name of the cipher (algorithm/mode/padding) cipherName, String the base algorithm name algorithm, int keySize (in bytes) for the cipher key. keySize, boolean true if the cipher is for encryption, false otherwise. isEncrypting)If you want to create your own versions of the block ciphers for < TLS 1.1, override this method. |
| protected TlsBlockCipherImpl | createCBCBlockCipherImpl(TlsCryptoParameters cryptoParams, String algorithm, int cipherKeySize, boolean forEncryption)
|
| public TlsCertificate | createCertificate(byte[]
DER/BER encoding of the certificate of interest. encoding)Implements org. |
| public TlsCertificate | createCertificate(short
Certificate type as per IANA TLS Certificate Types registry type, byte[] DER/BER encoding of the certificate of interest. encoding)Implements org. |
| private TlsCipher | |
| public TlsCipher | createCipher(TlsCryptoParameters
context specific parameters. cryptoParams, int the encryption algorithm to be employed by the cipher. encryptionAlgorithm, int the MAC algorithm to be employed by the cipher. macAlgorithm)Implements org. |
| private TlsAEADCipher | |
| private TlsAEADCipher | |
| private TlsAEADCipher | |
| private TlsAEADCipher | |
| protected TlsCipher | createCipher_CBC(TlsCryptoParameters cryptoParams, String algorithm, int cipherKeySize, int macAlgorithm)
|
| private TlsAEADCipher | |
| private TlsAEADCipher | |
| public TlsDHDomain | createDHDomain(TlsDHConfig
the config describing the DH parameters to use. dhConfig)Implements org. |
| public TlsECDomain | createECDomain(TlsECConfig
the config describing the EC parameters to use. ecConfig)Implements org. |
| public TlsHash | createHash(int
the hash algorithm the hash needs to implement. cryptoHashAlgorithm)Implements org.
See enumeration class |
| protected TlsHash | Returns: a hash calculator.the name of the Hash function required. digestName)If you want to create your own versions of Hash functions, override this method. |
| public TlsHMAC | createHMAC(int
the MAC algorithm the HMAC needs to match. macAlgorithm)Implements org.
See enumeration class |
| protected TlsHMAC | |
| public TlsHMAC | createHMACForHash(int
the hash algorithm the HMAC should use. cryptoHashAlgorithm)Implements org.
See enumeration class |
| public TlsKemDomain | createKemDomain(TlsKemConfig
the config describing the KEM parameters to use. kemConfig)Implements org. |
| protected TlsHMAC | |
| public TlsNonceGenerator | createNonceGenerator(byte[]
context-specific seed material additionalSeedMaterial)Implements org. |
| protected TlsNullCipher | Returns: a null cipher suite implementation.the name of the algorithm supporting the MAC. macAlgorithm)To disable the null cipher suite, override this method with one that throws an IOException. |
| pack-priv Cipher | |
| public TlsSecret | createSecret(byte[]
the data to base the TlsSecret on. data)Implements org. |
| public TlsSRP6Client | createSRP6Client(TlsSRPConfig
client config. srpConfig)Implements org. |
| public TlsSRP6Server | createSRP6Server(TlsSRPConfig
server config. srpConfig, BigInteger the SRP6 verifier value. srpVerifier)Implements org. |
| public TlsSRP6VerifierGenerator | createSRP6VerifierGenerator(TlsSRPConfig
generator config. srpConfig)Implements org. |
| protected TlsStreamSigner | |
| protected TlsStreamSigner | createStreamSigner(String algorithmName, AlgorithmParameterSpec parameter, PrivateKey privateKey, boolean needsRandom)
|
| protected TlsStreamVerifier | |
| protected TlsStreamVerifier | createStreamVerifier(String algorithmName, AlgorithmParameterSpec parameter, byte[] signature, PublicKey publicKey)
|
| protected Tls13Verifier | |
| protected TlsStreamSigner | createVerifyingStreamSigner(SignatureAndHashAlgorithm algorithm, PrivateKey privateKey, boolean needsRandom, PublicKey publicKey)
|
| protected TlsStreamSigner | createVerifyingStreamSigner(String algorithmName, AlgorithmParameterSpec parameter, PrivateKey privateKey, boolean needsRandom, PublicKey publicKey)
|
| public TlsSecret | generateRSAPreMasterSecret(ProtocolVersion
the client version to place in the first 2 bytes version)Implements org. |
| pack-priv String | |
| public JcaJceHelper | |
| pack-priv String | |
| public AlgorithmParameters | |
| public SecureRandom | getSecureRandom()
Implements org. |
| public AlgorithmParameters | |
| public boolean | hasAnyStreamVerifiers(Vector<E>
A signatureAndHashAlgorithms)Vector of SignatureAndHashAlgorithm values.Implements org. |
| public boolean | hasAnyStreamVerifiersLegacy(short[]
An array of clientCertificateTypes)ClientCertificateType values.Implements org. |
| public boolean | hasCryptoHashAlgorithm(int
the algorithm of interest. cryptoHashAlgorithm)Implements org. |
| public boolean | hasCryptoSignatureAlgorithm(int
the algorithm of interest. cryptoSignatureAlgorithm)Implements org. |
| public boolean | hasDHAgreement()
Implements org. |
| public boolean | hasECDHAgreement()
Implements org. |
| public boolean | hasEncryptionAlgorithm(int
the algorithm of interest. encryptionAlgorithm)Implements org. |
| public boolean | hasHKDFAlgorithm(int
the algorithm of interest. cryptoHashAlgorithm)Implements org. |
| public boolean | hasKemAgreement()
Implements org. |
| public boolean | hasMacAlgorithm(int
the algorithm of interest. macAlgorithm)Implements org. |
| public boolean | hasNamedGroup(int namedGroup)
Implements org. named group value.
|
| public boolean | hasRSAEncryption()
Implements org. |
| public boolean | hasSignatureAlgorithm(short
the algorithm of interest. signatureAlgorithm)Implements org. |
| public boolean | hasSignatureAndHashAlgorithm(SignatureAndHashAlgorithm
the algorithm of interest. sigAndHashAlgorithm)Implements org. |
| public boolean | hasSignatureScheme(int
the scheme of interest. signatureScheme)Implements org. |
| public boolean | hasSRPAuthentication()
Implements org. |
| public TlsSecret | hkdfInit(int
the hash algorithm to instantiate HMAC with. See cryptoHashAlgorithm)CryptoHashAlgorithm for values.Implements org. |
| protected Boolean | |
| protected Boolean | |
| protected boolean | |
| protected boolean |