-
Notifications
You must be signed in to change notification settings - Fork 219
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
Add encryption meta to metapd.Region #666
Conversation
Signed-off-by: Yi Wu <yiwu@pingcap.com>
Signed-off-by: Yi Wu <yiwu@pingcap.com>
Signed-off-by: Yi Wu <yiwu@pingcap.com>
Signed-off-by: Yi Wu <yiwu@pingcap.com>
Signed-off-by: Yi Wu <yiwu@pingcap.com>
Signed-off-by: Yi Wu <yiwu@pingcap.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest LGTM
Signed-off-by: Yi Wu <yiwu@pingcap.com>
updated. PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Yi Wu <yiwu@pingcap.com> <!-- Thank you for working on PD! Please read PD's [CONTRIBUTING](https://github.com/tikv/pd/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR. PR Title Format: 1. pkg [, pkg2, pkg3]: what's changed 2. *: what's changed --> ### What problem does this PR solve? <!-- Add the issue link with a summary if it exists. --> This is part 1 for adding TDE support to PD. pingcap/tidb#18262 It contains helper methods for encryption. ### What is changed and how it works? This PR adds utility types and functions: * encrypt/decrypt data using aes-ctr (for encrypting region boundary keys) and aes-gcm (for encrypting data encryption keys) * helper methods to encrypt/decrypt region boundary keys in-place * wrapper of master key, and helper method to read a master key (must be a 256 bit encryption key, stored as hex-string) from a local file ### Check List <!-- Remove the items that are not applicable. --> Tests <!-- At least one of them must be included. --> - Unit test Related changes - depends on pingcap/kvproto#666 ### Release note * No release note
Adding encryption meta to `metapb.Region`. This is going to be used by PD to encrypt the start_key and end_key when persisting the `Region` struct. Signed-off-by: Yi Wu <yiwu@pingcap.com>
Adding encryption meta to
metapb.Region
. This is going to be used by PD to encrypt the start_key and end_key when persisting theRegion
struct.Signed-off-by: Yi Wu yiwu@pingcap.com