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

[Feature] signLazy / verifyLazy functions for Ed25519 and Ed448 #29

Open
epoberezkin opened this issue Jan 11, 2024 · 3 comments
Open

Comments

@epoberezkin
Copy link

epoberezkin commented Jan 11, 2024

Currently there are only sign / verify functions that compute sha512 hash of the passed data internally. The problem with that is that it doesn't allow signing/verifying lazy bytestrings.

We can split implementation of crypton_ed25519_sign / crypton_ed25519_sign_open (and also crypton_decaf_ed448_sign / crypton_ed448_sign_open) to two parts to allow passing digests as well, and expose them as singDigest / verifyDigest functions in both modules that accept sha 512 hashes (like in other modules).

@kazu-yamamoto We will do the PR if it's ok.

@epoberezkin epoberezkin changed the title [Feature] signDigest functions for Ed25519 and Ed448 [Feature] signDigest / verifyDigest functions for Ed25519 and Ed448 Jan 11, 2024
@kazu-yamamoto
Copy link
Owner

Of course!

@dpwiz
Copy link

dpwiz commented Jan 15, 2024

Unfortunately we've found that the algorithm uses a digest prefix of its own and then again, with a prefix derived from the previous digest. That makes it challenging to make a proper API, like the signDigest in the other modules, as it would involve callback ping-pong through FFI.

@epoberezkin
Copy link
Author

epoberezkin commented Jan 15, 2024

It's possible to make singLazy/verifyLazy, by passing array of chunk pointers to C function, but it won't work well for large number of chunks probably...

We'll park this idea for now.

@epoberezkin epoberezkin changed the title [Feature] signDigest / verifyDigest functions for Ed25519 and Ed448 [Feature] signLazy / verifyLazy functions for Ed25519 and Ed448 Jan 15, 2024
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

3 participants