You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/utilities/data_masking.md
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -504,6 +504,39 @@ sequenceDiagram
504
504
<i>Encrypting operation using envelope encryption.</i>
505
505
</center>
506
506
507
+
#### Encrypt operation with multiple KMS Keys
508
+
509
+
When encrypting data with multiple KMS keys, the `aws_encryption_sdk` executes additional encryption calls to encrypt the data with each of the specified keys.
510
+
511
+
<center>
512
+
```mermaid
513
+
sequenceDiagram
514
+
autonumber
515
+
participant Client
516
+
participant Lambda
517
+
participant DataMasking as Data Masking
518
+
participant EncryptionProvider as Encryption Provider
519
+
Client->>Lambda: Invoke (event)
520
+
Lambda->>DataMasking: Init Encryption Provider with master key
521
+
Note over Lambda,DataMasking: AWSEncryptionSDKProvider([KMS_KEY])
522
+
Lambda->>DataMasking: encrypt(data)
523
+
DataMasking->>EncryptionProvider: Create unique data key
524
+
Note over DataMasking,EncryptionProvider: KMS GenerateDataKey API
525
+
DataMasking->>DataMasking: Cache new unique data key
Note over DataMasking,EncryptionProvider: KMS Encrypt API
532
+
end
533
+
Note over DataMasking: Encrypted message includes encrypted data, data key encrypted, algorithm, and more.
534
+
DataMasking->>Lambda: Ciphertext from encrypted message
535
+
Lambda-->>Client: Return response
536
+
```
537
+
<i>Encrypting operation using envelope encryption.</i>
538
+
</center>
539
+
507
540
#### Decrypt operation with Encryption SDK (KMS)
508
541
509
542
We call KMS to decrypt the encrypted data key available in the encrypted message. If successful, we run authentication _(context)_ and integrity checks (_algorithm, data key length, etc_) to confirm its proceedings.
0 commit comments