{"id":43031973,"url":"https://github.com/latticearc/latticearc","last_synced_at":"2026-05-27T14:12:22.829Z","repository":{"id":335359059,"uuid":"1145377392","full_name":"LatticeArc/latticearc","owner":"LatticeArc","description":"Hybrid Post-Quantum Cryptography Library for Rust - Secure transition to Quantum-Safe Encryption.","archived":false,"fork":false,"pushed_at":"2026-02-24T12:26:46.000Z","size":24482,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-24T12:42:57.483Z","etag":null,"topics":["aws-lc","aws-lc-rs","cryptography","encryption","fips","hybrid-encryption","ml-dsa","ml-kem","post-quantum","post-quantum-cryptography","pqc","rust","tls","tls13"],"latest_commit_sha":null,"homepage":"http://latticearc.com/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LatticeArc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-29T18:30:25.000Z","updated_at":"2026-02-24T12:21:43.000Z","dependencies_parsed_at":"2026-01-31T08:01:46.362Z","dependency_job_id":null,"html_url":"https://github.com/LatticeArc/latticearc","commit_stats":null,"previous_names":["latticearc/latticearc"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/LatticeArc/latticearc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LatticeArc%2Flatticearc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LatticeArc%2Flatticearc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LatticeArc%2Flatticearc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LatticeArc%2Flatticearc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LatticeArc","download_url":"https://codeload.github.com/LatticeArc/latticearc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LatticeArc%2Flatticearc/sbom","scorecard":{"id":1242757,"data":{"date":"2026-01-31T18:02:24Z","repo":{"name":"github.com/LatticeArc/latticearc","commit":"3a2b1c3dcd222dda61839a7e59653d9c1169b0cd"},"scorecard":{"version":"v5.3.0","commit":"c22063e786c11f9dd714d777a687ff7c4599b600"},"score":7.7,"checks":[{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dependency-update-tool"}},{"name":"Maintained","score":0,"reason":"project was created within the last 90 days. Please review its contents carefully","details":["Warn: Repository was created within the last 90 days."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#maintained"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#code-review"}},{"name":"CI-Tests","score":-1,"reason":"no pull request found","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#ci-tests"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/docs.yml:70","Info: jobLevel 'contents' permission set to 'read': .github/workflows/release.yml:246","Info: jobLevel 'actions' permission set to 'read': .github/workflows/release.yml:231","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/sbom.yml:103","Info: jobLevel 'contents' permission set to 'read': .github/workflows/scorecard.yml:27","Info: jobLevel 'actions' permission set to 'read': .github/workflows/scorecard.yml:28","Info: topLevel permissions set to 'read-all': .github/workflows/benchmarks.yml:15","Info: topLevel permissions set to 'read-all': .github/workflows/ci.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:20","Warn: topLevel 'security-events' permission set to 'write': .github/workflows/codeql.yml:21","Info: topLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:19","Info: topLevel permissions set to 'read-all': .github/workflows/constant-time.yml:15","Info: topLevel permissions set to 'read-all': .github/workflows/coverage.yml:9","Info: topLevel permissions set to 'read-all': .github/workflows/docs.yml:9","Info: topLevel permissions set to 'read-all': .github/workflows/fips-validation.yml:12","Info: topLevel permissions set to 'read-all': .github/workflows/fuzzing.yml:11","Info: topLevel permissions set to 'read-all': .github/workflows/geiger.yml:15","Info: topLevel permissions set to 'read-all': .github/workflows/kani.yml:15","Info: topLevel permissions set to 'read-all': .github/workflows/mutation.yml:22","Info: topLevel permissions set to 'read-all': .github/workflows/performance.yml:11","Info: topLevel permissions set to 'read-all': .github/workflows/release.yml:9","Info: topLevel permissions set to 'read-all': .github/workflows/sanitizers.yml:15","Info: topLevel 'contents' permission set to 'read': .github/workflows/sbom.yml:20","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18","Info: topLevel permissions set to 'read-all': .github/workflows/security.yml:11"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":10,"reason":"SAST tool detected: CodeQL","details":["Info: SAST configuration detected: CodeQL","Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info: 132 out of 132 GitHub-owned GitHubAction dependencies pinned","Info:  68 out of  68 third-party GitHubAction dependencies pinned","Info:   1 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#vulnerabilities"}},{"name":"CII-Best-Practices","score":5,"reason":"badge detected: Passing","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: RustCargoFuzzer integration found: arc-fuzz/fuzz_targets/constant_time_fuzz.rs:8","Info: RustCargoFuzzer integration found: arc-fuzz/fuzz_targets/cross_border_fuzz.rs:9","Info: RustCargoFuzzer integration found: arc-fuzz/fuzz_targets/encrypt_fuzz.rs:9","Info: RustCargoFuzzer integration found: arc-fuzz/fuzz_targets/fuzz_target_1.rs:9","Info: RustCargoFuzzer integration found: arc-fuzz/fuzz_targets/hybrid_encrypt_fuzz.rs:9","Info: RustCargoFuzzer integration found: arc-fuzz/fuzz_targets/hybrid_kem_fuzz.rs:8","Info: RustCargoFuzzer integration found: arc-fuzz/fuzz_targets/hybrid_sign_fuzz.rs:8"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Info: 'stale review dismissal' is required to merge on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Warn: codeowners review is not required on branch 'main'","Info: 'last push approval' is required to merge on branch 'main'","Info: 'up-to-date branches' is required to merge on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#branch-protection"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#license"}},{"name":"Contributors","score":0,"reason":"project has 0 contributing companies or organizations -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#contributors"}}]},"last_synced_at":"2026-01-31T19:57:37.421Z","repository_id":335359059,"created_at":"2026-01-31T19:57:37.421Z","updated_at":"2026-01-31T19:57:37.421Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29786978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-lc","aws-lc-rs","cryptography","encryption","fips","hybrid-encryption","ml-dsa","ml-kem","post-quantum","post-quantum-cryptography","pqc","rust","tls","tls13"],"created_at":"2026-01-31T08:00:38.883Z","updated_at":"2026-05-27T14:12:22.822Z","avatar_url":"https://github.com/LatticeArc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LatticeArc\n\n[![crates.io](https://img.shields.io/crates/v/latticearc.svg)](https://crates.io/crates/latticearc)\n[![docs.rs](https://docs.rs/latticearc/badge.svg)](https://docs.rs/latticearc)\n[![CI](https://github.com/LatticeArc/latticearc/actions/workflows/ci.yml/badge.svg)](https://github.com/LatticeArc/latticearc/actions/workflows/ci.yml)\n[![NIST PQC FIPS 203–206](https://img.shields.io/badge/NIST_PQC_FIPS_203--206-algorithms-blue)](docs/NIST_COMPLIANCE.md)\n[![codecov](https://codecov.io/gh/LatticeArc/latticearc/branch/main/graph/badge.svg)](https://codecov.io/gh/LatticeArc/latticearc)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n\n**Post-quantum cryptography for Rust.** You describe what you're protecting; LatticeArc picks the algorithm, security level, and compliance mode. Hybrid (PQ + classical) by default. One crate.\n\n| What you'd normally wire up yourself | What can go wrong |\n|--------------------------------------|-------------------|\n| Pick from 4 NIST standards, 11 parameter sets | Wrong security level, wrong algorithm type |\n| Combine ML-KEM + X25519 + HKDF + AES-GCM | Broken key combiner, missing domain separation |\n| Zeroize secrets, constant-time comparisons | Leaks via `Debug`, timing side-channels |\n| FIPS 140-3, CNSA 2.0 mode restrictions | Non-compliant algorithm silently selected |\n\n```rust\nuse latticearc::{encrypt, decrypt, CryptoConfig, UseCase, EncryptKey, DecryptKey};\nuse latticearc::generate_hybrid_keypair_with_level;\nuse latticearc::primitives::kem::ml_kem::MlKemSecurityLevel;\n\n// HealthcareRecords resolves to ML-KEM-1024 (NIST Level 5), so the keypair\n// must be generated at the matching level — generate_hybrid_keypair() defaults\n// to ML-KEM-768 and would be rejected by validate_key_matches_scheme.\nlet (pk, sk) = generate_hybrid_keypair_with_level(MlKemSecurityLevel::MlKem1024)?;\nlet encrypted = encrypt(b\"patient records\",\n    EncryptKey::Hybrid(\u0026pk),\n    CryptoConfig::new().use_case(UseCase::HealthcareRecords))?;\nlet decrypted = decrypt(\u0026encrypted, DecryptKey::Hybrid(\u0026sk), CryptoConfig::new())?;\n// ML-KEM-1024 + X25519 + HKDF-SHA256 + AES-256-GCM — selected automatically\n```\n\n---\n\n## Quick Start\n\n### Library\n\n```toml\n[dependencies]\nlatticearc = \"0.8\"\n```\n\n**Hybrid encryption** — PQ + classical, both must fail for an attacker to succeed:\n\n```rust\nuse latticearc::{encrypt, decrypt, CryptoConfig, EncryptKey, DecryptKey};\n\nlet (pk, sk) = latticearc::generate_hybrid_keypair()?;\nlet encrypted = encrypt(b\"secret data\", EncryptKey::Hybrid(\u0026pk), CryptoConfig::new())?;\nlet decrypted = decrypt(\u0026encrypted, DecryptKey::Hybrid(\u0026sk), CryptoConfig::new())?;\n```\n\n**Digital signatures** — ML-DSA-65 + Ed25519 hybrid:\n\n```rust\nuse latticearc::{generate_signing_keypair, sign_with_key, verify, CryptoConfig};\n\nlet config = CryptoConfig::new();\nlet (pk, sk, _scheme) = generate_signing_keypair(config.clone())?.into_parts();\nlet signed = sign_with_key(b\"document\", \u0026sk, \u0026pk, config.clone())?;\nassert!(verify(\u0026signed, config)?);\n```\n\n### CLI\n\n`latticearc-cli` exposes the same library for ops and CI workflows — no Rust required:\n\n```bash\ncargo install --git https://github.com/LatticeArc/latticearc latticearc-cli\n# or, from a local checkout:  cargo install --path latticearc-cli\n```\n\n```bash\n# Sign a legal document (ML-DSA-87 + Ed25519 hybrid, selected by use case)\nlatticearc-cli keygen --use-case legal-documents --output ./keys\nlatticearc-cli sign   --input contract.pdf \\\n  --key keys/hybrid-ml-dsa-87-ed25519.sec.json \\\n  --public-key keys/hybrid-ml-dsa-87-ed25519.pub.json\nlatticearc-cli verify --input contract.pdf \\\n  --signature contract.pdf.sig.json \\\n  --key keys/hybrid-ml-dsa-87-ed25519.pub.json\n\n# Encrypt healthcare records (AES-256-GCM)\nlatticearc-cli keygen  --algorithm aes256 --output ./keys\nlatticearc-cli encrypt --use-case healthcare-records \\\n  --input patient.json --output patient.enc.json \\\n  --key keys/aes256.key.json\n```\n\n\u003e 22 use cases · 12 algorithms · hybrid + PQ-only modes. Full reference: [`latticearc-cli/README.md`](latticearc-cli/README.md).\n\n---\n\n## When to Use\n\n**Use LatticeArc when you want:**\n\n- Hybrid PQ + classical encrypt/decrypt without wiring ML-KEM + X25519 + HKDF + AES-GCM yourself\n- Use-case-driven algorithm selection (22 workloads, 3 compliance modes)\n- A CLI that ops teams can use without writing Rust\n- Opt-in FIPS routing with no code changes\n\n**Reach for something else when you need:**\n\n- A single low-level primitive — use `aws-lc-rs`, `fips204`, `fips205`, or `fn-dsa` directly\n- End-to-end CMVP-certified module — no CMVP backend exists for PQ signatures yet\n- Cross-language bindings — `liboqs` covers C, Python, Go, Java\n- `no_std` / embedded — `wolfCrypt` leads for embedded PQ\n- A TLS stack — use `rustls`, OpenSSL 3.5, or wolfSSL\n\n\u003e Detailed comparison: [Ecosystem Map](docs/ECOSYSTEM.md)\n\n---\n\n## How It Works\n\nPlaintext, key type, and config flow through a policy engine that selects the algorithm pipeline at runtime:\n\n```mermaid\nflowchart LR\n    subgraph \"You provide\"\n        DATA[\"Plaintext\"]\n        KEY[\"Key type\"]\n        CFG[\"CryptoConfig\"]\n    end\n\n    subgraph \"LatticeArc decides\"\n        ENGINE[\"Policy\\nEngine\"]\n    end\n\n    subgraph \"Hybrid mode\"\n        H_KEM[\"ML-KEM\\nencapsulate\"]\n        H_ECDH[\"X25519\\nkey exchange\"]\n        H_HKDF[\"HKDF\\ncombine\"]\n        H_AES[\"AES-256-GCM\\nencrypt\"]\n        H_KEM --\u003e H_HKDF\n        H_ECDH --\u003e H_HKDF\n        H_HKDF --\u003e H_AES\n    end\n\n    subgraph \"PQ-only mode\"\n        P_KEM[\"ML-KEM\\nencapsulate\"]\n        P_HKDF[\"HKDF\\nderive\"]\n        P_AES[\"AES-256-GCM\\nencrypt\"]\n        P_KEM --\u003e P_HKDF\n        P_HKDF --\u003e P_AES\n    end\n\n    DATA --\u003e ENGINE\n    KEY --\u003e ENGINE\n    CFG --\u003e ENGINE\n    ENGINE --\u003e|\"CryptoMode::Hybrid\"| H_KEM\n    ENGINE --\u003e|\"CryptoMode::PqOnly\"| P_KEM\n\n    style ENGINE fill:#8b5cf6,stroke:#6d28d9,color:#fff\n    style H_AES fill:#10b981,stroke:#059669,color:#fff\n    style P_AES fill:#3b82f6,stroke:#1d4ed8,color:#fff\n```\n\n### Algorithms \u0026 Backends\n\nAlgorithm conformance ≠ module validation. `--features fips` switches aws-lc-rs to its CMVP-validated build for the algorithms it covers. PQ signatures always use non-validated crates. LatticeArc itself is **not** a CMVP-certified module.\n\n| Category | Algorithms | Backend |\n|----------|-----------|---------|\n| **PQ Key Encapsulation** | ML-KEM-512/768/1024 (FIPS 203) | aws-lc-rs — FIPS 140-3 validated with `--features fips` |\n| **PQ Signatures** | ML-DSA-44/65/87 (FIPS 204) | fips204 — NIST-conformant, not CMVP-validated |\n| **PQ Hash Signatures** | SLH-DSA (FIPS 205) | fips205 — NIST-conformant, not CMVP-validated |\n| **PQ Lattice Signatures** | FN-DSA-512/1024 (draft FIPS 206) | fn-dsa — NIST-conformant, not CMVP-validated |\n| **Classical Signatures** | Ed25519 | ed25519-dalek — audited |\n| **Classical Key Exchange** | X25519 | aws-lc-rs — FIPS 140-3 validated with `--features fips` |\n| **Symmetric Encryption** | AES-256-GCM | aws-lc-rs — FIPS 140-3 validated with `--features fips` |\n| **Symmetric Encryption** | ChaCha20-Poly1305 | chacha20poly1305 — non-FIPS |\n| **Hash** | SHA-2 (256/384/512) | RustCrypto `sha2` — widely reviewed, NOT CMVP-validated. `--features fips` does NOT swap SHA-2 to aws-lc-rs. |\n| **Hash** | SHA-3, BLAKE2 | sha3 / blake2 crates — non-FIPS |\n| **KDF** | HKDF-SHA256 | aws-lc-rs — FIPS 140-3 validated with `--features fips` |\n\n\u003e Details: [Algorithm Selection Guide](docs/ALGORITHM_SELECTION.md) · [NIST Compliance](docs/NIST_COMPLIANCE.md)\n\n### Architecture\n\nThe unified API sits over a small set of composite operations, which sit over the NIST primitives, which sit over their backends:\n\n```mermaid\nblock-beta\n    columns 3\n\n    block:API[\"Unified API\"]:3\n        columns 3\n        encrypt[\"encrypt()\"] decrypt[\"decrypt()\"] sign[\"sign_with_key()\"]\n    end\n\n    block:CONFIG[\"Configuration\"]:3\n        columns 3\n        cc[\"CryptoConfig\"] mode[\"CryptoMode\"] level[\"SecurityLevel\"]\n    end\n\n    block:HYBRID[\"Hybrid \u0026 PQ-Only Encryption\"]:2\n        columns 2\n        henc[\"hybrid\\nML-KEM + X25519\\n+ HKDF + AES-GCM\"]\n        pqenc[\"pq_only\\nML-KEM\\n+ HKDF + AES-GCM\"]\n    end\n\n    block:SIG[\"Signatures\"]:1\n        columns 1\n        hsig[\"ML-DSA + Ed25519\\nSLH-DSA · FN-DSA\"]\n    end\n\n    block:PRIM[\"Primitives\"]:3\n        columns 5\n        kem[\"ML-KEM\\nFIPS 203\"] dsa[\"ML-DSA\\nFIPS 204\"] slh[\"SLH-DSA\\nFIPS 205\"] fn[\"FN-DSA\\ndraft FIPS 206\"] sym[\"AES-GCM\\nX25519 · Ed25519\"]\n    end\n\n    block:BACK[\"Backends\"]:3\n        columns 3\n        awslc[\"aws-lc-rs\\n(FIPS opt-in)\"] fips204[\"fips204 · fips205\"] fndsa[\"fn-dsa · ed25519-dalek\"]\n    end\n\n    style API fill:#3b82f6,stroke:#1d4ed8,color:#fff\n    style CONFIG fill:#e2e8f0,stroke:#64748b\n    style HYBRID fill:#10b981,stroke:#059669,color:#fff\n    style SIG fill:#f59e0b,stroke:#d97706,color:#fff\n    style PRIM fill:#e2e8f0,stroke:#94a3b8\n    style BACK fill:#374151,stroke:#1f2937,color:#fff\n```\n\n---\n\n## Verification\n\nMulti-layered — each tier catches what the tier below cannot.\n\n### Proof-level\n\n| Tool | What it proves | Scope |\n|------|----------------|-------|\n| [SAW](https://github.com/awslabs/aws-lc-verification) (via aws-lc-rs) | Machine-checked correctness of C primitives | AES-GCM, HMAC, HKDF, SHA-2, ECDSA, ECDH — see [aws-lc-verification](https://github.com/awslabs/aws-lc-verification) for the up-to-date proof inventory |\n| [Kani](https://github.com/model-checking/kani) | Bounded model checking of Rust code | 30 proofs; 18 PR-blocking, full suite scheduled nightly |\n\n### Property-based, differential, attacker-chosen\n\n| Tool | What it catches |\n|------|-----------------|\n| [Proptest](https://proptest-rs.github.io/proptest/) | Roundtrip, non-malleability, single-bit rejection invariants (40+ properties × 256+ cases) |\n| Cross-impl differential | ML-KEM (fips203 vs aws-lc-rs, 600 round-trips/run), ML-DSA (fips204 vs pqcrypto-mldsa), SLH-DSA (fips205 vs pqcrypto-sphincsplus) — 21 tests |\n| [Wycheproof](https://github.com/nicholasblaskey/wycheproof-rs) | 555 attacker-chosen vectors through our AES-GCM, ChaCha20-Poly1305, HMAC, HKDF wrappers |\n\n### Constant-time (3-way gate, weekly)\n\n| Tool | Methodology |\n|------|-------------|\n| Criterion | Qualitative wall-clock divergence between input classes |\n| [DudeCT](https://eprint.iacr.org/2016/1123) | Welch's t-test; per-bench gates — `\\|max t\\| \u003c 10` for HMAC verify (PRIMARY CT gate), `\\|max t\\| \u003c 50` for hybrid `ct_eq` (regression sentry — ctgrind is authoritative on this pure-Rust path). See [`.github/workflows/dudect.yml`](.github/workflows/dudect.yml) for rationale. |\n| ctgrind (Valgrind memcheck) | Marks secret bytes as uninit; fails on any branch or index depending on them |\n\n### DoS, fuzz, sanitizers\n\n- **Allocation budgets** — per-API-call ceiling on every crypto op, regression-gated via `stats_alloc`\n- **31 libfuzzer targets** — AEAD, KEM, signatures, KDF, serialization, DoS; weekly matrix; OSS-Fuzz scaffold in [`fuzz/oss-fuzz/`](fuzz/oss-fuzz/)\n- **`cargo-mutants --in-diff`** — 80% score floor, PR-blocking on changed crypto files\n- **Sanitizers** — ASan / TSan / LSan run weekly (Rust-side coverage); C-side uninitialized-read coverage for `aws-lc` lives in the upstream library's own CI, matching aws-lc-rs / ring / rustls / RustCrypto practice\n- **`#![forbid(unsafe_code)]`** enforced at workspace level\n\n\u003e Full proof inventory: [Formal Verification](docs/FORMAL_VERIFICATION.md)\n\n---\n\n## Security\n\nDesigned under the assumption that any single algorithm may be broken — hybrid mode ensures an attacker must defeat both components. Key material is zeroized on drop, tag comparisons run in constant time, secret types have manual `Debug` impls that redact contents.\n\n### Limitations\n\n- **Not a CMVP-certified cryptographic module.** No CMVP backend exists for PQ signatures. Use `--features fips` for the subset that routes through aws-lc-rs.\n- **Not independently audited.** Security researchers welcome to review.\n- **Pre-1.0.** API may change between minor versions; see [CHANGELOG.md](CHANGELOG.md). CLI environment variables documented in [`latticearc-cli/README.md`](latticearc-cli/README.md).\n\n### Reporting \u0026 upstream\n\n- Report security issues to **Security@LatticeArc.com** — see [SECURITY.md](SECURITY.md)\n- Upstream contributions: [aws-lc-rs#1029](https://github.com/aws/aws-lc-rs/pull/1029) (ML-KEM `DecapsulationKey` serialization, shipped in v1.16.0) · [aws-lc-rs#1034](https://github.com/aws/aws-lc-rs/pull/1034) (ML-DSA seed-based deterministic keygen, shipped in v1.16.0)\n\n---\n\n## Build\n\nRequires Rust 1.93+ and a C/C++ compiler. FIPS builds also need CMake and Go.\n\n```bash\ncargo build                       # default\nbrew install cmake go             # macOS, FIPS prerequisites\n# sudo apt install cmake golang-go build-essential  # Ubuntu\ncargo build --features fips       # FIPS-validated backend\n```\n\n| Error | Fix |\n|-------|-----|\n| `CMake not found` | Install CMake (FIPS only) |\n| `Go not found` | Install Go 1.18+ (FIPS only) |\n| `cc not found` (Linux) | `sudo apt install build-essential` |\n| Long initial build | First build compiles AWS-LC from source (~2-3 min) |\n\n### Cargo features\n\n| Feature | Default | Effect |\n|---|:---:|---|\n| `fips` | off | Routes AES-GCM, ML-KEM, X25519, HKDF through CMVP-validated aws-lc-rs. Required for `ComplianceMode::Fips140_3` / `Cnsa2_0`. SHA-2 stays on RustCrypto `sha2`. Transitively enables `fips-self-test`. |\n| `fips-self-test` | off | Power-up KAT self-tests for FIPS-boundary algorithms (ML-KEM, AES-GCM, ML-DSA, SLH-DSA). |\n| `tracing-init` | off | Exposes `init_tracing[_with_file]` helpers. Libraries must NOT enable this — subscriber init belongs in the binary. Enabled by `latticearc-cli`. |\n| `secret-mlock` | off | `mlock(2)` / `VirtualLock` for heap-backed `SecretVec` buffers — prevents swap and core-dump exposure. |\n| `kat-test-vectors` | off | **Test-only.** Exposes `AeadCipher::new_allow_weak_key` to reproduce NIST AES-GCM Test Cases 1 \u0026 2 (all-zero key). |\n\n### Migration\n\nLatticeArc is pre-1.0; each minor version may ship breaking changes. See [CHANGELOG.md](CHANGELOG.md) for the authoritative per-release breaking-change list with rationale.\n\n---\n\n## Documentation\n\n| Document | Description |\n|----------|-------------|\n| [Algorithm Selection Guide](docs/ALGORITHM_SELECTION.md) | Use-case tables, security-level mapping, compliance modes |\n| [Unified API Guide](docs/UNIFIED_API_GUIDE.md) | Zero-trust sessions, all 22 use cases, PQ-only mode |\n| [Key Format Specification](docs/KEY_FORMAT.md) | LatticeArc Portable Key (LPK) schema, JSON + CBOR |\n| [Ecosystem Map](docs/ECOSYSTEM.md) | Comparison with OpenSSL, aws-lc-rs, liboqs, RustCrypto, age, Sequoia |\n| [NIST Compliance](docs/NIST_COMPLIANCE.md) | Per-algorithm FIPS conformance status |\n| [Formal Verification](docs/FORMAL_VERIFICATION.md) | Complete Kani proof inventory |\n| [Design \u0026 Architecture](docs/DESIGN.md) | Crate structure, module boundaries, design decisions |\n| [Design Patterns](docs/DESIGN_PATTERNS.md) | Config, crypto safety, and testing patterns |\n| [CLI Reference](latticearc-cli/README.md) | Full `latticearc-cli` command reference |\n\n## License \u0026 Contributing\n\nApache 2.0 — see [LICENSE](LICENSE). Contributions welcome; see [CONTRIBUTING.md](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatticearc%2Flatticearc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flatticearc%2Flatticearc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatticearc%2Flatticearc/lists"}