Skip to content

Commit 0c26f58

Browse files
authored
Fix return condition for properties with provided bit in KEM/PKE libraries. (EasyCrypt#738)
1 parent 517dad7 commit 0c26f58

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

theories/crypto/KeyEncapsulationMechanisms.eca

+7-7
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ module IND_CCA1_P (S : Scheme) (O : Oracles_CCA1i) (A : Adv_INDCCA1) = {
478478

479479
b' <@ A(O(S)).distinguish(if b then k' else k, c);
480480

481-
return b' = b;
481+
return b';
482482
}
483483
}.
484484

@@ -540,7 +540,7 @@ module IND_CCA2_P (S : Scheme) (O1 : Oracles_CCA1i) (O2 : Oracles_CCA2i) (A : Ad
540540

541541
b' <@ A(O2(S)).distinguish(if b then k' else k, c);
542542

543-
return b' = b;
543+
return b';
544544
}
545545
}.
546546

@@ -595,7 +595,7 @@ module IND_CCA_P (S : Scheme) (O : Oracles_CCA2i) (A : Adv_INDCCA) = {
595595

596596
b' <@ A(O(S)).distinguish(pk, if b then k' else k, c);
597597

598-
return b' = b;
598+
return b';
599599
}
600600
}.
601601

@@ -1100,7 +1100,7 @@ module WANO_CPA_P (S : Scheme) (A : Adv_WANOCPA) = {
11001100

11011101
b' <@ A.distinguish(pk0, pk1, c);
11021102

1103-
return b' = b;
1103+
return b';
11041104
}
11051105
}.
11061106

@@ -1223,7 +1223,7 @@ module WANO_CCA1_P (S : Scheme) (O0 : Oracles_CCA1i) (O1 : Oracles_CCA1i) (A : A
12231223

12241224
b' <@ A(O0(S), O1(S)).distinguish(c);
12251225

1226-
return b' = b;
1226+
return b';
12271227
}
12281228
}.
12291229

@@ -1431,7 +1431,7 @@ module ANO_CCA_P (S : Scheme)
14311431

14321432
b' <@ A(O0(S), O1(S)).distinguish(pk0, pk1, (k, c));
14331433

1434-
return b' = b;
1434+
return b';
14351435
}
14361436
}.
14371437

@@ -1491,7 +1491,7 @@ module WANO_CCA_P (S : Scheme)
14911491

14921492
b' <@ A(O0(S), O1(S)).distinguish(pk0, pk1, c);
14931493

1494-
return b' = b;
1494+
return b';
14951495
}
14961496
}.
14971497

theories/crypto/PublicKeyEncryption.eca

+2-2
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ module IND_CCA1_P (S : Scheme) (O : Oracles_CCA1i) (A : Adv_INDCCA1) = {
438438

439439
b' <@ A(O(S)).distinguish(c);
440440

441-
return b' = b;
441+
return b';
442442
}
443443
}.
444444

@@ -497,7 +497,7 @@ module IND_CCA2_P (S : Scheme) (O1 : Oracles_CCA1i) (O2 : Oracles_CCA2i) (A : Ad
497497

498498
b' <@ A(O2(S)).distinguish(c);
499499

500-
return b' = b;
500+
return b';
501501
}
502502
}.
503503

0 commit comments

Comments
 (0)