Skip to main content

Crate cryptocol

Crate cryptocol 

Source
Expand description

§cryptocol: A Comprehensive Cryptography Library

§Endianness Support

cryptocol is optimized for Little-endian architectures, as they are the most widely used in modern computing. For more detailed information regarding Endianness (Little-endian vs. Big-endian), please read more here.

§Big-endian Compatibility Notice

Support for Big-endian architectures is currently experimental. We do not recommend using this crate on Big-endian systems for production or critical applications. Users choosing to do so assume full responsibility for any potential issues.

§Roadmap for Version 1.0

The following features are planned for the cryptocol ecosystem.

  • Completed: Implementation and documentation are at least 95% complete.
  • In Progress: Implementation or documentation is below 95%, or work has not yet begun.

§1. Small Numbers

Foundational types for Big Numbers and other cryptographic modules.

§2. Big Numbers

Essential for Asymmetric-Key Algorithms and high-precision calculations.

§3. Hash Algorithms

§3-1. Official SHA-series
  • SHA-3 & Keccak: Supports 8/16/32/64-bit variants, including SHA3-224/256/384/512 and SHAKE 128/256. – Keccak_Generic
  • SHA-2 (512/t): Including 512/256 and 512/224 variants. – SHA2_512_t_Generic
  • SHA-2 (512-bit): SHA-512, SHA-384, and SHA-512/256. – SHA2_512_Generic
  • SHA-2 (256-bit): SHA-256 and SHA-224. – SHA2_256_Generic
§3-2. Educational Hash Algorithms (Insecure)

Warning: These are intended for educational purposes only and should not be used for securing sensitive data.

§4. Symmetric-Key Algorithms (Block Ciphers)

§4-1. AES Finalists
§4-2. Educational Block Ciphers (Insecure)

Warning: These are intended for educational purposes only and should not be used for securing sensitive data.

§4-3. Combined Cipher Containers

Note: While supported, using native AES-256 or specific Rijndael variants is generally recommended over 2AES/3AES for better security and performance.

§5. Pseudo-Random Number Generators (PRNG)

§6. Asymmetric-Key Algorithms

  • ECC (Elliptic Curve Cryptography): (Planned) Generic ECC implementation with padding support. – ECC_Generic.
  • RSA (Ron Rivest, Adi Samir, Leonard Adleman): (In Progress) Implementation of RSA with PKCS #1 v1.5 and OAEP (Optimal Asymmetric Encryption Padding) (PKCS #1 v2.0/RFC 2437) padding. – RSA_Generic, PKCS1V15, and OAEP.

§Versioning Policy

The project will reach Version 1.0.0.0 once all twenty-one functional areas listed above are fully implemented.

  • Pre-v1.0: Versions will range up to 0.21.x.x based on the progress of the listed functionalities.
  • Post-v1.0: New features will increment the version beyond 1.0.0.0.

Note: Version numbers like 0.5.0.0 indicate progress through the functionality list, not necessarily a 50% completion of the entire codebase.

Modules§

asymmetric
hash
various cryptographic hash functions
number
Provides various number types, including small primitive-based integers, memory-sharing integer unions, and fixed-size big integers.
random
various pseudo-random number generators
symmetric
various symmetric-key algorithms for the encryption/decryption of digital data

Macros§

define_utypes_with
The macro that defines the types U256, U384, U512, U768, U1024, U2048, U3072, U4096, U5120, U6144, U7168, U8192, and U16384.
define_utypes_with_u8
The macro that defines the types U256, U384, U512, U768, U1024, U2048, U3072, U4096, U5120, U6144, U7168, U8192, and U16384 based on u8.
define_utypes_with_u16
The macro that defines the types U256, U384, U512, U768, U1024, U2048, U3072, U4096, U5120, U6144, U7168, U8192, and U16384 based on u16.
define_utypes_with_u32
The macro that defines the types U256, U384, U512, U768, U1024, U2048, U3072, U4096, U5120, U6144, U7168, U8192, and U16384 based on u32.
define_utypes_with_u64
The macro that defines the types U256, U384, U512, U768, U1024, U2048, U3072, U4096, U5120, U6144, U7168, U8192, and U16384 based on u64.
define_utypes_with_u128
The macro that defines the types U256, U384, U512, U768, U1024, U2048, U3072, U4096, U5120, U6144, U7168, U8192, and U16384 based on u128.