Frontier projects
pcea
Prime Circular Encryption Algorithm
Purpose within the whole
A reviewed project purpose has not yet been declared.
Repository self-description · exact-head projection
MSDMD
Collection pcea_msdmd.ts at 1595842abd1a. The repository remains source authority; this page only projects it.
Refresh reads the repository's current public HEAD without mutating it. The build-time exact-head projection remains the fallback.
Repository-owned reading surface
Documentation
README and Markdown documentation are copied from the exact repository head recorded by this site build. A live refresh can replace this view with the repository's current public HEAD for this browser session.
README · 1595842abd1a
PCEA — Prime Circular Encryption Algorithm
Pure-Python, zero-runtime-dependency library implementing the stable PCEA symmetric state transform.
Scope
PCEA encrypts pre-quantized integer neural architecture state using synchronized prior state. Runtime state is a list of seeds; each seed is a 7×7 integer array: 7 circles × 7 tensors.
For each value at (seed_idx, circle_idx, tensor_idx), PCEA selects a prime base from the fixed 53-prime circle, maps the signed value into a fixed-width unsigned Möbius-disk position, encodes it in fixed-width base-p digits, derives key digits from synchronized previous-state contributors plus the hierarchical address, shifts modulo p, and reconstructs the encrypted integer.
encrypt: e_j = (v_j + k_j) mod p
decrypt: v_j = (e_j - k_j) mod p
Fixed-width encoding prevents output digit count from exposing the plaintext magnitude class. word_bits must be large enough for the caller’s signed range and must match between sender and receiver.
State and synchronized prior-state cells must be exact Python int values inside the signed word_bits range. KDF fields use a versioned, length-delimited binary integer encoding; arbitrary objects are never canonicalized through str(value). This transcript change is intentionally incompatible with ciphertext produced by the former text-encoded KDF.
Usage
from pcea import PCEAInstance, decrypt_state, encrypt_state
seed0 = [[0 for _ in range(7)] for _ in range(7)]
last_state = [seed0]
state1 = [[circle * 10 + tensor for tensor in range(7)] for circle in range(7)]
state2 = [[100 + circle * 10 + tensor for tensor in range(7)] for circle in range(7)]
encrypted = encrypt_state([state1], last_state)
assert decrypt_state(encrypted, last_state) == [state1]
enc = PCEAInstance(seed=last_state)
dec = PCEAInstance(seed=last_state)
assert dec.decrypt(enc.encrypt([state2])) == [state2]
PCEA ↔ UCNS boundary
PCEA is specified to decrypt/invert via keys and not through UCNS inverse operations.
- PCEA consumes forward arithmetic substrate behavior only.
- Security rests on key management: synchronized/protected
last_state, approved secret generation, and correct session handling. - A mismatch in key state must fail recovery by design.
- No claim of cryptographic hardness is inherited from UCNS geometry, factorization, gonols, or research harnesses.
tests/test_contract_spec.py is the release gate for this boundary; .github/workflows/contract-boundary.yml runs it on pull requests and pushes to main.
Research boundary
Mutable PCEA research no longer lives in this repository. The former pcea-ucns/ proving ground, its research-only tests, and research record were deprecated here and replaced by the active workspace:
The-Interdependency/stack/research/pcea/
pcea-ucns/README.md remains only as a tombstone for old links. Historical research remains recoverable from Git history at pcea@ecf2ca0dec38bef29382e02121b0edde66763aa9; stack records the exact migration provenance and blob identities.
Completed, bounded behavior may return to this repository only through an explicit source change with its own tests and review. Research survival does not transfer security standing.
Verification
python -m pytest -q
python -m pytest -q tests/test_cipher.py tests/test_codec.py tests/test_kdf.py tests/test_instance.py tests/test_contract_spec.py
Install
pip install .
pip install ".[dev]"
Python >=3.9; runtime dependencies: none.
License
MIT. See LICENSE.
Repository documents
The static page indexes exact-head documents without duplicating their full bytes into the site artifact. Use Refresh MSDMD + docs above to render the current public copies here.
Documentation provenance
Public surfaces
hmmm
Editorial project role is inferred from public GitHub metadata until a reviewed .interdependency/project.yml is added.
hmmm
Project maturity has not been explicitly declared.