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

strip leding zero bytes from PrivateKey secret #172

Open
NicolaLS opened this issue Jan 16, 2025 · 0 comments
Open

strip leding zero bytes from PrivateKey secret #172

NicolaLS opened this issue Jan 16, 2025 · 0 comments

Comments

@NicolaLS
Copy link

Instantiating two private keys using e.g. \x00\xff and \xff as the secret should not create different (property wise, not instance wise) private keys in the context of a high-level interface.

I understand that the underlying functions behave differently but on a high level I'd expect the public key derivation sG to be the same since the integer value of s is the same no matter how many leading zeros the secret bytes have.

Private keys are often serialized with a 0x00 leading zero byte padding, it would be nice to just pass this to PrivateKey() instead of having to strip that.

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

1 participant