-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gimli proofs: adapt to new leakage extraction
- Loading branch information
Showing
5 changed files
with
44 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,34 @@ | ||
ECARGS ?= | ||
ECARGS ?= -I Jasmin:../../../../eclib | ||
|
||
JASMIN2EC := ../../../jasmin2ec | ||
|
||
CT_MODE ?= CT | ||
GIMLI_CT = gimli_$(shell echo $(CT_MODE) | tr A-Z a-z).ec | ||
|
||
.SUFFIXES: .jazz .ec | ||
|
||
all: gimli_arm.ec gimli_x86.ec gimli_x86_ct.ec gimli_arm_ct.ec gimli_avx.ec gimli_avx_ct.ec | ||
all: ct gimli_arm.ec gimli_x86.ec gimli_x86_ct.ec gimli_arm_ct.ec gimli_avx.ec gimli_avx_ct.ec | ||
easycrypt runtest $(ECARGS) ec.config $@ | ||
|
||
ct: $(GIMLI_CT) gimli_x86_ct.ec gimli_arm_ct.ec gimli_avx_ct.ec | ||
easycrypt $(ECARGS) $< | ||
|
||
gimli_arm.ec: ../arm-m4/gimli.jazz | ||
$(JASMIN2EC) --arch=arm-m4 -o $@ $^ | ||
|
||
gimli_arm_ct.ec: ../arm-m4/gimli.jazz | ||
$(JASMIN2EC) --arch=arm-m4 --model=CT -o $@ $^ | ||
$(JASMIN2EC) --arch=arm-m4 --model=$(CT_MODE) -o $@ $^ | ||
|
||
gimli_x86.ec: ../x86-64/gimli.jazz | ||
$(JASMIN2EC) --arch=x86-64 -o $@ $^ | ||
|
||
gimli_x86_ct.ec: ../x86-64/gimli.jazz | ||
$(JASMIN2EC) --arch=x86-64 --model=CT -o $@ $^ | ||
$(JASMIN2EC) --arch=x86-64 --model=$(CT_MODE) -o $@ $^ | ||
|
||
gimli_avx.ec: ../x86-64/gimliv.jazz ../x86-64/gimliv.jinc | ||
$(JASMIN2EC) --arch=x86-64 -o $@ $< | ||
|
||
gimli_avx_ct.ec: ../x86-64/gimliv.jazz ../x86-64/gimliv.jinc | ||
$(JASMIN2EC) --arch=x86-64 --model=CT -o $@ $< | ||
$(JASMIN2EC) --arch=x86-64 --model=$(CT_MODE) -o $@ $< | ||
|
||
.PHONY: all ct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ args = -I Jasmin:../../../../eclib | |
|
||
[test-all] | ||
okdirs = . | ||
file_exclude = ./gimli_ct.ec ./gimli_ctg.ec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require Gimli_x86_ct Gimli_arm_ct Gimli_avx_ct. | ||
from Jasmin require import JLeakage. | ||
|
||
(** The [io] argument holds a pointer to the data that undergoes the permutation. | ||
* Since it is an address, its value is leaked, and should be public. *) | ||
|
||
equiv gimli_x86_ct : | ||
Gimli_x86_ct.M.gimli ~ Gimli_x86_ct.M.gimli : ={ Gimli_x86_ct.M.leakages } ==> ={ Gimli_x86_ct.M.leakages }. | ||
proof. proc; inline *; sim. qed. | ||
|
||
equiv gimli_arm_ct : | ||
Gimli_arm_ct.M.gimli ~ Gimli_arm_ct.M.gimli : ={ Gimli_arm_ct.M.leakages } ==> ={ Gimli_arm_ct.M.leakages }. | ||
proof. proc; inline *; sim. qed. | ||
|
||
equiv gimli_avx_ct : | ||
Gimli_avx_ct.M.gimli ~ Gimli_avx_ct.M.gimli : ={ io, Gimli_avx_ct.M.leakages } ==> ={ Gimli_avx_ct.M.leakages }. | ||
proof. proc; inline *; sim. qed. |