Skip to content
ISARA Radiate Quantum-safe Library Samples
C CMake
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aead_chacha20_poly1305 "Beta 2" set of 2.0 samples. Jul 29, 2019
chacha20 "Beta 2" set of 2.0 samples. Jul 29, 2019
classicmceliece "Beta 2" set of 2.0 samples. Jul 29, 2019
common "Beta 2" set of 2.0 samples. Jul 29, 2019
dilithium "Beta 2" set of 2.0 samples. Jul 29, 2019
frododh "Beta 2" set of 2.0 samples. Jul 29, 2019
frodokem "Beta 2" set of 2.0 samples. Jul 29, 2019
hash "Beta 2" set of 2.0 samples. Jul 29, 2019
hmac "Beta 2" set of 2.0 samples. Jul 29, 2019
hss "Beta 2" set of 2.0 samples. Jul 29, 2019
kdf_concatenation "Beta 2" set of 2.0 samples. Jul 29, 2019
kdf_pbkdf2 "Beta 2" set of 2.0 samples. Jul 29, 2019
kdf_rfc5869 "Beta 2" set of 2.0 samples. Jul 29, 2019
kyber "Beta 2" set of 2.0 samples. Jul 29, 2019
newhopedh "Beta 2" set of 2.0 samples. Jul 29, 2019
ntruprime "Beta 2" set of 2.0 samples. Jul 29, 2019
poly1305 "Beta 2" set of 2.0 samples. Jul 29, 2019
rainbow "Beta 2" set of 2.0 samples. Jul 29, 2019
rng "Beta 2" set of 2.0 samples. Jul 29, 2019
samwise "Beta 2" set of 2.0 samples. Jul 29, 2019
sidh "Beta 2" set of 2.0 samples. Jul 29, 2019
sike "Beta 2" set of 2.0 samples. Jul 29, 2019
sphincs
version "Beta 2" set of 2.0 samples. Jul 29, 2019
xmss "Beta 2" set of 2.0 samples. Jul 29, 2019
xmssmt "Beta 2" set of 2.0 samples. Jul 29, 2019
.gitignore Initial commit Sep 22, 2016
CMakeLists.txt "Beta 2" set of 2.0 samples. Jul 29, 2019
LICENSE Initial commit Sep 22, 2016
README.md Add Samwise, link to Documentation. Jul 29, 2019
SECURITY.md Updated README and SECURITY for 2.0 Feb 20, 2019
compiler_options.cmake Latest 2.0 release candidate samples. May 3, 2019
find_toolkit.cmake "Beta 2" set of 2.0 samples. Jul 29, 2019

README.md

ISARA Radiate™ Quantum-safe Library 2.0 Samples

Samples

Sample code for the toolkit. Each directory has one or more self-contained programs inside demonstrating how to use the toolkit for a specific purpose:

  • aead_chacha20_poly1305 — Encrypt/decrypt using ChaCha20/Poly1305 for authenticated encryption.
  • chacha20 — Encrypt/decrypt using ChaCha20.
  • classicmceliece — Generate keys, encapsulate and decapsulate data using the Classic McEliece KEM.
  • dilithium — Generate Dilithium keys, sign a file's data with a Dilithium key, and verify a Dilithium signature.
  • frododh — Agree on a shared secret using Frodo, a relative of the NewHope scheme.
  • frodokem &mdsh; Generate keys, encapsulate and decapsulate data using FrodoKEM.
  • hash — Hash a file's data using SHA2-256, SHA2-384, SHA2-512, SHA3-256, or SHA3-512.
  • hmac — Get the HMAC tag for a file's data using any of the available hash algorithms.
  • hss — Generate keys, sign a file's data, detach signatures from a private key's state, and verify a signature using the HSS algorithm.
  • kdf_concatenation, kdf_pbkdf2, and kdf_rfc5869 — Derive a key (some pseudorandom data) using the specified key derivation function.
  • kyber — Generate keys, encapsulate and decapsulate data using Kyber.
  • newhopedh — Agree on a shared secret using the NewHopeDH scheme.
  • ntruprime — Generate keys, encapsulate and decapsulate data using NTRUPrime.
  • poly1305 — Get the Poly1305 tag for a file's data.
  • rainbow — Generate keys, sign a file's data, and verify a signature using the Rainbow algorithm.
  • rng — Generate pseudorandom bytes using HMAC-DRBG.
  • samwise — Agree on a shared secret using an optimized variant of Frodo.
  • sidh — Agree on a shared secret using Supersingular Isogeny Diffie-Hellman.
  • sike — Generate keys, encapsulate and decapsulate data using Supersingular Isogeny Key Encapsulation.
  • sphincs — Generate keys, sign a file's data, and verify a signature using the SPHINCS+ algorithm.
  • version — Display the library's version information.
  • xmss — Generate keys, sign a file's data, detach signatures from a private key's state, and verify a signature using the XMSS algorithm.
  • xmssmt — Generate keys, sign a file's data, detach signatures from a private key's state, and verify a signature using the XMSSMT algorithm.

Building Samples

NOTE Before building the samples, copy one of the CPU-specific versions of the toolkit libraries into a lib directory. For example, to build the samples for Intel Core 2 or better CPUs, copy the contents of lib_core2 into lib.

The samples use the IQR_TOOLKIT_ROOT CMake or environment variable to determine the location of the toolkit to build against. CMake requires that environment variables are set on the same line as the CMake command, or are exported environment variables in order to be read properly. If IQR_TOOLKIT_ROOT is a relative path, it must be relative to the directory where you're running the cmake command.

  1. Install the toolkit somewhere, e.g. /path/to/toolkit/.
  2. cd to the samples directory, such as /path/to/toolkit/samples/.
  3. Use mkdir to make a build directory; cd into the build directory.
  4. Run CMake: cmake -DIQR_TOOLKIT_ROOT=/path/to/toolkit/ .. or IQR_TOOLKIT_ROOT=/path/to/toolkit cmake .. The .. in there refers to the parent of your build directory, so it'll pick up the CMakeLists.txt in the main samples directory.
  5. Run make: make

This will build all of the samples in individual directories under the build directory.

NOTE Don't build the samples on macOS using gcc 8, they will crash before main() due to a problem with -fstack-protector-all. Use clang to produce Mac binaries.

To build individual samples:

  1. Install the toolkit somewhere, e.g. /path/to/toolkit/.
  2. cd to the specific samples directory, such as /path/to/toolkit/samples/hash.
  3. Use mkdir to make a build directory; cd into the build directory.
  4. Run CMake: cmake -DIQR_TOOLKIT_ROOT=/path/to/toolkit/ .. or IQR_TOOLKIT_ROOT=/path/to/toolkit cmake .. The .. in there refers to the parent of your build directory, so it'll pick up the CMakeLists.txt in the specific samples directory (the one in hash in this case).
  5. Run make: make

This will build the specific sample in the build directory.

Running Samples

See individual README.html files in the sample subdirectories for instructions on running specific samples.

Execute the samples with no arguments to use the default parameters, or use --help to list the available options.

Security Issues

For information about reporting security issues, please read the SECURITY document.

Documentation

You can read the toolkit documentation online at ISARA's website:

License

See the LICENSE file for details:

Copyright © 2016-2019, ISARA Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Trademarks

ISARA Radiate™ is a trademark of ISARA Corporation.

You can’t perform that action at this time.