1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 13:38:12 +00:00
Commit Graph

1342 Commits

Author SHA1 Message Date
matejcik
db92b13f97 cosi: move things around
ed25519raw is moved back to trezorlib
ed25519cosi is renamed to cosi, and has a couple more functions,
with the expectation that TrezorClient.cosi_* methods will move there.

Also most code shouldn't need ed25519raw for anything, so it might get
renamed to "_ed25519" to indicate that it's a private implementation.

For now, I added a "verify" method to cosi, so that you don't need to
call into ed25519raw.checkvalid. But trezor-core's keyctl is also
using ed25519raw.publickey. I'm not sure if that's worth replicating
in cosi, or whether to just leave it be, so I'm leaving it be for now.

Importantly, new function "sign_with_privkey" does that math thing that
was part of the selftest and is also explicitly listed in keyctl.
(it's called sign_with_privkey because I expect to have a "sign" method
here that calls into Trezor)
2018-05-17 12:53:01 +02:00
Tomas Susanka
277296be90 tests/stellar: verify marked as not passing on T2 2018-05-16 15:04:00 +02:00
Tomas Susanka
3ee3083e8c tests/device/stellar: verify message 2018-05-14 16:53:10 +02:00
Tomas Susanka
bb74950e23 stellar: message is normalized before sign/verify 2018-05-14 15:33:57 +02:00
Tomas Susanka
22560128fe stellar: StellarSignMessage.message is bytes 2018-05-14 15:17:13 +02:00
Tomas Susanka
f97815f69a vendor: trezor-common updated 2018-05-14 15:16:26 +02:00
Tomas Susanka
d57fe33582 tests/device/stellar: sign message 2018-05-14 14:09:39 +02:00
matejcik
f9c20f8d2f travis: do not trigger trezor-core if not master 2018-05-11 16:01:11 +02:00
matejcik
cc7c8ccb59 client: clean up exception and decorator code 2018-05-11 15:34:49 +02:00
matejcik
a478dac5f7 client: clean up logging and printing 2018-05-11 15:34:23 +02:00
matejcik
a2b70562bc flake8: be stricter 2018-05-11 15:29:38 +02:00
matejcik
123aec5d7d tests/device_tests: remove all star imports 2018-05-11 15:29:38 +02:00
matejcik
266e34eec4 tests/device_tests: disable protobuf outputs unless run with -v 2018-05-11 15:29:38 +02:00
matejcik
0b6ec27064 logging: get rid of pprint and VerboseWireMixin
(and also TrezorClientVerbose)
2018-05-11 15:29:38 +02:00
matejcik
ca8ebacab9 logging: convenience function to set up protobuf logging 2018-05-11 15:29:38 +02:00
matejcik
1e4c1c093e protobuf: improve prettyprint formatting 2018-05-11 15:29:38 +02:00
matejcik
eed91db880 protocol: python logging to supersede VerboseWire 2018-05-11 15:29:38 +02:00
matejcik
b7c7190573 trezorlib: remove Hash to btc_hash, prepare for moving it away from things 2018-05-11 15:29:38 +02:00
matejcik
325312d11c protobuf: move formatter function to protobuf where it belongs better 2018-05-11 15:29:38 +02:00
matejcik
579adb1871 tests: update to use parse_path 2018-05-11 15:29:38 +02:00
matejcik
d106869061 trezorlib: deprecate client.expand_path and move the staticmethod
to an ordinary function tools.parse_path

Also remove PRIME_DERIVATION_FLAG and move it to tools.HARDENED_FLAG
2018-05-11 15:29:37 +02:00
matejcik
4f66b37f25 tests: update imports after tests.support move 2018-05-11 15:29:37 +02:00
matejcik
603b201ad0 tests: create tests.support module
for things that should not be part of trezorlib but tests use them
2018-05-11 15:29:37 +02:00
Tomas Susanka
77766d2d0f tests/device/eth: known/unknown token test 2018-05-10 13:33:06 +02:00
matejcik
a289d16838 build: require typing module for python < 3.4 2018-05-09 17:43:41 +02:00
matejcik
e0d850df7d protobuf: update generators and messages to be identical with trezor-core 2018-05-09 17:15:13 +02:00
Tomas Susanka
18adf6cc4d tests/stellar: marked as passing on T1 2018-05-09 16:34:51 +02:00
matejcik
5329bc9463
Merge pull request #167 from zulucrypto/stellar
[Stellar] [WIP] Add Stellar support to trezorctl
2018-05-07 14:23:56 +02:00
matejcik
dd0217c746 protobuf: update trezor-common and messages 2018-05-07 14:14:16 +02:00
matejcik
28264a4fe0 protobuf: improve description of sint_to_uint 2018-05-07 14:10:34 +02:00
matejcik
df8c3da1a2 protobuf: properly implement signed types (fixes #249) 2018-05-07 14:10:34 +02:00
matejcik
b156ec9757 travis: fix bash syntax bug in trigger-travis.sh 2018-05-07 13:36:55 +02:00
matejcik
76fea5afc4 build: move ethereum requirements to their own extra
We only need ethereum libraries for `ethereum_sign_tx` in trezorctl,
and rlp has caused us dependency problems in the past already.
Also we required ethjsonrpc for the same thing but never listed
that dependency anywhere.

That changes now.
2018-05-07 13:05:48 +02:00
matejcik
6c033bd810 travis: trigger build of trezor-core when python-trezor is pushed 2018-05-07 12:47:41 +02:00
matejcik
43f14ac760 build: add flake8 to dev requirements 2018-05-04 17:50:49 +02:00
matejcik
4c06a613b5 ethereum: do 'int_to_big_endian' conversion manually
instead of relying on 'rlp.utils' from which it was removed
by 1.0, and moved to 'eth_utils' which don't support py3.4
2018-05-04 17:43:58 +02:00
matejcik
41d99764c6 build: reorganize requirements, mark hidapi as optional
This drops the command line options. `libusb` is now required
unconditionally (it's cffi so no harm there). hidapi is an extra.
You either need to install it manually, or specify it in your
requirements.txt like so:

trezor[hidapi] >= 0.9.2
2018-05-04 15:54:23 +02:00
matejcik
ce7a434f2d build: add the prebuild command as a dependency for develop
So, 'python setup.py develop' exists. And of course it doesn't have build_py as
a dependency, because of course it doesn't.
We could use 'data_files' instead of 'package_data and copying', and then use
pkg_resources to find the actual file location, and that could work in theory.
But pkg_resources API is weird and messy and this whole area of Python
packaging theory barely works as it is.

Instead we will force the prebuild command to be a dependency of develop as
well as build_py, and we do this by monkey-patching instead of the proper way,
because at this point it seems cleaner. I wonder if there are more commands
that would need this.
2018-05-03 18:55:32 +02:00
Tomas Susanka
6f032456fc tests/device/nem: mosaic with levy test 2018-05-03 14:03:38 +02:00
ZuluCrypto
7128347975
stellar tests - added missing pytest import 2018-04-28 13:06:13 -06:00
ZuluCrypto
5fccc4381b
fix style to match flake8 2018-04-28 12:59:08 -06:00
ZuluCrypto
200b5a71df
Merge remote-tracking branch 'upstream/master' into stellar 2018-04-28 12:54:32 -06:00
ZuluCrypto
2cf6414fa5
stellar - minor cleanup and simplification of some boolean field checks 2018-04-28 12:39:55 -06:00
Tomas Susanka
7cfbe689e8 tests/device/nem: different amounts; note about what is displayed 2018-04-27 17:39:04 +01:00
Tomas Susanka
50e755be46 tests/device/nem: known/unknown mosaics test 2018-04-27 17:37:29 +01:00
Aleksey Popov
8f31422adf lisk: Fix wrong signature in tx tests 2018-04-23 16:47:15 +02:00
matejcik
cc7e3eb9b5 travis: force setuptools>=38 which download prebuilt .whls
this fixes a build error in dependencies that we seriously don't care about
which was happening in travis's py34
2018-04-23 13:35:14 +02:00
ZuluCrypto
49025aad2b
stellar tests - fix imports and indicate that tests are currently expected to fail 2018-04-20 10:35:01 -06:00
ZuluCrypto
61f5e1df61
stellar.py now returns a tuple from parse_transaction_bytes and no longer uses a reserved argument name 2018-04-20 10:34:26 -06:00
ZuluCrypto
ea6ced4dae
client.py - refactor Stellar signing loop to make the message flow clearer 2018-04-20 10:33:56 -06:00