You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following part is specifically important about sign/verify_hash:
This flag automatically sets sign_message: if an application sets the flag sign_hash when creating a key, then the key always has the permissions conveyed by sign_message. For a key pair, this concerns the private key.
I see multiple ways to fix this:
Make the fields of UsageFlags private (or just the sign/verify ones?) with setters and getters on the different usages. set_sign_hash would set both sign_hash and sign_message to true.
Just add verify/sign_message methods that return true if either sign/verify_message or sign/verify_hash are true.
I would prefer 1 I think but that is a breaking change. That's probably fine. 2 would make the behaviour correct if you use the new method but we would have to check that we use that everywhere. It's not breaking though.
The text was updated successfully, but these errors were encountered:
Made the fields of UsageFlags private and added a public setter and a public getter for each field. Also changed the operations and tests so that they use the getter/setter rather trying to access the fields of UsageFlags directly.
Signed-off-by: Sam Davis <sam.davis@arm.com>
Made the fields of UsageFlags private and added a public setter and a public getter for each field. Also changed the operations and tests so that they use the getter/setter rather trying to access the fields of UsageFlags directly.
Signed-off-by: Sam Davis <sam.davis@arm.com>
We added a clarification in the book in parallaxsecond/parsec-book#110 regarding
sign/verify_hash/message
.The following part is specifically important about
sign/verify_hash
:I see multiple ways to fix this:
UsageFlags
private (or just thesign
/verify
ones?) with setters and getters on the different usages.set_sign_hash
would set bothsign_hash
andsign_message
to true.verify/sign_message
methods that returntrue
if eithersign/verify_message
orsign/verify_hash
aretrue
.I would prefer 1 I think but that is a breaking change. That's probably fine. 2 would make the behaviour correct if you use the new method but we would have to check that we use that everywhere. It's not breaking though.
The text was updated successfully, but these errors were encountered: