@moneromooo-monero thanks for the reply.
So far I can see only 3 basic building blocks, logically separable to separate PRs:
— poly1305 as you mentioned
— small patch to add incremental API to Keccak
— small patch to add incremental API to Chacha
This PR may seem large but the vast majority of the PR are generated protobuf messages in `src/device_trezor/trezor/messages` with 38768 lines of code (94%), the whole `src/device_trezor` has 41289 lines of code, so there are only 2521 lines of non-generated code for the TREZOR.
There are also some small additions to wallet2, simplewallet, account etc. mainly adding support for another device (TREZOR) and few minor things, such as cold signing protocol. These are IMO good to keep in the same PR as the `device_trezor`.
JSON library — this PR was meant as a prototype to align some expectations, not for direct merge. Thus I used a single-file header-only JSON library which is very easy to work with (rapidjson is a bit more complicated). The one I used is also used in the general TREZOR C++ client library. But to make it clearer now I refactored the PR to use rapidjson.
So 3 separate PR (keccak, chacha, poly1305) and then this one?