Kiến trúc
Architecture
Sơ đồ tổng thể v1.0
v1.0 overview map
Ngày của từng lần cập nhật ghi ở Changelog của trang chủ. Mỗi tuyên bố ghi kèm mức bằng chứng.
The date of each update is in the Changelog on the home page. Each claim states its evidence level.
Trạng thái. Trang này mô tả bản đang chạy, phát hành ngày 2026-12-02. Mục chưa đo trên production ghi chờ xác minh sau phát hành. Tổng quan.
Status. This page describes the running build, released on 2026-12-02. Items not yet measured on production read awaiting post-release verification. Overview.
Luồng sử dụng
Usage flow
profileid riêng (ứng dụng cùng dự án, cùng chế độ nhận cùng mã)profileid per project × profile mode (apps in the same project using the same mode share it)- Consent theo phạm vi; token ngắn hạn, dùng một lần (mặc định khoảng 5 giây)
- Không xuất RootID, khoá hay salt cho ứng dụng
- SAHEYLU là ứng dụng, không phải cổng trung gian
- Scoped consent; short-lived one-time token (about 5 s by default)
- No RootID, key or salt is ever given to apps
- SAHEYLU is an app, not a gateway
L0 · Authentication & Unlock
userKEY = 32 byte ngẫu nhiên, bọc trong Provider Card32 random bytes, wrapped in the Provider CarduserKEY → pk, vsbind = userBIND(pk) = sha256(sha256(pk))RootID = sha256(pk)[0:32]VaultKEY = HKDF(pk, vs, bind)Hệ thống Core · lưu trữ mù
The service Core · blind storage
container_salt (mã hoá)protected by VaultKEY; holds container_salt (encrypted)container_id = sha256(RootID ‖ "|" ‖ container_salt)[0:32]asset_salt (mã hoá)partitioned by purpose, access, lifecycle; holds route + asset_salt (encrypted)asset_id = sha256(container_id ‖ "|" ‖ asset_salt)[0:32]Cơ sở dữ liệu (đang chạy, 5 bảng)
Database (live, 5 tables)
users: định danh mù, khoá bọc, Vault và bản dự phòng (không chứa phiên)user_providers: thẻ đăng nhập (hash tra cứu, bản mã), không trỏ vềusersvault_containers: Container L2, không mappingvault_project_assets: Asset L3, không mappingsettings: cấu hình hệ thống- Không có cột/bảng liên kết cha–con (user_id, owner_id, parent_id…). Phạm vi: không có bảng hay khoá nối trực tiếp trong CSDL; liên kết qua tên, ảnh, IP, thời điểm là giới hạn riêng (xem Giới hạn)
- AES-256-GCM cho dữ liệu và route; hash định vị hàng không mã hoá
users: blind identity, wrapped keys, the Vault and its backup copy (no sessions)user_providers: sign-in cards (lookup hash, ciphertext), no pointer tousersvault_containers: L2 Containers, no mappingvault_project_assets: L3 Assets, no mappingsettings: system configuration- No parent–child link column/table (user_id, owner_id, parent_id…). Scope: no direct linking table or key in the database; linking through name, photo, IP or timing is a separate limit (see Limitations)
- AES-256-GCM for data and routes; row-locating hashes are not encrypted
ASH · Autonomous Self-Healing (đã phát hành, chưa bật)(released, not enabled)
- Trạng thái: ASH thế hệ mới có trong mã đang chạy nhưng chưa bật (sổ mốc chưa khởi tạo); trong lúc chưa bật, không có lớp phát hiện và khôi phục nào dưới đây hoạt động. Căn cứ trước phát hành: test và diễn tập trong môi trường thử với R2 mô phỏng. Phát hiện, phục hồi, R2 thật và Object Lock: chờ xác minh sau phát hành.
- Status: the new-generation ASH is in the running code but not enabled (the ledger is not initialised); while it is off, none of the detection and restore layers below operate. Pre-release basis: tests and rehearsal in a test environment with a simulated R2. Detection, restore, real R2 and Object Lock: awaiting post-release verification.
- Căn cứ độ mới: hai tệp sổ mốc (A/B) trên máy chủ, ngoài thư mục web, chỉ thêm bản ghi; không còn tin “lần đầu thấy” (TOFU).
- Phát hiện → Cô lập: mỗi lần đọc một hàng được bảo vệ, so với sổ mốc; hàng lệch không được phục vụ.
- Khôi phục: bản sao bản mã từng hàng gửi lên R2 theo lô 15 phút, mọi đối tượng cùng cỡ; đó không phải sao lưu toàn hệ thống.
- Đóng khi lỗi: không xác minh được toàn hệ thống thì trả 503; bộ gửi dừng hoặc hàng chờ đầy thì từ chối lệnh ghi được bảo vệ.
- Chỉ khôi phục bản mã: không làm sống lại quyền đã thu hồi hay cấu hình đã vô hiệu.
- Freshness basis: two append-only ledger files (A/B) on the server, outside the web root; no trust-on-first-use (TOFU).
- Detect → Isolate: each read of a protected row is checked against the ledger; a mismatching row is not served.
- Restore: a per-row ciphertext copy is uploaded to R2 in 15-minute batches with equal-size objects; this is not a whole-system backup.
- Fail closed: if the system as a whole cannot be verified it returns 503; if the sender is down or its queue is full, protected writes are refused.
- Restores ciphertext only: revoked permissions or disabled configuration are never brought back.
Trạng thái hiện nay
Current status
- Định danh, L1, L2, L3, Consent, mở khoá bằng khoá phía người dùng: đang chạy; chờ xác minh sau phát hành
- Tự phục hồi (sổ mốc + R2): chưa bật (sổ mốc chưa khởi tạo)
- Backup: chưa có bản sao lưu toàn hệ thống ngoài máy; bản sao từng hàng trên R2 không phải sao lưu toàn hệ thống
- L4 Node: chưa triển khai
- Identity, L1, L2, L3, Consent, unlocking with user-held keys: running; awaiting post-release verification
- Self-healing (ledger + R2): not enabled (ledger not initialised)
- Backup: there is no off-host whole-system backup; the per-row R2 copies are not a whole-system backup
- L4 Node: not implemented
Giới hạn hiện tại
Current limits
- Máy chủ đang chạy thấy khoá khi người dùng đăng nhập: Hệ thống không phải zero-knowledge.
- Giới hạn của tự phục hồi: kẻ ghi được cả cơ sở dữ liệu lẫn sổ mốc, hoặc có root lúc chạy, nằm ngoài phạm vi; mất cả hai tệp sổ mốc thì hàng riêng không phục hồi được; toàn hệ thống có trần số lần ghi được bảo vệ mỗi giờ.
- Truyền dữ liệu: HTTPS qua Cloudflare (Cloudflare giải TLS)
- Xem đầy đủ ở Giới hạn
- The running server sees keys while users are signed in: The service is not zero-knowledge.
- Self-healing limits: someone able to write both the database and the ledger, or with root while it runs, is out of scope; losing both ledger files makes private rows unrecoverable; the whole system has an hourly ceiling on protected writes.
- Transport: HTTPS through Cloudflare (Cloudflare terminates TLS)
- Full list: Limitations
Một danh tính gốc, mỗi dự án và mỗi chế độ hồ sơ một mã riêng (ứng dụng cùng dự án, cùng chế độ nhận cùng mã). Trạng thái và mức bằng chứng từng cơ chế: Bảo mật; mục chưa đo trên production của bản đang chạy ghi chờ xác minh sau phát hành.
One base identity, a separate code per project and profile mode (apps in the same project using the same mode receive the same code). Status and evidence level per mechanism: Security; items not yet measured on production of the running build read awaiting post-release verification.
Tầng dữ liệu L0–L4Data layers L0–L4
| Tầng | Layer | Ranh giới mật mã | Cryptographic boundary | Ranh giới tra cứu | Lookup boundary | Phạm vi khi bị lộ | Compromise scope |
|---|---|---|---|---|---|---|---|
| L0 Danh tính & mở khoá (đăng nhập Google → thẻ → khoá người dùng); tiền tầng, không tính vào cây dữ liệu | L0 Identity & unlock (Google sign-in → card → user key); a pre-layer, not part of the data tree | Thẻ đăng nhập chỉ mở bằng bí mật của chính người dùng: thiết bị đã dùng, mã khôi phục; Google chỉ xác thực | The sign-in card opens only with the user’s own secret: a used device, the recovery code; Google only authenticates | Tìm hàng đăng nhập bằng hash có khoá | Sign-in rows are looked up by a keyed hash | DB + mọi bí mật máy chủ: theo thiết kế mở 0 tài khoản (B11/B12; test trong môi trường thử, chờ xác minh sau phát hành). Chiếm máy chủ đang chạy: thu khoá của phiên đang hoạt động | DB + every server secret: by design opens 0 accounts (B11/B12; tested in the test environment, awaiting post-release verification). Taking over the running server: collects keys of active sessions |
| L1 Vault | L1 Vault | Khoá Vault của người dùng | The user’s Vault key | Không có bảng ánh xạ người dùng → Container | No user → Container mapping table | Chỉ DB: 0 quan hệ Container lộ ra (đo trên bản trước; đo lại chờ xác minh sau phát hành) | DB only: 0 Container relations exposed (measured on the previous build; re-measurement awaiting post-release verification) |
| L2 Container | L2 Container | Khoá riêng từng Container | Per-Container key | Không suy ra Asset từ DB; độ dài route lộ số Asset (giới hạn thấp) | Assets cannot be derived from the DB; route length reveals the Asset count (low limit) | Lộ một Container chỉ mở Container đó | A leaked Container opens only that Container |
| L3 Asset (dự án): phần cấu hình SSO + phần riêng của chủ | L3 Asset (project): SSO config part + owner’s private part | Bản đăng ký SSO: hàng riêng, khoá dẫn từ khoá tầng đăng ký; máy chủ đọc được để xác thực đăng nhập. Phần riêng: khoá của chủ | SSO registration: its own row, keyed from the registration-layer key; the server reads it to authenticate sign-ins. Private part: the owner’s key | Mã dự án công khai = DerivedID(asset_id, "eywal:apps:v1") | Public project code = DerivedID(asset_id, "eywal:apps:v1") | Mọi khoá máy chủ: phần riêng không mở được và không định vị được; ghi lại bản cũ: sổ mốc phát hiện (test trong môi trường thử, chờ xác minh sau phát hành) | Every server key: the private part can be neither opened nor located; replaying an old version is detected by the ledger (tested in the test environment, awaiting post-release verification) |
| L4 Node | L4 Node | NOT VERIFIED (chưa triển khai)NOT VERIFIED (not implemented) | |||||
Số tầng không phải số lớp bảo mật độc lập.
The number of layers is not the number of independent security layers.
Ai giữ gì và ai thấy gì (người dùng, cơ sở dữ liệu, bí mật máy chủ, máy chủ đang chạy, trung gian mạng, ứng dụng), kèm trạng thái từng điểm: xem Bảo mật.
Who holds what and who sees what (user, database, server secrets, running server, network intermediary, app), with the status of each point: see Security.
Derived Identity & Blind Relationship
Derived Identity & Blind Relationship
Hệ thống không lưu liên kết cha–con trực tiếp; hệ thống tính đường liên kết khi được mở khoá hợp lệ. Không có bảng hay cột mapping cha–con. Salt định tuyến nằm trong bản mã của tầng cha; chỉ khi mở khoá hợp lệ, hệ thống mới dùng bí mật tầng cha và salt để tính DerivedID, rồi định vị bản ghi con bằng hash. Theo thiết kế, DerivedID chỉ tính khi chạy, không lưu trong CSDL và không trả qua API (theo đọc mã và test); chưa kiểm hết nhật ký, và máy chủ đang chạy vẫn thấy các giá trị này (EYWAL-SEC-008). Thông tin định tuyến mã hoá vẫn được giữ để chủ thể truy cập lại.
The service does not store parent–child links; it computes the path when validly unlocked. There is no parent–child mapping table or column. Routing salts live inside the parent layer's ciphertext; only after a valid unlock does the system use the parent secret and salt to compute DerivedID and locate the child row by hash. By design, DerivedID is computed only at runtime, is not stored in the database and is not returned through the API (per code review and tests); logs have not been fully checked, and the running server still sees these values (EYWAL-SEC-008). The encrypted routing data remains so the owner can access it again.
L1 Vault RootID + container_salt ┊ runtime, no stored mapping ▼ container_id = DerivedID(RootID, container_salt) L2 Container container_id + asset_salt ┊ runtime, no stored mapping ▼ asset_id = DerivedID(container_id, asset_salt) L3 Asset row located by sha256(id)
| Mapping trực tiếp | Direct mapping | DerivedID | |||
|---|---|---|---|---|---|
| Quan hệ cha–con | Parent–child link | Cột hoặc bảng liên kết | Column or join table | Salt định tuyến mã hoá trong tầng cha | Routing salt encrypted in the parent |
| DB lưu gì | What the DB holds | ID cha/con hoặc quan hệ rõ | Parent/child ids or plain links | Hash định vị hàng, bản mã, metadata | Row-locating hash, ciphertext, metadata |
| Chỉ có DB | DB only | Nối được nếu mapping đọc được | Linkable if the mapping is readable | Không tái dựng được trong phạm vi đã kiểm thử | Not reconstructable within the tested scope |
| Suy ngược con → cha | Child → parent | Có thể | Possible | Không, theo giả định mật mã hiện hành | No, under current cryptographic assumptions |
Mô hình bảo vệ & trạng thái
Protection model & status
Cơ sở dữ liệu không có bảng ánh xạ để dựng lại cây dữ liệu. Kẻ có bản chụp cơ sở dữ liệu cùng toàn bộ bí mật máy chủ: theo thiết kế không mở được tài khoản nào, vì khoá chỉ mở bằng bí mật của chính người dùng (B11/B12); phần cấu hình đăng nhập của dự án thì đọc được nếu biết mã dự án, nhưng không suy ra được dữ liệu riêng (B13). Các thuộc tính này có test tấn công có đối chứng trong môi trường thử; trên production chờ xác minh sau phát hành. Kẻ kiểm soát máy chủ đang chạy vẫn là giới hạn.
The database has no mapping table from which to rebuild the data tree. Someone with a database snapshot plus every server secret: by design opens no account, because keys open only with the user’s own secret (B11/B12); a project’s sign-in configuration is readable if its id is known, but the private data cannot be derived from it (B13). These properties have attack tests with controls in the test environment; on production they are awaiting post-release verification. Someone controlling the running server remains a limit.
Trạng thái từng cơ chế (kèm mã yêu cầu và mức bằng chứng) nằm ở ma trận tuyên bố trong Security & Trust.
Per-mechanism status (with requirement IDs and evidence level) is in the claims matrix on Security & Trust.