#encryption #cryptography #privacy

no-std fortress-core

Fortress Core Library - Enterprise Security. Core library for Fortress secure database system with multi-layer encryption.

9 releases (stable)

1.0.11 Apr 23, 2026
1.0.5 Apr 25, 2026
1.0.2-alpha Mar 18, 2026

#1707 in Database interfaces


Used in 4 crates (3 directly)

MIT license

6MB
117K SLoC

Fortress Core

Crates.io Documentation License: MIT

Fortress Core - The heart of Fortress secure database system. Enterprise-grade encryption, key management, and security primitives.

Features

  • Multiple Encryption Algorithms: AEGIS-256, ChaCha20-Poly1305, AES-256-GCM, and more
  • Advanced Key Management: Automatic generation, rotation, and secure storage
  • High Performance: Optimized for speed with hardware acceleration
  • Memory Safe: Built with Rust for zero vulnerabilities
  • Developer Friendly: Simple API with comprehensive error handling

Quick Start

Add this to your Cargo.toml:

[dependencies]
fortress-core = "1.0.1"

Or install via cargo:

cargo add fortress-core

Basic Usage

use fortress_core::prelude::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Initialize encryption
    let algorithm = Aegis256::new();
    let key_manager = KeyManager::new();
    let key = key_manager.generate_key(&algorithm)?;
    
    // Encrypt data
    let plaintext = b"Hello, Fortress!";
    let ciphertext = algorithm.encrypt(plaintext, &key)?;
    
    // Decrypt data
    let decrypted = algorithm.decrypt(&ciphertext, &key)?;
    
    assert_eq!(plaintext, decrypted);
    println!("Encryption successful!");
    
    Ok(())
}

Field-Level Encryption

use fortress_core::prelude::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let fortress = Fortress::new().await?;
    
    // Create encrypted field
    let encrypted_field = fortress.create_encrypted_field(
        "user_data",
        EncryptionAlgorithm::Aegis256
    )?;
    
    // Encrypt sensitive data
    let sensitive_data = "user-secret-key";
    let encrypted_data = encrypted_field.encrypt(sensitive_data.as_bytes())?;
    
    // Decrypt when needed
    let decrypted_data = encrypted_field.decrypt(&encrypted_data)?;
    
    println!("Decrypted: {}", String::from_utf8(decrypted_data)?);
    Ok(())
}

Performance

Fortress Core is optimized for high-performance encryption:

Algorithm Throughput (MB/s) Latency (ms) Security Level
AEGIS-256 1500+ 0.5 Very High
ChaCha20-Poly1305 1200+ 0.7 High
AES-256-GCM 1000+ 0.8 High

Features

  • default: Standard library support
  • cloud-storage: AWS S3, Azure Blob, Google Cloud Storage integration
  • postgres: PostgreSQL database backend
  • simd: SIMD optimizations for supported platforms
  • hardware-acceleration: Hardware acceleration support

License

This project is licensed under MIT - see the LICENSE file for details.

Documentation

Contributing

Please read our Contributing Guide before contributing.

Support

Dependencies

~97–155MB
~2.5M SLoC