Skip to content

Commit

Permalink
updated version to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ladnir committed Feb 7, 2020
1 parent 5e5b442 commit f139b87
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
# Flag and #defines #
############################################
add_definitions(-DSOLUTION_DIR='${CMAKE_SOURCE_DIR}')
set(CMAKE_C_FLAGS "-ffunction-sections -Wall -maes -msse2 -msse4.1 -mpclmul -Wfatal-errors -pthread -Wno-strict-overflow -fPIC -no-pie -Wno-ignored-attributes -Wno-parentheses")
set(CMAKE_C_FLAGS "-Wall -maes -msse2 -msse4.1 -mpclmul -Wfatal-errors -pthread -fPIC -no-pie -Wno-ignored-attributes -Wno-parentheses")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++14")

# Select flags.
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ follow [these instructions](https://stackoverflow.com/questions/41464356/build-b

**Enabling Relic (for fast base OTs):**
* Clone the Visual Studio port [Relic](https://github.com/ladnir/relic) `git clone https://github.com/ladnir/relic.git`.
* Use the CMake command `cmake . -DMULTI=OPENMP -DCMAKE_INSTALL_PREFIX:PATH=C:\libs -DCMAKE_GENERATOR_PLATFORM=x64` generate a Visual Studio solution
* Use the CMake commands
```
cmake . -DMULTI=OPENMP -DCMAKE_INSTALL_PREFIX:PATH=C:\libs -DCMAKE_GENERATOR_PLATFORM=x64
cmake --build .
cmake --install .
````
* Optional: Build with gmp/mpir for faster performance.
* Install it to `C:\libs` (build the `INSTALL` VS project).
* Edit the config file [libOTe/cryptoTools/cryptoTools/Common/config.h](https://github.com/ladnir/cryptoTools/blob/master/cryptoTools/Common/config.h) to include `#define ENABLE_RELIC`.
Expand Down
2 changes: 1 addition & 1 deletion cryptoTools
32 changes: 19 additions & 13 deletions libOTe/config.h
Original file line number Diff line number Diff line change
@@ -1,52 +1,58 @@
#pragma once

#define LIBOTE_VERSION_MAJOR 1
#define LIBOTE_VERSION_MINOR 0
#define LIBOTE_VERSION_PATCH 0

#define LIBOTE_VERSION (LIBOTE_VERSION_MAJOR * 10000 + LIBOTE_VERSION_MINOR * 100 + LIBOTE_VERSION_PATCH)

// build the library with "simplest" Base OT enabled
/* #undef ENABLE_SIMPLESTOT */
#define ENABLE_SIMPLESTOT ON

// build the library with the ASM "simplest" Base OT enabled
/* #undef ENABLE_SIMPLESTOT_ASM */

// build the library with Masney Rindal Base OT enabled
/* #undef ENABLE_MR */
#define ENABLE_MR ON

// build the library with Masney Rindal Kyber Base OT enabled
/* #undef ENABLE_MR_KYBER */

// build the library with Naor Pinkas Base OT enabled
/* #undef ENABLE_NP */
#define ENABLE_NP ON



// build the library with Keller Orse Scholl OT-Ext enabled
/* #undef ENABLE_KOS */
#define ENABLE_KOS ON

// build the library with IKNP OT-Ext enabled
/* #undef ENABLE_IKNP */
#define ENABLE_IKNP ON

// build the library with Silent OT Extension enabled
/* #undef ENABLE_SILENTOT */
#define ENABLE_SILENTOT ON



// build the library with KOS Delta-OT-ext enabled
#define ENABLE_DELTA_KOS ON

// build the library with IKNP Delta-OT-ext enabled
/* #undef ENABLE_DELTA_IKNP */
#define ENABLE_DELTA_IKNP ON



// build the library with OOS 1-oo-N OT-Ext enabled
/* #undef ENABLE_OOS */
#define ENABLE_OOS ON

// build the library with KKRT 1-oo-N OT-Ext enabled
/* #undef ENABLE_KKRT */
#define ENABLE_KKRT ON

// build the library with RR 1-oo-N OT-Ext OT-ext enabled
/* #undef ENABLE_RR */
#define ENABLE_RR ON

// build the library with RR approx k-oo-N OT-ext enabled
/* #undef ENABLE_AKN */
#define ENABLE_AKN ON


#define OTE_RANDOM_ORACLE 1
Expand All @@ -60,10 +66,10 @@

#if defined(ENABLE_SIMPLESTOT_ASM) && defined(_MSC_VER)
#undef ENABLE_SIMPLESTOT_ASM
#warning "ENABLE_SIMPLESTOT_ASM should not be defined on windows."
#pragma warning "ENABLE_SIMPLESTOT_ASM should not be defined on windows."
#endif
#if defined(ENABLE_MR_KYBER) && defined(_MSC_VER)
#undef ENABLE_MR_KYBER
#warning "ENABLE_MR_KYBER should not be defined on windows."
#pragma warning "ENABLE_MR_KYBER should not be defined on windows."
#endif

10 changes: 8 additions & 2 deletions libOTe/config.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#pragma once

#define LIBOTE_VERSION_MAJOR 1
#define LIBOTE_VERSION_MINOR 0
#define LIBOTE_VERSION_PATCH 0

#define LIBOTE_VERSION (LIBOTE_VERSION_MAJOR * 10000 + LIBOTE_VERSION_MINOR * 100 + LIBOTE_VERSION_PATCH)

// build the library with "simplest" Base OT enabled
#cmakedefine ENABLE_SIMPLESTOT @ENABLE_SIMPLESTOT@

Expand Down Expand Up @@ -60,10 +66,10 @@

#if defined(ENABLE_SIMPLESTOT_ASM) && defined(_MSC_VER)
#undef ENABLE_SIMPLESTOT_ASM
#warning "ENABLE_SIMPLESTOT_ASM should not be defined on windows."
#pragma warning "ENABLE_SIMPLESTOT_ASM should not be defined on windows."
#endif
#if defined(ENABLE_MR_KYBER) && defined(_MSC_VER)
#undef ENABLE_MR_KYBER
#warning "ENABLE_MR_KYBER should not be defined on windows."
#pragma warning "ENABLE_MR_KYBER should not be defined on windows."
#endif

0 comments on commit f139b87

Please sign in to comment.