amaters

Crates.ioamaters
lib.rsamaters
version0.1.0
created_at2026-01-14 01:16:50.053806+00
updated_at2026-01-19 02:42:43.773126+00
descriptionAmateRS - Fully Homomorphic Encrypted Distributed Database with Zero Trust Architecture
homepagehttps://github.com/cool-japan/amaters
repositoryhttps://github.com/cool-japan/amaters
max_upload_size
id2041891
size80,955
KitaSan (cool-japan)

documentation

https://docs.rs/amaters

README

AmateRS - The Sovereign Data Infrastructure

Crates.io Documentation License: MIT OR Apache-2.0 Rust

AmateRS is a next-generation distributed database with Fully Homomorphic Encryption (FHE) capabilities, enabling computation on encrypted data without ever exposing plaintext to servers.

This is the meta crate that re-exports all AmateRS components for convenient access.

Vision

"Reclaiming Digital Dignity through Computation in the Dark"

Like the sun goddess Amaterasu hiding in the rock cave (Iwato), data remains hidden within a robust cryptographic shell. Yet the light (computational power) emanating from it continues to illuminate the world.

AmateRS resolves the fundamental trade-off between privacy protection and data utilization.

Architecture

AmateRS consists of four core components inspired by Japanese mythology:

Component Origin Role Technology
Iwato (岩戸) Heavenly Rock Cave Storage Engine LSM-Tree, WiscKey, io_uring
Yata (八咫鏡) Eight-Span Mirror Compute Engine TFHE-rs, GPU acceleration
Ukehi (宇気比) Sacred Pledge Consensus Raft, ZK-SNARKs
Musubi (結び) The Knot Network Layer gRPC, QUIC, mTLS

Re-exported Crates

This meta crate provides unified access to all AmateRS components:

Module Crate Description
core amaters-core Storage, compute, types, and errors
net amaters-net gRPC services and mTLS
cluster amaters-cluster Raft consensus
sdk amaters-sdk-rust Client SDK

Features

  • Encryption in Use: Data remains encrypted during computation via TFHE (Fully Homomorphic Encryption)
  • Zero Trust: Servers never see plaintext - mathematically impossible to decrypt without client keys
  • Distributed Consensus: Raft-based replication with encrypted log entries
  • High Performance: GPU-accelerated FHE operations, optimized LSM-Tree storage
  • Post-Quantum Security: LWE-based cryptography resistant to quantum attacks

Quick Start

Installation

Add AmateRS to your Cargo.toml:

[dependencies]
amaters = "0.1"

# Or with specific features
amaters = { version = "0.1", features = ["full"] }

Basic Usage

use amaters::prelude::*;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Connect to AmateRS server
    let client = AmateRSClient::connect("http://localhost:50051").await?;

    // Store encrypted data
    let key = Key::from_str("user:123");
    let value = CipherBlob::new(vec![/* encrypted bytes */]);
    client.set("users", &key, &value).await?;

    // Retrieve data
    if let Some(data) = client.get("users", &key).await? {
        println!("Retrieved {} bytes", data.len());
    }

    Ok(())
}

Storage Engine (Iwato)

use amaters::core::storage::MemoryStorage;
use amaters::core::traits::StorageEngine;
use amaters::prelude::*;

let storage = MemoryStorage::new();
let key = Key::from_str("data");
let value = CipherBlob::new(vec![1, 2, 3]);

storage.put(&key, &value).await?;
let retrieved = storage.get(&key).await?;

Consensus (Ukehi)

use amaters::cluster::{RaftNode, RaftConfig, Command};

let config = RaftConfig::new(1, vec![1, 2, 3]);
let node = RaftNode::new(config)?;

let cmd = Command::from_str("SET key value");
let index = node.propose(cmd)?;

Query Builder

use amaters::sdk::query;
use amaters::prelude::*;

let q = query("users")
    .where_clause()
    .eq(col("status"), CipherBlob::new(vec![1]))
    .build();

Feature Flags

Flag Description
default No additional features
full Enable all features (mtls + fhe)
mtls Enable mTLS support in networking
fhe Enable full FHE support with TFHE

Use Cases

Healthcare & Genomics

  • Store encrypted DNA/medical data
  • Perform analysis without exposing patient information
  • Enable global medical research while preserving privacy

Supply Chain Transparency

  • Track CO2 emissions without revealing trade secrets
  • Verify ethical sourcing without exposing supplier networks
  • Maintain competitive advantage while ensuring transparency

Financial Inclusion

  • Credit scoring without revealing personal transaction history
  • Privacy-preserving identity verification
  • Secure cross-border payments

Individual Crates

If you need only specific functionality, you can use the individual crates directly:

[dependencies]
# Core types and storage
amaters-core = "0.1"

# Network layer
amaters-net = "0.1"

# Consensus
amaters-cluster = "0.1"

# Client SDK
amaters-sdk-rust = "0.1"

Development Status

Current Version: 0.1.0 (Production Ready)

  • ✅ Core storage engine (Iwato) - LSM-Tree with WAL and compaction
  • ✅ FHE compute engine (Yata) - TFHE-rs integration with predicate evaluation
  • ✅ Network layer (Musubi) - gRPC with TLS/mTLS
  • ✅ Rust SDK with connection pooling and retry logic
  • ✅ CLI tool with full admin capabilities
  • ✅ 665+ tests passing
  • 🚧 Consensus layer (Ukehi) - Foundation complete, clustering in progress
  • 📋 GPU acceleration (CUDA/Metal) - Planned for v0.2.0

Contributing

We welcome contributions! Please see our contribution guidelines.

Development Setup

# Clone the repository
git clone https://github.com/cool-japan/amaters
cd amaters

# Run tests
cargo test --workspace --all-features

# Run clippy
cargo clippy --workspace --all-features -- -D warnings

# Run benchmarks
cargo bench --workspace

# Format code
cargo fmt --all

Documentation

License

Licensed under either of:

at your option.

Authors

COOLJAPAN OU (Team KitaSan) Contact: contact@cooljapan.tech Website: https://github.com/cool-japan


"We are not just building a database. We are building the Vault of Civilization."

Commit count: 1

cargo fmt