Skip to content

Commit

Permalink
Initial SEAL commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kimlaine committed Dec 1, 2018
1 parent a9c6ed0 commit ba2d578
Show file tree
Hide file tree
Showing 147 changed files with 51,892 additions and 70 deletions.
81 changes: 52 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
# Other stuff
examples/CMakeCache.txt
examples/CMakeFiles
examples/Makefile
examples/cmake_install.cmake
src/CMakeCache.txt
src/CMakeFiles
src/Makefile
src/.config
src/autom4te.cache/*
src/cmake/SEALConfig.cmake
src/cmake/SEALConfigVersion.cmake
src/cmake/SEALTargets.cmake
src/cmake_install.cmake
src/install_manifest.txt
src/seal/CMakeCache.txt
src/seal/CMakeFiles
src/seal/Makefile
src/seal/cmake_install.cmake
src/seal/util/CMakeCache.txt
src/seal/util/CMakeFiles
src/seal/util/Makefile
src/seal/util/cmake_install.cmake
src/seal/util/config.h
tests/CMakeCache.txt
tests/CMakeFiles
tests/Makefile
tests/cmake_install.cmake
tests/install_manifest.txt
tests/seal/CMakeCache.txt
tests/seal/CMakeFiles
tests/seal/Makefile
tests/seal/cmake_install.cmake
tests/seal/util/CMakeCache.txt
tests/seal/util/CMakeFiles
tests/seal/util/Makefile
tests/seal/util/cmake_install.cmake
.ycm_extra_conf.py
.vimrc
.lvimrc
.local_vimrc
*/*.code-workspace
*/.vscode
*/build
*/*.build
*/compile_commands.json

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
Expand All @@ -23,15 +70,13 @@ bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ib/

# Visual Studio 2015/2017 cache/options directory
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
Expand All @@ -54,20 +99,14 @@ project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json

# StyleCop
StyleCopReport.xml

# Files built by Visual Studio
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
Expand Down Expand Up @@ -221,10 +260,6 @@ ClientBin/
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
Expand All @@ -239,8 +274,6 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak

# SQL Server files
*.mdf
Expand All @@ -251,7 +284,6 @@ ServiceFabricBackup/
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser

# Microsoft Fakes
FakesAssemblies/
Expand All @@ -263,6 +295,9 @@ FakesAssemblies/
.ntvs_analysis.dat
node_modules/

# Typescript v1 declaration files
typings/

# Visual Studio 6 build log
*.plg

Expand Down Expand Up @@ -316,15 +351,3 @@ __pycache__/

# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
*.binlog

# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
.mfractor/
18 changes: 18 additions & 0 deletions Contrib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Contributing

This project welcomes contributions and suggestions. Most contributions require you
to agree to a Contributor License Agreement (CLA) declaring that you have the right to,
and actually do, grant us the rights to use your contribution. For details, visit
https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow
the instructions provided by the bot. You will only need to do this once across all
repos using our CLA.

This project has adopted the
[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the
[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional
questions or comments.
27 changes: 27 additions & 0 deletions Issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Issues

## Technical questions

The best way to get help with technical questions is on
[StackOverflow](https://stackoverflow.com/questions/tagged/seal) using the
[seal] tag. To contact the Microsoft SEAL team directly, please email
[sealcrypto@microsoft.com](mailto:sealcrypto@microsoft.com).

## Bug reports

We appreciate community efforts to find and fix bugs and issues in SEAL. If
you believe you have found a bug or want to report some other issue, please
do so on [GitHub](https://github.com/Microsoft/SEAL/issues). To help others
determine what the problem may be, we provide a helpful script that collects
relevant system information that you can submit with the bug report (see below).

### System information

To collect system information for an improved bug report, please run
make -C tools system_info
This will result in a file system\_info.tar.gz to be generated, which you can
optionally attach with your bug report.

## Critical security issues

For reporting critical security issues, see Security.md.
177 changes: 136 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,141 @@
# Introduction
SEAL (Simple Encrypted Arithmetic Library) is an easy-to-use homomorphic encryption
library, developed by researchers in the Cryptography Research group at Microsoft
Research. SEAL is written in standard C++17 and can be compiled also as C++14.

# System requirements
Since SEAL has no external dependencies and is written in standard C++ it is easy
to build on any 64-bit system. For building in Windows, SEAL contains a Visual
Studio 2017 solution file. For building in Linux and Mac OS X, SEAL requires either
g++-6 or newer, or clang++-5 or newer. Please see INSTALL.txt for installation
instructions using CMake.
Microsoft Simple Encrypted Arithmetic Library (Microsoft SEAL) is an easy-to-use
homomorphic encryption library developed by researchers in the Cryptography
Research group at Microsoft Research. SEAL is written in modern standard C++ and
has no external dependencies, making it easy to compile and run in many different
environments.

# Documentation
The code-base contains (see SEALExamples/main.cpp) extensive and thoroughly
commented examples that should serve as a self-contained introduction to using SEAL.
In addition, the header files contain detailed comments for the public API.
For more information about the Microsoft SEAL project, see [http://sealcrypto.org](http://sealcrypto.org).

# License
SEAL is licensed under the MIT license; see LICENSE.txt.

# Contributing

This project welcomes contributions and suggestions. Most contributions require you
to agree to a Contributor License Agreement (CLA) declaring that you have the right to,
and actually do, grant us the rights to use your contribution. For details, visit
https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow
the instructions provided by the bot. You will only need to do this once across all
repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional
questions or comments.

# Acknowledgements
We would like to thank John Wernsing, Michael Naehrig, Nathan Dowlin, Rachel Player,
Gizem Cetin, Susan Xia, Peter Rindal, Kyoohyung Han, Zhicong Huang, Amir Jalali, Wei Dai,
Ilia Iliashenko, and Sadegh Riazi for their contributions to the SEAL project. We would also
like to thank everyone who has sent us helpful comments, suggestions, and bug reports.

# Contact Us
The best way to ask technical questions is on StackOverflow using the [seal] tag. To contact
us directly, please email [sealcrypto@microsoft.com](mailto:sealcrypto@microsoft.com).

SEAL is licensed under the MIT license; see LICENSE.

# Building and using SEAL

## Windows

SEAL comes with a Microsoft Visual Studio 2017 solution file SEAL.sln that can be
used to conveniently build the library, examples, and unit tests.

#### Debug and release builds

You can easily switch from Visual Studio configuration menu whether SEAL should be
built in Debug mode (no optimizations) or in Release mode. Please note that Debug
mode should not be used except for debugging SEAL itself, as the performance will be
orders of magnitude worse than in Release mode.

#### Library

Build the SEAL project (src/SEAL.vcxproj) from SEAL.sln. Building SEAL results
in the static library seal.lib to be created in lib/x64/$(Configuration). When
linking with applications, you need to add src/ (full path) as an include directory
for SEAL header files.

#### Examples

Build the SEALExamples project (examples/SEALExamples.vcxproj) from SEAL.sln.
This results in an executable sealexamples.exe to be created in bin/x64/$(Configuration).

#### Unit tests

The unit tests require the Google Test framework to be installed. The appropriate
NuGet package is already listed in tests/packages.config, so once you attempt to build
the SEALTest project (tests/SEALTest.vcxproj) from SEAL.sln Visual Studio will
automatically download and install it for you.

## Linux and OS X

SEAL is very easy to configure and build in Linux and OS X using CMake (>= 3.10).
A modern version of GNU G++ (>= 6.0) or Clang++ (>= 5.0) is needed. In OS X the
Xcode toolchain (>= 9.3) will work.

In OS X you will need CMake with command line tools. For this, you can either
1. install the cmake package with [Homebrew](https://brew.sh), or
2. download CMake directly from [https://cmake.org/download](https://cmake.org/download) and [enable command line tools](https://stackoverflow.com/questions/30668601/installing-cmake-command-line-tools-on-a-mac).

Below we give instructions for how to configure, build, and install SEAL either
system-wide (global install), or for a single user (local install). A system-wide
install requires elevated (root) privileges.

#### Debug and release builds

You can easily switch from CMake configuration options whether SEAL should be built in
Debug mode (no optimizations) or in Release mode. Please note that Debug mode should not
be used except for debugging SEAL itself, as the performance will be orders of magnitude
worse than in Release mode.

### Global install

#### Library

If you have root access to the system you can install SEAL system-wide as follows:
cd src
cmake .
make
sudo make install
cd ..

#### Examples

To build the examples do:
cd examples
cmake .
make
cd ..

After completing the above steps the sealexamples executable can be found in bin/.
See examples/CMakeLists.txt for how to link SEAL with your own project using cmake.

#### Unit tests

To build the unit tests, make sure you have the Google Test library (libgtest-dev)
installed. Then do:
cd tests
cmake .
make
cd ..

After completing these steps the sealtest executable can be found in bin/. All unit
tests should pass successfully.

### Local install

#### Library

To install SEAL locally, e.g., to ~/mylibs, do the following:
cd src
cmake -DCMAKE_INSTALL_PREFIX=~/mylibs .
make
make install
cd ..

#### Examples

To build the examples do:
cd examples
cmake -DCMAKE_PREFIX_PATH=~/mylibs .
make
cd ..

After completing the above steps the sealexamples executable can be found in bin/.
See examples/CMakeLists.txt for how to link SEAL with your own project using cmake.

#### Unit tests

To build the unit tests, make sure you have the Google Test library (libgtest-dev)
installed. Then do:
cd tests
cmake -DCMAKE_PREFIX_PATH=~/mylibs .
make
cd ..

After completing these steps the sealtest executable can be found in bin/. All unit
tests should pass successfully.

# Documentation

The code-base contains extensive and thoroughly commented examples that should
serve as a self-contained introduction to using SEAL (see examples/examples.cpp). In
addition, the header files contain detailed comments for the public API.
Loading

0 comments on commit ba2d578

Please sign in to comment.