public enum CryptoAlgorithm extends Enum<CryptoAlgorithm>
Format: CryptoAlgorithm(block size, nonce length, tag length, max content length, key algo, key length, short value representing this algorithm, trailing signature alg, trailing signature length)
Enum Constant and Description |
---|
ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256
AES-GCM 128 with HKDF-SHA256
|
ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256
AES-GCM 128 with ECDSA (SHA256 with the secp256r1 curve)
|
ALG_AES_128_GCM_IV12_TAG16_NO_KDF
AES-GCM 128
|
ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256
AES-GCM 192
|
ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384
AES-GCM 192 with ECDSA (SHA384 with the secp384r1 curve)
|
ALG_AES_192_GCM_IV12_TAG16_NO_KDF
AES-GCM 192
|
ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY
AES-GCM 256 with key commitment Note: 1.7.0 of this library only supports decryption of using
this crypto algorithm and does not support encryption with this algorithm
|
ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384
AES-GCM 256 with ECDSA (SHA384 with the secp384r1 curve) and key commitment Note: 1.7.0 of this
library only supports decryption of using this crypto algorithm and does not support encryption
with this algorithm
|
ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256
AES-GCM 256
|
ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384
AES-GCM 256 with ECDSA (SHA384 with the secp384r1 curve)
|
ALG_AES_256_GCM_IV12_TAG16_NO_KDF
AES-GCM 256
|
Modifier and Type | Method and Description |
---|---|
static CryptoAlgorithm |
deserialize(byte messageFormatVersion,
short value)
Deprecated.
|
int |
getBlockSize()
Returns the block size of this algorithm in bytes.
|
int |
getCommitmentLength() |
int |
getCommitmentNonceLength() |
String |
getDataKeyAlgo()
Returns the algorithm associated with the data key.
|
int |
getDataKeyLength()
Returns the length of the data key in bytes.
|
SecretKey |
getEncryptionKeyFromDataKey(SecretKey dataKey,
CiphertextHeaders headers) |
byte[] |
getHeaderNonce()
Returns the header nonce to use with this algorithm.
|
String |
getKeyAlgo()
Returns the algorithm used for encrypting the plaintext data.
|
String |
getKeyCommitmentAlgo_() |
int |
getKeyLength()
Returns the length of the key used in this algorithm in bytes.
|
long |
getMaxContentLen()
Returns the maximum content length in bytes that can be processed under a single data key in
this algorithm.
|
byte |
getMessageFormatVersion()
Returns the message format version associated with this algorithm suite.
|
int |
getMessageIdLength()
Returns the length of the message Id in the header for this algorithm.
|
byte |
getNonceLen()
Returns the nonce length used in this algorithm in bytes.
|
int |
getSuiteDataLength() |
int |
getTagLen()
Returns the tag length used in this algorithm in bytes.
|
String |
getTrailingSignatureAlgo()
Returns the algorithm used to calculate the trailing signature
|
short |
getTrailingSignatureLength()
Returns the length of the trailing signature generated by this algorithm.
|
short |
getValue()
Returns the value used to encode this algorithm in the ciphertext.
|
boolean |
isCommitting()
Returns a derived value of whether a commitment value is generated with the key in order to
ensure key commitment.
|
boolean |
isSafeToCache()
Returns whether data keys used with this crypto algorithm can safely be cached and reused for a
different message.
|
static CryptoAlgorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CryptoAlgorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CryptoAlgorithm ALG_AES_128_GCM_IV12_TAG16_NO_KDF
public static final CryptoAlgorithm ALG_AES_192_GCM_IV12_TAG16_NO_KDF
public static final CryptoAlgorithm ALG_AES_256_GCM_IV12_TAG16_NO_KDF
public static final CryptoAlgorithm ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256
public static final CryptoAlgorithm ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA256
public static final CryptoAlgorithm ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA256
public static final CryptoAlgorithm ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256_ECDSA_P256
public static final CryptoAlgorithm ALG_AES_192_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384
public static final CryptoAlgorithm ALG_AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384
public static final CryptoAlgorithm ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY
public static final CryptoAlgorithm ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384
public static CryptoAlgorithm[] values()
for (CryptoAlgorithm c : CryptoAlgorithm.values()) System.out.println(c);
public static CryptoAlgorithm valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static CryptoAlgorithm deserialize(byte messageFormatVersion, short value)
deserialize(byte, short)
value
- the value of the objectpublic int getMessageIdLength()
public byte[] getHeaderNonce()
public byte getMessageFormatVersion()
public int getBlockSize()
public byte getNonceLen()
public int getTagLen()
public long getMaxContentLen()
public String getKeyAlgo()
public int getKeyLength()
public short getValue()
public String getDataKeyAlgo()
public int getDataKeyLength()
public String getTrailingSignatureAlgo()
public boolean isSafeToCache()
public short getTrailingSignatureLength()
public String getKeyCommitmentAlgo_()
public boolean isCommitting()
public int getCommitmentLength()
public int getCommitmentNonceLength()
public int getSuiteDataLength()
public SecretKey getEncryptionKeyFromDataKey(SecretKey dataKey, CiphertextHeaders headers) throws InvalidKeyException
InvalidKeyException
Copyright © 2023. All rights reserved.