Different keyboard keys make different clicking sounds when pressed. In
particular, the ENTER and SPACE keys are noticeably louder on most keyboards.
This makes possible an acoustic side-channel attack whereby an eavesdropper
with a microphone could gain knowledge about the lengths of the words in a
user's mnemonic seed phrase as they're being typed. This information could
also be obtained by analyzing the pauses between words.
Since the words in the Electrum wordlist used by MMGen vary in length from three
to twelve letters, the keyspace required to be searched in a brute-force attack
on the seed could thus be drastically reduced.
Stealth mnemonic entry mitigates this vulnerability by treating all characters
that are not lowercase letters in the range 'a-z' as “pad characters”. Pad
characters are simply discarded and can be typed either before, after or in the
middle of words. For each word, once a sufficient number of characters,
including pad characters, have been typed (currently 12), any pad character
can be used to enter the word. Since each word can now be entered using the
same number of keystrokes and padded with random characters at random
positions, acoustic analysis of the user's keyboard clicks will yield little
useful information for an attacker.
This feature is enabled by default as it doesn't impact existing functionality
and can simply be ignored if one chooses not to use it.
- Estimated vsize is compared with actual vsize after signing.
If estimate is off by more than 5%, the program aborts, asking
the user to re-create the tx using --vsize-adj
- Estimated and actual vsizes will differ meaningfully only in the
rare situation where non-MMGen addrs with uncompressed pubkeys
are used as inputs
Since the tx file is potentially untrusted data, be strict about what we allow:
- check data size against max_tx_file_size (defaults to 100000 bytes)
- check for ascii encoding
- check line lengths
- reject extraneous keys in inputs and outputs (done by MMGenListItem)
max_tx_file_size can be overridden in config file
- closes an exploit whereby an infected online MMGen installation could craft
a special TX file to trick an offline signing MMGen into executing an
arbitrary expression
- update TX file format (to v3) to permit calling literal_eval() on unmodified
inputs and outputs data (old v2 file format continues to be supported)
- new TX file conversion script: `scripts/tx-v2-to-v3.py`
- `scripts/tx-old2new.py` modified and renamed to `scripts/tx-v1-to-v3.py`
- Monero key-address files include spendkey, viewkey and wallet password
- Wallet password is first 16 bytes of SHA256x2(spendkey)
- Generate Monero wallets either by hand with:
1) `monero-wallet-cli --generate-from-spend-key walletfile`, using the keyaddrfile data,
or automatically, using:
2) `mmgen-tool keyaddrlist2monerowallet keyaddrfile`
The utility will generate a wallet for each key/address pair in the keyaddrfile and encrypt
it using the password. The password is supplied via stdin.
- Other feature: 32-byte hexadecimal password generation with `mmgen-passgen --hex`