dynamodb_encryption_sdk.internal.crypto.jce_bridge.authentication
Cryptographic authentication resources for JCE bridge.
Warning
No guarantee is provided on the modules and APIs within this namespace staying consistent. Directly reference at your own risk.
Classes
Parent class for all Java bridges that provide authentication characteristics. |
|
|
Symmetric MAC authenticators. |
|
Asymmetric signature authenticators. |
- class dynamodb_encryption_sdk.internal.crypto.jce_bridge.authentication.JavaAuthenticator[source]
Bases:
object
Parent class for all Java bridges that provide authentication characteristics.
- abstract load_key(key, key_type, key_encoding)[source]
Load a key from bytes.
- Parameters
key (bytes) – Raw key bytes to load
key_type (EncryptionKeyType) – Type of key to load
key_encoding (KeyEncodingType) – Encoding used to serialize
key
- Returns
Loaded key
- Return type
- abstract validate_algorithm(algorithm: str) None [source]
Determine whether the requested algorithm name is compatible with this authenticator.
- Parameters
algorithm (str) – Algorithm name
- Raises
InvalidAlgorithmError – if specified algorithm name is not compatible with this authenticator
- class dynamodb_encryption_sdk.internal.crypto.jce_bridge.authentication.JavaMac(java_name: str, algorithm_type: Callable, hash_type: Callable)[source]
Bases:
dynamodb_encryption_sdk.internal.crypto.jce_bridge.authentication.JavaAuthenticator
Symmetric MAC authenticators.
https://docs.oracle.com/javase/8/docs/api/javax/crypto/Mac.html https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#Mac
- load_key(key, key_type, key_encoding)[source]
Load a raw key from bytes.
- Parameters
key (bytes) – Raw key bytes to load
key_type (EncryptionKeyType) – Type of key to load
key_encoding (KeyEncodingType) – Encoding used to serialize
key
- Returns
Loaded key
- Return type
- Raises
ValueError – if
key_type
is not symmetric orkey_encoding
is not raw
- validate_algorithm(algorithm: str) None [source]
Determine whether the requested algorithm name is compatible with this authenticator.
- Parameters
algorithm (str) – Algorithm name
- Raises
InvalidAlgorithmError – if specified algorithm name is not compatible with this authenticator
- class dynamodb_encryption_sdk.internal.crypto.jce_bridge.authentication.JavaSignature(java_name: str, algorithm_type: Any, hash_type: Callable, padding_type: Callable)[source]
Bases:
dynamodb_encryption_sdk.internal.crypto.jce_bridge.authentication.JavaAuthenticator
Asymmetric signature authenticators.
https://docs.oracle.com/javase/8/docs/api/java/security/Signature.html https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#Signature
- validate_algorithm(algorithm: str) None [source]
Determine whether the requested algorithm name is compatible with this authenticator.
- Parameters
algorithm (str) – Algorithm name
- Raises
InvalidAlgorithmError – if specified algorithm name is not compatible with this authenticator
- load_key(key, key_type, key_encoding)[source]
Load a key object from the provided raw key bytes.
- Parameters
key (bytes) – Raw key bytes to load
key_type (EncryptionKeyType) – Type of key to load
key_encoding (KeyEncodingType) – Encoding used to serialize
key
- Returns
Loaded key
- Raises
ValueError – if
key_type
andkey_encoding
are not a valid pairing