libtomcrypt icon indicating copy to clipboard operation
libtomcrypt copied to clipboard

contextualized extension of the Ed25519 scheme

Open sa-kib opened this issue 1 year ago • 2 comments

This PR adds Ed25519 context support and message pre-hashing support when signin/verifying.

Checklist

  • [x] documentation is updated
  • [x] tests are added

sa-kib avatar Aug 16 '22 09:08 sa-kib

87fbc596bf5a2a520718c5189154412ecb22fe74 is valid but I think we should keep the tweetnacl code as is (as much as possible). IMO a better fix would be to use msglen + siglen in the call of zeromem() inside ed25519_verify_private().

sjaeckel avatar Aug 16 '22 10:08 sjaeckel

@sa-kib thanks for the PR!

Please check the changes I did and confirm whether this is fine for you.

I'll rebase&squash then as necessary, force-push to your fork and will merge this PR afterwards.

sjaeckel avatar Aug 16 '22 13:08 sjaeckel

@sjaeckel thank you for taking a look! I'm fine with the changes you've made (we weren't sure if we should touch tweetnacl), thank you for taking care. This PR originated from OP-TEE Ed25519ph support, so I wanted to gather some feedback from optee community regarding usage of these API calls we introduced.

sa-kib avatar Aug 18 '22 07:08 sa-kib

@jenswi-linaro @larperaxis you're the consumers of the API, are you fine with these changes as well?

sjaeckel avatar Aug 18 '22 09:08 sjaeckel