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

Merlin dep is broken on big-endian machines #228

Open
rozbb opened this issue Nov 21, 2022 · 3 comments
Open

Merlin dep is broken on big-endian machines #228

rozbb opened this issue Nov 21, 2022 · 3 comments
Labels
do-for-2.0 This should be resolved before a 2.0 release

Comments

@rozbb
Copy link
Contributor

rozbb commented Nov 21, 2022

merlin fails tests on big endian machines dalek-cryptography/merlin#60 (comment), due to some underlying casting that isn't respectful of endianness. It probably isn't a security issue, but I don't like it.

Currently there are two PRs on two different merlin repos that fix this.

If we don't have write access to either repo, we might have to fork and maintain yet another :(

@burdges
Copy link

burdges commented Nov 21, 2022

I'd wager deterministic batch verification is not used by many people yet, and this crates gets it wrong anyways, and ed25519-zebra uses Sha512 for this. I'd swap in Sha512 now and slap on a warning that deterministic batching is unstable.

@rozbb rozbb added the do-for-2.0 This should be resolved before a 2.0 release label Dec 20, 2022
@rozbb
Copy link
Contributor Author

rozbb commented Jan 5, 2023

this crate gets it wrong anyways

How so? It would be really bad if we published something broken

I'd swap in Sha512 now

In place of what? Merlin? Using Merlin is far more secure than making my own transcript mechanism. STROBE has figured all of these things out for me.

@burdges
Copy link

burdges commented Jan 5, 2023

You need the validity criteria to be permissive like ed25519-zebra, not merely in the batch verification but in the stand along verification too. It's not I think deterministic batch verification otherwise.

It's merely an xof that sha512 lacks, not the full transcript functionality, so you'd hash the batch and then expand via cloning the sha512 state or chacha or whatever ed25519-zebra does. I like merlin but it's a dependency and ed25519 uses sha512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-for-2.0 This should be resolved before a 2.0 release
Projects
None yet
Development

No branches or pull requests

2 participants