ltonetwork / seasalt

NaCl compatible cryptography library using Bouncy Castle (Java)
Apache License 2.0
3 stars 1 forks source link

secp256k1 should not be hard coded #31

Closed jasny closed 2 years ago

jasny commented 2 years ago

ECDSA key pair should work for any curve. In compressPublicKey the secp256k1 curve is hard coded.

https://github.com/ltonetwork/seasalt/blob/fcb133c0008e73cdf46b5438fa250a07705419c2/src/main/java/com/ltonetwork/seasalt/keypair/ECDSAKeyPair.java#L53


When generating keys, use the configured curve and don't hard code 'secp256k1`.

https://github.com/ltonetwork/seasalt/blob/fcb133c0008e73cdf46b5438fa250a07705419c2/src/main/java/com/ltonetwork/seasalt/sign/ECDSARecovery.java#L292