KMS Flashcards

1
Q

Resilience of KMS

A

Regionally and Public Service (within in AWS Public Zone, but still requires permissions to access the service)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Main role of KMS

A

Create, Store and Manage Keys.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

KMS is used for

A

Encryption and decryption (plain text to cipher text and vice versa)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

features of KMS

A
Supports both asymmetric and symmetric encryption
Cryptographic operations (encryptions and decryption)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Security of KMS

A

Keys never leave KMS

Provides FIPS 140-2 (L2) US security standard.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Uses of CMK

A

KMS uses CMKs for cryptographic operations, also used by user, application and AWS services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

CMK is

A

Logical and it is just a container which has the physical backing key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

CMK contains

A
Key Policy
Key ID
Key Date
Description 
State (active or inactive) Key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Features of CMK

A

CMK contain physical backing key which is managed by KMS and used for cryptographic operations.
Physical key can be imported or generated by KMS.

Can be used to perform cryptographic operations on data of size 4KB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Security of CMK

A

CMK is restricted within KMS (in a particular region created) and cannot be extracted outside KMS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Types of CMK and Key rotation.

A

AWS Managed CMK (Completely managed by AWS)
Key Rotated - Once in 3 years (Enabled by default)
Customer Managed CMK (Can edit the key policy to allow other AWS accounts to access our key)
Key Rotated - Once a year. (Optional to enable or disable)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Key rotation ?

A

Process of changing the physical backing key.

CMK will retain all the previous keys and the current keys.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Alias

A

Can create a alias for CMK (Regionally Resilient)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Working of CMK and KMS

A

Choose a region and create a new key which will creates CMK using createKey operation (creates a container contains a physical backing key)

This is what KMS Creates,Stores and Manages.

CMKs are not stored without encryption on disk permanently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Encryption using CMK

A

User will request Encrypt Operation by providing data and specifying the CMK and KMS accepts the data assuming the user has permissions to perform encrypt
operation.

Then decrypts the key and uses the key along with the data to generate cipher text.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Decryption using CMK

A

User will request decrypt operation by only providing the data (CMK data is encoded within the encrypted data), then KMS decrypts the corresponding CMK and decrypts the encrypted data and generate plain text.

assuming the user has permissions to perform decrypt operation.

17
Q

Security of CMK and KMS

A

CMKs never leave KMS and every operation requires permissions

18
Q

Role separation

A

User 1 -> Only creating and managing keys.

User 2-> Only perform cryptographic operations.

19
Q

DEKs

A

KMS generate -> CMK -> CMKs generate DEK using generateDataKey operation.

All three linked so KMS knows which DEK belongs to which CMK.

But KMS does not manage store DEK (only generates DEKs) we or the AWS service should handle cryptographic operations using on our data.

20
Q

Condition for DEK

A

Used to perform cryptographic operations on data size greater than 4KB

21
Q

Versions of DEKs

A

Plain text Key and Encrypted Key

22
Q

Working of DEKs

A

DEK is encrypted by CMK when it is generated and decrypted key can be generated by CMK assuming we have permissions.

23
Q

Encryption using DEK

A

Encrypt plain text data with plain text version of DEK and get the cipher text and discard plain text DEK.
So we have encrypted DEK and cipher text.

this process is not handled by KMS we have to handle it or the service.

We can use the same DEK for millions of files.

24
Q

Decryption using DEK

A

Pass the encrypted DEK to KMS and call decrypt operation using the corresponding CMK and get the plain text DEK and decrypt the data and then discard the decrypted DEK.

25
Q

Key Policy

A

Every CMK has a Key policy (type of resource policy).

For Customer managed CMK we can modify the key policy.

26
Q

Chain of trust

A

Explicitly set the keys to trust the AWS account.
The account can manage the key by setting IAM policies to IAM users assuming we have permissions to grant permissions.

account trusts IAM, account is trusted by key policy.

27
Q

Role separation

A

Can grant permission to create and manage keys but cannot control cryptographic operations.