Removes the flawed BIP-39 implementation in the core.

Removes API calls for /mnemonic.

Readout for VanityGen.java now excludes a BIP-39 seed-phrase and only gives a raw private key.
This commit is contained in:
Sir.Galahad
2021-07-08 02:24:31 -06:00
parent 52b0c244a8
commit bbe3a30e77
4 changed files with 2 additions and 2257 deletions

View File

@@ -10,7 +10,6 @@ import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.bouncycastle.jsse.provider.BouncyCastleJsseProvider;
import org.qortal.account.PrivateKeyAccount;
import org.qortal.crypto.Crypto;
import org.qortal.utils.BIP39;
import org.qortal.utils.Base58;
import com.google.common.primitives.Bytes;
@@ -44,15 +43,13 @@ public class VanityGen {
byte checksum = (byte) (hash[0] & 0xf0);
byte[] entropy132 = Bytes.concat(entropy, new byte[] { checksum });
String mnemonic = BIP39.encode(entropy132, "en");
PrivateKeyAccount account = new PrivateKeyAccount(null, hash);
if (!account.getAddress().startsWith(prefix))
continue;
System.out.println(String.format("Address: %s, public key: %s, private key: %s, mnemonic: %s",
account.getAddress(), Base58.encode(account.getPublicKey()), Base58.encode(hash), mnemonic));
System.out.println(String.format("Address: %s, public key: %s, private key: %s",
account.getAddress(), Base58.encode(account.getPublicKey()), Base58.encode(hash)));
System.out.flush();
}
}