All Projects β†’ safecrypto β†’ libsafecrypto

safecrypto / libsafecrypto

Licence: MIT license
WP6 of the SAFEcrypto project - a suite of lattice-based cryptographic schemes

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
assembly
5116 projects
Makefile
30231 projects
M4
1887 projects
C#
18002 projects

Projects that are alternatives of or similar to libsafecrypto

pqcrypto
πŸ‘» Post-quantum cryptography for Python.
Stars: ✭ 15 (-51.61%)
Mutual labels:  post-quantum-cryptography
gonano
An implementation of the Nano cryptocurrency in Go
Stars: ✭ 34 (+9.68%)
Mutual labels:  lattice
SpinMonteCarlo.jl
Markov chain Monte Carlo solver for lattice spin systems implemented by Julialang
Stars: ✭ 35 (+12.9%)
Mutual labels:  lattice
l2hmc-qcd
Application of the L2HMC algorithm to simulations in lattice QCD.
Stars: ✭ 33 (+6.45%)
Mutual labels:  lattice
fpga-docker
Tools for running FPGA vendor toolchains with Docker
Stars: ✭ 54 (+74.19%)
Mutual labels:  lattice
ggplotify
ggplot everything
Stars: ✭ 89 (+187.1%)
Mutual labels:  lattice
virgil-crypto-c
This library is designed to be small, flexible and convenient wrapper for a variety crypto algorithms. So it can be used in a small micro controller as well as in a high load server application.
Stars: ✭ 24 (-22.58%)
Mutual labels:  post-quantum-cryptography
Ipaper
R package: personal tools for R data processing
Stars: ✭ 14 (-54.84%)
Mutual labels:  lattice
frodo
practical quantum-secure key encapsulation from generic lattices
Stars: ✭ 17 (-45.16%)
Mutual labels:  post-quantum-cryptography
awesome-secure-computation
Awesome list for cryptographic secure computation paper. This repo includes *Lattice*, *DifferentialPrivacy*, *MPC* and also a comprehensive summary for top conferences.
Stars: ✭ 125 (+303.23%)
Mutual labels:  lattice
JSON-for-VHDL
A JSON library implemented in VHDL.
Stars: ✭ 56 (+80.65%)
Mutual labels:  lattice
1bitSDR
Minimal SDR with Lattice MachXO2 FPGA. And a port to Cyclone3 by Steven Groom
Stars: ✭ 53 (+70.97%)
Mutual labels:  lattice
platform-lattice ice40
Lattice iCE40: development platform for PlatformIO
Stars: ✭ 34 (+9.68%)
Mutual labels:  lattice
catplot
A Python Library for Energy Profile and Abstract Grid(2D/3D) plotting
Stars: ✭ 31 (+0%)
Mutual labels:  lattice
dilithium
No description or website provided.
Stars: ✭ 166 (+435.48%)
Mutual labels:  post-quantum-cryptography
lwe-frodo
Post-quantum key exchange from the learning with errors problem β€” from the paper "Frodo: Take off the ring! Practical, Quantum-Secure Key Exchange from LWE", published in ACM CCS 2016, https://eprint.iacr.org/2016/659
Stars: ✭ 36 (+16.13%)
Mutual labels:  post-quantum-cryptography
conexp-clj
A General-Purpose Tool for Formal Concept Analysis
Stars: ✭ 37 (+19.35%)
Mutual labels:  lattice
verifla
Fork of OpenVeriFla - FPGA debugging logic analyzer to use with your designs - examples (so far) for ice40/IceStorm
Stars: ✭ 21 (-32.26%)
Mutual labels:  lattice
pergola
Low-cost ECP5 FPGA development board
Stars: ✭ 64 (+106.45%)
Mutual labels:  lattice
SSL-TLS-ECDSA-timing-attack
Timing Attack on TLS' ECDSA signature
Stars: ✭ 41 (+32.26%)
Mutual labels:  lattice

Alt text

SAFEcrypto

Secure Architectures of Future Emerging Cryptography

SAFEcrypto will provide a new generation of practical, robust, and physically secure post-quantum cryptographic functions. Work Package 6 will develop a suite of software routines to implement the lattice-based constructions identified in Work Package 4 of the SAFEcrypto project, whilst providing cryptographic primitives for use in the demonstrations developed in Work Package 9.

The following schemes are currently supported...

Signatures:

  • BLISS-B
  • Dilithium / Dilithium-G
  • ENS
  • DLP
  • Ring-TESLA
  • Falcon

KEM:

  • ENS
  • Kyber

Encryption:

  • RLWE
  • Kyber

IBE:

  • DLP

Directory Structure

  • docs - All documentation relating to the SAFEcrypto software library
  • examples - Example applications demonstrating the library's capabilities
  • include - Header files to be distributed with the shared/static library
  • src - All software code relating to the library itself
    • schemes - LBC cryptographic algorithms
    • utils - Common shared mathemtical and cryptographic functions
    • unit - Unit Tests
  • test - Test software
    • functional - Functional Tests
    • kat - Known Answer Tests
  • LICENSE - Software licensing notice
  • README - This file

Copyright

Copyright (C) Queen’s University Belfast, ECIT, 2016, 2017


Dependencies

autotools, autoconf, autoconf-archive, automake, libtool, doxygen, texlive, pkg-config, check-devel, subunit-devel, texlive-latex-extra, graphviz

Optionally: gmp, mpfr

Dockerfile available in master branch

Docker

Alternatively a dockerfile is provided to create a development environment with all prerequisites already installed

Bulid container

docker build --tag safecrypto-docker docker

Run container sharing current directory

docker run --rm -it -v "$(pwd)":/"$(basename "$(pwd)")" -w /"$(basename "$(pwd)")" -e HOST_USER_ID=$(id -u) -e HOST_USER_GID=$(id -g) safecrypto-docker

Installation

If building from a cloned version control repository (rather than a source code distribution) the user must configure autotools by running the following script:

./autogen.sh

Generate the required Makefile's for your environment using the folowing command:

./configure

If the library and associated software is to be created for development purposes or debugging then the configure command should be passed the relevant arguments:

./configure CPPFLAGS=-DDEBUG CFLAGS="-g -O0"

The generated Makefile at the root level must then be executed to build the SAFEcrypto software library and all associated applications. A number of automated tests are executed as part of the automated build to ensure that the software has been successfuly built on the target system.

make

If the user wishes to generate the reference documentation in PDF and html format then the following make target should be executed:

make doxygen-doc

In order to install the generated libraries onto the system the user must execute the following command:

make install

Running Tests

The source code for the test functions can be found in ./test/functional. Different variants of the schemes are included, e.g. func_alg_dlp_sig.c refers to the DLP signature scheme, whilst func_alg_dlp_sig_recovery.c refers to the variant with the message recovery property. Test files for components such as sampling and NTT are also present. After building the project, to run a given signature scheme:

./test/functional/func_<alg>_<function>

Within the test files, parameter sets can be modified (specified by the i index) and flags can be set to specify sampling techniques used or countermeasures switched on. The list of available flags is found in include/safecrypto.h.


Licensing

The MIT License applies to this software, please refer to the LICENSE file in the root directory for details.

Portions of this Software utilise open source software. No open source software used in libsafecrypto has been endorsed by any of the authors. We would like to thank the following for their contribution to the open source community. Please refer to the associated src/utils/third_party directory for the relevant source code.


AES - src/utils/third_party/aes

Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved.
The redistribution and use of this software (with or without changes)
is allowed without the payment of fees or royalties provided that:

source code distributions include the above copyright notice, this
list of conditions and the following disclaimer;

binary distributions include the above copyright notice, this list
of conditions and the following disclaimer in their documentation.

This software is provided 'as is' with no explicit or implied warranties
in respect of its operation, including, but not limited to, correctness
and fitness for purpose.

BLAKE2 - src/utils/crypto/blake2

 Written in 2012 by Samuel Neves <[email protected]>

 To the extent possible under law, the author(s) have dedicated all copyright
 and related and neighboring rights to this software to the public domain
 worldwide. This software is distributed without any warranty.

 You should have received a copy of the CC0 Public Domain Dedication along
 with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

CHACHA20 - src/utils/crypto/chacha

By Emill, 2016, Public Domain

ISAAC - src/utils/crypto/isaac

By Bob Jenkins, 1996, Public Domain

Mersenne Twister - src/utils/mersenne_twister

A C-program for MT19937, with initialization improved 2002/1/26.
Coded by Takuji Nishimura and Makoto Matsumoto.

Before using, initialize the state by using init_genrand(seed)  
or init_by_array(init_key, key_length).

Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
All rights reserved.                          

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

 1. Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

 2. Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.

 3. The names of its contributors may not be used to endorse or promote
    products derived from this software without specific prior written
    permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Any feedback is very welcome.
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)

SALSA20 - src/utils/crypto/salsa

D. J. Bernstein, Public Domain

SHA-2 - src/utils/crypto/sha2

Copyright (c) 2002, Dr Brian Gladman, Worcester, UK.   All rights reserved.

LICENSE TERMS

The free distribution and use of this software in both source and binary
form is allowed (with or without changes) provided that:

 1. distributions of this source code include the above copyright
    notice, this list of conditions and the following disclaimer;

 2. distributions in binary form include the above copyright
    notice, this list of conditions and the following disclaimer
    in the documentation and/or other associated materials;

 3. the copyright holder's name is not used to endorse products
    built using this software without specific written permission.

ALTERNATIVELY, provided that this notice is retained in full, this product
may be distributed under the terms of the GNU General Public License (GPL),
in which case the provisions of the GPL apply INSTEAD OF those given above.

DISCLAIMER

This software is provided 'as is' with no explicit or implied warranties
in respect of its properties, including, but not limited to, correctness
and/or fitness for purpose.

SHA-3 - src/utils/crypto/sha3

19-Nov-11  Markku-Juhani O. Saarinen <[email protected]>

Whirlpool - src/utils/crypto/whirlpool

Copyright: 2009-2012 Aleksey Kravchenko <[email protected]>

Permission is hereby granted,  free of charge,  to any person  obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction,  including without limitation
the rights to  use, copy, modify,  merge, publish, distribute, sublicense,
and/or sell copies  of  the Software,  and to permit  persons  to whom the
Software is furnished to do so.

This program  is  distributed  in  the  hope  that it will be usefu,  but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  Use this program  at  your own risk!

Bug Reporting, Feature Requests And Dev Community


Contact Information


Legal Notices

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].