Alexandre Paillier
17968338d8
Removed EIP712 verbose display of inner struct names
2023-07-18 17:00:35 +02:00
Alexandre Paillier
af8123ad45
Fix improper handling of empty arrays in EIP712 messages
2023-07-18 17:00:35 +02:00
Alexandre Paillier
174d35782f
Review fixes
2022-10-26 14:54:10 +02:00
Jorge Martins
0b288cd924
Eip712 review ( #355 )
...
* Possible security fix.
It is possible to send a new structure definition after sending a structure implementation, which makes the app treat unrestricted data as if it was a well defined structure.
This commit tries to fix that behaviour. Once a structure implementation is sent, we consider all structures to be defined and we do not allow new definitions.
* Fix previous commit
2022-10-18 11:09:00 +02:00
Alexandre Paillier
5ce56bd53e
Renamed EIP712 context files to less generic ones
2022-09-14 17:27:33 +02:00
Alexandre Paillier
ed479128fd
EIP712 Filtering count checking
2022-09-14 09:41:39 +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
bce0a3114d
WIP path refactoring
2022-08-05 18:15:54 +02:00
Alexandre Paillier
f0764545ae
Small simplification/refactoring of EIP712 typed data
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
01179730a1
Updated the EIP-712 filtering signature specs; Update the verification implementation to now handle field path intead of only the field key name
2022-08-05 18:15:48 +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
ca37612f61
Fix io_exchange exception
...
Was trying to reply to EIP712 ARRAY size APDU twice
2022-08-05 18:15:43 +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
a24f621ce3
EIP712 filtering, added new APDUs
2022-08-05 18:15:41 +02:00
Alexandre Paillier
f480d5091e
Now uses an eip712 context struct instead of having multiple global variables => reduced bss footprint
2022-08-05 18:15:39 +02:00
Alexandre Paillier
239da44d0e
Added a new temporary EIP-712 half-bind mode
2022-08-05 17:52:48 +02:00
Alexandre Paillier
a0551e8226
Added a function to check if we are in the domain or the message struct
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
59dd149534
Added some NULL checks for global structure pointers
2022-08-05 17:52:46 +02:00
Alexandre Paillier
c0eaf8d106
Proper cleanup after EIP712 message
2022-08-05 17:52:46 +02:00
Alexandre Paillier
9f29a7caa2
UI handling WIP
2022-08-05 17:52:44 +02:00
Alexandre Paillier
b8424d1a21
Now handles domain & message struct not based on order but on struct name
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
90dfa74538
Emulates old behaviour with new APDUs but computed all on-device
2022-08-05 17:52:43 +02:00
Alexandre Paillier
b6e4f887cb
Fixes printf formatting issues caused by the toolchain
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
ad030cdb6a
Make the dependencies mandatory in the typehash function
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
6d86a5de77
Global hash making
2022-08-05 17:52:38 +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