Skip to content

Commit

Permalink
Fixed import errors updated KEM and PKE libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
MM45 committed Jan 2, 2025
1 parent 170ed79 commit b2fcc8e
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 6 deletions.
3 changes: 0 additions & 3 deletions proofs/FO_KEM.eca
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,3 @@ clone import PublicKeyEncryptionROM as PKEROM with

type in_t <- ptxt_t,
type out_t <- rand_t.

import PKE F_RO.
import DeltaCorrectROM.
25 changes: 22 additions & 3 deletions proofs/KEM_KDF_PP.eca
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require import AllCore Distr.
require import AllCore Distr PROM.
require KeyEncapsulationMechanismsROM.


Expand Down Expand Up @@ -26,6 +26,13 @@ type rand_t.
**)
theory PPKDFKCT.
(* Clones and imports *)
clone import FullRO as F_RO with
type in_t <- key_t * ctxt_t,
type out_t <- key_t

proof *.


(* Definitions for KEMs in ROM *)
clone import KeyEncapsulationMechanismsROM as KEMsROM with
type pk_t <- pk_t,
Expand All @@ -42,7 +49,7 @@ clone import KeyEncapsulationMechanismsROM as KEMsROM with
clone import MALBINDROM with
type rand_t <- rand_t.

import MALBIND KEMs F_RO.
import MALBIND KEMs.


(* Properties (other) *)
Expand Down Expand Up @@ -242,6 +249,12 @@ end PPKDFKCT.
**)
theory PPKDFKPK.
(* Clones and imports *)
clone import FullRO as F_RO with
type in_t <- key_t * pk_t,
type out_t <- key_t

proof *.

(* Definitions for KEMs in ROM *)
clone import KeyEncapsulationMechanismsROM as KEMsROM with
type pk_t <- pk_t,
Expand All @@ -258,7 +271,7 @@ clone import KeyEncapsulationMechanismsROM as KEMsROM with
clone import MALBINDROM with
type rand_t <- rand_t.

import MALBIND KEMs F_RO.
import MALBIND KEMs.


(* Properties (other) *)
Expand Down Expand Up @@ -459,6 +472,12 @@ end PPKDFKPK.
**)
theory PPKDFKCTPK.
(* Clones and imports *)
clone import FullRO as F_RO with
type in_t <- key_t * ctxt_t * pk_t,
type out_t <- key_t

proof *.

(* Definitions for KEMs in ROM *)
clone import KeyEncapsulationMechanismsROM as KEMsROM with
type pk_t <- pk_t,
Expand Down
36 changes: 36 additions & 0 deletions tmp/testpp.eca
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
require KeyEncapsulationMechanisms.

clone import KeyEncapsulationMechanisms as KEMs.

print HON_BIND.


module T = {
proc main(bc : bindconf) : unit = {
var pk0 : pk_t;
var pk1 : pk_t;
var sk0 : sk_t;
var sk1 : sk_t;
var b : bool;
var c0 : ctxt_t;
var c1 : ctxt_t;
var k0 : key_t option;
var k1 : key_t option;
var no_fail : bool;


if (is_pkbsc bc)
(pk1, sk1) <- (pk0, sk0);
else {
if (is_pkbtc bc)
(pk1, sk1) <- witness;
else {
b <- false ;
if (b)
(pk1, sk1) <- witness;
else
(pk1, sk1) <- (pk0, sk0);
}
}
}
}.

0 comments on commit b2fcc8e

Please sign in to comment.