Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
16bfbaf
WIP CBOR.Spec.Raw.Nondet
tahina-pro Sep 26, 2025
19343bb
check_equiv_correct
tahina-pro Sep 26, 2025
2f49722
check_valid_correct, with weak bound
tahina-pro Sep 27, 2025
4bc1791
WIP strong bound statement
tahina-pro Sep 27, 2025
d691221
check_valid with strict bound check
tahina-pro Sep 29, 2025
e9e19e7
WIP CBOR.Pulse.Raw.EverParse.Nondet
tahina-pro Sep 30, 2025
22a73eb
pts_to_serialized_nlist_raw_data_item_head_header'
tahina-pro Oct 1, 2025
54c9d8a
pts_to_serialized_strong_prefix
tahina-pro Oct 1, 2025
6f51e14
impl_check_equiv_list
tahina-pro Oct 3, 2025
325f926
impl_check_setoid_assoc_eq_with_overflow
tahina-pro Oct 7, 2025
021af45
rlimit
tahina-pro Oct 7, 2025
f690a89
impl_list_for_all_with_overflow_setoid_assoc_eq_with_overflow
tahina-pro Oct 7, 2025
cfab0f6
impl_check_equiv_map_hd_body
tahina-pro Oct 8, 2025
6bfd786
revamp types
tahina-pro Oct 8, 2025
f5a5679
impl_list_existsb_with_overflow_map_fst
tahina-pro Oct 8, 2025
767e198
revisit check_map_depth spec
tahina-pro Oct 8, 2025
b0f796c
impl_check_map_depth
tahina-pro Oct 8, 2025
6721bb4
impl_list_no_setoid_repeats_with_overflow_map_fst
tahina-pro Oct 9, 2025
bb17a21
impl_check_valid
tahina-pro Oct 9, 2025
f2d46f0
add an interface
tahina-pro Oct 9, 2025
c8835da
remove old NoMap modules, subsumed by Nondet
tahina-pro Oct 9, 2025
5dcca9f
mk_cbor_map_key_depth
tahina-pro Oct 9, 2025
425fe8c
WIP cbor_validate_nondet
tahina-pro Oct 10, 2025
7f23870
move Pulse NonDet interface from spec/ to pulse/
tahina-pro Oct 10, 2025
27846a8
instantiate check_valid, check_equiv with the basic data model
tahina-pro Oct 10, 2025
2ccbda5
WIP cbor_validate_nondet
tahina-pro Oct 10, 2025
09e7e92
cbor_validate_nondet
tahina-pro Oct 11, 2025
7256964
CBOR.Pulse.Raw.Format.Nondet -> *.Validate
tahina-pro Oct 11, 2025
9e83b06
WIP expose check_equiv for lists
tahina-pro Oct 13, 2025
466ee85
impl_check_equiv_list_basic
tahina-pro Oct 13, 2025
cdb0104
check_equiv_list_map_correct
tahina-pro Oct 13, 2025
96a5d0f
CBOR.Pulse.Raw.Format.Nondet.Compare.fst
tahina-pro Oct 14, 2025
e947954
cbor_nondet_serialize
tahina-pro Oct 15, 2025
888ff56
WIP destructors
tahina-pro Oct 15, 2025
373436b
reset to any perm
tahina-pro Oct 16, 2025
19a05e5
weaken permission on array_iterator_start
tahina-pro Oct 16, 2025
4e2fdf4
cbor_nondet_array_iterator_next
tahina-pro Oct 20, 2025
f8f78f8
cbor_nondet_map_iterator_next
tahina-pro Oct 22, 2025
49e21c5
WIP cbor_nondet_equiv_body with explicit redefinition of cbor_array_i…
tahina-pro Oct 22, 2025
8f0485c
use a stronger type annotation instead of copying definitions
tahina-pro Oct 22, 2025
d5c7860
cbor_nondet_equiv
tahina-pro Oct 23, 2025
035ab51
cbor_nondet_map_get
tahina-pro Oct 23, 2025
81d9b44
make assoc, no_repeats lemmas available
tahina-pro Oct 23, 2025
d2ae6d9
cbor_nondet_no_setoid_repeats
tahina-pro Oct 23, 2025
f6277d4
seq_list_map_cbor_nondet_match_elim
tahina-pro Oct 24, 2025
90becfb
cbor_nondet_mk_map_gen
tahina-pro Oct 24, 2025
fa0dfb0
det/krml -> krml
tahina-pro Oct 24, 2025
f59b892
CBORDet snapshot
tahina-pro Oct 24, 2025
afdde93
first attempt at extracting CBOR.Pulse.Raw.Nondet.Common
tahina-pro Oct 24, 2025
30f4088
cbor_nondet_mk_map_entry; move validator, parser, serializer type def…
tahina-pro Oct 24, 2025
b4f3238
isolate types into CBOR.Pulse.API.Nondet.Type
tahina-pro Oct 24, 2025
0a9b909
CBOR.Pulse.Raw.Nondet.Common -> CBOR.Pulse.API.Nondet.Rust
tahina-pro Oct 24, 2025
4e51fe5
extract nondet to Rust
tahina-pro Oct 24, 2025
edcd7c4
extract nondet to C
tahina-pro Oct 24, 2025
8f7535e
add rules to produce the nondet C snapshot
tahina-pro Oct 24, 2025
5f8fd46
cbor nondet snap
tahina-pro Oct 24, 2025
ce13f26
CI: add nondet C snapshot
tahina-pro Oct 24, 2025
28cf0d1
WIP add some nondet tests
tahina-pro Oct 24, 2025
cdce914
adapt test generator to nondet API
tahina-pro Oct 24, 2025
64a2f91
cbor nondet snap
tahina-pro Oct 24, 2025
a7088ce
cbor nondet test snap
tahina-pro Oct 24, 2025
1479a75
ignore test executable
tahina-pro Oct 24, 2025
733a245
use Pulse branch _taramana_arrayptr_null
tahina-pro Oct 27, 2025
8e9e4a4
make mk_string_from_arrayptr_t safer
tahina-pro Oct 27, 2025
7ff84b9
cbor snap
tahina-pro Oct 27, 2025
f5e3883
mk_tagged_safe, mk_array_safe, mk_map_safe
tahina-pro Oct 27, 2025
f426a02
cbor_nondet_parse
tahina-pro Oct 27, 2025
0ed9770
cbor_nondet_serialize
tahina-pro Oct 27, 2025
5bcdbaa
safe destructors
tahina-pro Oct 28, 2025
cbf9d37
map_get_by_ref_safe
tahina-pro Oct 28, 2025
15df28d
mk_simple_safe
tahina-pro Oct 28, 2025
5dc089d
make nondet safe again
tahina-pro Oct 28, 2025
6adc8d0
cbor nondet snap
tahina-pro Oct 28, 2025
cc9ade0
adapt gen det test with more strict construction of text strings
tahina-pro Oct 28, 2025
a46be9b
CBORDetTest.c snap
tahina-pro Oct 28, 2025
5ad56c7
adapt det CBOR example with safer text string construction
tahina-pro Oct 29, 2025
1e9f0bd
fix verified CBOR tests
tahina-pro Oct 29, 2025
4a5d551
VSCode config for EverCDDL
tahina-pro Oct 29, 2025
7c7ffde
adapt EverCDDL to the new string API
tahina-pro Oct 29, 2025
c6d1aea
COSE snapshot
tahina-pro Oct 29, 2025
afa736e
adapt non-deterministic tests
tahina-pro Oct 29, 2025
cce4e8e
CBOR nondet test snap
tahina-pro Oct 29, 2025
af7fe71
register CBOR nondet tests
tahina-pro Oct 29, 2025
7d72b1d
fix COSE clean rules
tahina-pro Oct 29, 2025
12c3abc
register CBOR nondet clean rule
tahina-pro Oct 29, 2025
08ff1cb
some CBOR nondet tests from QCBOR
tahina-pro Oct 29, 2025
a630a5b
add example for C nondet
tahina-pro Oct 30, 2025
8053a46
simplify cbor_nondet_parse signature
tahina-pro Oct 30, 2025
d60722a
cbor nondet snapshot
tahina-pro Oct 30, 2025
ff81340
adapt nondet tests to simplified cbor_nondet_parse
tahina-pro Oct 30, 2025
2e09ce2
CBOR nondet test snap
tahina-pro Oct 30, 2025
35633ac
clean up CBOR nondet Makefiles
tahina-pro Oct 30, 2025
fa046d8
int64 constructors/destructors, byte/text string destructors
tahina-pro Oct 30, 2025
188c33d
cbor nondet snap
tahina-pro Oct 30, 2025
6e3e1d6
document CBORNondet in README.md
tahina-pro Oct 30, 2025
e83972b
cbor_nondet_size
tahina-pro Oct 31, 2025
5942b68
cbor nondet snap
tahina-pro Oct 31, 2025
9958bad
cbor_nondet_map_get_multiple
tahina-pro Nov 5, 2025
656c00b
cbor nondet snap
tahina-pro Nov 5, 2025
00455c0
rlimit
tahina-pro Nov 5, 2025
ce96af8
extract function signatures without type definitions
tahina-pro Nov 6, 2025
b0a7618
nondet C: extract types separately
tahina-pro Nov 6, 2025
0e02c2e
cbor nondet C snapshot
tahina-pro Nov 6, 2025
b60f5d7
do not use decidable equality on option types
tahina-pro Nov 6, 2025
476486c
cbor nondet snap: option types now go private
tahina-pro Nov 6, 2025
13e89b4
WIP Rust nondet snapshot
tahina-pro Nov 17, 2025
637cda3
API.Nondet.Rust -> Raw.Nondet
tahina-pro Nov 17, 2025
67fa94a
Mimic the Det Rust API for Nondet
tahina-pro Nov 18, 2025
c4240ef
CBOR nondet snapshot
tahina-pro Nov 18, 2025
7f4aa02
fix Rust nondet tests
tahina-pro Nov 18, 2025
fa10287
Merge branch 'master' into _taramana_cbor_nondet
tahina-pro Dec 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Generate snapshot
run: |
make ADMIT=1 cbor-snapshot 3d-doc-snapshot -kj$(nproc) && make ADMIT=1 cose-snapshot -kj$(nproc) &&
git add doc/3d-snapshot src/cbor/pulse/det/c src/cbor/pulse/det/rust src/cose/c src/cose/rust &&
git add doc/3d-snapshot src/cbor/pulse/det/c src/cbor/pulse/nondet/c src/cbor/pulse/det/rust src/cose/c src/cose/rust &&
if ! git diff --staged --exit-code ; then git commit -m "3D doc, CBOR, COSE snapshot" ; fi &&
git diff --exit-code
- name: Push new branch
Expand Down
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ standalone and does not need a separate installation of EverCBOR.

More options are available, use `--help` for more details.

NOTE: EverCDDL currently only supports the deterministic encoding of
CBOR. While EverCBOR also offers an implementation for
non-deterministic, definite-length CBOR objects, we have not connected
it with EverCDDL yet.

## QuackyDucky

Run `./bin/qd.exe -help` to get instructions on how to run QuackyDucky.
Expand All @@ -114,11 +119,22 @@ TODO: integrate [documentation and example by Samuel Chassot](https://github.com

EverParse presents EverCBOR, our formally verified implementation of CBOR.

NOTE: Currently, we only support the deterministic subset of CBOR. Full support of CBOR is coming soon.
We offer two distributions: CBORNondet supports definite-length CBOR
objects, and CBORDet supports deterministically encoded CBOR objects
(RFC 8979 Section 4.2.1)

NOTE: In both cases, we do not support floating-point values
yet. Equivalence of floating-point NaNs for the purpose of map key
comparisons has not been fully standardized in IETF CBOR yet; related
discussions are ongoing, and we intend to extend our verified
implementation with support for floating-point values once such
discussions stabilize.

NOTE: Currently, CBORNondet and CBORDet cannot be used together yet.

* C:

+ The generated C source files for CBOR are in
+ The generated C source files for the CBOR deterministic encoding are in
`src/cbor/pulse/det/c`, which also contains some tests in the
`test` subdirectory. There, the header file is `CBORDet.h`. The
object file is `CBORDet.o`, which you can link with your
Expand All @@ -127,16 +143,28 @@ NOTE: Currently, we only support the deterministic subset of CBOR. Full support
+ A fully documented example is in
`src/cbor/pulse/det/c/example`. There, `main.c` documents the C
API; its `Makefile` shows how to compile and link against CBORDet.

+ The generated C source files for CBORNondet are in
`src/cbor/pulse/nondet/c`, which also contains some tests in the
`test` subdirectory. There, the header file is `CBORNondet.h`. The
object file is `CBORNondet.o`, which you can link with your
application.

+ A fully documented example is in
`src/cbor/pulse/nondet/c/example`. There, `main.c` documents the C
API; its `Makefile` shows how to compile and link against CBORNondet.

* Rust:

+ The generated Rust source files for CBOR are in
+ The generated Rust source files for the CBOR deterministic encoding are in
`src/cbor/pulse/det/rust` , where you can use `cargo build` and
`cargo test` ; the crate is called `cborrs`.

+ The generated HTML documentation of `cborrs` is at
`https://project-everest.github.io/everparse/evercbor-rust/cborrs/`

+ TODO: Take a snapshot of the generated Rust source files for CBORNondet

## EverCOSign

EverParse presents EverCOSign, our formally verified implementation of COSE signing.
Expand Down
21 changes: 18 additions & 3 deletions nofstar.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ clean_rules += clean-cbor clean-cose

.PHONY: all-nofstar

cbor:
cbor: cbor-det cbor-nondet

cbor-det:
+$(MAKE) -C src/cbor/pulse/det

.PHONY: cbor
cbor-nondet:
+$(MAKE) -C src/cbor/pulse/nondet

.PHONY: cbor cbor-det cbor-nondet

cose: cbor
+$(MAKE) -C src/cose
Expand All @@ -19,13 +24,23 @@ cbor-det-c-test: cbor

.PHONY: cbor-det-c-test

cbor-nondet-c-test: cbor
+$(MAKE) -C src/cbor/pulse/nondet/c all-tests

.PHONY: cbor-nondet-c-test

# NOTE: I wish we could use `cargo -C ...` but see https://github.com/rust-lang/cargo/pull/11960
cbor-det-rust-test: cbor
+cd src/cbor/pulse/det/rust && cargo test

.PHONY: cbor-det-rust-test

cbor-test-unverified: cbor-det-c-test cbor-det-rust-test
cbor-nondet-rust-test: cbor
+cd src/cbor/pulse/nondet/rust && cargo test

.PHONY: cbor-nondet-rust-test

cbor-test-unverified: cbor-det-c-test cbor-det-rust-test cbor-nondet-c-test cbor-nondet-rust-test

.PHONY: cbor-test-unverified

Expand Down
2 changes: 1 addition & 1 deletion opt/hashes.Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FStar_hash := 1cff8d796deed8834926389a986d015498780041
karamel_hash := fb36fecb552c9fb202beb38a6c5a732c3f2cd49f
pulse_hash := f51670f4c0117c8614e10c421025d77e1e44940e
pulse_hash := a1a94bae512a7ca56fd03ae8da5154409a1cca06
30 changes: 22 additions & 8 deletions src/cbor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,28 @@ all: snapshot

interface: spec.do pulse.do

snapshot: extract
+$(MAKE) -C pulse/det $@
snapshot: det/snapshot nondet/snapshot

test-snapshot: extract
+$(MAKE) -C pulse/det $@
.PHONY: det/snapshot nondet/snapshot

det/snapshot: extract
+$(MAKE) -C pulse/$(dir $@) $(notdir $@)

nondet/snapshot: extract
+$(MAKE) -C pulse/$(dir $@) $(notdir $@)

test-snapshot: det/test-snapshot nondet/test-snapshot

.PHONY: det/test-snapshot nondet/test-snapshot

det/test-snapshot: extract
+$(MAKE) -C pulse/$(dir $@) $(notdir $@)

nondet/test-snapshot: extract
+$(MAKE) -C pulse/$(dir $@) $(notdir $@)

extract:
+$(MAKE) -C pulse/det/krml ALREADY_CACHED='*,-CBOR,'
+$(MAKE) -C pulse/krml ALREADY_CACHED='*,-CBOR,'

.PHONY: extract

Expand All @@ -25,7 +39,7 @@ pulse/raw.do: spec/raw.do pulse.do

pulse/raw/everparse.do: pulse/raw.do spec/raw/everparse.do

pulse/det/krml.do: pulse/raw/everparse.do
pulse/krml.do: pulse/raw/everparse.do

%.do:
+$(MAKE) -C $(basename $@)
Expand All @@ -34,11 +48,11 @@ pulse/det/krml.do: pulse/raw/everparse.do

.PHONY: interface snapshot test-snapshot

clean: pulse/det.clean
clean: pulse/det.clean pulse/nondet.clean

.PHONY: clean

clean-verify: spec.clean spec/raw.clean spec/raw/everparse.clean pulse.clean pulse/raw.clean pulse/raw/everparse.clean pulse/det/krml.clean
clean-verify: spec.clean spec/raw.clean spec/raw/everparse.clean pulse.clean pulse/raw.clean pulse/raw/everparse.clean pulse/krml.clean

.PHONY: clean-verify

Expand Down
Loading
Loading