i liked the sound of "entropy". it sounded like a disease against which you could be inoculated before travelling abroad.
based on the "tutorial" referred to in the first link, i fashioned a small library to handle the whole process: generate entropy, create the mnemonic phrase, create the seed. i wrote it with b4j non-gui in mind.
declare the Gentropy class and run the appropriate methods:
genGentropy - create a 128-bit entropy
genMnemonic - create the mnemonic sentence from that entropy.
genSeed - create the seed from the mnemonic sentence...
you can either generate your own entropy or use some generated elsewhere. genMnemonic accepts either. if you use entropy generated elsewhere, it can be 64, 128 or 256 bits. the hovering tool reports what each method does.
the file from which the mnemonic sentence is created is the "official" english version. there are several others. the library is mostly a proof of concept, so i used the
english version.
in the wild, seed creation offers several options. i went with a simple model. if somebody actually wanted to use the library to generate his bitcoin wallet credentials, he might want to rethink that.
i didn't perform any bullet-proofing; if you provide your own garbage entropy to see if you can provoke a crash, you might succeed.
if the thing is useful, i can probably be coaxed into making it worthy of use.
B4X:
Dim gentropy As Gentropy
Dim entropy As String = gentropy.genGentropy
Log(entropy)
' OR USE ENTROPY CREATED ELSEWHERE:
Dim entropy As String = "11111101111011011110011100111010010011111100001110011000001111110000011011001110001010100011101001000011010100100100000001000000"
Dim mnemonicsentence As String = gentropy.genMnemonic( entropy )
Log("mnemonic sentence: " & mnemonicsentence)
Dim seed As String = gentropy.genSeed( mnemonicsentence )
Log(seed)