Skip to content

Commit 7c721ed

Browse files
committed
minor fix
1 parent 4c61b23 commit 7c721ed

6 files changed

+15
-13
lines changed

examples/src/migration/migration_aws_kms_key_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
66
The AWS KMS keyring uses symmetric encryption KMS keys to generate, encrypt and
77
decrypt data keys. This example creates a KMS Keyring and KMS MKP and
8-
then encrypts a custom input EXAMPLE_DATA with an encryption context using both
9-
the keyring and MKP. The example then decrypts the ciphertext using both keyring and MKPs.
8+
then encrypts a custom input EXAMPLE_DATA with the same encryption context using both
9+
the keyring and MKP. The example then decrypts the ciphertexts using both keyring and MKPs.
1010
This example also includes some sanity checks for demonstration:
1111
1. Decryption of these ciphertexts encrypted using keyring and MKP
1212
is possible using both KMS keyring and KMS MKP

examples/src/migration/migration_raw_aes_key_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
when you need to provide the wrapping key and encrypt the data keys locally or offline.
1010
1111
This example creates a Raw AES Keyring and Raw AES MKP and
12-
then encrypts a custom input EXAMPLE_DATA with an encryption context using both
13-
the keyring and MKP. The example then decrypts the ciphertext using both keyring and MKPs.
12+
then encrypts a custom input EXAMPLE_DATA with the same encryption context using both
13+
the keyring and MKP. The example then decrypts the ciphertexts using both keyring and MKPs.
1414
This example also includes some sanity checks for demonstration:
1515
1. Decryption of these ciphertexts encrypted using keyring and MKP
16-
is possible using both KMS keyring and KMS MKP
16+
is possible using both Raw AES keyring and Raw AES MKP
1717
2. Both decrypted plaintexts are same and match EXAMPLE_DATA
1818
These sanity checks are for demonstration in the example only. You do not need these in your code.
1919

examples/src/migration/migration_raw_rsa_key_example.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
decrypts the data key using the private key.
1414
1515
This example creates a Raw RSA Keyring and Raw RSA MKP and
16-
then encrypts a custom input EXAMPLE_DATA with an encryption context using both
17-
the keyring and MKP. The example then decrypts the ciphertext using both keyring and MKPs.
16+
then encrypts a custom input EXAMPLE_DATA with the same encryption context using both
17+
the keyring and MKP. The example then decrypts the ciphertexts using both keyring and MKPs.
1818
This example also includes some sanity checks for demonstration:
1919
1. Decryption of these ciphertexts encrypted using keyring and MKP
20-
is possible using both KMS keyring and KMS MKP
20+
is possible using both Raw RSA keyring and Raw RSA MKP
2121
2. Both decrypted plaintexts are same and match EXAMPLE_DATA
2222
These sanity checks are for demonstration in the example only. You do not need these in your code.
2323
@@ -142,6 +142,8 @@ def _get_raw_key(self, key_id):
142142
except KeyError:
143143
# We fix the static key in order to make the test deterministic
144144
# In practice, you should get this key from a secure key management system such as an HSM.
145+
# Also, in practice, users should generate a new key pair for each key id in
146+
# the StaticRandomMasterKeyProvider.
145147
static_key = DEFAULT_RSA_PRIVATE_KEY
146148
self._static_keys[key_id] = static_key
147149
return WrappingKey(

examples/test/migration/test_i_migration_aws_kms_key_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111

1212

1313
def test_migration_aws_kms_key():
14-
"""Test function for migrating using AWS KMS Keys."""
14+
"""Test function for migration of AWS KMS Keys."""
1515
kms_key_id = "arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f"
1616
migration_aws_kms_key(kms_key_id)

examples/test/migration/test_i_migration_raw_aes_key_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
3-
"""Test suite for the migration_to_raw_aes_keyring_from_raw_aes_master_key_provider_example."""
3+
"""Test suite for the migration_raw_aes_key_example."""
44
import pytest
55

66
from ...src.migration.migration_raw_aes_key_example import (
@@ -11,5 +11,5 @@
1111

1212

1313
def test_migration_raw_aes_key():
14-
"""Test function for migrating to Raw AES Keyring from Raw AES Master Key Provider."""
14+
"""Test function for migration of Raw AES keys."""
1515
migration_raw_aes_key()

examples/test/migration/test_i_migration_raw_rsa_key_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
3-
"""Test suite for the migration_to_raw_rsa_keyring_from_raw_rsa_master_key_provider_example."""
3+
"""Test suite for the migration_raw_rsa_key_example."""
44
import pytest
55

66
from ...src.migration.migration_raw_rsa_key_example import (
@@ -11,5 +11,5 @@
1111

1212

1313
def test_migration_raw_rsa_key():
14-
"""Test function for migrating to Raw RSA Keyring from Raw RSA Master Key Provider."""
14+
"""Test function for migration of Raw RSA keys."""
1515
migration_raw_rsa_key()

0 commit comments

Comments
 (0)