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

Update hashkeys error handling when private PQ keys are passed #47

Open
cjengel opened this issue Oct 18, 2024 · 0 comments
Open

Update hashkeys error handling when private PQ keys are passed #47

cjengel opened this issue Oct 18, 2024 · 0 comments

Comments

@cjengel
Copy link
Collaborator

cjengel commented Oct 18, 2024

When you run hashkeys and pass in a private PQ key in either v2 or v3 mode it gives an odd error message and returns the wrong hash. Should either add support to extracting the public key from the private or providing a better error message. Passing in the public PQ works.

V2:
cengel:sb-signing-utils$ ./hashkeys -V 2 -a test/v2_keys/runtime_hw_key_a.key -d test/v2_keys/runtime_hw_key_d.key
**** ERROR : Not enough space for contents of file E:5136 A:2336 : test/v2_keys/runtime_hw_key_d.key
0415c90b37b30c579e12ffff3d919d6f85de3a1625bcba787cf9c48775aaae408d4da4386d82733e1efd0a84ababf08bb44cc64d8de3ecd28f539659f0bb4368
cengel:sb-signing-utils$ ./hashkeys -V 2 -a test/v2_keys/runtime_hw_key_a.key -d test/v2_keys/runtime_hw_key_d.pub
06b58c54df13d36fe3e30ecd15698d23f09b33937fec838590add2a2f491a6cda98d3e58e5b613f5d776498cbb5a17cc28f4ff0b0179ae3eceb5cea46c5e239b
cengel:sb-signing-utils$ ./hashkeys -V 2 -a test/v2_keys/runtime_hw_key_a.pub -d test/v2_keys/runtime_hw_key_d.pub
06b58c54df13d36fe3e30ecd15698d23f09b33937fec838590add2a2f491a6cda98d3e58e5b613f5d776498cbb5a17cc28f4ff0b0179ae3eceb5cea46c5e239b

V3:
cengel:sb-signing-utils$ ./hashkeys -V 3 -a test/v3_keys/runtime_hw_key_a.key -d test/v3_keys/runtime_hw_key_d.key
**** ERROR : Not enough space for contents of file E:4896 A:2592 : test/v3_keys/runtime_hw_key_d.key
60bfd05e73328496659ef1e13ab91675310510b1d1c7a868526a9a6fcd23155bf3dc8ed437e0b42d7fa0b82479f2a1a98c4c377f5f7f3a3ba8eebbcda003f92f
cengel:sb-signing-utils$ ./hashkeys -V 3 -a test/v3_keys/runtime_hw_key_a.key -d test/v3_keys/runtime_hw_key_d.pub
a29164db9d87b104aa6c17b9fdecd8a5df2b5adbd3e5b9b0da3c169fbf2cf858a5ca479e2b15af4696dfa091b6081bfccb5b34e53d355b2bac4855ec53753619
cengel:sb-signing-utils$ ./hashkeys -V 3 -a test/v3_keys/runtime_hw_key_a.pub -d test/v3_keys/runtime_hw_key_d.pub
a29164db9d87b104aa6c17b9fdecd8a5df2b5adbd3e5b9b0da3c169fbf2cf858a5ca479e2b15af4696dfa091b6081bfccb5b34e53d355b2bac4855ec53753619

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