Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jasmin, Mathcomp2 and Coq.8.18.0-8.20.0 #53

Draft
wants to merge 418 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
418 commits
Select commit Hold shift + click to select a range
fd4be4a
fix bind_list (also added comment that it truncates)
bshvass Apr 21, 2022
7707c45
delete ocaml compiler generated files
haselwarter Apr 22, 2022
182f9b5
add xor jasmin translation example
haselwarter Apr 22, 2022
f40ba53
prove `translate_pexpr_correct`
bshvass Apr 23, 2022
042ce1c
remove `bind_list_to_tuple` definitions and lemmas
bshvass Apr 23, 2022
a1e9d59
Style + fix build
TheoWinterhalter Apr 25, 2022
63d8fd7
Move deriving import to avoid conflicting instances for Z_choiceType
haselwarter Apr 25, 2022
cf7073a
pass the signatures of preceding translated functions through the tra…
haselwarter Apr 25, 2022
09ff0fe
Alt. definition of bind_list with corrected computational behaviour
haselwarter Apr 25, 2022
11f0a6c
Nits
TheoWinterhalter Apr 25, 2022
a474049
Prove app_sopn_nil_ok_size to avoid countless discriminates
TheoWinterhalter Apr 26, 2022
d7d56c8
Much more concise and fast proof of app_sopn_list_correct
TheoWinterhalter Apr 26, 2022
f4518a5
translate funcall (wip)
haselwarter Apr 27, 2022
0edc48b
translate fundef (wip)
haselwarter Apr 27, 2022
a47e95f
define the function part of translate_fundef
haselwarter Apr 27, 2022
e443040
simplify the output of the jasmin/xor example
haselwarter Apr 27, 2022
d301567
prettify the add1 and bigadd examples
haselwarter Apr 27, 2022
138def0
Define translation of for
TheoWinterhalter Apr 28, 2022
c6aa2cd
Silence warning
TheoWinterhalter Apr 28, 2022
49599b9
Start massaging the for proof
TheoWinterhalter Apr 28, 2022
465d2ab
Big chunk of the for proof
TheoWinterhalter Apr 28, 2022
f1a261c
Complete for proof
TheoWinterhalter Apr 29, 2022
13f3315
sem_Ind_cons case of translate_prog_correct
TheoWinterhalter Apr 29, 2022
840c2e9
Remove translate_instr_r_correct and inline it + proof for if
TheoWinterhalter Apr 29, 2022
5b30298
Factorise proofs into translate_pexpr_correct_cast
TheoWinterhalter Apr 29, 2022
720dc2f
Prove translate_write_var_estate
TheoWinterhalter Apr 29, 2022
4e99f5d
Use translate_write_var_estate to simplify other goal
TheoWinterhalter Apr 29, 2022
9be3afc
Further simplification using translate_write_var_estate
TheoWinterhalter Apr 29, 2022
9236151
Define translate_instr directly (instead of using exact)
TheoWinterhalter Apr 29, 2022
a6a5906
change `write_lval` input to `typed_chElement`
bshvass May 2, 2022
275e5ff
nits
TheoWinterhalter May 2, 2022
0ed8757
several addition, mainly to prove `app_sopn_list_tuple_correct`
bshvass May 3, 2022
fd23d68
Merge branch 'jasmin' of https://github.com/SSProve/ssprove into jasmin
bshvass May 3, 2022
d6796e2
added comments
bshvass May 3, 2022
5187318
Nits
TheoWinterhalter May 3, 2022
f52fb94
implement `Copn` case of translate_instr
bshvass May 3, 2022
bccf958
Merge branch 'jasmin' of https://github.com/SSProve/ssprove into jasmin
bshvass May 3, 2022
844986b
Define handled_program
TheoWinterhalter May 3, 2022
9939cbd
Use handled_program to deal with while case
TheoWinterhalter May 3, 2022
26fb513
prove `opn`; only admitted lemma `app_sopn_list_tuple_correct`
bshvass May 3, 2022
74b2f50
Merge branch 'jasmin' of https://github.com/SSProve/ssprove into jasmin
bshvass May 3, 2022
b91861e
fix build
bshvass May 3, 2022
23af575
refactor proof of `opn`
bshvass May 3, 2022
b341a19
added `asmop_correct` to context and begun proving it for x86
bshvass May 3, 2022
dada9d4
Style
TheoWinterhalter May 4, 2022
efcb15e
generalized translation of `app_sopn` and proved it correct
bshvass May 4, 2022
bc78fb1
simplify subproof of `tr_app_sopn_single_correct`
bshvass May 5, 2022
7bfeaa1
Simplify tr_app_sopn_correct + style
TheoWinterhalter May 5, 2022
b4327b6
Fix build
TheoWinterhalter May 5, 2022
3a01ee7
Define chArray_set_sub and complete translation of write_lval
TheoWinterhalter May 5, 2022
76fc6b6
simplify `tr_app_sopn`
bshvass May 5, 2022
0a71e64
Prove chArray_set_sub_correct
TheoWinterhalter May 5, 2022
5f04aa2
Nit
TheoWinterhalter May 5, 2022
a37c195
Prove translate_to_arr
TheoWinterhalter May 5, 2022
119ca36
Complete translate_write_lval_correct (Lasub case)
TheoWinterhalter May 5, 2022
03a154c
Slightly improve x86_correct
TheoWinterhalter May 5, 2022
57a665c
Uncomment x86_correct
TheoWinterhalter May 5, 2022
836e654
simplify proof of `x86_correct`
bshvass May 5, 2022
5de06db
Simplify no_arr_correct
TheoWinterhalter May 5, 2022
b89a628
Progress with ptr_var_neq
TheoWinterhalter May 5, 2022
ee41b51
Prove ptr_var_neq
TheoWinterhalter May 5, 2022
d570180
injective_translate_var does not hold!
TheoWinterhalter May 5, 2022
30f645c
rewriting in `bigadd` example
bshvass May 5, 2022
5e4b216
Prove mem_loc_translate_var_neq
TheoWinterhalter May 5, 2022
97d915d
nat_of_fun_ident might not be injective either
TheoWinterhalter May 5, 2022
11dd86f
Fix up injective_nat_of_ident
TheoWinterhalter May 5, 2022
fecde6e
prove `injective_nat_of_ident`
bshvass May 5, 2022
b7e5764
use coq stdlib
bshvass May 5, 2022
4f5b682
modify `translate_var` and prove `injective_translate_var`
bshvass May 6, 2022
4a69b7b
added some notation and automation for program simplification
bshvass May 6, 2022
fdc6172
remove nop in tactic
bshvass May 6, 2022
4002c7b
fun with funs
haselwarter May 7, 2022
0917e20
revert experiment to add dependent pairs to choice_type
haselwarter May 7, 2022
17e00ec
Merge remote-tracking branch 'github/jasmin' into jasmin
haselwarter May 9, 2022
150a74a
move translate_instr down to right before translate_prog
haselwarter May 9, 2022
0dca6ce
break `Translate` section in two when P changes, translate fdef bodie…
haselwarter May 9, 2022
afa6680
unbreak the build
haselwarter May 10, 2022
9e55c90
ltac2 code for Jasmin variables in examples, factor out example utils
haselwarter May 11, 2022
25fa5ca
Nits
TheoWinterhalter May 12, 2022
2a3cf4b
Start using Proof using
haselwarter May 12, 2022
97f268c
refactor: section variables only as needed, notation module
haselwarter May 12, 2022
cb4149c
prove call correct up to "stack safety", finally a good tr_prog inver…
haselwarter May 13, 2022
f41eb64
Nits
TheoWinterhalter May 13, 2022
6e95f1c
clean up main theorem (statement & proof)
haselwarter May 13, 2022
ed06ae0
generalise over the funname during the induction in the main thm
haselwarter May 13, 2022
b4f394f
nits
haselwarter May 15, 2022
3c65813
factor out translate_write_var_correct and _vars_ as separate lemmas
haselwarter May 16, 2022
30ff96f
wip: correctness of proc. reading from the empty heap is problematic
haselwarter May 16, 2022
7b7dac5
strengthen IH in main thm, by adding global rel_estate (broken)
haselwarter May 16, 2022
3558ae7
minor fix
bshvass May 16, 2022
1eedd58
Revert "minor fix"
haselwarter May 17, 2022
b18255f
Revert "strengthen IH in main thm, by adding global rel_estate (broken)"
haselwarter May 17, 2022
c7e9ab5
small example of correctness proof
bshvass May 24, 2022
8d4580d
prove call case of `prog_correct`
bshvass May 25, 2022
b08ff97
Revert "prove call case of `prog_correct`"
bshvass May 25, 2022
704d660
more injectivity
bshvass May 31, 2022
ac4a335
Style
TheoWinterhalter Jun 3, 2022
e4270b0
Added sum types
cmester0 Jun 8, 2022
9cda9f9
Added auto or eauto to intuition
cmester0 Jun 28, 2022
be91124
Added sum / coproduct notation
cmester0 Jun 28, 2022
902fc87
Merge pull request #27 from cmester0/jasmin_sum_types
spitters Jun 30, 2022
e4aed60
prefix order and disjointness
bshvass Jun 28, 2022
01dde49
fix
bshvass Jun 28, 2022
5f1774e
new translation
bshvass Jun 29, 2022
780cc96
more order/disj
bshvass Jun 29, 2022
85143f1
move injectivity lemmas up
bshvass Jun 29, 2022
3ca406a
change `rel_estate` and reprove lemmas
bshvass Jun 29, 2022
b406c61
refactor main proof and main statement to new relation
bshvass Jun 29, 2022
0adf651
examples
bshvass Jun 29, 2022
05f6d79
removed simple admits, only remaining is nontrivial
bshvass Jun 29, 2022
05010d6
finished proof of `translate_prog_correct`
bshvass Jul 1, 2022
5e2680d
modified `xor.v` to use new simplification
bshvass Jul 5, 2022
a1ab460
simplify notation and `xor` example
bshvass Jul 6, 2022
501cf9e
fix `xor.v`
bshvass Jul 6, 2022
29a4cdb
update to jasmin main
bshvass Aug 18, 2022
959a906
fix compilation
bshvass Sep 19, 2022
3b6e28e
upgrade deextraction script from `sed` to `perl`
bshvass Sep 27, 2022
468a41f
regenerated examples
bshvass Sep 27, 2022
607e038
minor fix, added test
bshvass Sep 27, 2022
df0467a
fix compilation errors
haselwarter Sep 29, 2022
e7f27b8
fix and silence warnings
haselwarter Sep 29, 2022
d0cddee
xor example
bshvass Oct 7, 2022
89a09a9
regenerate examples
bshvass Oct 7, 2022
bead4e7
update _CoqProject and Makefile
bshvass Oct 7, 2022
4a97047
added tactics for removing puts/gets
bshvass Oct 20, 2022
77eeea9
(WIP) init aes examples
bshvass Oct 24, 2022
98de66b
translated sike434 code with handwritten globs (note the while loop)
bshvass Oct 25, 2022
cb97425
progress
bshvass Oct 25, 2022
e211c93
some lemmas on words
bshvass Oct 27, 2022
ba974f1
word lemmas, reached a point where I need to define AES ops properly
bshvass Oct 27, 2022
88b1ae1
updated dependencies
bshvass Oct 28, 2022
68d39b1
Merge branch 'jasmin' of https://github.com/SSProve/ssprove into jasmin
bshvass Oct 28, 2022
c6260e8
progress (one 'subword' case done in 'key_expand' lemma)
bshvass Oct 31, 2022
3fba84b
Provide semantics for deterministic programs
TheoWinterhalter Nov 3, 2022
5257fc6
Prove r_transL_val
TheoWinterhalter Nov 4, 2022
56d4a48
aes progress
bshvass Nov 8, 2022
dbce239
usage of new transitivity lemma to xor example
bshvass Nov 8, 2022
ce7395d
more aes
bshvass Nov 24, 2022
4f1141c
Add missing backticks
TheoWinterhalter Dec 2, 2022
9dd4a27
progress on equivalence between `keyExpansion` and `JKEYS_EXPAND`
bshvass Dec 8, 2022
eaa29e6
Merge branch 'jasmin' of https://github.com/SSProve/ssprove into jasmin
bshvass Dec 8, 2022
73a957b
Update build.yml
TheoWinterhalter Dec 9, 2022
3b5d8e6
Don't really manage to improve AES yet
TheoWinterhalter Dec 9, 2022
fddc183
compute variables manually
bshvass Dec 9, 2022
216bc72
much less redundant version, though still very slow
bshvass Dec 9, 2022
1a36dae
use identifier instead of concrete set of Locations
bshvass Dec 10, 2022
7d9ff21
Merge branch 'jasmin' of https://github.com/SSProve/ssprove into jasmin
bshvass Dec 10, 2022
bf059b2
finish an SSProve proof as sanity check
bshvass Dec 10, 2022
7d1b31b
cleaning
bshvass Dec 11, 2022
fa7efcd
more cleaning
bshvass Dec 11, 2022
1793b5b
redefine `pdisj` and reprove `rcon` and `key_expand` correctness
bshvass Dec 11, 2022
db89395
restate `translate_for_rule` and refactor/automate `keyExpansionE`
bshvass Dec 11, 2022
c294d17
Cleanup and automation, also finish small things in `keyExpansionE`
bshvass Dec 11, 2022
7ac003d
Remove spurious dot
TheoWinterhalter Dec 12, 2022
302983b
more aes, transitivity lemma for unary statements, unary loop rule
bshvass Dec 13, 2022
bc89434
Merge branch 'jasmin' of https://github.com/SSProve/ssprove into jasmin
bshvass Dec 13, 2022
11b3655
implement several specs, prove `aes_rounds_h`
bshvass Dec 13, 2022
bd6b508
separate file for the aes prog
bshvass Dec 13, 2022
5779f4b
update _CoqProject
bshvass Dec 13, 2022
41c0035
added aes_hac and restructured aes/ a bit
bshvass Dec 13, 2022
e1dd8ac
clean
bshvass Dec 13, 2022
f34ea2a
import zify
bshvass Dec 13, 2022
8af2a92
add notation for remaining aes functions
bshvass Dec 13, 2022
cb6eb95
minor fix
bshvass Dec 13, 2022
0654781
clean and minor fix
bshvass Dec 14, 2022
6d38cec
several word lemmas and more AES
bshvass Dec 14, 2022
0245e7a
static translation for better control over reductions in proofs
bshvass Dec 14, 2022
75abb77
match proofs to new translation
bshvass Dec 14, 2022
1c0c1bb
prove JAES is equivalent to imperative spec of AES
bshvass Dec 14, 2022
d193457
First part of showing AES done
cmester0 Dec 14, 2022
ed5e6fb
WIP aes_hac
cmester0 Dec 14, 2022
0cc8bf0
WIP
cmester0 Dec 14, 2022
012de4b
Aes subproof done
cmester0 Dec 16, 2022
bf2c685
Progress
cmester0 Dec 16, 2022
134ad92
update to the newest version of jasmin
bshvass Dec 19, 2022
9700593
One subgoal closer, aes_hac
cmester0 Dec 19, 2022
69ef8d2
another sub protocol for key_combined
cmester0 Dec 19, 2022
19a2980
Merge branch 'jasmin' of github.com:SSProve/ssprove into jasmin
cmester0 Dec 19, 2022
b3de403
Done showing key_combined (needs cleanup)
cmester0 Dec 20, 2022
3bc642d
Structure of key_expand_eq done (aes_hac)
cmester0 Dec 20, 2022
3ca7099
first attempt at computing locations; note VERY slow
bshvass Dec 20, 2022
2715826
More progress
cmester0 Dec 20, 2022
06a27fc
Clear whitespace
cmester0 Dec 20, 2022
c865aa1
new invariants based on predicates and corresponding advantage rules
bshvass Dec 21, 2022
0649411
generalized specs of intermidiate imperative aes (Caes, Cenc, etc.)
bshvass Dec 21, 2022
331b5bc
security proof init
bshvass Dec 21, 2022
7bb83fd
security proof cleaning
bshvass Dec 21, 2022
b7f7371
more cleaning
bshvass Dec 21, 2022
7717a4c
Merge branch 'jasmin' of https://github.com/SSProve/ssprove into jasmin
bshvass Dec 21, 2022
10b52d9
cleared dubious admit in `prf.v`
bshvass Dec 21, 2022
30edbff
cleanup and restructuring
bshvass Dec 22, 2022
e455fa6
remove unused definitions
bshvass Dec 23, 2022
16f7154
Apply subproof, instead of repeating it
cmester0 Jan 2, 2023
8fe8451
Merge branch 'jasmin' of github.com:SSProve/ssprove into jasmin
cmester0 Jan 2, 2023
db77f8f
Subword and sbox proven
cmester0 Jan 4, 2023
c1616e2
Filled into larger proof
cmester0 Jan 4, 2023
aee4d21
Finished more subproofs
cmester0 Jan 5, 2023
40f7bdc
Done with key_expand
cmester0 Jan 11, 2023
cb9bbaf
Done with key_expand (cleanup)
cmester0 Jan 11, 2023
99350cf
Updated to changes in hacspec
cmester0 Jan 12, 2023
62d67da
remove word admits
bshvass Jan 16, 2023
cf4384a
remove remaining admits
bshvass Jan 18, 2023
4bfa195
minor fix, print assumptions and end of `aes_prf`
bshvass Jan 18, 2023
f8a6261
Closer to unrolling loop
cmester0 Jan 23, 2023
eee22e2
WIP aes_hac
cmester0 Jan 24, 2023
cd6bda2
WIP for_loop
cmester0 Jan 25, 2023
75202a5
A bit of cleanup
cmester0 Jan 25, 2023
d28f55a
aes done, only subprofs left
cmester0 Jan 25, 2023
81b377e
WIP
cmester0 Jan 25, 2023
e8a173b
Correct Invariant?
cmester0 Jan 26, 2023
4f68fcd
fix xor example
bshvass Jan 27, 2023
9f59063
Merge
bshvass Jan 27, 2023
2d1bbf9
different formulation of valid stack
bshvass Jan 27, 2023
6983be8
Keys expand done, few helper lemmas not done
cmester0 Jan 30, 2023
2a296fe
Only helper lemmas and aes_enc(_last) left
cmester0 Jan 30, 2023
0296967
Missing ShiftRows, SubBytes and MixColumns
cmester0 Jan 30, 2023
fc026aa
No more admits (only in hacspec_lib)
cmester0 Jan 30, 2023
158642b
Merge branch 'jasmin' of github.com:SSProve/ssprove into jasmin
cmester0 Jan 30, 2023
2084c80
Update to changes in waes file
cmester0 Jan 30, 2023
8019f5a
add coq-mathcomp-word as dependency to opam
haselwarter Jan 31, 2023
8ab3f1b
move lemma to fix one of the compilation errors
haselwarter Jan 31, 2023
6caf9b5
Moved equivalence proofs to the hacspec repository
cmester0 Feb 2, 2023
d0aedf5
anonymize, remove comments
haselwarter Feb 4, 2023
eb23fda
change unsupported to ret dummy
bshvass Apr 26, 2023
e262f06
prove `get_translated_fun` deterministic
bshvass Apr 26, 2023
96146e2
mv x86_correct
bshvass Apr 26, 2023
56d986a
fix aes_utils
bshvass Apr 27, 2023
f0bc6f9
add combined compiler/translation theorem
bshvass May 2, 2023
8537621
fix PRF encryption to return nonce
haselwarter Aug 21, 2023
fc11b36
prove concrete bounds and delete admitted things
bshvass Sep 20, 2023
3617a71
update to coq-mathcomp-word.2.1 for coq-mathcomp-zify compatibility
haselwarter Sep 20, 2023
e4f5e21
Merge remote-tracking branch 'github/jasmin' into jasmin
haselwarter Sep 20, 2023
0f61198
jasmin readme
bshvass Sep 20, 2023
77873ac
Merge branch 'jasmin' of https://github.com/SSProve/ssprove into jasmin
bshvass Sep 20, 2023
6aa247c
Update to Mathcomp2 and Coq 8.18.0
cmester0 Jun 6, 2023
c747cdc
remove jasmin dependency for now
cmester0 Mar 14, 2024
bcc0533
remove jasmin dependency for now
cmester0 Mar 14, 2024
9e8dbbf
remove jasmin dependency for now
cmester0 Mar 14, 2024
ae1f7e6
include more of jasmin word
cmester0 Mar 14, 2024
cba2823
cleanup
cmester0 Mar 14, 2024
fbb670c
Removed location from aux protocol
cmester0 Sep 5, 2024
1646b52
Update opam file
cmester0 Sep 6, 2024
27062c9
Merge branch 'main' into jasmin-coq.8.19.0
4ever2 Jan 22, 2025
c71e44e
Cleanup
4ever2 Jan 22, 2025
3009a66
OVN fixes
4ever2 Jan 22, 2025
417c4bc
Update opam-build workflow
4ever2 Jan 22, 2025
d4369a9
Update nix workflows
4ever2 Jan 22, 2025
1cb7a5f
Reinstate Jasmin dependency
4ever2 Jan 23, 2025
3f59a42
Merge branch 'main' into jasmin-coq.8.19.0
4ever2 Jan 23, 2025
f3e1bcc
Nix fixes
4ever2 Jan 23, 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
60 changes: 45 additions & 15 deletions .github/workflows/nix-action-8.18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (coq)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.18\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail;
true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target coq
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.18\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
Expand Down Expand Up @@ -84,12 +90,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (mathcomp-analysis)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.18\" --argstr job \"mathcomp-analysis\" \\\n --dry-run 2> err > out
|| (touch fail; true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target mathcomp-analysis
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.18\" --argstr job \"mathcomp-analysis\" \\\n --dry-run 2>&1 >
/dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\"\
\ | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
Expand Down Expand Up @@ -153,12 +165,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (ssprove)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.18\" --argstr job \"ssprove\" \\\n --dry-run 2> err > out || (touch
fail; true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target ssprove
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.18\" --argstr job \"ssprove\" \\\n --dry-run 2>&1 > /dev/null)\n
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
Expand All @@ -175,6 +193,18 @@ jobs:
name: 'Building/fetching previous CI target: mathcomp-analysis'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
job "mathcomp-analysis"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-experimental-reals'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
job "mathcomp-experimental-reals"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-word'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
job "mathcomp-word"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-zify'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
job "mathcomp-zify"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: extructures'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
Expand Down
60 changes: 45 additions & 15 deletions .github/workflows/nix-action-8.19.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (coq)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.19\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail;
true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target coq
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.19\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
Expand Down Expand Up @@ -84,12 +90,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (mathcomp-analysis)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.19\" --argstr job \"mathcomp-analysis\" \\\n --dry-run 2> err > out
|| (touch fail; true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target mathcomp-analysis
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.19\" --argstr job \"mathcomp-analysis\" \\\n --dry-run 2>&1 >
/dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\"\
\ | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
Expand Down Expand Up @@ -153,12 +165,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (ssprove)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.19\" --argstr job \"ssprove\" \\\n --dry-run 2> err > out || (touch
fail; true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target ssprove
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.19\" --argstr job \"ssprove\" \\\n --dry-run 2>&1 > /dev/null)\n
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
Expand All @@ -175,6 +193,18 @@ jobs:
name: 'Building/fetching previous CI target: mathcomp-analysis'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-analysis"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-experimental-reals'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-experimental-reals"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-word'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-word"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-zify'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-zify"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: extructures'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
Expand Down
60 changes: 45 additions & 15 deletions .github/workflows/nix-action-8.20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (coq)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.20\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail;
true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target coq
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.20\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
Expand Down Expand Up @@ -84,12 +90,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (mathcomp-analysis)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.20\" --argstr job \"mathcomp-analysis\" \\\n --dry-run 2> err > out
|| (touch fail; true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target mathcomp-analysis
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.20\" --argstr job \"mathcomp-analysis\" \\\n --dry-run 2>&1 >
/dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\"\
\ | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
Expand Down Expand Up @@ -153,12 +165,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (ssprove)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.20\" --argstr job \"ssprove\" \\\n --dry-run 2> err > out || (touch
fail; true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target ssprove
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.20\" --argstr job \"ssprove\" \\\n --dry-run 2>&1 > /dev/null)\n
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
Expand All @@ -175,6 +193,18 @@ jobs:
name: 'Building/fetching previous CI target: mathcomp-analysis'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-analysis"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-experimental-reals'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-experimental-reals"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-word'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-word"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-zify'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-zify"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: extructures'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/opam-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ jobs:
- name: Build
run: |
opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq.8.18.0 coq-equations.1.3+8.18 coq-mathcomp-ssreflect.2.1.0 coq-mathcomp-analysis.1.0.0 coq-extructures.0.4.0 coq-deriving.0.2.0
opam install coq.8.18.0 coq-equations.1.3+8.18 coq-mathcomp-ssreflect.2.1.0 coq-mathcomp-analysis.1.0.0 coq-extructures.0.4.0 coq-deriving.0.2.0 coq-mathcomp-word.3.0 coq-mathcomp-zify.1.5.0+2.0+8.16
opam exec -- make -j4
2 changes: 1 addition & 1 deletion .nix/coq-nix-toolbox.nix
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"fb3515feec422e546de863ad0101e2a51ec9b8db"
"d5e4aea261db6410c81e2e3758b1f5b9668a1463"
58 changes: 58 additions & 0 deletions .nix/coq-overlays/ssprove/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{ lib, mkCoqDerivation, coq, version ? null
, equations
, mathcomp-ssreflect
, mathcomp-analysis
, mathcomp-experimental-reals
, mathcomp-word
, mathcomp-zify
, extructures
, deriving
}:

(mkCoqDerivation {
pname = "ssprove";
owner = "SSProve";

inherit version;
defaultVersion = with lib.versions; lib.switch [coq.coq-version mathcomp-ssreflect.version] [
{ cases = [(range "8.18" "8.20") "2.3.0"]; out = "0.2.3"; }
{ cases = [(range "8.18" "8.20") (range "2.1.0" "2.2.0")]; out = "0.2.2"; }
# This is the original dependency:
# { cases = ["8.17" "1.18.0"]; out = "0.1.0"; }
# But it is not loadable. The math-comp nixpkgs configuration
# will always only output version 1.18.0 for Coq 8.17.
# Hence, the Coq 8.17 and math-comp 1.17.0 must be explicitly set
# to load it.
# (This version is not on the math-comp CI and hence not checked.)
{ cases = ["8.17" "1.17.0"]; out = "0.1.0"; }
] null;

releaseRev = v: "v${v}";

release."0.2.3".sha256 = "sha256-Y3dmNIF36IuIgrVILteofOv8e5awKfq93S4YN7enswI=";
release."0.2.2".sha256 = "sha256-tBF8equJd6hKZojpe+v9h6Tg9xEnMTVFgOYK7ZnMfxk=";
release."0.2.1".sha256 = "sha256-X00q5QFxdcGWeNqOV/PLTOqQyyfqFEinbGUTO7q8bC4=";
release."0.2.0".sha256 = "sha256-GDkWH0LUsW165vAUoYC5of9ndr0MbfBtmrPhsJVXi3o=";
release."0.1.0".sha256 = "sha256-Yj+k+mBsudi3d6bRVlZLyM4UqQnzAX5tHvxtKoIuNTE=";

propagatedBuildInputs = [equations
mathcomp-ssreflect
mathcomp-analysis
mathcomp-experimental-reals
mathcomp-word
mathcomp-zify
extructures
deriving];

meta = with lib; {
description = "SSProve: A Foundational Framework for Modular Cryptographic Proofs in Coq";
license = licenses.mit;
maintainers = [ {
name = "Sebastian Ertel";
email = "[email protected]";
github = "sertel";
githubId = 3703100;
} ];
};

})
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This repository contains the Coq formalisation of the paper:\
[eprint](https://eprint.iacr.org/2021/397/20210526:113037))

Secondary literature:
* **The Last Yard: Foundational End-to-End Verification of High-Speed Cryptography** at CPP'24.
* **The Last Yard: Foundational End-to-End Verification of High-Speed Cryptography** at CPP'24.
Philipp G. Haselwarter, Benjamin Salling Hvass, Lasse Letager Hansen, Théo Winterhalter, Cătălin Hriţcu, and Bas Spitters. ([DOI](https://doi.org/10.1145/3636501.3636961))

This README serves as a guide to running verification and finding the
Expand Down Expand Up @@ -81,7 +81,7 @@ All set.
##### Project setup
1. Create a new project folder and `cd` into it.
2. Copy one of the above templates into it (removing the `.template*` suffix).
3. And finally run `nix develop` which throws you into a shell where SSProve is already installed. (`From Crypt Require Import ...`)
3. And finally run `nix develop` which throws you into a shell where SSProve is already installed. (`From SSProve.Crypt Require Import ...`)

You may need to initialize the project as a Git repository and add the `flake.nix` to it.
The generated `flake.lock` pins the versions and hence also needs to be added to this new project repo.
Expand Down
Loading
Loading