regula_core

The signing-and-verification core of the Jero node and CETI.

1. What regula_core is

regula_core is the signing-and-verification core of the Jero node and CETI. It is the layer that decides what counts: nothing counts until it is signed and the signature verifies.

The rule, stated plainly: if it is not signed, it is not accepted. If the signature does not verify against the claimed identity, it is refused.

2. How it functions as a node

One key

Each node holds one key: a 32-byte secp256k1 secret, drawn from the operating system's cryptographic random source and valid only if it lies within the curve order (0 < k < n). The public key is published uncompressed — 65 bytes, 0x04 || X || Y. The private key never leaves the node; only the public key and its hash are shared.

Signatures

Signatures are ECDSA on secp256k1 over double-SHA256 (SHA256d), DER-encoded — the Bitcoin 0.1 style. To sign, the node hashes the canonical payload twice and signs the digest; to verify, any peer needs only the public key. Signatures are deterministic (RFC 6979) in the CETI implementation.

digest    = SHA256d(canonical payload bytes)
signature = ECDSA_secp256k1(digest)   # DER-encoded

Node identity

The node identity is derived from the public key by hashing, never assigned by a server:

node id = jn1 + hex(HASH160)
HASH160 = RIPEMD160(SHA256(public key))

The node id names a node, never money: no version-0x00 payment address is emitted. The fingerprint is the first 12 hex characters of the HASH160, grouped as four-four-four: JERO-XXXX-XXXX-XXXX on the Jero node, and a CETI- prefix on CETI nodes (CETI-XXXX-XXXX-XXXX). Because identifiers are re-derived from the public key, a claimed fingerprint or node id that does not match its key is caught on verification.

Signed envelopes + ledger

Between peers, everything travels as a signed envelope:

On each node, the append-only ledger records events as a local chain of signatures: each event is signed, carries the hash of the previous event, and is hashed with its signature to form its event hash. The block chain (CRegulaBlock / regula_core in the Jero node) goes further: each block commits the double-SHA256 of its canonical header and payload, is signed with the sysop key, and is chained by previous hash to the block before it. Verification re-checks every link: hashes, previous-hash pointers, and signatures.

block_hash = SHA256d(canonical(header || payload))
sysop_sig  = ECDSA_secp256k1(block_hash)

Write gate

Agents propose, only the sysop signs. Agents and uploads sit in a queue as pending (uploads as unvalidated) until the sysop — security level 255, holder of the node key — signs or rejects them. Rejected items never enter signed history: a rejection is logged, but the rejected item never becomes a signed event and never becomes the previous hash of anything after it.

Signed posts, bundles, and nodelist

Key auth

Authentication is challenge/response on the same key — no passwords, no shared secrets, no central server:

  1. The verifier issues a fresh challenge (node id + random nonce + timestamp).
  2. The holder signs the fresh challenge with the node key.
  3. The verifier verifies the signature against the public key.

A signature for one challenge authenticates nothing else: the nonce and timestamp bind it to that challenge.

Private messages

Private envelopes add encryption on top of the same signature:

shared = ECDH(sender_priv, recipient_pub) on secp256k1
key    = HKDF-SHA256(shared, salt="jero-peer-v1")
body   = AES-256-GCM(key, nonce || ciphertext || tag)

The scheme is ECDH on secp256k1, HKDF-SHA256, AES-256-GCM. The signature authenticates, encryption covers only confidentiality: a private envelope still proves who sent it, and the encryption only keeps its contents from anyone else.

3. Why it is needed for sovereign AI

regula_core proves three things about every piece of a node's record — authorship, order, and acceptance:

It proves all three without trusting a host or platform. Verification needs only the public key and the bytes: any peer can check a signature, a chain, or a bundle without asking a server, an account system, or a vendor whether it is real. Private keys stay on the node — the secret never leaves the machine that owns it, and signatures prove possession without revealing it.

Sovereignty as a threat model. The node remains useful when a hosted model is busy or gone. If a hosted model goes away, the signed local record still verifies — the history, the authorship, and the sysop's approval all survive the disappearance of any platform, because none of them ever depended on one.

4. Origin

The records describe regula_core inside Jero node 0.1, a local-first retro BBS node for personal AI memory: one node, a local board, a genesis file, keys, and a signed log — memory that stays on the node, with outside models as workers, not homes.

The records describe no earlier named project behind regula_core, and none is invented here. No earlier history is claimed for it. What the records show is regula_core as the signing-and-verification core of the Jero node, carried forward into CETI on the same key, the same signature scheme, and the same rule: nothing counts until it is signed and the signature verifies.