Commit Graph

561 Commits

Author SHA1 Message Date
Julien Cretin 9778ea7fd2 Introduce distinct integer types
This PR does the following things:
- Give incompatible representations for integers with different semantics:
  - `usize` is used for natural numbers for the public API.
  - `Nat` is used internally for natural numbers (essentially a stable `usize`).
  - `Word` is used for sequences of bits representing words in flash.
  - `Position` is used for word positions in the virtual storage.
- Only use fixed size integers to preserve overflow behavior between targets.
- Use little-endian representation instead of native representation for `Word`.

Alternatives:
- Run tests and fuzzing on 32-bits architecture (or some compatibility mode).
  This approach would have better readability than the current solution (less
  conversions at public API). However it would require additional setup and
  might not be viable long-term by restricting machines on which fuzzing is
  possible.
- Accept the behavior difference for tests and fuzzing. This approach would also
  have better readability. However checking for arithmetic overflow (and other
  `usize` related concerns like memory size) is more important.
2020-10-29 18:48:15 +01:00
Julien Cretin dea28f622f Merge pull request #190 from ia0/v2_lib
Add model for new store
2020-10-29 13:29:49 +01:00
Julien Cretin 5ce91947b6 Fix StoreRatio fields visibility and improve documentation 2020-10-29 12:23:34 +01:00
Julien Cretin 8e22fbd9a6 Merge branch 'master' into v2_lib 2020-10-29 08:21:13 +01:00
kaczmarczyck f60c159221 Merge pull request #191 from mingxguo27/mingxguo-cred-policy
Always set default credential policy
2020-10-28 17:32:49 +01:00
mingxguo27 c6a93d0539 Always set default credential policy 2020-10-28 15:03:59 +00:00
Julien Cretin e7303ed7c6 Add model for new store 2020-10-27 14:23:39 +01:00
Julien Cretin 55ceec2a21 Merge pull request #172 from ia0/v2_lib
Add format helpers for new store
2020-10-27 14:13:33 +01:00
Julien Cretin 71815cad09 Update ERASED_WORD definition to use WORD 2020-10-27 13:45:18 +01:00
Julien Cretin edd1bcf5d2 Do not inline constants in documentation 2020-10-27 11:25:08 +01:00
Julien Cretin ab8b90b596 Merge branch 'master' into v2_lib 2020-10-27 11:09:52 +01:00
Julien Cretin 1f0f2d16e3 Merge pull request #189 from ia0/travis
Remove unused .travis.yml
2020-10-27 11:09:23 +01:00
Julien Cretin 1ef1a8d95b Remove unused .travis.yml 2020-10-27 10:36:16 +01:00
Julien Cretin 552bab6ba9 Remove public visibility for internal function 2020-10-26 17:51:40 +01:00
Julien Cretin cb3369213f Fix merge missing conflict 2020-10-23 17:27:20 +02:00
Julien Cretin 3755be1625 Merge branch 'master' into v2_lib 2020-10-23 17:20:19 +02:00
Julien Cretin 6bb11f09f0 Merge pull request #187 from ia0/v2_buffer
Add buffer storage for new store
2020-10-23 17:18:32 +02:00
Julien Cretin 99e2d07156 Fix documentation 2020-10-23 16:38:48 +02:00
Julien Cretin f52ea953b8 Improve documentation 2020-10-23 15:38:21 +02:00
Julien Cretin 34ad35fdc1 Fix documentation 2020-10-23 11:52:21 +02:00
Julien Cretin f5e6f8728f Do not use nightly features 2020-10-23 08:41:44 +02:00
Julien Cretin d8f405baab Add missing alloc crate 2020-10-23 08:37:09 +02:00
Julien Cretin 10ac76e58a Add buffer storage for new store 2020-10-23 08:22:30 +02:00
Julien Cretin b7fff97a8e Merge branch 'master' into v2_lib 2020-10-23 08:06:47 +02:00
kaczmarczyck 18fdfc4305 Merge pull request #178 from mingxguo27/mingxguo-fuzzing-mvp
Add initial corpus files
2020-10-16 15:58:52 +02:00
mingxguo27 66006bf943 Merge branch 'master' into mingxguo-fuzzing-mvp 2020-10-15 14:43:34 +00:00
Julien Cretin 43924ff8f4 Merge branch 'master' into v2_lib 2020-10-15 16:30:38 +02:00
mingxguo27 4edec261bc Resolved PR comments 2020-10-15 13:28:27 +00:00
Julien Cretin f8fe1a9493 Add small proofs 2020-10-14 17:36:52 +02:00
kaczmarczyck 245e0ab781 Merge pull request #183 from mingxguo27/mingxguo-code-deletion
Removed duplicated code in process_get_assertion
2020-10-14 15:02:53 +02:00
mingxguo27 ba8144ebf6 Removed duplicated code 2020-10-14 12:18:45 +00:00
Julien Cretin c098f2695b Clarify current supported values 2020-10-14 12:20:48 +02:00
Julien Cretin 223908febd Remove confusing clarification 2020-10-14 11:41:46 +02:00
Julien Cretin 8191378b40 Merge branch 'master' into v2_lib 2020-10-14 11:16:00 +02:00
Julien Cretin 0aece24e0a Merge pull request #181 from ia0/disable_reproducible_workflow
Disable reproducible workflow
2020-10-13 15:49:39 +02:00
Julien Cretin 4c76d5618e Show the diff but do not fail 2020-10-13 14:59:31 +02:00
Julien Cretin f512645837 Improve documentation 2020-10-13 12:46:25 +02:00
Julien Cretin eede767fe3 Improve documentation 2020-10-12 18:07:29 +02:00
Julien Cretin 0242873a23 Improve comments 2020-10-12 16:25:25 +02:00
Julien Cretin d721949806 Improve documentation 2020-10-12 14:40:30 +02:00
mingxguo27 9bf4c16d81 Changed reproducible 2020-10-09 15:15:22 +00:00
mingxguo27 88309cd20a Changed reproducible 2020-10-09 15:02:46 +00:00
mingxguo27 b43d618c03 Completed hex 2020-10-09 11:10:25 +00:00
Julien Cretin d1ab6090f1 Disable reproducible workflow 2020-10-09 12:16:02 +02:00
Julien Cretin 7b21eba5df Expand documentation 2020-10-09 11:55:51 +02:00
mingxguo27 ed4514c3e0 Add initial corpus files 2020-10-08 19:14:38 +00:00
Julien Cretin c09a5ed719 Address comments 2020-10-07 15:17:37 +02:00
Julien Cretin aa2c26a65d Merge branch 'master' into v2_lib 2020-10-07 11:12:47 +02:00
gendx f328971ae8 Merge pull request #165 from mingxguo27/mingxguo-fuzzing-mvp
Fuzzing helper library and more fuzz targets
2020-10-05 14:26:00 +02:00
mingxguo27 cc0c9eefeb changed reproducible 2020-10-05 10:17:09 +00:00