Skip to content

Base keyrings #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 113 commits into from
Aug 1, 2019
Merged
Show file tree
Hide file tree
Changes from 103 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
0d29631
Adding Keyring API
mmegs-amzn Jun 18, 2019
237a2af
Added docstring to public class
mmegs-amzn Jun 18, 2019
9bbdf83
Delete __init__.py
MeghaShetty Jun 18, 2019
1a14a3b
Delete raw_keyring.py
MeghaShetty Jun 18, 2019
c1a1c77
Edited docstring
mmegs-amzn Jun 18, 2019
66b348f
Edited docstring again
mmegs-amzn Jun 18, 2019
4a0a1c6
Changes in docstring statements
mmegs-amzn Jun 19, 2019
5f6fcb9
Docstring changes
mmegs-amzn Jun 19, 2019
9d8d964
Changes in docstring
mmegs-amzn Jun 20, 2019
83ccdd3
Raw keyring initial
mmegs-amzn Jun 20, 2019
aed1ed7
Raw keyring encrypt commit
mmegs-amzn Jun 20, 2019
dc9352c
Encrypt functions for Raw RSA and AES
mmegs-amzn Jun 20, 2019
b9c22b9
Raw RSA and AES initial
mmegs-amzn Jun 20, 2019
745c9ed
Changes in raw keyrings according to new keyring materials
mmegs-amzn Jun 27, 2019
bb163bc
Updated with autoformat
mmegs-amzn Jun 27, 2019
27fe8d9
Modified base
mmegs-amzn Jun 28, 2019
e8286ac
Corrected tox and flake errors
mmegs-amzn Jun 28, 2019
eef26e7
Docstring error correction
mmegs-amzn Jul 1, 2019
900a064
Added docstrings and corrected errors
mmegs-amzn Jul 1, 2019
c500970
Some more changes in docstrings
mmegs-amzn Jul 1, 2019
8a00e15
Updating base API
mmegs-amzn Jul 1, 2019
250f554
Made all suggested changes
mmegs-amzn Jul 2, 2019
d8a8389
Corrected tox and flake8 errors
mmegs-amzn Jul 3, 2019
8f9f737
Minor change in raw-keyrings
mmegs-amzn Jul 8, 2019
9cd81ea
Adding Keyring API
mmegs-amzn Jun 18, 2019
e3d0757
Added docstring to public class
mmegs-amzn Jun 18, 2019
fcb03c2
Delete __init__.py
MeghaShetty Jun 18, 2019
ae78331
Delete raw_keyring.py
MeghaShetty Jun 18, 2019
f668ca4
Edited docstring
mmegs-amzn Jun 18, 2019
c06b1fa
Edited docstring again
mmegs-amzn Jun 18, 2019
1e2a672
Changes in docstring statements
mmegs-amzn Jun 19, 2019
82feb00
Docstring changes
mmegs-amzn Jun 19, 2019
11f9ce6
Changes in docstring
mmegs-amzn Jun 20, 2019
7a345a5
Raw keyring initial
mmegs-amzn Jun 20, 2019
6ef9ea7
Raw keyring encrypt commit
mmegs-amzn Jun 20, 2019
6576731
Encrypt functions for Raw RSA and AES
mmegs-amzn Jun 20, 2019
5a87c0e
Raw RSA and AES initial
mmegs-amzn Jun 20, 2019
dd01e6b
bump attrs to 19.1.0
mattsb42-aws Jun 21, 2019
82429fe
add keyring trace and integrate into updated encrytion/decryption mat…
mattsb42-aws Jun 21, 2019
0dc48a2
s/KeyRing/Keyring/g
mattsb42-aws Jun 21, 2019
ea0b09d
align cryptographic materials and add write-only interface
mattsb42-aws Jun 27, 2019
9b3d4e2
encrypted_data_keys must only contain EncryptedDataKey
mattsb42-aws Jun 27, 2019
ac67a6f
fix test to be Python 2 compatible
mattsb42-aws Jun 27, 2019
0921eff
Changes in raw keyrings according to new keyring materials
mmegs-amzn Jun 27, 2019
8399fea
Updated with autoformat
mmegs-amzn Jun 27, 2019
38c756b
Modified base
mmegs-amzn Jun 28, 2019
5005cfb
data encryption key must be set before encrypted data keys can be add…
mattsb42-aws Jun 28, 2019
242a3a3
Corrected tox and flake errors
mmegs-amzn Jun 28, 2019
2672567
Docstring error correction
mmegs-amzn Jul 1, 2019
2696183
Added docstrings and corrected errors
mmegs-amzn Jul 1, 2019
f1d1977
Some more changes in docstrings
mmegs-amzn Jul 1, 2019
f08239c
Updating base API
mmegs-amzn Jul 1, 2019
881cf5e
add signing/verification key checks to Encryption/DecryptionMaterials
mattsb42-aws Jul 2, 2019
5769efa
DecryptionMaterials.algorithm must be set before DecryptionMaterials.…
mattsb42-aws Jul 2, 2019
00a7678
update materials docs and typehints
mattsb42-aws Jul 2, 2019
36edf5b
Made all suggested changes
mmegs-amzn Jul 2, 2019
98cf791
EncryptionMaterials must not be initialized with encrypted_data_keys …
mattsb42-aws Jul 3, 2019
e03f38b
add is_complete properties to EncryptionMaterials and DecryptionMater…
mattsb42-aws Jul 3, 2019
f99ac6c
Corrected tox and flake8 errors
mmegs-amzn Jul 3, 2019
b928fd2
Minor change in raw-keyrings
mmegs-amzn Jul 8, 2019
e92db76
change KeyringTraceFlag values to bitshifted ints to match other impl…
mattsb42-aws Jul 9, 2019
bcd4cfe
normalize EncryptionMaterials._encrypted_data_keys to list and encryp…
mattsb42-aws Jul 9, 2019
be3a391
temporarily pin pydocstyle at <4.0.0 to avoid issue breaking flake8-d…
mattsb42-aws Jul 9, 2019
402af2c
temporarily cap pydocstyle at <4.0.0 for decrypt oracle
mattsb42-aws Jul 10, 2019
be4f74c
Changes to keyring trace in raw keyrings
mmegs-amzn Jul 12, 2019
f165e22
Merge branch 'keyring' of github.com:aws/aws-encryption-sdk-python in…
mmegs-amzn Jul 12, 2019
b921715
Changes to raw keyrings after rebase
mmegs-amzn Jul 12, 2019
c01fb90
Adding test files
mmegs-amzn Jul 12, 2019
85a0149
Adding tests
mmegs-amzn Jul 12, 2019
af239f6
Changed data encryption key type to RawDataKey
mmegs-amzn Jul 12, 2019
1a49427
Added keyring trace to pytest encryption materials
mmegs-amzn Jul 14, 2019
ec1d8b5
Changed value of keyring_trace.wrapping_key
mmegs-amzn Jul 15, 2019
5ff39d6
Few changes to match new API
mmegs-amzn Jul 15, 2019
64298a7
Tox errors
mmegs-amzn Jul 15, 2019
cc5aa44
Functional tests pass
mmegs-amzn Jul 16, 2019
7d896d1
Formatting errors corrected and functional tests pass
mmegs-amzn Jul 16, 2019
3eb4536
Corrected too broad exception error and deleted empty return statemen…
mmegs-amzn Jul 16, 2019
b1ad3ed
Changed Exeception to BaseException to solve broad exception error
mmegs-amzn Jul 16, 2019
03aeae3
Added suppress broad exception
mmegs-amzn Jul 17, 2019
2a248f5
Added pylint disable broad exception
mmegs-amzn Jul 17, 2019
92f419c
Changed wrapping keys for RSA keyrings from WrappingKey to cryptograp…
mmegs-amzn Jul 18, 2019
66b56b7
Fixed tox errors
mmegs-amzn Jul 18, 2019
0295db5
More tox errors
mmegs-amzn Jul 18, 2019
4adec20
Moved code for generation of plaintext to be before the check for key…
mmegs-amzn Jul 18, 2019
22243dc
Tox errors
mmegs-amzn Jul 18, 2019
07d05f7
Added metaclass to base API and unit tests for base API
mmegs-amzn Jul 18, 2019
6df10d5
Changed metaclass to six.add_metaclass in base API
mmegs-amzn Jul 18, 2019
8e47bad
Fixed pylint errors
mmegs-amzn Jul 18, 2019
4aae643
Fixed more pylint errors
mmegs-amzn Jul 18, 2019
ede165a
Removed RawAESKeyring instance
mmegs-amzn Jul 18, 2019
39dbfd3
Changed on_encrypt_helper to generate_data_key and removed on_decrypt…
mmegs-amzn Jul 19, 2019
61e8fe5
Changed docstring for generate_data_key
mmegs-amzn Jul 19, 2019
e61f4a2
Changed decryption_materials.data_key to decryption_materials.data_en…
mmegs-amzn Jul 19, 2019
89f8a2c
Fixed pylint errors
mmegs-amzn Jul 19, 2019
fbf351f
Changed raw keyrings to have class methods for PEM and DER encoded keys
mmegs-amzn Jul 20, 2019
fb8b7b8
Unit tests for raw keyrings
mmegs-amzn Jul 22, 2019
41dd140
Changes for PEM encoding
mmegs-amzn Jul 22, 2019
b350207
Changed base API to remove metaclass and modified tests
mmegs-amzn Jul 23, 2019
9de5b16
Delete raw_keyring.py
MeghaShetty Jul 23, 2019
16d433d
Delete test_f_keyring_raw_aes.py
MeghaShetty Jul 23, 2019
7c021da
Delete test_f_keyring_raw_rsa.py
MeghaShetty Jul 23, 2019
115f804
Delete test_keyring_raw_aes.py
MeghaShetty Jul 23, 2019
3f9a3c0
Delete test_keyring_raw_rsa.py
MeghaShetty Jul 23, 2019
d2bb774
Suggested changes
mmegs-amzn Jul 23, 2019
3620b58
Made suggested changes to base API and tests
mmegs-amzn Jul 24, 2019
115254b
Made suggested changes to base API tests
mmegs-amzn Jul 24, 2019
8943bf2
Merge branch 'base-keyrings' of github.com:MeghaShetty/aws-encryption…
mmegs-amzn Jul 24, 2019
b37933c
Ignore commit
mmegs-amzn Jul 24, 2019
a7eb7e2
Corrected tox and pylint errors in base API unit tests
mmegs-amzn Jul 24, 2019
5a9d2bb
Removed try except for Iterable
mmegs-amzn Aug 1, 2019
0767416
Removed try except for Iterable from test_utils
mmegs-amzn Aug 1, 2019
66d96c2
Added try except for Iterable in base API
mmegs-amzn Aug 1, 2019
28fdbd8
Resolved isort errors
mmegs-amzn Aug 1, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions examples/src/sample_aes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
"""Functional tests for Raw AES keyring encryption decryption path."""

import pytest

from aws_encryption_sdk.identifiers import Algorithm, WrappingAlgorithm
from aws_encryption_sdk.keyring.raw_keyring import RawAESKeyring
from aws_encryption_sdk.materials_managers import DecryptionMaterials, EncryptionMaterials

pytestmark = [pytest.mark.functional, pytest.mark.local]

_ENCRYPTION_CONTEXT = {"key_a": "value_a", "key_b": "value_b", "key_c": "value_c"}
_PROVIDER_ID = "Random Raw Keys"
_KEY_ID = b"5325b043-5843-4629-869c-64794af77ada"
_WRAPPING_KEY = b"12345678901234567890123456789012"
_SIGNING_KEY = b"aws-crypto-public-key"

_ENCRYPTION_MATERIALS = EncryptionMaterials(
algorithm=Algorithm.AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384,
encryption_context=_ENCRYPTION_CONTEXT,
signing_key=_SIGNING_KEY,
)


def sample_aes_encryption_decryption():

# Initializing attributes
key_namespace = _PROVIDER_ID
key_name = _KEY_ID
_wrapping_algorithm = WrappingAlgorithm.AES_256_GCM_IV12_TAG16_NO_PADDING

# Creating an instance of a raw AES keyring
fake_raw_aes_keyring = RawAESKeyring(
key_namespace=key_namespace,
key_name=key_name,
wrapping_key=_WRAPPING_KEY,
wrapping_algorithm=_wrapping_algorithm,
)

# Call on_encrypt function for the keyring
encryption_materials = fake_raw_aes_keyring.on_encrypt(encryption_materials=_ENCRYPTION_MATERIALS)

print("PLAINTEXT DATA KEY")
print(encryption_materials.data_encryption_key.data_key)

print("ENCRYPTED DATA KEY")
print(encryption_materials.encrypted_data_keys)

# Generate decryption materials
decryption_materials = DecryptionMaterials(
algorithm=Algorithm.AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384, verification_key=b"ex_verification_key"
)

# Call on_decrypt function for the keyring
decryption_materials = fake_raw_aes_keyring.on_decrypt(
decryption_materials=decryption_materials, encrypted_data_keys=encryption_materials.encrypted_data_keys
)

print("DECRYPTED DATA KEY")
print(decryption_materials.data_encryption_key.data_key)

if decryption_materials.data_encryption_key:
# Check if the data keys match
assert encryption_materials.data_encryption_key == decryption_materials.data_encryption_key


sample_aes_encryption_decryption()
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
six
boto3>=1.4.4
cryptography>=1.8.1
attrs>=19.1.0
Expand Down
13 changes: 13 additions & 0 deletions src/aws_encryption_sdk/keyring/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
"""All provided Keyrings."""
4 changes: 2 additions & 2 deletions src/aws_encryption_sdk/materials_managers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class EncryptionMaterials(CryptographicMaterials):
Most parameters are now optional.

:param Algorithm algorithm: Algorithm to use for encrypting message
:param DataKey data_encryption_key: Plaintext data key to use for encrypting message (optional)
:param RawDataKey data_encryption_key: Plaintext data key to use for encrypting message (optional)
:param encrypted_data_keys: List of encrypted data keys (optional)
:type encrypted_data_keys: list of :class:`EncryptedDataKey`
:param dict encryption_context: Encryption context tied to `encrypted_data_keys`
Expand Down Expand Up @@ -370,7 +370,7 @@ class DecryptionMaterials(CryptographicMaterials):
All parameters are now optional.

:param Algorithm algorithm: Algorithm to use for encrypting message (optional)
:param DataKey data_encryption_key: Plaintext data key to use for encrypting message (optional)
:param RawDataKey data_encryption_key: Plaintext data key to use for encrypting message (optional)
:param dict encryption_context: Encryption context tied to `encrypted_data_keys` (optional)
:param bytes verification_key: Raw signature verification key (optional)
:param keyring_trace: Any KeyRing trace entries (optional)
Expand Down
73 changes: 73 additions & 0 deletions test/unit/test_keyring_base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
"""Unit tests for base keyring."""

import pytest
import six

from aws_encryption_sdk.identifiers import Algorithm
from aws_encryption_sdk.keyring.base import EncryptedDataKey, Keyring
from aws_encryption_sdk.materials_managers import DecryptionMaterials, EncryptionMaterials
from aws_encryption_sdk.structures import MasterKeyInfo

try: # Python 3.5.0 and 3.5.1 have incompatible typing modules
from typing import Iterable # noqa pylint: disable=unused-import
except ImportError: # pragma: no cover
# We only actually need these imports when running the mypy checks
pass

pytestmark = [pytest.mark.unit, pytest.mark.local]

_encryption_materials = EncryptionMaterials(
algorithm=Algorithm.AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384,
encryption_context={"encryption": "context", "values": "here"},
signing_key=b"aws-crypto-public-key",
)

_decryption_materials = DecryptionMaterials(
algorithm=Algorithm.AES_256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384, verification_key=b"ex_verification_key"
)

_encrypted_data_keys = [
EncryptedDataKey(
key_provider=MasterKeyInfo(provider_id="Random Raw Keys", key_info=b"5325b043-5843-4629-869c-64794af77ada"),
encrypted_data_key=six.b(
"\n \x8b\xc6\xfd\x91\xc7\xd5\xdc+S\x15n\xd9P\x99n\x1d\xb2\xdd\x15\xeaW"
"\xc3\x13k2\xf6\x02\xd0\x0f\x85\xec\x9e\x12\xa7\x01\x01\x01\x01\x00x"
"\x8b\xc6\xfd\x91\xc7\xd5\xdc+S\x15n\xd9P\x99n\x1d\xb2\xdd\x15\xeaW"
"\xc3\x13k2\xf6\x02\xd0\x0f\x85\xec\x9e\x00\x00\x00~0|\x06\t*\x86H"
"\x86\xf7\r\x01\x07\x06\xa0o0m\x02\x01\x000h\x06\t*\x86H\x86\xf7\r"
"\x01\x07\x010\x1e\x06\t`\x86H\x01e\x03\x04\x01.0\x11\x04\x0c\xc9rP"
"\xa1\x08t6{\xf2\xfd\xf1\xb3\x02\x01\x10\x80;D\xa4\xed`qP~c\x0f\xa0d"
"\xd5\xa2Kj\xc7\xb2\xc6\x1e\xec\xfb\x0fK\xb2*\xd5\t2\x81pR\xee\xd1"
'\x1a\xde<"\x1b\x98\x88\x8b\xf4&\xdaB\x95I\xd2\xff\x10\x13\xfc\x1aX'
"\x08,/\x8b\x8b"
),
)
]


def test_keyring_no_encrypt():
class KeyringNoEncrypt(Keyring):
def on_decrypt(self, _decryption_materials, _encrypted_data_keys):
return

assert pytest.raises(NotImplementedError)


def test_keyring_no_decrypt():
class KeyringNoDecrypt(Keyring):
def on_encrypt(self, _encryption_materials):
return

assert pytest.raises(NotImplementedError)
27 changes: 27 additions & 0 deletions test/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@
import aws_encryption_sdk.internal.utils
from aws_encryption_sdk.exceptions import InvalidDataKeyError, SerializationError, UnknownIdentityError
from aws_encryption_sdk.internal.defaults import MAX_FRAME_SIZE, MESSAGE_ID_LENGTH
from aws_encryption_sdk.materials_managers import EncryptionMaterials, DecryptionMaterials, EncryptedDataKey
from aws_encryption_sdk.structures import DataKey, EncryptedDataKey, MasterKeyInfo, RawDataKey
from aws_encryption_sdk.keyring.raw_keyring import RawRSAKeyring, RawAESKeyring

from .test_values import VALUES
from .unit_test_utils import assert_prepped_stream_identity

try: # Python 3.5.0 and 3.5.1 have incompatible typing modules
from typing import Iterable, Union # noqa pylint: disable=unused-import
except ImportError: # pragma: no cover
# We only actually need these imports when running the mypy checks
pass

pytestmark = [pytest.mark.unit, pytest.mark.local]


Expand All @@ -42,6 +50,24 @@ def test_prep_stream_data_wrap(source):
assert_prepped_stream_identity(test, io.BytesIO)


class NullRawRSAKeyring(RawRSAKeyring):
def on_encrypt(self, encryption_materials):
# type: (EncryptionMaterials) -> EncryptionMaterials
return encryption_materials

def on_decrypt(self, decryption_materials, encrypted_data_keys):
# type: (DecryptionMaterials, Iterable[EncryptedDataKey]) -> DecryptionMaterials
return decryption_materials


class NullRawAESKeyring(RawAESKeyring):
def on_encrypt(self):
return

def on_decrypt(self):
return


class TestUtils(object):
@pytest.fixture(autouse=True)
def apply_fixtures(self):
Expand Down Expand Up @@ -265,3 +291,4 @@ def test_source_data_key_length_check_invalid(self):
source_data_key=mock_data_key, algorithm=mock_algorithm
)
excinfo.match("Invalid Source Data Key length 4 for algorithm required: 5")

48 changes: 48 additions & 0 deletions test/unit/test_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,54 @@ def array_byte(source):
"\xff\x8fn\x95\xf0\xf0E\x91Uj\xb0E3=\x0e\x1a\xf1'4\xf6"
),
"signature_len": b"\x00h",
"private_rsa_key_bytes": [
(
b"-----BEGIN RSA PRIVATE KEY-----"b"MIICXgIBAAKBgQCUjhI8YRPXV8Gfofbg/"
b"PLjWw2AzowQTPErLU2z3+xGqElMdzdiC4Ta43DFWZg34Eg0X8kQPAeoe8h3cRSMo"
b"77eSOHt2dPo7OfTfZqsH8766fivHIKVxBYPX8SZYIUhMtRnlg3uqch9BksfRop+h"
b"f8h/H3lfervJoevS2CXYB9/iwIDAQABAoGBAIqeGzQOHbaGI51yQ2zjez1dPDdiB"
b"F49fZideHEM1GuGIodgguRQ/VJGgncUSC5zcMy2SGaGrVqwznltohAtxy4rZp0eh"
b"2O3aHYi9Wehd0SPLh+qwu7mJDuh0z15hmCOue070FnUtyuSwhXLwDrbot2+5HbmF"
b"9clJLI5tv92gvIpAkEA+Bv5i8XJNPN1rao31aQFoi9bFIOEclk3b1RbLX6mpZBFS"
b"U9CNUy0RQNC0+H3KZ5CTvsyFGpMfTdiFc/Qdesk3QJBAJlHjrvoadP+PU3zXYrWR"
b"D5EryyTxaP1bOjrp9xLuQBeU8x7EVJdpoul9OmwcT3NrAqvxDE9okjha2tjCI6O2"
b"4cCQQDMyOJPYL/zaaPO5LlTKB/SPv4RT4BplYPw6xKa2XeZHhxiJv5B2f7NG6T0G"
b"AWWn16hrCoouZhKngTidfXc7motAkA/KiTgvKr3yHp86AAxWZDv1CAYD6FPqrDB3"
b"3LiLnZDd5uy1ThTJ/Kc87vUnXhdDqeKE9qWrB53SCWbMElzbd17AkEA4DMp+6ngM"
b"o6sS0dY1X6nTLqgvK3B0z5GCAdSEy3Y8jh995Lrl+hy88HzuwUkQwwPlZkFhUNCx"
b"edrC6cTKE5xLA=="
b"-----END RSA PRIVATE KEY-----"
),
(
b"-----BEGIN RSA PRIVATE KEY-----\n"
b"MIIEowIBAAKCAQEAo8uCyhiO4JUGZV+rtNq5DBA9Lm4xkw5kTA3v6EPybs8bVXL2\n"
b"ZE6jkbo+xT4Jg/bKzUpnp1fE+T1ruGPtsPdoEmhY/P64LDNIs3sRq5U4QV9IETU1\n"
b"vIcbNNkgGhRjV8J87YNY0tV0H7tuWuZRpqnS+gjV6V9lUMkbvjMCc5IBqQc3heut\n"
b"/+fH4JwpGlGxOVXI8QAapnSy1XpCr3+PT29kydVJnIMuAoFrurojRpOQbOuVvhtA\n"
b"gARhst1Ji4nfROGYkj6eZhvkz2Bkud4/+3lGvVU5LO1vD8oY7WoGtpin3h50VcWe\n"
b"aBT4kejx4s9/G9C4R24lTH09J9HO2UUsuCqZYQIDAQABAoIBAQCfC90bCk+qaWqF\n"
b"gymC+qOWwCn4bM28gswHQb1D5r6AtKBRD8mKywVvWs7azguFVV3Fi8sspkBA2FBC\n"
b"At5p6ULoJOTL/TauzLl6djVJTCMM701WUDm2r+ZOIctXJ5bzP4n5Q4I7b0NMEL7u\n"
b"ixib4elYGr5D1vrVQAKtZHCr8gmkqyx8Mz7wkJepzBP9EeVzETCHsmiQDd5WYlO1\n"
b"C2IQYgw6MJzgM4entJ0V/GPytkodblGY95ORVK7ZhyNtda+r5BZ6/jeMW+hA3VoK\n"
b"tHSWjHt06ueVCCieZIATmYzBNt+zEz5UA2l7ksg3eWfVORJQS7a6Ef4VvbJLM9Ca\n"
b"m1kdsjelAoGBANKgvRf39i3bSuvm5VoyJuqinSb/23IH3Zo7XOZ5G164vh49E9Cq\n"
b"dOXXVxox74ppj/kbGUoOk+AvaB48zzfzNvac0a7lRHExykPH2kVrI/NwH/1OcT/x\n"
b"2e2DnFYocXcb4gbdZQ+m6X3zkxOYcONRzPVW1uMrFTWHcJveMUm4PGx7AoGBAMcU\n"
b"IRvrT6ye5se0s27gHnPweV+3xjsNtXZcK82N7duXyHmNjxrwOAv0SOhUmTkRXArM\n"
b"6aN5D8vyZBSWma2TgUKwpQYFTI+4Sp7sdkkyojGAEixJ+c5TZJNxZFrUe0FwAoic\n"
b"c2kb7ntaiEj5G+qHvykJJro5hy6uLnjiMVbAiJDTAoGAKb67241EmHAXGEwp9sdr\n"
b"2SMjnIAnQSF39UKAthkYqJxa6elXDQtLoeYdGE7/V+J2K3wIdhoPiuY6b4vD0iX9\n"
b"JcGM+WntN7YTjX2FsC588JmvbWfnoDHR7HYiPR1E58N597xXdFOzgUgORVr4PMWQ\n"
b"pqtwaZO3X2WZlvrhr+e46hMCgYBfdIdrm6jYXFjL6RkgUNZJQUTxYGzsY+ZemlNm\n"
b"fGdQo7a8kePMRuKY2MkcnXPaqTg49YgRmjq4z8CtHokRcWjJUWnPOTs8rmEZUshk\n"
b"0KJ0mbQdCFt/Uv0mtXgpFTkEZ3DPkDTGcV4oR4CRfOCl0/EU/A5VvL/U4i/mRo7h\n"
b"ye+xgQKBgD58b+9z+PR5LAJm1tZHIwb4tnyczP28PzwknxFd2qylR4ZNgvAUqGtU\n"
b"xvpUDpzMioz6zUH9YV43YNtt+5Xnzkqj+u9Mr27/H2v9XPwORGfwQ5XPwRJz/2oC\n"
b"EnPmP1SZoY9lXKUpQXHXSpDZ2rE2Klt3RHMUMHt8Zpy36E8Vwx8o\n"
b"-----END RSA PRIVATE KEY-----\n"
)
]
}
VALUES["updated_encryption_context"] = copy.deepcopy(VALUES["encryption_context"])
VALUES["updated_encryption_context"]["aws-crypto-public-key"] = VALUES["encoded_curve_point"]
Expand Down