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

Fix return of cred protect value for resident ed25519 keys #568

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

enrikb
Copy link
Contributor

@enrikb enrikb commented Sep 3, 2021

The cred protect value was not masked correctly when reading it from a
resident key. This did no harm for ec256, as the stored algorithm ID
happens to be zero wich does not invalidate the cred protect value.

For eddsa, where the stored algorithm ID is 1, the cred protect value
left the range of 1-3 and was forcibly mapped back to the default value
(1). I.e., all existing resident ed25519 keys should have stored the
correct cred protect values already. With this fix applied, the correct
values will be returned instead of a fixed value of 1.

The cred protect value was not masked correctly when reading it from a
resident key. This did no harm for ec256, as the stored algorithm ID
happens to be zero wich does not invalidate the cred protect value.

For eddsa, where the stored algorithm ID is 1, the cred protect value
left the range of 1-3 and was forcibly mapped back to the default value
(1). I.e., all existing resident ed25519 keys should have stored the
correct cred protect values already. With this fix applied, the correct
values will be returned instead of a fixed value of 1.
@enrikb enrikb mentioned this pull request Sep 3, 2021
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