Alexandre Paillier
a3f5eee116
WIP field hashing support
2022-08-05 17:52:35 +02:00
Alexandre Paillier
0e9cd91ecc
Removed structure packing, prevents unaligned access
2022-08-05 17:52:35 +02:00
Alexandre Paillier
477046bd43
Removed unused byte type
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
Alexandre Paillier
fd31def094
Update app context wrapping
2022-08-05 17:52:33 +02:00
Alexandre Paillier
9521b36de3
Now prefixes the type hash with a marker
2022-08-05 17:52:33 +02:00
Alexandre Paillier
223aa10a58
Better macro naming for hash length
2022-08-05 17:52:32 +02:00
Alexandre Paillier
c53a4299a3
TypeHash function now uses the device's hashing functions
2022-08-05 17:52:32 +02:00
Alexandre Paillier
3d9089b395
New functions that emulate the device's hashing functions
2022-08-05 17:52:31 +02:00
Alexandre Paillier
1375571957
Unify mem utils function names
2022-08-05 17:52:31 +02:00
Alexandre Paillier
9ca9caf410
encodeType reformatting / code cleanup
2022-08-05 17:52:31 +02:00
Alexandre Paillier
c30b3aceec
Added memory allocation utility functions
2022-08-05 17:52:30 +02:00
Alexandre Paillier
547846f56d
Small code cleaning in the init of solidity typenames
2022-08-05 17:52:30 +02:00
Alexandre Paillier
2584490afa
Added array size macro
2022-08-05 17:52:29 +02:00
Alexandre Paillier
54fe26a301
Extracted the context initialization from the main source file
2022-08-05 17:52:29 +02:00
Alexandre Paillier
b2fe2f26ba
Implements the hashing part of typeHash
2022-08-05 17:52:29 +02:00
Alexandre Paillier
5889da054e
Extracted the encodeType and typeHash functions from the main file
2022-08-05 17:52:28 +02:00
Alexandre Paillier
e3dfd787b5
Memory allocation checking
2022-08-05 17:52:28 +02:00
Alexandre Paillier
16081c38a9
Added some memory related debug features
2022-08-05 17:52:28 +02:00
Alexandre Paillier
59490beff9
Small type-enforcing refactoring + now properly gets typestrings
2022-08-05 17:52:27 +02:00
Alexandre Paillier
e57bc93c69
Fix stack overflow with long APDUs
2022-08-05 17:52:27 +02:00
Alexandre Paillier
161919c012
Simpler computing the string's length in memory
2022-08-05 17:52:26 +02:00
Alexandre Paillier
420afdf958
Small function to make formatting into memory of uint easier
2022-08-05 17:52:26 +02:00
Alexandre Paillier
e3a8e4ccd2
Big Refactoring
...
- moved some things in header files
- now uses memory allocation functions with automatic checks, small abstraction layer
2022-08-05 17:52:26 +02:00
Alexandre Paillier
3fda010667
Add memory functions
2022-08-05 17:52:25 +02:00
Alexandre Paillier
5438b39eb2
Fixes the index overflow, since header + data could be longer than 0xFF
2022-08-05 17:52:25 +02:00
Alexandre Paillier
63f454b29a
Fixed ram usage message
2022-08-05 17:52:24 +02:00
Alexandre Paillier
024691eb64
Fix warning in release mode
2022-08-05 17:52:24 +02:00
Alexandre Paillier
545bc439fe
Better implementation of enum(s)->typename memory structure
2022-08-05 17:52:24 +02:00
Alexandre Paillier
c3dc0c18ff
Refactoring; added some utility functions to navigate the type definitions
2022-08-05 17:52:23 +02:00
Alexandre Paillier
3b6c32d707
Updated C code with new array handling
2022-08-05 17:52:23 +02:00
Alexandre Paillier
1bc8675473
Initial version
2022-08-05 17:52:22 +02:00
Alexandre Paillier
b25eaa1b48
Renamed the existing EIP712 implementation folder
2022-08-05 17:52:22 +02:00
Jorge Martins
2811917658
Mark pointer to databuffer/workbuffer as const
2022-07-15 12:33:19 +02:00
Jorge Martins
e0218520d8
Fix multiple vulnerabilities
2022-07-08 11:12:50 +02:00
Alexandre Paillier
23202f6a63
Minimize includes in header files to what they depend on
2022-03-09 15:23:53 +01:00
Jean-Baptiste Bédrune
cd78581ffd
Fix all the defects identified by Clang Static Analyzer
...
Some fixes are dirty, but it is a start to enforce scan-build on
every commit.
Signed-off-by: pscott <scott.piriou@ledger.fr >
2021-07-27 12:09:22 +02:00
pscott
b646cf1b28
Fix compilation warnings ( #159 )
...
* Fix easy warnings for sdk 2.0
* Add attribute unused to bagl_elemt_t in callback functions
* Add attribute unused to io_event function
* Clang-format
* Use elfs from CI in tests (#167 )
* Add Nano X build
* Use CI's build artifacts for CI's tests
* Add network display (#152 )
* Add network name display instead of chainID
* Add display of correct ticker along with network
* Add FTM
* Clang-format
* Add comment in python script
* Rename SIZE_MAX to MAX_SIZE
* Change %u to %d in printf
* Remove needless PIC
* Update comment about get_chain_id()
* Update example script to follow EIP155
* Remove unused PIC calls
* Add whitespace between ticker and amount when using EIP155
* Remove decimal config per network, set back 18 everywhere
* Adapt u32_from_BE to swith cases
* Remove chainid from signTx.py
* Switch to switch in stead of if in get_chain_id
* Revert "Remove chainid from signTx.py"
This reverts commit 454e09f280ec3e3ec1c7d7cc0027247ef4390088.
* Change Ethereum chainid to 1
* Rename chainid_step to network_step
* Adapt finalizeParsing to new chainid for Ethereum
* Update snapshots
* clang-format
* Fix network display logic for clones
* Fix tests
* Add clone tests
Co-authored-by: TamtamHero <10632523+TamtamHero@users.noreply.github.com >
Co-authored-by: Jean P <10632523+TamtamHero@users.noreply.github.com >
2021-07-05 11:01:51 +02:00
pscott
5fd27ff5ca
Use INT256_LENGTH and ADDRESS_LENGTH define
2021-06-08 10:24:51 +02:00
pscott
9a798e3662
Fix warnings for nanox sdk
2021-03-24 16:32:08 +01:00
TamtamHero
17bd07a346
Apply clang-format
2020-12-01 16:20:13 +01:00
BTChip github
1a311684a2
Replace memset by expilcit_bzero for critical data
2020-11-30 18:22:21 +01:00
BTChip github
d43f7f6698
Cleanup os_mem* functions
2020-11-30 18:22:17 +01:00
TamtamHero
1f9ef34845
Use recommanded UX macros from recents SDKs
2020-10-20 15:40:31 +02:00
TamtamHero
62a144b22b
Remove Ledger Blue specific code, and other unused discriminants
2020-10-20 15:22:22 +02:00
TamtamHero
eac45259da
Remove trailing whitespaces
2020-10-07 16:56:40 +02:00
BTChip github
27c34e271a
Add EIP 712 signing v0
2020-10-07 16:48:20 +02:00