Notes on: BIP39 and Mnumonic Seeds

xmrwallet and electrum don’t use BIP39 for a few reasons:

xmrwallet does this to make the seed:

    SecretKeyFactory skf = SecretKeyFactory.getInstance("PBKDF2withHmacSHA512");
    KeySpec spec = new PBEKeySpec(NKFDchars(mnemonic), NKFDbytes("mnemonic" + passphrase), 2048, 512);

Java’s PBEKeySpec uses PKCS#5 (RFC2898) aka PBKDF{1,2} not sure which, I assume PBKDF2

(for implementing this in go this can be found in /x/crypto: they use SHA512

Electrum mnumonic generation code here: Seedvault uses plain BIP39:

BIP39 and Mnemonic Seeds