trezor / trezor-core

:lock: Don't use this repo, use the new monorepo instead:
https://github.com/trezor/trezor-firmware
GNU General Public License v3.0
354 stars 204 forks source link

Model T: v1 Protocol? #254

Closed rfjakob closed 6 years ago

rfjakob commented 6 years ago

On https://github.com/trezor/trezor-core/issues/91#issuecomment-355759065 I read that

T2 supports v1 protocol.

However, it seems to behave differently from a Model One. Testing with the tesoro Go library plus this patch I get:

Model One:

~/go/src/github.com/conejoninja/tesoro/example$ ./example 
Found 1 TREZOR devices connected
>init
{"vendor":"bitcointrezor.com"....}

Model T:

~/go/src/github.com/conejoninja/tesoro/example$ ./example 
Found 1 TREZOR devices connected
>init
(hangs)

The tesoro author seems to also have noticed this and says in https://github.com/conejoninja/tesoro/issues/7#issuecomment-401162052 :

The new communication protocol is a bit different from model One

Now the question is: Is it different on purpose and should the library work around the difference, or maybe is v1 protocol support not yet complete? Thanks!

matejcik commented 6 years ago

I suspect this is because you're using HID interface. Trezor T talks only over WebUSB, and its HID interface is reserved for U2F.

Other than that, it speaks unmodified v1 protocol.

rfjakob commented 6 years ago

Ok I see, thanks for the clarification! The API docs left me confused as they only mention HID.