Skip to content

Version 2.0.0

Latest

Choose a tag to compare

@StormBytePP StormBytePP released this 02 Oct 13:20

[Summary]

StormByte Crypto is the cryptography module of the StormByte C++ suite.

It depends on StormByte Base ≥ 2.0.0, StormByte Buffer ≥ 2.0.0 and StormByte System ≥ 2.0.0. This repository is not Base, Buffer, Config, Database, Logger, Multimedia, Network or System.

Public headers under StormByte/crypto/ cover Hasher, Compressor, Crypter (symmetric and asymmetric), Signer, Secret, KeyPair, Password and Vault. Crypto++ never leaves the private tree.

If you landed here from a release link and have not read the tree:

  • What this module is, how to build it, and short examples: README.md
  • License: GNU Lesser General Public License version 3 or later, LICENSE

Changed

  • Exception message constructors now accept std::string_view; exception copy/move special members are defined out of line in their owning Crypto DLLs.
  • Port public text to Base's StormByte::Safe::String and polymorphic ownership to StormByte::Safe::Clonable / Safe::Shared; Password accepts mutable std::string& for wipeable caller-owned input.
  • Updated repository links to the StormByte-Suite organization and removed documentation for the retired standalone dependency.
  • Shared vs static follows CMake BUILD_SHARED_LIBS (declared in the project root, default ON). There is no STORMBYTE_CRYPTO_SHARED CMake option. When the library is shared, the compile definition STORMBYTE_CRYPTO_SHARED is still set so visibility.h can distinguish dllexport / dllimport / static. CI passes -DBUILD_SHARED_LIBS=ON. Vendored Crypto++ and BZip2 stay static BM components; their archives are closed onto consumers by the static sidecar.
  • Breaking: Port to StormByte Base 2.0.0, Buffer 2.0.0 and System 2.0.0. Public types follow Base 2.0: Clonable + MakePointer / Shared instead of std::shared_ptr, StormByte::BinaryData instead of Buffer DataType / raw vectors at the public edge, StormByte::Size for abstract counts and StormByte::ByteSize for octet lengths (Password::Size() is ByteSize). std::size is gone from the public API.
  • Breaking: Exceptions no longer use StormByte::Component. Crypto::Exception forwards Path{"Crypto"} to StormByte::Exception. Per-office exceptions (Compressor::Exception, Crypter::Exception, Hasher::Exception, KeyPair::Exception, Secret::Exception, Signer::Exception) live in their own namespace and add only their own segment; Crypto concatenates before forwarding. what() is StormByte.Crypto or StormByte.Crypto.<Child>: message.
  • Breaking: Buffer 2.0 streaming contract. Block I/O is std::span<const std::byte> into Buffer::WriteOnly. Pipelines take Buffer::Consumer and return a consumer; FIFO::Data() is BinaryData.
  • Breaking: Factories and keypair / signer / crypter / secret constructors take KeyPair::Generic::PointerType (Safe::Shared), not std::shared_ptr. Generate / Load return that pointer type. Safe::Clonable::MakePointer is used for public-only views.
  • Breaking: Public leaf classes are final. Destructors of public types are declared in the header and defined out of line in the .cxx (= default) so the vtable and typeinfo stay on this side of the DLL.
  • Breaking: Non-secret public text is ingested as std::string_view and copied inside the library. That includes KeyPair leaf constructors, Secret::Share, Vault names (Store/Get/Contains/Remove), KeyPair::Generic::Save baseName, and Signer::Verify / DoVerify signatures. StormByte::Safe::String and std::string convert to string_view. Owned public text (PublicKey()) is const StormByte::Safe::String&. Conversion to std::string is explicit (std::string{std::string_view{...}}).
  • Breaking: Password no longer takes std::string by value. Ingest is a non-const std::string&; the bytes are copied into wiped storage and the caller's object is overwritten and cleared. Literals use explicit Password(const char*) and are not wiped. Raw bytes (const void* + ByteSize) are copied and not wiped. string_view is rejected so a live password buffer cannot remain in the caller after construction, and so a std::string is not moved across the DLL heap.
  • Breaking: Password and Vault move to StormByte::Crypto::Secure (StormByte/crypto/secure/{password,vault,exception}.{hxx,cxx}). Crypto::VaultException is now Crypto::Secure::VaultException (what() is StormByte.Crypto.Secure.Vault: message). Secure::Exception is StormByte.Crypto.Secure. ExpectedPassword lives next to Vault. Headers StormByte/crypto/password.hxx and StormByte/crypto/vault.hxx are gone.
  • Breaking: Private backend namespace Implementation is Engine (StormByte::Crypto::Engine). Public headers do not mention it.
  • Dual license on sources and LICENSE: LGPL-3.0-or-later or commercial. Neither covers Crypto++, bundled libbzip2, or vendored StormByte trees under thirdparty/.
  • Tests rewritten to the suite format (section headers, snake_case functions, accumulating main). Coverage of hasher, compressor, crypter, signer, secret, password, vault and keypair (save/load and OpenSSL fixtures) updated to the new pins.
  • Hybrid encrypt/decrypt tests compare plaintext with std::string::operator== (ASSERT_TRUE), not ASSERT_EQUAL. The harness C-string path false-failed prefix+4096 payloads on Ubuntu clang while the bytes already matched.
  • Doxygen (ENABLE_DOC) resolves Buffer, Logger, System and Base headers via INCLUDE_PATH and skips thirdparty.
  • CONTRIBUTING.md and CODING_STYLE.md aligned with Logger.

Notes