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

Feature/nano kid policy key access refactor #1213

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

Conversation

pflynn-virtru
Copy link
Member

No description provided.

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.
Replaced string types with dedicated KID and Algorithm types across various functions and structs. This change enhances type safety and consistency in handling cryptographic keys and algorithms. It also includes updates to related test cases and error handling.
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