Skip to content
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

Ensure data integrity of the keychain component #46

Open
baumstern opened this issue Aug 19, 2020 · 0 comments
Open

Ensure data integrity of the keychain component #46

baumstern opened this issue Aug 19, 2020 · 0 comments

Comments

@baumstern
Copy link
Contributor

Motivation

In a gist, other fields of keychain.Key relies on the PrivateKey field since they are derived from the private key.

Currently, the fields of keychain.Key are publicly exported.
It has a potential risk that a consumer of the keychain component may unintentionally change the value of each field. It would corrupts integrity of keychain.Key (e.g. digital signature operation like signing and verify would not working, the association of public key and id of the key would be broken).
This risk seems to me severe since most debugging for this bug gonna be hard.

Possible approach

  • Change the fields of keychain.Key to private
  • Assign the responsiblity of ensuring integrity to keychain.Store interface: see feat: keychain component #33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant