Commit graph

1,372 commits

Author SHA1 Message Date
ba2cc40d20
rpc.py: disable proxy config from environment for requests backend
The Requests library honors the *_PROXY environment variables by default
  (a dangerous and insecure policy in the opinion of the MMGen Project).
  Thus if the user had one of these variables set and explicitly requested the
  `requests` backend via the `--rpc-backend` option, JSON-RPC communications
  would have gone over the configured proxy.

  Only the `mmgen-xmrwallet` command uses `requests` as its default backend,
  so only it was affected by this vulnerability in the default configuration,
  i.e. without use of `--rpc-backend`.

  This patch sets `trust_env=False` to disable the dangerous behavior.
2022-05-08 10:07:17 +00:00
8184fe195d
mmgen-tool: relocate ETH chksum and Geth wallet key commands 2022-05-08 10:07:16 +00:00
7e99b88d55
add v13.1.0 release notes 2022-05-06 12:52:42 +00:00
d5e8d5b96f
various fixes and cleanups 2022-05-06 12:52:41 +00:00
2314247918
add msys2-sshd-setup.sh convenience script 2022-05-06 12:52:41 +00:00
942c210b3d
test.py ethdev: Erigon fixes 2022-05-06 12:52:41 +00:00
1eabba00a8
add ethkey dependency test 2022-05-06 12:52:40 +00:00
856b5b1e27
test.py xmrwallet: SSH proxy initialization cleanups, add dep test 2022-05-06 12:52:40 +00:00
4dd799104b
activate RIPEMD-160 code, add tests 2022-05-03 21:01:06 +00:00
40d90b37b8
add pure-Python RIPEMD-160 code and wrapper routine
- The RIPEMD-160 hash algorithm has been deprecated in OpenSSLv3 and is
  therefore missing in the Python hashlib of Ubuntu 22.04 (Jammy Jellyfish).

- The provided wrap_ripemd160() routine monkey patches hashlib to use a
  pure-Python RIPEMD-160 implementation (also provided in this patch) if
  necessary. The routine needs to be called just once per program invocation.

- The RIPEMD-160 implementation is courtesy of Bitcoin Core developer Pieter
  Wuille.
2022-05-03 21:01:06 +00:00
feffc45fd5
Windows and Windows testing fixes 2022-05-03 21:01:05 +00:00
23457774e2
BTC-only testing fixes 2022-05-03 21:01:05 +00:00
01f52617f6
various fixes and cleanups 2022-05-03 21:01:05 +00:00
b84e68d486
message signing: cleanups, default to base cls if proto cls missing 2022-05-03 21:01:04 +00:00
cda6e2c3ce
base_proto.ethereum.tx.new: move __init__ from base class 2022-05-03 21:01:04 +00:00
a81ff33f08
mmgen-msg: support raw (unprefixed) message signing for Ethereum 2022-04-29 16:53:52 +00:00
815e75c602
util.py: get_keccak(): cache result 2022-04-29 16:53:51 +00:00
3510841a12
minor fixes and cleanups 2022-04-29 16:53:51 +00:00
770b209afc
message signing: support Ethereum
- Ethereum signatures conform to the standard defined by the Geth `eth_sign`
  JSON-RPC call

Usage information:

    $ mmgen-msg --help

Testing:

    $ test/unit_tests.py -v msg.eth
    $ test/test.py -e --coin=eth --daemon-id=geth -X msgverify_export ethdev
2022-04-28 11:00:53 +00:00
096f363dbc
mmgen-tool: add extract_key_from_geth_wallet command
- decrypt the encrypted private key in a Geth keystore wallet and output
  the decrypted key in hexadecimal format

Usage:

    $ mmgen-tool extract_key_from_geth_wallet geth-keystore-wallet.json

Testing:

    $ test/test.py -e tool_extract_key_from_geth_wallet
2022-04-28 11:00:53 +00:00
09ab734ab3
mmgen-msg: support verification and display of exported JSON data
Usage:

    $ mmgen-msg verify signatures.json

Testing:

    $ test/unit_tests.py -v msg
2022-04-28 11:00:52 +00:00
c46002c520
msg.py: improve handling of failed Seed ID data 2022-04-28 11:00:52 +00:00
af65676db5
tool pubhex2addr: support non-Bitcoin protocols, add test vectors
- Prior to this patch, the command produced incorrect output for ETH, XMR
  and ZEC-Z protocols.
2022-04-28 11:00:52 +00:00
4e3b11a313
tool addr2pubhash: check input, rejecting non-PKH addresses 2022-04-28 11:00:51 +00:00
17539c0de1
tooltest2.py: test vectors: use variables for repeated data 2022-04-28 11:00:51 +00:00
44cfe1c3dd
various changes and fixes throughout 2022-04-28 11:00:50 +00:00
1ba11a71c1
support Bitcoin Core v23.0.0 2022-04-25 15:14:43 +00:00
5535e33238
unit_tests.py rpc: display daemon info 2022-04-25 15:13:05 +00:00
0b80ab0f26
minor fixes and cleanups 2022-04-25 15:13:04 +00:00
4821fc203c
mmgen-msg: add export command
- export signature data relevant for a third-party verifier to JSON
2022-04-23 14:38:34 +00:00
aecc03e2a2
mmgen-tool: add eth_checksummed_addr command 2022-04-23 14:36:10 +00:00
303027f02f
add comments for buggy daemons (Litecoin v0.21.2rc5, Geth v1.10.17)
- Litecoin Core v0.21.2rc5 (comment only)
- Geth v1.10.17 (comment + testing code)
2022-04-23 14:36:09 +00:00
0d2b730ebf
unit_tests.py dep: add solc (Solidity compiler) test 2022-04-23 14:36:09 +00:00
830d07cde2
minor fixes 2022-04-23 14:36:08 +00:00
25efac31bc
message signing: support autosigning
Usage information:

    $ mmgen-autosign --help

Testing:

    $ test/test.py -e autosign_btc
2022-03-30 15:49:45 +00:00
d817931c04
mmgen-msg: support display of unsigned message files 2022-03-30 15:49:45 +00:00
3b239105e8
main_autosign.py, msg.py: minor fixes and cleanups 2022-03-30 15:49:45 +00:00
a50fbf9351
test.py autosign: rewrite test 2022-03-30 15:49:44 +00:00
7a72deed9f
daemon.py: for test suite, use separate dir trees for each network 2022-03-30 15:49:44 +00:00
fdcdc4772b
mmgen-autosign: move autosign key to mountpoint 2022-03-30 15:49:43 +00:00
e5cf3b6ec8
message signing: user-level support
Usage information:

    $ mmgen-msg --help

Testing:

    $ test/test.py -e regtest
2022-03-28 13:51:25 +00:00
69cff97201
mmgen-xmrwallet: add timestamp to address labels 2022-03-16 14:58:09 +00:00
86e3b273c7
message signing: low-level infrastructure and unit test
- Messages can be signed for arbitrary lists or ranges of addresses.
- Addresses and ranges are specified using a SEED_ID:ADDR_TYPE:IDX_RANGE
  selector.
- For segwit addresses, signature data includes a pubkey hash and p2pkh address
  sharing the same key to allow verification of messages with external tools,
  e.g. `bitcoin-cli verifymessage`.

Testing:

    $ test/unit_tests.py -av msg
2022-02-14 10:18:44 +00:00
937fb94470
tool addr2pubhash(), pubhash2addr(): bugfixes 2022-02-14 10:18:43 +00:00
10232790e7
proto.btc: pubkey2segwitaddr() -> pubhash2segwitaddr()
- also changed: pubkey2redeem_script() -> pubhash2redeem_script()
2022-02-14 10:18:43 +00:00
92b5246c1d
proto.pubhash2.*addr(): cleanups 2022-02-14 10:18:42 +00:00
9e3d8d92de
mmgen-passchg: improve secure wallet deletion logic 2022-02-13 11:08:50 +00:00
224b6a70d0
confirm_or_raise() cleanups 2022-02-13 11:08:50 +00:00
c7f0b2d8f9
wallet.incog_base: minor cleanups 2022-02-13 11:08:50 +00:00
395fa1c1d3
minor fixes; adapt script launcher, g.version for node tools 2022-02-11 09:43:33 +00:00