|
| 1 | +[//]: # "Copyright Amazon.com Inc. or its affiliates. All Rights Reserved." |
| 2 | +[//]: # "SPDX-License-Identifier: CC-BY-SA-4.0" |
| 3 | + |
| 4 | +# Clarify Wrapping Key Identifiers |
| 5 | + |
| 6 | +## Affected Features |
| 7 | + |
| 8 | +This serves as a reference of all features that this change affects. |
| 9 | + |
| 10 | +| Feature | |
| 11 | +| --------------------------------------------------------------------------------------------------- | |
| 12 | +| [Encrypted Data Key](../../framework/structures.md#encrypted-data-key) | |
| 13 | +| [AWS KMS Keyring](../../framework/kms-keyring.md) | |
| 14 | +| [Raw AES Keyring](../../framework/raw-aes-keyring.md) | |
| 15 | +| [Raw RSA Keyring](../../framework/raw-rsa-keyring.md) | |
| 16 | +| [Keyring Decryption Contract](https://github.com/awslabs/aws-encryption-sdk-specification/pull/131) | |
| 17 | + |
| 18 | +## Affected Specifications |
| 19 | + |
| 20 | +This serves as a reference of all specification documents that this change affects. |
| 21 | + |
| 22 | +| Specification | |
| 23 | +| --------------------------------------------------------- | |
| 24 | +| [Structures](../../framework/structures.md) | |
| 25 | +| [Keyring Interface](../../framework/keyring-interface.md) | |
| 26 | +| [AWS KMS Keyring](../../framework/kms-keyring.md) | |
| 27 | +| [Raw AES Keyring](../../framework/raw-aes-keyring.md) | |
| 28 | +| [Raw RSA Keyring](../../framework/raw-rsa-keyring.md) | |
| 29 | + |
| 30 | +## Affected Implementations |
| 31 | + |
| 32 | +The scope of this change only affects the specification. |
| 33 | +Follow-up changes that define |
| 34 | +whether implementations expose these concepts |
| 35 | +MAY affect implementations. |
| 36 | + |
| 37 | +## Definitions |
| 38 | + |
| 39 | +### Conventions used in this document |
| 40 | + |
| 41 | +The key words |
| 42 | +"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", |
| 43 | +"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" |
| 44 | +in this document are to be interpreted as described in |
| 45 | +[RFC 2119](https://tools.ietf.org/html/rfc2119). |
| 46 | + |
| 47 | +## Summary |
| 48 | + |
| 49 | +We have referenced several terms throughout various specification documents |
| 50 | +that are never defined: |
| 51 | +"key namespace", |
| 52 | +"key name", |
| 53 | +"key provider ID", |
| 54 | +and "key provider info". |
| 55 | +This change defines each of these terms |
| 56 | +and describes their relationships to each other |
| 57 | +and the keyrings they represent. |
| 58 | + |
| 59 | +## Out of Scope |
| 60 | + |
| 61 | +- Whether, or how, each keyring exposes any of these values at runtime is out of scope. |
| 62 | + |
| 63 | +- Specific values for these terms for any specific keyring is out of scope. |
| 64 | + |
| 65 | +## Motivation |
| 66 | + |
| 67 | +Various specification documents reference |
| 68 | +"key namespace", |
| 69 | +"key name", |
| 70 | +"key provider ID", |
| 71 | +and "key provider info", |
| 72 | +but we never define what these terms mean |
| 73 | +or how they relate to each other. |
| 74 | + |
| 75 | +In order to ensure the specification documents accurately describe keyring behavior, |
| 76 | +we need to define all terms that they use. |
| 77 | + |
| 78 | +## Drawbacks |
| 79 | + |
| 80 | +This change SHOULD NOT introduce any drawbacks. |
| 81 | +It is identifying and describing |
| 82 | +terms that already exist |
| 83 | +and the existing relationship between them. |
| 84 | + |
| 85 | +## Security Implications |
| 86 | + |
| 87 | +This change SHOULD NOT have any security implications. |
| 88 | + |
| 89 | +## Operational Implications |
| 90 | + |
| 91 | +This change SHOULD NOT have any operational implications. |
| 92 | + |
| 93 | +## Guide-level Explanation |
| 94 | + |
| 95 | +Key namespace and key name are configuration values that determine the behavior of a keyring. |
| 96 | + |
| 97 | +Key provider ID and key provider info are values that identify the keyring configuration |
| 98 | +that can fulfill the keyring's decryption contract. |
| 99 | +The keyring attaches these values to a data key ciphertext to form an encrypted data key. |
| 100 | + |
| 101 | +## Reference-level Explanation |
| 102 | + |
| 103 | +"Key namespace", "key name", "key provider ID", and "key provider info" |
| 104 | +are all concepts that identify a wrapping key. |
| 105 | + |
| 106 | +### key namespace |
| 107 | + |
| 108 | +A configuration value for a keyring |
| 109 | +that identifies the grouping or categorization |
| 110 | +for the wrapping keys that keyring can access. |
| 111 | + |
| 112 | +The key namespace MUST be a string value. |
| 113 | + |
| 114 | +### key name |
| 115 | + |
| 116 | +A configuration value for a keyring |
| 117 | +that identifies a single wrapping key |
| 118 | +within a key namespace. |
| 119 | + |
| 120 | +The key name MUST be a string value. |
| 121 | + |
| 122 | +### key provider ID |
| 123 | + |
| 124 | +An output value returned by a keyring on encrypt |
| 125 | +as part of an encrypted data key structure |
| 126 | +that identifies the grouping or categorization |
| 127 | +for a keyring that can fulfill this decryption contract. |
| 128 | + |
| 129 | +The key provider ID MUST be a binary value |
| 130 | +and SHOULD be equal to a UTF-8 encoding of the key namespace. |
| 131 | + |
| 132 | +### key provider info |
| 133 | + |
| 134 | +An output value returned by a keyring on encrypt |
| 135 | +as part of an encrypted data key structure |
| 136 | +that provides necessary information for a keyring |
| 137 | +to fulfill this decryption contract. |
| 138 | + |
| 139 | +The key provider info MUST be a binary value |
| 140 | +and SHOULD be equal to a UTF-8 encoding of the key name. |
| 141 | + |
| 142 | +One example of a keyring where the key name and key provider info can differ |
| 143 | +is the AWS KMS keyring. |
| 144 | +This keyring uses its key name to identify the desired CMK in its call to AWS KMS. |
| 145 | +However, the key provider info that this keyring writes is |
| 146 | +the CMK identifier that AWS KMS includes in its response. |
| 147 | +If the key name is a CMK ARN, these two values are identical |
| 148 | +because this response value is always the CMK ARN of the CMK that AWS KMS used. |
| 149 | +However, if the key name is some other valid CMK identifier, |
| 150 | +such as an alias, |
| 151 | +then they are different. |
0 commit comments