Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions examples/SchnorrPK.ec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ clone G.PowZMod as GP with

clone GP.FDistr as FD.

clone GP.ZModE.ZModpField as ZPF.
clone GP.ZModE.ZModpFieldBd as ZPF.

import G GP GP.ZModE FD.

Expand Down Expand Up @@ -145,7 +145,7 @@ section SchnorrPKSecurity.
auto; rewrite /R /R_DL /oget => &hr /> hne 2!-> /=.
rewrite expM !expB accepting_transcript_1 accepting_transcript_2.
rewrite invM (mulcC m{hr}) -mulcA (mulcA m{hr}) mulcV mulcA mulc1 -expB -expM.
by rewrite ZPF.divrr ?ZPF.subr_eq0 // exp1.
by rewrite ZPF.F.divff ?ZPF.R.subr_eq0 // exp1.
qed.

(* Special honest verifier zero knowledge *)
Expand Down
4 changes: 2 additions & 2 deletions examples/UC/dh_enc.ec
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ require DiffieHellman.
clone DiffieHellman as DH.
import DH.DDH DH.G DH.GP DH.FD DH.GP.ZModE.

clone DH.GP.ZModE.ZModpField as ZPF.
clone DH.GP.ZModE.ZModpFieldBd as ZPF.

(* Such statements make no sense when we don't restrict to a
complexity class
Expand Down Expand Up @@ -896,7 +896,7 @@ wp;call (_: ={glob HybFChan.F2Auth.F2Auth,
); last first.

(* Init *)
by auto => /> &2; rewrite expM /= -expM ZPF.mulrC expM.
by auto => /> &2; rewrite expM /= -expM ZPF.R.mulrC expM.
(* Now the call *)
+ by proc;inline *; auto => /> /#.
+ by sim />.
Expand Down
8 changes: 4 additions & 4 deletions examples/cramer-shoup/cramer_shoup.ec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require DiffieHellman.
clone DiffieHellman as DH.
import DH.DDH DH.G DH.GP DH.FD DH.GP.ZModE.

clone DH.GP.ZModE.ZModpField as ZPF.
clone DH.GP.ZModE.ZModpFieldBd as ZPF.

lemma gt1_q : 1 < order by smt(ge2_p).

Expand Down Expand Up @@ -576,7 +576,7 @@ section Security_Aux.
move=> kL _ xL _ x2L _ yL _ y2L _ zL _ resu bL _.
have H1 : (-uL) * wL + u'L * wL = wL * (u'L - uL) by ring.
have H2 : (-uL) * wL + u'L * wL <> zero.
+ rewrite H1 ZPF.mulf_eq0 negb_or HwL /=.
+ rewrite H1 ZPF.F.mulf_eq0 negb_or HwL /=.
by move: Hu'L;apply: contra => H;ring H.
split => [? _ | _ ]; 1: by field.
move=> z2L _; split => [ | _]; 1: by field.
Expand Down Expand Up @@ -605,7 +605,7 @@ section Security_Aux.
move=> kL _ yL _ y2L _ zL _ r'L _ xL _.
have H1 : (-uL) * wL + u'L * wL = wL * (u'L - uL) by ring.
have H2 : (-uL) * wL + u'L * wL <> zero.
+ rewrite H1 ZPF.mulf_eq0 negb_or HwL /=.
+ rewrite H1 ZPF.F.mulf_eq0 negb_or HwL /=.
by move: Hu'L;apply: contra => H;ring H.
split => [? _ | _ ]; 1: by field.
move=> z2L _; split => [ | _]; 1: by field.
Expand Down Expand Up @@ -752,7 +752,7 @@ section Security_Aux.
move=> yL _ y2L _ zL _ r'L _ xL _ rL _.
have H1 : (-uL) * wL + u'L * wL = wL * (u'L - uL) by ring.
have H2 : (-uL) * wL + u'L * wL <> zero.
+ rewrite H1 ZPF.mulf_eq0 negb_or HwL0 /=.
+ rewrite H1 ZPF.F.mulf_eq0 negb_or HwL0 /=.
by move: HuL;apply: contra => H;ring H.
split => [ | _ /#].
rewrite log_bij !(logg1, logrzM, logDr); field.
Expand Down
6 changes: 3 additions & 3 deletions examples/elgamal.ec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pragma +implicits.
clone DiffieHellman as DH.
import DH.DDH DH.G DH.GP DH.FD DH.GP.ZModE.

clone DH.GP.ZModE.ZModpField as ZPF.
clone DH.GP.ZModE.ZModpFieldBd as ZPF.

(** Construction: a PKE **)
type pkey = group.
Expand Down Expand Up @@ -107,8 +107,8 @@ section Security.
(fun z, z - loge (if b then m1 else m0){2}).
auto; call (_:true).
auto; progress.
- by rewrite ZPF.addrAC -ZPF.addrA ZPF.subrr ZPF.addr0.
- by rewrite -ZPF.addrA ZPF.subrr ZPF.addr0.
- by rewrite ZPF.R.addrAC -ZPF.R.addrA ZPF.R.subrr ZPF.R.addr0.
- by rewrite -ZPF.R.addrA ZPF.R.subrr ZPF.R.addr0.
- by rewrite expD expgK.
qed.

Expand Down
Loading
Loading