aboutsummaryrefslogtreecommitdiff
path: root/crates/chat-crypto/README.txt
blob: e04246c92f44f11e0db1fc7510dd62c86d4ab1f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Copyright (C) 2026 Doan Luu Duc Tai <doan@luuduct.ai>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.


PRIVATE CHAT CRYPTOGRAPHY

    Fixed encryption: RFC 9980 ML-KEM-1024 + X448, OpenPGP v6.
    Signing: ML-DSA-87 + Ed448, OpenPGP v6.
    Backend: Sequoia 2.4.2 with OpenSSL 3.6.5. No algorithm substitution or
    vulnerability-advisory exception was used. The original RustCrypto backend
    is historical and no longer selected.

    This crate implements purpose-specific identity creation, Argon2id/AES-256-GCM
    protected files, detached authentication proofs, signed two-recipient messages,
    bounded verified history batches, and the original compatibility probe.
    Native Rust and browser WASI share the implementation. The standalone command
    accepts one JSON request on stdin; empty input runs the compatibility probe.
    Its browser WASI host grants no filesystem or network access. Private request
    data must remain in local memory and must never be submitted to the server.

    See ../../docs/CHAT-APPLICATION.txt for implemented formats, local setup,
    tests, backups, and limitations. Work remains experimental and local on
    feature/private-chat. Production remains unchanged. Do not mistake the
    compatibility probe for an application security audit.

    ../../docs/CHAT-OPENSSL-MIGRATION.txt records the complete backend decision,
    pinned source hashes, build flags, FFI/capability limitations, and reviewed
    dependency-policy exceptions. ../../docs/CHAT-SECURITY-REVIEW.txt records
    the superseded RustCrypto findings without advisory ignores.

CHECKS FROM THE WORKSPACE ROOT

        cargo test --locked -p stack-chat-crypto
        cargo run --locked -p stack-chat-crypto
        sh infra/chat/build-openssl-wasi.sh
        PLAYWRIGHT_BROWSERS_PATH="$PWD/.tools/browsers" node crates/chat-crypto/tests/browser.mjs
        cargo stack check

    Native builds require OpenSSL >=3.5 development files and libclang.
    The cross-build script supports an x86_64 GNU/Linux development host.
    Browser tooling is excluded from the public source tree and releases.
    The probe uses public fixture credentials and creates temporary identities
    in memory. It does not open the root .env or use the canonical RSA key.