Skip to content

Repository files navigation

ISARA Radiate™ Quantum-Safe Library 4.1 Samples

Samples

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

  • mldsa — Generate ML-DSA keys, sign a file's data with a ML-DSA key, and verify a ML-DSA signature.

  • mlkem — Encapsulate and decapsulate a generated shared key using ML-KEM.

  • lms — Generate keys, sign a file's data, and verify a signature using the LMS algorithm.

  • xmss — Generate keys, sign a file's data, detach signatures from a private key's state, and verify a signature using the XMSS algorithm.

  • aead_chacha20_poly1305 — Encrypt/decrypt using ChaCha20/Poly1305 for authenticated encryption.

  • chacha20 — Encrypt/decrypt using ChaCha20.

  • hash — Hash a file's data using SHA2-256, SHA2-384, SHA2-512, SHA3-256, or SHA3-512.

  • kdf — Derive a key (some pseudorandom data) using the specified key derivation function.

  • mac — Generate a message authentication code using the specified MAC algorithm.

  • rng — Generate pseudorandom bytes using HMAC-DRBG.

  • common — A small library of functions common to the samples.

  • integration — Integrating the library with other software.

  • version — Display the library's version information.

The integration directory has samples showing how to integrate external implementations with the library. These samples may have external dependencies on specific software such as OpenSSL, or specific operating system features such as having a /dev/urandom device available.

  • integration/hash-openssl — Use OpenSSL 1.1.1 or newer's SHA2-256, SHA2-512, SHA3-256, and SHA3-512 with the library's hash API.

  • integration/rng-cng — Use the Windows Cryptography API: Next Generation (CNG) with the library's random number generator API.

  • integration/rng-urandom — Use /dev/urandom with the library's random number generator API.

The samples are intended to demonstrate specific API use. They don't demonstrate any specific security practices.

Building Samples

NOTE In addition to your platform's usual development tools, you'll need a recent version of cmake (version 3.22 or newer): https://cmake.org/For most systems, you can use your platform's normal package tools to install it, but you may need to build an up-to-date version. Binaries are also available on the CMake website.

The samples use the IQR_LIBRARY_ROOT CMake or environment variable to determine the location of the library 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_LIBRARY_ROOT is a relative path, it must be relative to the directory where you're running the cmake command.

Command-line

To build all of the samples using the command-line:

  1. Install the library somewhere, e.g. /path/to/library/.

  2. cd to the samples directory, such as /path/to/library/samples/.

  3. Use mkdir to make a build directory; cd into the build directory.

  4. Run CMake: cmake -DIQR_LIBRARY_ROOT=/path/to/library/ .. or IQR_LIBRARY_ROOT=/path/to/library 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 the samples in individual directories under the build directory.

Use -DSTATIC=ON to link against the static library instead of the default shared library.

To build individual samples:

  1. Install the library somewhere, e.g. /path/to/library/.

  2. cd to the specific samples directory, such as /path/to/library/samples/hash.

  3. Use mkdir to make a build directory; cd into the build directory.

  4. Run CMake: cmake -DIQR_LIBRARY_ROOT=/path/to/library/ .. or IQR_LIBRARY_ROOT=/path/to/library 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 library documentation online at ISARA's website:

License

See the LICENSE file for details:

Copyright © 2016-2026, 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.

Releases

Packages

Used by

Contributors

Languages