Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4022832
stdlib: basic commutative algebra
strub Aug 21, 2024
7ad5f04
CommAlgebra: witness-level (comax) CRT layer
strub Jul 17, 2026
2d510c3
CommAlgebra: stack as Base / Euclidean; guard dvdw
strub Jul 17, 2026
d1603dc
Poly: evaluation lemma library; tighten the peval definition
strub Jul 17, 2026
1696643
Poly, ZModP: keep instance members as aliases; export IDPoly
strub Jul 17, 2026
fdd2dcb
Poly: evaluation of polynomial products
strub Jul 17, 2026
bfd7ee8
Poly: rename peval_big to peval_sum
strub Jul 17, 2026
f3fbf4e
Poly: products of monic linear factors
strub Jul 17, 2026
d263dec
Poly: mprod does not vanish outside its roots
strub Jul 17, 2026
3c6febe
Poly: simplify the monic-linear-factor lemmas
strub Jul 17, 2026
9b347d0
Poly: PolyField, polynomials over a field; Lagrange interpolation
strub Jul 17, 2026
b55d7a6
Poly: package Lagrange interpolation in a sub-theory; tidy proofs
strub Jul 17, 2026
4d3f588
CommAlgebra: Base owns its big operators and pushes them into Ideal
strub Jul 17, 2026
bbb6cb1
Ring, ZModP: delta-only mixins for IDomain and Field (pilot)
strub Jul 18, 2026
e6b9ba1
Ring, ZModP: reference-bundles for domains and fields
strub Jul 18, 2026
93e2b90
Poly: mixin architecture for the IDomain and Field levels
strub Jul 18, 2026
538159e
ZModP: remove the bundled ZModpField clone
strub Jul 18, 2026
5734cf6
Ideal, CommAlgebra: mixin parameters; BigPoly's CR slot as alias
strub Jul 18, 2026
95b5855
CommAlgebra: generic congruence modulo an element (eqm)
strub Jul 18, 2026
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 @@ -328,7 +328,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 @@ -897,7 +897,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 @@ -751,7 +751,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