Add generalized support for Restricted Decryption operations (ActivateCredential, Import, StartAuthSession) #395
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Asymmetric restricted decryption keys (e.g., EK/SRK) can be either RSA or ECC and support the following flows:
This change splits apart the algorithm-specific asymmetric crypto, and the parent-algorithm-agnostic protocols. This PR names the first part "Labeled Key Encapsulation" because it is very much like a KEM with an additional label (that depends on which protocol is being used). The advantage of this splitup, aside from aiding understandability, is that new algorithms for PQC can be added to the "Labeled KEM" side without touching the protocols.
This change adds helper functions that can be used to create attestation credentials/challenges as well as object import blobs, and refactors the existing salted session code to leverage the same Labeled KEM code.
This change vendors the test vectors from https://github.com/chrisfenner/tpm-test-vectors, which provide comprehensive coverage for this crypto protocol code.
This change introduces a .gitallowed file, because
git-secrets
was yelling at me about the JSON files containing the string "KEY" :)