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

feat(core): KID in NanoTDF Policy Key Access #1199

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pflynn-virtru
Copy link
Member

@pflynn-virtru pflynn-virtru commented Jul 23, 2024

Policy Key Access support
See https://github.com/opentdf/spec/tree/main/schema/nanotdf#342323-optional-policy-key-access

Added a new function lookupKidByPublicKey to the Provider in the KAS service, which looks up the key ID based on the provided public key. This function is utilized for key ID lookup in the NanoTDF rewrap method instead of the previous method. Also, included the PublicKeyBytes in the NanoTDF struct and other relevant areas. Moreover, created GetECCompressedKeyLengthFromECCMode in the EC Key Pair to extract the length of the compressed key given an ECC mode. The new approach allows us to associate public keys with their respective key IDs more efficiently.

#900
#717
#1203

Added a new function lookupKidByPublicKey to the Provider in the KAS service, which looks up the key ID based on the provided public key. This function is utilized for key ID lookup in the NanoTDF rewrap method instead of the previous method. Also, included the PublicKeyBytes in the NanoTDF struct and other relevant areas. Moreover, created GetECCompressedKeyLengthFromECCMode in the EC Key Pair to extract the length of the compressed key given an ECC mode. The new approach allows us to associate public keys with their respective key IDs more efficiently.
The update implements ECDSA support for policy keys in NanoTDF configuration. A new function ECPubKeyFromPemECDSA was added to generate an ECDSA public key from a PEM format. This also introduces changes in the nanotdf_config.go where the Policy key is now recognized as the KAS Key. Additional error handling has also been put into place in nanotdf.go for any errors during the process.
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

Successfully merging this pull request may close these issues.

1 participant