We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The EdDSA.sol file doesn't have any tests for it, it also seems to be incompatible for the following reasons:
EdDSA.sol
JubJub.Generator()
jubjub.py
SHA256
The following code should produce valid signatures for the scheme in EdDSA.sol, but whenever I try testing in Remix it hangs the browser.
from ethsnarks.eddsa import _SignatureScheme, as_scalar from hashlib import sha256 class SHA256EdDSA(_SignatureScheme): @classmethod def hash_public(cls, R, A, M): args = [R.x.n, R.y.n, A.x.n, A.y, M] msg = b''.join([int.to_bytes(_, 32, 'big') for _ in as_scalar(*args)]) hashed_msg = sha256(msg).digest() return int.from_bytes(hashed_msg, 'big') & ((2<<249) - 1) msg = 1234 k, A = SHA256EdDSA.random_keypair() smsg = SHA256EdDSA.sign(1234, k) SHA256EdDSA.verify(A, smsg.sig, msg) args_for_contract = [A, msg, smsg.sig.R, smsg.sig.s]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
EdDSA.sol
file doesn't have any tests for it, it also seems to be incompatible for the following reasons:JubJub.Generator()
is different compared to the one injubjub.py
SHA256
is used, but none of the implementatitons (Python, C++) use SHA256 for EdDSAThe following code should produce valid signatures for the scheme in
EdDSA.sol
, but whenever I try testing in Remix it hangs the browser.The text was updated successfully, but these errors were encountered: