Skip to content

Commit

Permalink
fixed examples with silver disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ladnir committed Aug 2, 2023
1 parent a2067a2 commit f315e3a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ if(DEFINED LIBOTE_CPP_VER)
unset(LIBOTE_CPP_VER CACHE )
endif()
if(NOT DEFINED LIBOTE_STD_VER)
set(LIBOTE_STD_VER 14)
set(LIBOTE_STD_VER 17)
endif()
if(NOT LIBOTE_STD_VER EQUAL 20 AND
NOT LIBOTE_STD_VER EQUAL 17 AND
NOT LIBOTE_STD_VER EQUAL 14)
NOT LIBOTE_STD_VER EQUAL 17)
message(FATAL_ERROR "Unknown c++ version. LIBOTE_STD_VER=${LIBOTE_STD_VER}")
endif()
set(CRYPTO_TOOLS_STD_VER ${LIBOTE_STD_VER})
Expand Down
6 changes: 1 addition & 5 deletions frontend/ExampleSilent.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ namespace osuCrypto
u64 trials = cmd.getOr("trials", 1);
auto malicious = cmd.isSet("mal") ? SilentSecType::Malicious : SilentSecType::SemiHonest;

#ifdef ENABLE_BITPOLYMUL
auto multType = cmd.isSet("silver") ? MultType::slv5 : MultType::QuasiCyclic;
#else
auto multType = MultType::slv5;
#endif;
auto multType = (MultType)cmd.getOr("multType", (int)DefaultMultType);

std::vector<SilentBaseType> types;
if (cmd.isSet("base"))
Expand Down
2 changes: 1 addition & 1 deletion frontend/ExampleVole.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace osuCrypto
// get a random number generator seeded from the system
PRNG prng(sysRandomSeed());

auto mulType = (MultType)cmd.getOr("multType", (int)MultType::slv5);
auto mulType = (MultType)cmd.getOr("multType", (int)DefaultMultType);
bool fakeBase = cmd.isSet("fakeBase");

u64 milli;
Expand Down
2 changes: 1 addition & 1 deletion libOTe/Tools/EACode/EACode.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace osuCrypto
#else
#define EA_CONSTEXPR
#endif
// Teh encoder for the generator matrix G = B * A.
// The encoder for the generator matrix G = B * A.
// B is the expander while A is the accumulator.
//
// B has mMessageSize rows and mCodeSize columns. It is sampled uniformly
Expand Down
16 changes: 8 additions & 8 deletions libOTe/TwoChooseOne/ConfigureCode.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ namespace osuCrypto
QuasiCyclic = 1,
#ifdef ENABLE_INSECURE_SILVER
// https://eprint.iacr.org/2021/1150, see https://eprint.iacr.org/2023/882 for attack.
slv5,
slv11,
slv5 = 2,
slv11 = 3,
#endif
// https://eprint.iacr.org/2022/1014
ExAcc7, // fast
ExAcc11,// fast but more conservative
ExAcc21,
ExAcc40, // conservative
ExAcc7 = 4, // fast
ExAcc11 = 5,// fast but more conservative
ExAcc21 = 6,
ExAcc40 = 7, // conservative

// https://eprint.iacr.org/2023/882
ExConv7x24, //fastest
ExConv21x24 // conservative.
ExConv7x24 = 8, //fastest
ExConv21x24 = 9 // conservative.
};

inline std::ostream& operator<<(std::ostream& o, MultType m)
Expand Down

0 comments on commit f315e3a

Please sign in to comment.