@@ -136,6 +136,16 @@ struct aws_cryptosdk_enc_request {
136136 * The encryption context for this message. CMMs are permitted to modify this
137137 * hash table in order to inject additional keys or otherwise modify the encryption
138138 * context.
139+ *
140+ * The values provided to the encryption context SHOULD be UTF-8 bytes.
141+ * While it is technically possible to provide invalid UTF-8 bytes,
142+ * doing so is strongly discouraged.
143+ * Messages that include invalid UTF-8 bytes in their encryption context
144+ * will not be interoperable across different language implementations
145+ * of the AWS Encryption SDK.
146+ * The ESDK for C permits writing and reading encryption contexts that
147+ * contain invalid UTF-8 bytes, but ESDKs in other languages will neither
148+ * read nor write messages whose encryption context contains invalid UTF-8.
139149 */
140150 struct aws_hash_table * enc_ctx ;
141151 /**
@@ -187,6 +197,21 @@ struct aws_cryptosdk_enc_materials {
187197 */
188198struct aws_cryptosdk_dec_request {
189199 struct aws_allocator * alloc ;
200+ /**
201+ * The encryption context for this message. CMMs are permitted to modify this
202+ * hash table in order to inject additional keys or otherwise modify the encryption
203+ * context.
204+ *
205+ * The values provided to the encryption context SHOULD be UTF-8 bytes.
206+ * While it is technically possible to provide invalid UTF-8 bytes,
207+ * doing so is strongly discouraged.
208+ * Messages that include invalid UTF-8 bytes in their encryption context
209+ * will not be interoperable across different language implementations
210+ * of the AWS Encryption SDK.
211+ * The ESDK for C permits writing and reading encryption contexts that
212+ * contain invalid UTF-8 bytes, but ESDKs in other languages will neither
213+ * read nor write messages whose encryption context contains invalid UTF-8.
214+ */
190215 const struct aws_hash_table * enc_ctx ;
191216 struct aws_array_list encrypted_data_keys ;
192217 enum aws_cryptosdk_alg_id alg ;
0 commit comments