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

Remove hash-on-card extension? #47

Open
arekinath opened this issue Mar 8, 2021 · 5 comments
Open

Remove hash-on-card extension? #47

arekinath opened this issue Mar 8, 2021 · 5 comments

Comments

@arekinath
Copy link
Owner

Currently debating whether to remove the ECDSA hash-on-card extension from future releases of this applet.

  • Most of the jc222 cards we tested it with (e.g. J3D081) are now known to have serious side-channel leaks in their ECDSA impls which enable easy and quick key extraction, so people probably shouldn't use them anyway
  • Removing hash-on-card would let us probably reduce our need for most of the fancier features in the SGL code (we will no longer need to regularly deal with big payloads coming in to be signed, since it'll just be hashes) and simplify that logic a lot (I know several people have raised concerns about how complex the memory management there is)
  • Removing it would also help contain our build options explosion a little, since we no longer have to deal with the two separate ECDSA modes
  • And it might let us be a little more standards-compliant with our APT, since we wouldn't have to advertise the hash-on-card algos any more? (see discussion in Current PIV Answer to Select Parsing in PIV AID  #45) We might at least be able to get the size of the APT down a bit.
  • It seems like no clients except pivy have ever implemented support for using it (though this isn't that surprising)
@kategray
Copy link

Since the side channel leaks defeat much of the purpose of the card, it's probably better to remove it and improve security-by-default.

@dengert
Copy link

dengert commented Mar 1, 2022

If "Hash on card" is expecting software to do all but last round of hash, there is a problem.

Also see OpenSC/OpenSC#2506 (comment) and htttps://github.com/openssl/openssl/issues/17688

OpenSC had one card that would allow for last round of SHA256 or SHA1 to be done on card. This required software to do the all the rounds but the last and access to intermediate hash to send to the card. OpenSSL-3.0 is deprecating the ability to access intermediate hash data. So for now, OpenSC is not going to support hash on card when used with OpenSC, as there was no response from any developers or users of the card.

@arekinath
Copy link
Owner Author

@dengert That doesn't sound like a problem so much as a vote in favour of removing it, if you ask me :)

@dengert
Copy link

dengert commented Mar 1, 2022 via email

@no-usernames-left
Copy link

no-usernames-left commented Nov 14, 2023

Most of the jc222 cards we tested it with (e.g. J3D081) are now known to have serious side-channel leaks in their ECDSA impls which enable easy and quick key extraction

@arekinath Are you referring to LadderLeak? If not, do you have a link handy which details this?

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

4 participants