mirror of
https://github.com/Qortal/qortal.git
synced 2025-03-15 11:52:32 +00:00
WIP: trade-bot: make sure the "trade" private key is valid for both Curve25519 and secp256k1
This commit is contained in:
parent
16581766c6
commit
6be67d0d92
@ -254,9 +254,9 @@ public class TradeBot {
|
||||
}
|
||||
|
||||
private static byte[] generateTradePrivateKey() {
|
||||
byte[] seed = new byte[32];
|
||||
RANDOM.nextBytes(seed);
|
||||
return seed;
|
||||
// The private key is used for both Curve25519 and secp256k1 so needs to be valid for both.
|
||||
// Curve25519 accepts any seed, so generate a valid secp256k1 key and use that.
|
||||
return new ECKey().getPrivKeyBytes();
|
||||
}
|
||||
|
||||
private static byte[] deriveTradeNativePublicKey(byte[] privateKey) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user