-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed import errors updated KEM and PKE libraries.
- Loading branch information
Showing
3 changed files
with
58 additions
and
6 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
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,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); | ||
} | ||
} | ||
} | ||
}. |