aws_encryption_sdk.internal.crypto.data_keys

Contains data key helper functions.

Functions

calculate_commitment_key(source_key, ...)

Calculates the commitment value.

derive_data_encryption_key(source_key, ...)

Derives the data encryption key using the defined algorithm.

aws_encryption_sdk.internal.crypto.data_keys.derive_data_encryption_key(source_key, algorithm, message_id)

Derives the data encryption key using the defined algorithm.

Parameters
  • source_key (bytes) – Raw source key

  • algorithm (aws_encryption_sdk.identifiers.Algorithm) – Algorithm used to encrypt this body

  • message_id (bytes) – Message ID

Returns

Derived data encryption key

Return type

bytes

aws_encryption_sdk.internal.crypto.data_keys.calculate_commitment_key(source_key, algorithm, message_id)

Calculates the commitment value.

Parameters
  • source_key (bytes) – Raw source key

  • algorithm (aws_encryption_sdk.identifiers.Algorithm) – Algorithm used to encrypt this body

  • message_id (bytes) – Message ID

Returns

Derived data encryption key

Return type

bytes