ENCRYPT — “CHATLOG LibCrypt” — the React-orbit stream cipher — NOT DEPLOYED
NOT DEPLOYED — complete in source; registers itself as the “encrypt” library in design; no code onchain
[chain].
1. Identity
| Source | lib/encrypt.sol (contract ENCRYPT, “CHATLOG LibCrypt”/“LibCrypt”) |
| Onchain | absent [chain]; announced as design intent in the IRC log |
| months before/around the kernel `[irc: lines 50041, 70617 — corroboration | |
| only]` |
2. Role
A message-layer stream cipher between two registered users: Encrypt(from, to, key, data) XORs the plaintext against a keystream generated by
ALTERNATING Rod/Cone React steps between the two parties’ SHIOs; ciphertexts
expire in 10 days and are pruned. Party-gated both directions (NotParty
unless the caller’s SHIO ownership checks pass). Saat(bytes) folds any
bytes into three uint64 “chromosomes” (the ≥18-byte input check).
Security posture: NOT confidentiality in the cryptographic sense — the keystream is a public orbit over world-readable state (SHA.View exposes Secret; MotzkinPrime ≈ 2^49.8). What it provides: permissioning (only the two parties’ SHIO owners), co-evolution commitment (the keystream depends on the pair’s actual shared call history — unforgeable without performing it), and ephemerality (10-day expiry + Prune — sealed against casual observation, cheap to store).
3. Dependencies
Constructed with VOID; reaches ZHENG for Bao lookups by soul; Reacts both parties’ SHAs.
4. State
Zheng, Void, _encryptions (index → {Data, Expiry}), _indexes
(capped at MotzkinPrime entries — TooManyCrypts).
5. Functions
Function table extracted mechanically from lib/encrypt.sol. Gate: public = anyone · owners = MultiOwnable set, msg.sender OR tx.origin · bouncers = QING bouncer rule · single-owner = classic owner · deployer = constructor wiring. meter = the call self-mints one unit via _mintToCap() (a call-counter against the constructor-lottery maxSupply).
| signature | gate | meter | events | reverts |
|---|---|---|---|---|
constructor(address VoidAddress) |
deployer | meter | — | — |
Encrypt(uint64 From, uint64 to, string memory Key, string memory Data) returns (uint64 index) |
public | meter | — | — |
Encapsulate(Bao memory From, uint64 Gamma, uint64 Rho, uint64 Upsilon, uint64 Ohm) returns (uint64 Entropy, bytes memory Geng) |
public | meter | — | — |
Saat(bytes memory Geng) returns (uint64[3] memory Go) |
public | — | — | ChromosomeLength |
Encrypt(uint64 From, uint64 to, bytes memory Key, bytes memory Data) returns (uint64 index) |
public | meter | — | NotParty |
Crypt(Bao memory From, Bao memory to, bytes memory Key, bytes memory Data) returns (uint64 indexable, bytes memory result) |
internal | meter | — | TooManyCrypts |
Decrypt(uint64 From, uint64 to, uint64 Index, string memory Key) returns (bytes memory) |
public | meter | — | — |
Prune() |
public | meter | — | — |
Decrypt(uint64 From, uint64 to, uint64 Index, bytes memory Key) returns (bytes memory result) |
public | meter | — | NotParty |
hashKey(bytes memory Key) returns (uint64 result) |
public | meter | — | — |
Errors declared: NotParty(address from, address to, address party) · ChromosomeLength(uint8 minimum, uint256 length) · TooManyCrypts(uint64 max, uint256 count)
Effects: Crypt (internal) — the alternating loop: Rod.React(hashKey(key),
cone.Channel) seeds; per 8 bytes Cone.React then Rod.React advance the
keystream; indexable = the final _e. hashKey = keccak(key) mod
MotzkinPrime. Decrypt recomputes the same stream and deletes on expiry
read. Encapsulate is the self-to-self variant folding Gamma/Rho/Upsilon/
Ohm into chromosomes. Overloads Encrypt/Decrypt(string Key, …) wrap the
bytes forms.
6. Integration notes
- Reference-only. Indexes are uint64 keystream states, not sequential ids —
_indexesis the enumeration surface. - If it ever deploys as designed, it would self-register as VOID’s “encrypt” library.
7. Provenance
- [src]
lib/encrypt.sol. - [chain] absence probes; [irc] corroboration (index in 07-semantics §8).