Repository navigation
Releases
v0.26.1
oxicrypt 0.26.1 is a patch release. Nothing inside the cryptographic module changes: the approved services, self-tests and library interface are those of 0.26.0, and the crates and prebuilt libraries behave as they did.
Lint coverage. Clippy with warnings denied now runs for aarch64-apple-darwin and aarch64-unknown-linux-gnu in CI and the pre-push hook, so code compiled only for 64-bit ARM is linted before a push. Test-only helpers in oxicrypt-keccak-accel used by the AVX2 cross-path test are compiled only on x86_64. (#287, #294)
Release tooling. scripts/attach-draft.sh waits for a newly created draft release to appear in the releases list before uploading, with the attempt count and delay settable through ATTACH_LIST_ATTEMPTS and ATTACH_LIST_DELAY. The release-script test suite clears git's repository-local environment at start and checks itself under an inherited GIT_DIR. (#293)
v0.26.0
oxicrypt 0.26.0
oxicrypt is a pure-Rust cryptographic module that targets FIPS 140-3 Level 1. This release adds the oxicrypt crate, which gives a Rust program the module through the module's separately built and signed shared library without compiling any module crate into the program. The C interface gains a numbered ABI that the Rust crate and the system loader both check. The deterministic random bit generators (DRBGs) refuse entropy and nonce inputs shorter than the minimum for their security strength. The integrity signer signs Windows DLLs built with the GNU toolchain.
What the release adds
oxicryptcrate for Rust programs. The crate links the module's shared library and never its static archive: on Linux, Android and Windows it links the library by its exact file name, and on Apple targets, whose linker takes no exact name, it refuses a library directory that also holds the archive. At build time it requires the library's verifying-key fingerprint or an explicit opt-out. At initialisation it checks the library's ABI number, that the library is operational with its integrity indicator readingPassed, its fingerprint and its active profile. It wraps SHA-384, HKDF-SHA384, AES-256-GCM, HMAC_DRBG-SHA-256, ML-DSA-87 and ML-KEM-1024 with fixed-size types, single-use seeds and secrets zeroed on drop. The crate is outside the cryptographic boundary.- Numbered C ABI.
oxi_abi_version()returns the C interface's ABI number, 1. The number is independent of the release version and changes only when the interface breaks compatibility; within a number, a newer library serves an older caller, not the reverse. Theoxicryptcrate accepts any library that reports its ABI number and refuses another withError::LibraryAbi; a library withoutoxi_abi_version, as every earlier release is, is accepted only at the crate's own release version.abi/v1.txtinoxicrypt-ffirecords every exported function's parameter and return types and every status code at that number, and a test fails when one is removed or changed while the number stays, or when a recorded line is edited. Output sizes are not in that record. - Status codes in the C header.
oxicrypt.hdefines the status codes asOXI_RESULT_*constants of theOxiResultenum, with the values the C functions return. - Shared library named by ABI. The library's
SONAMEisliboxicrypt_ffi.so.<ABI>on Linux and its macOS install name is@rpath/liboxicrypt_ffi.<ABI>.dylib, so a loader refuses a library of another ABI by name. Release tarballs ship that layout, and the Windows tarball also ships the MSVC import libraryoxicrypt_ffi.dll.lib. Android keeps the plainliboxicrypt_ffi.so, the only form an application packages, and the Windows DLL keeps its name. C programs linked against a cargo build on Linux or macOS must deploy the library under the new name; see Upgrading. - DRBG minimum input lengths. HMAC_DRBG, Hash_DRBG and CTR_DRBG with a derivation function refuse an entropy input shorter than the instantiated security strength on instantiate, reseed and prediction-resistance generate, and a nonce shorter than half of it on instantiate. The refusals are
Error::EntropyInputTooShort,Error::NonceTooShortand a newDrbgError::EntropyInputTooShortvariant, and reach the C ABI asOxiResult::EntropyInputTooShort(29) andOxiResult::NonceTooShort(30). An instantiate refused by a length check leaves the DRBG uninstantiated. See Upgrading for the lengths. - Integrity signer for GNU-toolchain Windows DLLs. The signer reads the module's statics from the DWARF debug information in the DLL when no program database of the name the DLL records is beside it. The four pinned statics are always located exactly or the DLL is refused. The other module statics are covered only on two assumptions the reader cannot check: that the compiler gives every static with storage a
DW_AT_location, and that every module crate is built with full debug information; a static that breaks either is not seen, where a program database would list it. An image with neither a program database record nor DWARF is refused asNoDwarf. The refusals areNoDwarf,DwarfForm,DuplicateStatic,StaticOutsideImage,StaticUnlocatedandStaticUnsized. - Removed the
oxicrypt-pointerplaceholder crate. Theoxicryptcrate name on crates.io passes to the Rust binding at its first publish, and the placeholder versions 1.40.3 and 0.0.1 are yanked then.
Upgrading
DRBG entropy and nonce lengths
Every Hash_DRBG and HMAC_DRBG variant requires at least 32 bytes of entropy input and a 16-byte nonce, so SHA-384 callers that supplied 24-byte entropy or a 12-byte nonce are refused. CTR_DRBG with a derivation function requires entropy input of at least the AES key length and a nonce of at least half of it. Supply inputs of those lengths or longer. Rust code that matches exhaustively on DrbgError must handle DrbgError::EntropyInputTooShort. C callers must handle OXI_RESULT_ENTROPY_INPUT_TOO_SHORT (29) and OXI_RESULT_NONCE_TOO_SHORT (30). An instantiate refused by a length check leaves the DRBG uninstantiated.
Shared library name for C programs linked against a cargo build
On Linux, cargo writes the plain liboxicrypt_ffi.so, while a program linked with -loxicrypt_ffi against target/release records liboxicrypt_ffi.so.1, so the loader refuses to start it (cannot open shared object file, exit status 127) until the library is deployed under that name. On macOS, cargo writes the plain liboxicrypt_ffi.dylib, while a program linked the same way records the install name @rpath/liboxicrypt_ffi.1.dylib, so the library must be deployed as liboxicrypt_ffi.1.dylib on the program's rpath. On both, copy the build output to the name scripts/library-file-name.sh prints and keep the plain name as a link to it. Release tarballs ship that layout already. Android and Windows keep their library names and need no change.
The full list of changes is in CHANGELOG.md under 0.26.0.
v0.25.0
oxicrypt 0.25.0
oxicrypt is a pure-Rust cryptographic module targeting FIPS 140-3. This release changes how the module proves its own binary is intact, refuses output unless the module is operational, and brings the power-up self-tests to the form FIPS 140-3 IG 10.3.A requires. A 0.x minor bump is incompatible; read the upgrade section before moving.
What the module now does
- Integrity test by signature. At start-up the module verifies an ML-DSA-87 (FIPS 204) signature over its own loaded image, covering every file-backed byte the loader maps: ELF on Linux and Android, Mach-O on macOS, PE on Windows. The signer refuses, by name, an image it cannot type.
- No output outside
SelfTestandOperational. Every output entry point checks the module state once per call, so an object built earlier produces nothing once the module enters its error state. During the power-up self-tests only the thread running them is admitted. - Self-tests compare against precomputed NIST values. The ML-KEM, ML-DSA, SLH-DSA and PBKDF2 power-up tests use vendored NIST ACVP vectors, and the C library's
oxi_initruns the known-answer tests of every algorithm crate it links. - LMS verification for all 80 parameter pairs of SP 800-208, plus
verify_any/oxi_lms_verify_any, which routes on the public key's typecodes. LMS key generation and signing are removed: SP 800-208 confines them to hardware modules. - Release artifacts cover Android (arm64 and x86_64) beside Linux, macOS and Windows.
Fixes
- Integrity-signed binaries launch on macOS on Apple silicon;
cargo xtask signapplies the code-sign, integrity-sign, code-sign order for every Apple target. (#280) - HKDF-Expand returns when asked for exactly 255 blocks in a release build. TLS 1.3
HkdfLabelinputs outside their RFC 8446 bounds are refused withInvalidInputrather than truncated. (#285) initialize_with_profileleaves the active profile unchanged when called after initialisation. (#285)
Upgrading from 0.24.0
Re-sign every binary with a key pair you generate. The integrity slot is format version 4; slots of earlier versions are refused. Generate a pair with oxicrypt-integrity-sign --keygen <dir> (outside any git work tree), build with OXICRYPT_INTEGRITY_VERIFY_KEY=<dir>/integrity-verify.pub (or OXICRYPT_INTEGRITY_VERIFY_KEY_HEX), and sign with --sign --key <dir>/integrity-signing.key. A build without a verifying key compiles but reports NoVerifyKey and never becomes operational. A binary you received is replaced with a fresh copy from its publisher, not re-signed. sign_image and write_extent take an oxicrypt_integrity_sign::SigningKey. The signer exits 3 when --sign is refused for its key and 4 when --keygen fails.
Result from output points. These now return Result and refuse outside SelfTest and Operational:
- every public
*_internalfunction (ECDSA, RSA and DH helpers return the refusal asNotOperational); finalizeon the SHA-1, SHA-2 and SHA-3 hashers and onHmac;squeezeandfinalize_intoon SHAKE, cSHAKE, KMAC, TupleHash and ParallelHash;finalizeon the LMS hash adapters (updateandabsorbstay infallible);encrypt_block/decrypt_blockonAes128Key,Aes192Key,Aes256Key;oxicrypt_aes::ctr_xor;oxicrypt_cmac::cmac_tag;oxicrypt_rsa::pssandoaepencode, decode and verify (Result<Option<_>, Error>/Result<bool, Error>);Conditioner::startup_kat(Result<bool, Error>);- key accessors
private_scalar,seed,prk,public_key,modulus_bytes,public_exponent; - the traits
oxicrypt_drbg::HashAlgandHmacAlgchanged signatures;BlockCipher's methods areencrypt_block_with/decrypt_block_with, taking aSelfTestStartedproof; oxicrypt_rsa::keygen::generate_2048/3072/4096are renamedgenerate_*_internaland hidden; useRsaPrivateKey2048::generateand its 3072- and 4096-bit counterparts.KeygenErrorgainsModule.- The HKDF, SP 800-108, PBKDF2 and TLS KDF output functions zeroize the output buffer on error.
Renamed and added variants.
IntegrityStatus::MismatchandIntegrityError::Mismatch→SignatureInvalid(status 2). AddedRefused(7),NoVerifyKey(8),KeyMismatch(9),SlotDamaged(10).SlotInvalid(3) now means only the unsigned build template;Unreadable(4) means the test was not performed.SlotDefectrange variants are renamed for entries (NoEntries,TooManyEntries,EmptyEntry,EntryOverflow,EntryOutOfBounds); new variants name the other defects.Unreadable::AllMechanismsFailedis removed; new variants name the read that failed.Unreadable::FileLengthon Darwin and Windows for a file shorter than the signed length.oxicrypt_imageread::ReadErrorgainsInvalidNameandNoImage.oxicrypt_module::Error::AlreadyFailed(formerlyNotOperational) for initialising a module whose initialisation failed; a failed initialisation is terminal until the process restarts.- New
Modulevariants onModeError,IntegrityError,DrbgError,EntropyError,TimerError,SourceError.EntropyError::ModulereplacesNotReady/ConditionerKatfor a refusal;TimerError::ModulereplacesUnavailablefor one. VerifyAnyError::Unroutablefor LMS input naming no parameter pair.
Removed.
oxicrypt_integrity::FIPS_INTEGRITY_KEY,mac_over_file_ranges,encode_hmac_hex,constant_time_eq;slot::OFF_MAC,RANGE_ENTRY_SIZE,MAX_RANGES.SlotImagelosesflags,slot_rva,mac,rangesand gainsfieldsandsignature.slot::encodeandslot::extent_lenchanged signatures.- LMS key generation and signing:
keygen,keygen_internal,keygen_from_parts,sign,sign_internal,LmsPrivateKey,LmsSigningKey,PRIVATE_KEY_LEN(every per-pair module and the crate root); each per-pair module'sKATS; the 80Lms…Signvariants ofoxicrypt_module::Service; theallocandparallelfeatures ofoxicrypt-lms; theacvp-harnessLMSkeyGenandsigGenhandlers. - Per-parameter-set self-test items:
slh_dsa_*::KATS,ml_kem_*::{self_test, KAT_ENTRY, KATS},ml_dsa_*::{self_test, KAT_ENTRY, KATS}; the crate-levelKATSof each is the only self-test slice.pbkdf2_self_test_sha1andpbkdf2_self_test_sha256;pbkdf2_self_test_sha224replaces them. - Hidden from documentation: the arithmetic modules of
oxicrypt_ecdsa,oxicrypt_eddsa,oxicrypt_rsaandoxicrypt_sha::keccak, the accelerator functions ofoxicrypt_aes_accelandoxicrypt_sha_accel, and theBlockCiphertrait.
#[non_exhaustive]: oxicrypt_integrity::SlotDefect, Unreadable, IntegrityError; oxicrypt_imageread::ReadError; oxicrypt_module::Error. Add a wildcard arm to every match.
On-demand integrity test. verify_loaded_image() runs only inside the power-up self-tests; at any other time it runs nothing and returns IntegrityError::Module (AlreadyInitialized once operational). oxi selftest reports the verdict from the process's start and re-runs the algorithm self-tests.
C ABI.
- The AES functions and HMAC-DRBG
reseed/generatereturnNotOperational = 1once the module has leftOperational, for handles created earlier. The functions returning a public key, modulus or exponent from a handle do the same. oxi_integrity_statuscan returnRefused = 7.oxi_initreturnsNotOperationalfor a module whose initialisation already failed.- Removed
oxi_lms_keygen,oxi_lms_sign, the 80oxi_lms_<pair>_keygenand 80oxi_lms_<pair>_signfunctions, andOXI_LMS_PRIVATE_KEY_LEN.oxi_lms_verifyand the per-pair verify functions remain. Addedoxi_lms_verify_any(InvalidInput = 5for an unroutable key;TagMismatch = 22for a failed verification). - Added
oxi_integrity_status_detail()andoxi_integrity_key_fingerprint(), which returnsBufferTooSmallfor a buffer under 32 bytes. oxicrypt-moduledoes not compile for a target without 64-bit atomics.
Verifying a release asset
Each shared library and oxi is signed with the project's release key, whose public half is keys/release-integrity-verify.pub in this tag; the static archive ships unsigned. The release key's fingerprint is the SHA-256 of that 2,592-byte file:
sha256:ef4ff23cd2cdd5c9aa97576f928e874b149017485b3a0e74e45aee1155f248fe
Run oxi --integrity (or call oxi_integrity_key_fingerprint() against the library) and compare the fingerprint it reports with that value, and compare the asset's SHA-256 with the one published beside it. Each asset's provenance file records the key's fingerprint and the SHA-256 of the artifact's signature.
Full list of changes: https://github.com/oxiforge/oxicrypt/blob/v0.25.0/CHANGELOG.md
v0.24.0
Note: the oxi binary in oxicrypt-cli-v0.24.0-macos-aarch64.tar.gz does not launch on Apple silicon, because macOS rejects its code signature after integrity signing (issue #280). Use v0.25.0, where the macOS artifacts are code signed after integrity signing and launch.
Completes the pre-operational software integrity test on macOS and Windows. The signer could produce a Mach-O or PE artifact the runtime had no way to verify, so the module never became operational on either; both now verify the bytes the loader mapped. Two crates carry the work and both publish for the first time — oxicrypt-imageread, which reads the module's own loaded image through mach_vm_read_overwrite and ReadProcessMemory, and oxicrypt-integrity-sign, the signer, so cargo install oxicrypt-integrity-sign now resolves.
Signed oxi binaries ship for the first time, one per platform, in their own oxicrypt-cli- tarball with a provenance record. oxi selftest runs the module's self-tests on demand and reports each one by name with the vector it is checked against, ending in an explicit indicator; a failure places the module in the error state. oxi --integrity reports the pre-operational integrity test's outcome, the extent it covered, and the two commands that make an unsigned build start.
Four notices for consumers
The release artifacts are renamed. The C library archive is oxicrypt-ffi-<tag>-<platform>.tar.gz, was oxicrypt-<tag>-<platform>.tar.gz through v0.23.2 — it is one delivery form of the module rather than the module. Releases up to v0.23.2 keep their original names; a script that fetches by asset name needs updating.
The integrity slot format is not backward compatible: every artifact must be re-signed. initialize() is removed. initialize_with_tests(integrity, tests) and initialize_with_profile take the integrity group as a parameter, and a module initialized with an empty group enters the new IntegrityUnverified state instead of becoming operational. No interface exists, at any visibility, to declare the test passed without running it.
oxicrypt-xmss is scoped to signature verification. keygen, sign and XmssPrivateKey are removed from the crate, and oxi_xmss_keygen and oxi_xmss_sign from the C ABI. Address encoding is aligned with RFC 8391, so signatures at any leaf index other than zero verify differently than in earlier versions. The crate now carries externally produced verification vectors from six independent sources, and its power-up self-test is a CAST over one of them.
The CNSA profiles match CNSSP-15 as published, each membership citing the clause that admits it. Services outside the suite return Error::AlgorithmRestricted where earlier versions permitted them — under CNSA 1.0 that includes SHA-256, SHA-512 and their HMAC, DRBG and KDF variants, the post-quantum algorithms and the stateful hash-based schemes; under CNSA 2.0, the Keccak-family hashes and XOFs. A deployment that needs the previous breadth selects the new AlgorithmProfile::Migration, or Unrestricted for anything beyond the two suites.
Artifacts
Prebuilt binaries are attached below for linux x86_64/aarch64, macOS x86_64/aarch64 and windows x86_64. oxicrypt-ffi- carries the shared and static objects with oxicrypt.h; oxicrypt-cli- carries the signed oxi binary. Each archive carries both licences and a BUILD-PROVENANCE.txt recording the target triple, glibc floor, rustc version, source commit and integrity MACs, alongside a SHA-256 checksum. Consuming the module from C needs no Rust toolchain.
Full detail in CHANGELOG.md.
oxicrypt holds no NIST certifications. It implements FIPS 140-3 Level 1 requirements and its algorithms are validated on NIST's ACVP demonstration server.
v0.23.2
Corrects the module's account of itself. The five in-boundary crates that use unsafe are described as readily auditable rather than audited — nothing in the repository records an audit — and the claim that the module is validated is gone from the rustdoc, README.md, the manifests and four published crate descriptions. oxicrypt targets FIPS 140-3 Level 1 and has not completed CMVP.
Fixes a panic in the CTR_DRBG derivation function. A combined entropy || nonce || personalization input of 152 to 192 bytes overran the working block, reachable from instantiate_df, reseed_df, generate_df and their C ABI mirrors. The admissible input length is unchanged; the working block now holds it.
Carries the comment sweep across 23 of the workspace's 37 units: standards citations checked against the documents they name, property claims checked against the code, and constant-time wording restored where the property holds by construction.
Prebuilt C libraries are attached below — shared and static objects with oxicrypt.h for linux x86_64/aarch64, macOS x86_64/aarch64 and windows x86_64. Each archive carries both licences and a BUILD-PROVENANCE.txt recording the target triple, glibc floor, rustc version, source commit and integrity MACs, alongside a SHA-256 checksum. Consuming the module from C needs no Rust toolchain.
Full detail in CHANGELOG.md.
oxicrypt holds no NIST certifications. It implements FIPS 140-3 Level 1 requirements and its algorithms are validated on NIST's ACVP demonstration server.
v0.22.0
Opens the crates.io roster: 29 crates for the registry, seven in-repo tools that stay out of it. The workspace previously set publish = false throughout, so the roster was implied rather than stated.
Breaking — the integrity key and slot magics changed. Any binary signed with the earlier key fails its power-up integrity check and must be re-signed with fips-integrity-sign --sign.
The command-line interface publishes as oxicrypt-cli. cargo install oxicrypt-cli installs an oxi binary, and nothing changes for anyone building from the repository. The crate name oxi was already registered on crates.io by an unrelated project.
Prebuilt C libraries are attached below — shared and static objects with oxicrypt.h for linux x86_64/aarch64, macOS x86_64/aarch64 and windows x86_64. Each archive carries both licences and a BUILD-PROVENANCE.txt recording the target triple, glibc floor, rustc version, source commit and integrity MACs, alongside a SHA-256 checksum. Consuming the module from C needs no Rust toolchain.
LAMA manifest conformance is gated on every push, and the quickstart examples the manifest carries are compiled by the test suite rather than asserted in a YAML file.
Build toolchain pinned to Rust 1.97.1; MSRV held at 1.95.
Full detail in CHANGELOG.md.
oxicrypt holds no NIST certifications. It implements FIPS 140-3 Level 1 requirements and its algorithms are validated on NIST's ACVP demonstration server.
v0.21.0
Makes the workspace publishable. Three defects stood between it and crates.io, none visible to any gate because nothing ran cargo package.
Internal dependencies had no version requirement. cargo package strips a dependency's path and records a registry requirement, which needs a version — so 27 of the 35 members failed to package. Internal crates are now declared once in root [workspace.dependencies]; 141 member declarations inherit them.
Embedded files reached outside their package root. cargo publish uploads a tarball of the package directory and the registry never fetches from the repository, so an include_str! climbing out of the package builds here and fails for every consumer — permanently, since a published version is immutable. The four crates embedding the LAMA manifest now reach the canonical file through a symlink inside their own package root.
The crates.io roster was implied rather than stated. Every member inherited publish = false, so nothing distinguished a crate awaiting the launch flag from one that must never reach a registry. 29 crates are now marked for the registry, 6 for the repository only.
Guards: scripts/check-internal-deps.sh asserts the dependency rules from cargo metadata against the commits being pushed; doc-guard asserts no embed escapes its package root and that each embedded manifest matches the canonical file byte for byte.
Build toolchain pinned to Rust 1.97.1; MSRV held at 1.95.
Full detail in CHANGELOG.md.
Process rehearsal — this version is not published to crates.io.