Skip to content

add google* to .gitignore #520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e01d7d6
add google* to .gitignore
dongfangzhao Jul 30, 2023
a8d01fa
Merge branch 'openfheorg:main' into main
hpdic Jun 15, 2024
c9c76d0
simple hpdic mark on examples
hpdic Jun 15, 2024
24c2973
test "make -j 16"
hpdic Jun 15, 2024
889a910
fix chameleoncloud .h error
hpdic Jul 7, 2024
98191e5
Merge branch 'openfheorg:main' into main
hpdic Dec 3, 2024
2ea04df
get rid of 3rd-party libs
hpdic Dec 4, 2024
48cc598
add cnpy lib; update cmake files; starting Nemesis
hpdic Dec 5, 2024
99441ab
ready to encrypt local models
hpdic Dec 14, 2024
f141177
we can do pair-wise multiplication...
hpdic Dec 15, 2024
b2b604f
found the key file to edit
hpdic Dec 15, 2024
47d8773
found the place for const-multiplication
hpdic Dec 15, 2024
c2f0f9f
so hard to get it work
hpdic Dec 15, 2024
610e86e
nemesis works for a single slot!
hpdic Dec 15, 2024
11f08b4
implementation done; ready for experiments
hpdic Dec 15, 2024
05648b7
ok batch caching is fine
hpdic Dec 15, 2024
296c1f8
started working on CKKS
hpdic Dec 16, 2024
ba78e24
nemesis CKKS also works
hpdic Dec 17, 2024
d711398
load ML model weights; expand base length
hpdic Dec 17, 2024
e30b6fc
nemesis mnist works
hpdic Dec 17, 2024
86854cc
baseline comparison is done
hpdic Dec 17, 2024
8e1997a
overhead experiment done
hpdic Dec 17, 2024
0ded0b0
working on reconstruction and randomization
hpdic Dec 17, 2024
28d3fb3
I think we are done, aren't we?
hpdic Dec 18, 2024
805ac7e
remove debug message
hpdic Dec 24, 2024
1d160da
Merge branch 'openfheorg:main' into main
hpdic May 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ _build/
api/
doxyoutput/

third-party/

.ipynb_checkpoints

Expand All @@ -20,6 +21,7 @@ test/bin
output.txt
Doxyfile
apidoc_warning_logfile.txt
third-party
third-party/distros/gmp-6.1.1
third-party/distros/gmp-6.1.2
third-party/distros/ntl-10.3.0
Expand All @@ -42,6 +44,7 @@ gmon.out
*.class

## for the moment
.cache
.cproject
.metadata/
.project
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ endif()

project (OpenFHE C CXX)

# 添加 cnpy 和 zlib 的路径
include_directories(/usr/local/include/)
link_directories(/usr/local/lib/)
# 定义公共的链接库变量
set(GLOBAL_LIBS cnpy z)

set(OPENFHE_VERSION_MAJOR 1)
set(OPENFHE_VERSION_MINOR 2)
set(OPENFHE_VERSION_PATCH 4)
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
HPDIC MOD
=========
* VS Code setup:
* On ChameleonCloud, if VS Code complains about missing header files, then open C/C++ configuration and set the compiler to '/usr/bin/g++-11'

OpenFHE - Open-Source Fully Homomorphic Encryption Library
=====================================

Expand Down
1,568 changes: 1,568 additions & 0 deletions compile_commands.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/binfhe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ add_custom_target( allbinfhe )

if( BUILD_SHARED )
set (BINFHELIBS PUBLIC OPENFHEbinfhe PUBLIC OPENFHEcore ${THIRDPARTYLIBS} ${OpenMP_CXX_FLAGS})
target_link_libraries (OPENFHEbinfhe PUBLIC OPENFHEcore ${THIRDPARTYLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS})
target_link_libraries (OPENFHEbinfhe PUBLIC OPENFHEcore ${THIRDPARTYLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
add_dependencies( allbinfhe OPENFHEbinfhe )
endif()

if( BUILD_STATIC )
set (BINFHELIBS ${BINFHELIBS} PUBLIC OPENFHEbinfhe_static PUBLIC OPENFHEcore_static ${THIRDPARTYSTATICLIBS} ${OpenMP_CXX_FLAGS})
target_link_libraries (OPENFHEbinfhe_static PUBLIC OPENFHEcore_static ${THIRDPARTYSTATICLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS})
target_link_libraries (OPENFHEbinfhe_static PUBLIC OPENFHEcore_static ${THIRDPARTYSTATICLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
add_dependencies( allbinfhe OPENFHEbinfhe_static )
endif()

if( BUILD_UNITTESTS )
file (GLOB BINFHE_TEST_SRC_FILES CONFIGURE_DEPENDS unittest/*.cpp)
add_executable (binfhe_tests ${BINFHE_TEST_SRC_FILES} ${UNITTESTMAIN})
set_property(TARGET binfhe_tests PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/unittest)
target_link_libraries ( binfhe_tests ${BINFHELIBS} ${ADDITIONAL_LIBS})
target_link_libraries ( binfhe_tests ${BINFHELIBS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
if (NOT ${WITH_OPENMP})
target_link_libraries ( binfhe_tests PRIVATE Threads::Threads)
target_link_libraries ( binfhe_tests PRIVATE Threads::Threads ${GLOBAL_LIBS})
endif()

add_dependencies( allbinfhe binfhe_tests )
Expand All @@ -78,7 +78,7 @@ if( BUILD_EXAMPLES)
add_executable ( ${exe} ${app} )
set_property(TARGET ${exe} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/examples/binfhe)
set( BINFHEAPPS ${BINFHEAPPS} ${exe} )
target_link_libraries ( ${exe} ${BINFHELIBS} ${ADDITIONAL_LIBS})
target_link_libraries ( ${exe} ${BINFHELIBS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
endforeach()

file (GLOB BINFHE_EXAMPLES_SRC_FILES CONFIGURE_DEPENDS examples/pke/*.cpp)
Expand All @@ -87,7 +87,7 @@ if( BUILD_EXAMPLES)
add_executable ( ${exe} ${app} )
set_property(TARGET ${exe} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/examples/binfhe/pke)
set( BINFHEAPPS ${BINFHEAPPS} ${exe} )
target_link_libraries ( ${exe} ${BINFHELIBS} ${ADDITIONAL_LIBS})
target_link_libraries ( ${exe} ${BINFHELIBS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
endforeach()

add_custom_target( allbinfheexamples )
Expand Down
12 changes: 6 additions & 6 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ add_custom_target( allcore )

if( BUILD_SHARED )
set (CORELIBS PUBLIC OPENFHEcore ${THIRDPARTYLIBS} ${OpenMP_CXX_FLAGS})
target_link_libraries (OPENFHEcore ${THIRDPARTYLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS})
target_link_libraries (OPENFHEcore ${THIRDPARTYLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
add_dependencies( allcore OPENFHEcore)
endif()

if( BUILD_STATIC )
set (CORELIBS ${CORELIBS} PUBLIC OPENFHEcore_static ${THIRDPARTYSTATICLIBS} ${OpenMP_CXX_FLAGS})
target_link_libraries (OPENFHEcore_static ${THIRDPARTYSTATICLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS})
target_link_libraries (OPENFHEcore_static ${THIRDPARTYSTATICLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
add_dependencies( allcore OPENFHEcore_static)
endif()

Expand All @@ -66,9 +66,9 @@ if( BUILD_UNITTESTS )
set (CORE_TEST_SRC_FILES ${CORE_TEST_SRC_FILES})
add_executable( core_tests ${CORE_TEST_SRC_FILES} ${UNITTESTMAIN} )
set_property(TARGET core_tests PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/unittest)
target_link_libraries ( core_tests ${CORELIBS} ${ADDITIONAL_LIBS})
target_link_libraries ( core_tests ${CORELIBS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
if (NOT ${WITH_OPENMP})
target_link_libraries ( core_tests PRIVATE Threads::Threads)
target_link_libraries ( core_tests PRIVATE Threads::Threads ${GLOBAL_LIBS})
endif()

add_dependencies( allcore core_tests )
Expand All @@ -89,7 +89,7 @@ if ( BUILD_EXAMPLES )
add_executable ( ${exe} ${app} )
set_property(TARGET ${exe} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/examples/core)
set( COREAPPS ${COREAPPS} ${exe} )
target_link_libraries ( ${exe} ${CORELIBS} ${ADDITIONAL_LIBS})
target_link_libraries ( ${exe} ${CORELIBS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
endforeach()

add_custom_target( allcoreexamples )
Expand All @@ -105,7 +105,7 @@ if (BUILD_EXTRAS)
add_executable ( ${exe} ${app} )
set_property(TARGET ${exe} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/extras/core)
set( COREEXTRAS ${COREEXTRAS} ${exe} )
target_link_libraries ( ${exe} ${CORELIBS} ${ADDITIONAL_LIBS})
target_link_libraries ( ${exe} ${CORELIBS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
endforeach()

add_custom_target( allcoreextras )
Expand Down
12 changes: 6 additions & 6 deletions src/pke/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ add_custom_target( allpke )

if( BUILD_SHARED )
set (PKELIBS PUBLIC OPENFHEpke PUBLIC OPENFHEcore PUBLIC OPENFHEbinfhe ${THIRDPARTYLIBS} ${OpenMP_CXX_FLAGS})
target_link_libraries (OPENFHEpke PUBLIC OPENFHEcore PUBLIC OPENFHEbinfhe ${THIRDPARTYLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS})
target_link_libraries (OPENFHEpke PUBLIC OPENFHEcore PUBLIC OPENFHEbinfhe ${THIRDPARTYLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
add_dependencies( allpke OPENFHEpke)
endif()

if( BUILD_STATIC )
set (PKELIBS ${PKELIBS} PUBLIC OPENFHEpke_static PUBLIC OPENFHEcore_static PUBLIC OPENFHEbinfhe_static ${THIRDPARTYLIBS} ${OpenMP_CXX_FLAGS})
target_link_libraries (OPENFHEpke_static PUBLIC OPENFHEcore_static PUBLIC OPENFHEbinfhe_static ${THIRDPARTYSTATICLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS})
target_link_libraries (OPENFHEpke_static PUBLIC OPENFHEcore_static PUBLIC OPENFHEbinfhe_static ${THIRDPARTYSTATICLIBS} ${OpenMP_CXX_FLAGS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
add_dependencies( allpke OPENFHEpke_static)
endif()

Expand All @@ -65,9 +65,9 @@ if( BUILD_UNITTESTS )
set_property(TARGET pke_tests PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/unittest)
target_include_directories(pke_tests PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/unittest")
target_include_directories(pke_tests PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/unittest/utils")
target_link_libraries ( pke_tests ${PKELIBS} ${ADDITIONAL_LIBS})
target_link_libraries ( pke_tests ${PKELIBS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
if (NOT ${WITH_OPENMP} )
target_link_libraries ( pke_tests PRIVATE Threads::Threads)
target_link_libraries ( pke_tests PRIVATE Threads::Threads ${GLOBAL_LIBS})
endif()
add_dependencies( allpke pke_tests )

Expand All @@ -83,7 +83,7 @@ if ( BUILD_EXAMPLES)
add_executable ( ${exe} ${app} )
set_property(TARGET ${exe} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/examples/pke)
set( PKEAPPS ${PKEAPPS} ${exe} )
target_link_libraries ( ${exe} ${PKELIBS} ${ADDITIONAL_LIBS})
target_link_libraries ( ${exe} ${PKELIBS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
endforeach()

add_custom_target( allpkeexamples )
Expand All @@ -99,7 +99,7 @@ if (BUILD_EXTRAS)
add_executable (${exe} ${app} )
set_property(TARGET ${exe} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/extras/pke)
set( PKEEXTRAS ${PKEEXTRAS} ${exe} )
target_link_libraries ( ${exe} ${PKELIBS} ${ADDITIONAL_LIBS})
target_link_libraries ( ${exe} ${PKELIBS} ${ADDITIONAL_LIBS} ${GLOBAL_LIBS})
endforeach()

add_custom_target( allpkeextras )
Expand Down
2 changes: 2 additions & 0 deletions src/pke/examples/depth-bfvrns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,5 +310,7 @@ int main(int argc, char* argv[]) {
std::cout << "\nResult of 3 homomorphic multiplications: \n";
std::cout << plaintextDecMult123 << std::endl;

std::cout << "===HPDIC MOD===" << std::endl;

return 0;
}
Loading