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

The module is not compatible with BIP340 specification #32

Open
paulmillr opened this issue Jun 28, 2023 · 1 comment
Open

The module is not compatible with BIP340 specification #32

paulmillr opened this issue Jun 28, 2023 · 1 comment

Comments

@paulmillr
Copy link

kPrime = math.deterministicGetK0(d, Px, message);

To simplify, you have if (auxRand is present) { use auxRand } else { deterministicGetK0() }

Specification https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#default-signing says use auxRand should always be used. deterministicGetK0 is some weird workaround that should not be present. Also it reduces security.

@landabaso
Copy link

Hi @guggero. Could you please run this test?

git clone https://github.com/landabaso/sign_schnorr_test.git
cd sign_schnorr_test
npm install
npm run test

For some reason, results differ when auxRand is 32 0x00 bytes than when auxRand is not passed.

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

2 participants