42 Commits

Author SHA1 Message Date
Alexandre Paillier
ae486e9e53 Can now feed the EIP-712 UI value buffer from multiple data (APDU) chunks
Also fixes EIP-712 bytes formatting for values longer than the display buffer, it would only show "..." (introduced by aa38ee995)
2024-06-20 11:32:09 +02:00
Alexandre Paillier
04464c2f11 Delay EIP-712 array traversal until size is received 2024-05-02 18:37:30 +02:00
Charles-Edouard de la Vergne
f5ea9c51c2 Fix various Linter issues and mispelling 2024-03-27 14:43:15 +01:00
Charles-Edouard de la Vergne
36ae183a1c Fix deprecated warnings 2024-03-27 14:43:15 +01:00
Francois Beutin
3bcf12ce1d Rename utils to common_utils 2024-02-02 11:23:30 +01:00
Francois Beutin
3d9da0dd16 Move basic utility functions from ethUtils to main utils file 2024-02-02 11:23:28 +01:00
Alexandre Paillier
78c0bfe424 Removed EIP-712 strict chain ID check 2022-09-15 16:44:19 +02:00
Alexandre Paillier
5ce56bd53e Renamed EIP712 context files to less generic ones 2022-09-14 17:27:33 +02:00
Alexandre Paillier
3ee1fa419a Now supports EIP-712 filtering with missing chain id & contract address 2022-09-14 09:41:37 +02:00
Jorge Martins
b2ec3eff0a Security review (#331)
* Fix some issues

* add typed_data.c changes

* Make attribution after the check
2022-08-08 13:53:41 +02:00
Alexandre Paillier
de9e895ad9 EIP-712 code linting 2022-08-05 18:15:59 +02:00
Alexandre Paillier
5e5b3c3621 EIP712 STRUCT FIELD IMPL now checks the APDU payload bounds 2022-08-05 18:15:58 +02:00
Alexandre Paillier
0cc75edf69 EIP712 code Doxygen comments pass 2022-08-05 18:15:57 +02:00
Alexandre Paillier
832bbbf24c Cleaned up the EIP712 field hash code 2022-08-05 18:15:54 +02:00
Alexandre Paillier
d1d1aa73e6 Made all EIP712 code use the same function for response APDUs 2022-08-05 18:15:52 +02:00
Alexandre Paillier
7dad477413 Moved EIP 712 commands handling into their own file & renamed some things 2022-08-05 18:15:50 +02:00
Alexandre Paillier
b782a69137 Moved all typed data in RAM related code into its own file 2022-08-05 18:15:49 +02:00
Alexandre Paillier
0100eed1fd EIP712 code now uses the global apdu response code; error handling improvements 2022-08-05 18:15:49 +02:00
Alexandre Paillier
4574c223f2 Clean up mem allocation alignment macro usage + small refactoring of the typehash dependencies search 2022-08-05 18:15:48 +02:00
Alexandre Paillier
559e729188 Better UI for verbose EIP-712, now shows the review struct screen even on inner structures 2022-08-05 18:15:45 +02:00
Alexandre Paillier
032d74e301 Now checks the EIP712Domain chain ID 2022-08-05 18:15:45 +02:00
Alexandre Paillier
b7a4c0d93b EIP-712 filtering UI adjustments; Removed half-blind special compilation flag 2022-08-05 18:15:41 +02:00
Alexandre Paillier
7e63bd8435 Now copies the EIP712 contract address into memory so it can be used later 2022-08-05 18:15:40 +02:00
Alexandre Paillier
8ea34f9f00 Fix hashing of signed negative integers smaller than 256 bits 2022-08-05 18:15:39 +02:00
Alexandre Paillier
f0d6a2bba1 Now filters out all fields but the name in the EIP712Domain in the half-blind mode 2022-08-05 17:52:48 +02:00
Alexandre Paillier
239da44d0e Added a new temporary EIP-712 half-bind mode 2022-08-05 17:52:48 +02:00
Alexandre Paillier
2fa6379470 Now only compiles full EIP-712 support for capable devices 2022-08-05 17:52:47 +02:00
Alexandre Paillier
c0eaf8d106 Proper cleanup after EIP712 message 2022-08-05 17:52:46 +02:00
Alexandre Paillier
2badb7b5b2 Now displays the field values
Show ints as uints for now
2022-08-05 17:52:45 +02:00
Alexandre Paillier
9f29a7caa2 UI handling WIP 2022-08-05 17:52:44 +02:00
Alexandre Paillier
5c00a5c27b Structs alignment in memory, fixes device freezes/crashes 2022-08-05 17:52:44 +02:00
Alexandre Paillier
516682b206 Fix impl APDU wrongly returning 0x6a80 2022-08-05 17:52:42 +02:00
Alexandre Paillier
d333b3a433 Fixed compilation errors/warnings 2022-08-05 17:52:40 +02:00
Alexandre Paillier
c689b68f76 Remove some now useless debug outputs 2022-08-05 17:52:39 +02:00
Alexandre Paillier
6c14bfa476 Now wraps the printf calls in a macro. SDK-like 2022-08-05 17:52:39 +02:00
Alexandre Paillier
09697f718a Fix dynamic bytes type encoding 2022-08-05 17:52:38 +02:00
Alexandre Paillier
6d86a5de77 Global hash making 2022-08-05 17:52:38 +02:00
Alexandre Paillier
a2a72edf83 Now initializes field hash struct in eip712 context 2022-08-05 17:52:37 +02:00
Alexandre Paillier
a3f5eee116 WIP field hashing support 2022-08-05 17:52:35 +02:00
Alexandre Paillier
45dfd5d6a6 Proper path implementation with array support 2022-08-05 17:52:34 +02:00
Alexandre Paillier
0e386a4204 Now initializes a path in memory 2022-08-05 17:52:34 +02:00
Alexandre Paillier
7e35b96ec0 WIP field hashing 2022-08-05 17:52:33 +02:00