SlopScore
00 crowd

Manifold_Trajectory_Cipher_Research_V2

a vibe coded experimental cryptopgraphic research project exploring whether a nonlinear dynamical system built from prime-field arithmetic and manifold-inspire high-dimensional state space
Open repo on GitHubgithub.com/ie3ni/Manifold_Trajectory_Cipher_Research_V2
Python · ★ 1 · 0 forks · MIT · paperwork by the Cap'mmostly ai (inferred)light human (inferred)works-on-my-machine (inferred)other
listed 1 hour ago by ie3ni · last checked 1 hour ago
The owner didn't write this. This repo never submitted itself. The Cap'm found it on a truffle trawl and wrote its paperwork from what GitHub already shows. Picked by hand by the Cap'm on 2026-10-12: a vibe coded experimental cryptopgraphic research project exploring whether a nonlinear dynamical system built; its own README says "a vibe coded experimental cryptopgraphic research project exploring whether a nonlinear dynamical system built from prime-field arit". 1 stars; MIT license. The owner did not submit this. Votes count; awards don't until the owner claims it.

I'm not calling your project slop! Geeze, it's a joke... Do you own this repo?

Log in with GitHub as ie3ni. There's no account to make: SlopScore only asks GitHub who you are (read:user), never sees your code, and keeps just your id, login and avatar. Then you can:

  • Keep it, on your terms. Commit your own slopscore.md (spec) and press Refresh. Your paperwork replaces the Cap'm's, and you can submit it for Slop of the Day.
  • Take it down. One click on Remove. It stays gone; the trawl never brings it back.

Log in with GitHub

Can't log in as the owner? Request a takedown. No login needed, and a trawled listing comes down right away.

GitHub says
a vibe coded experimental cryptopgraphic research project exploring whether a nonlinear dynamical system built from prime-field arithmetic and manifold-inspire high-dimensional state space
created
2026-08-04 · pushed 2 months ago · 1 commits · 1 contributor
languages
Python 100%
paperwork
licensereadme 42% health
dependencies
no dependency graph (no manifest, or disabled) · OSV.dev, checked 1 hour ago

Disclosures, inferred by the Cap'm

slopbucket
vibe-coded
category
other
ai_generated
mostly
human_touch
light
status
works-on-my-machine
language (detected)
python
license (detected)
mit

The Cap'm's log

The Cap'm wrote this paperwork, not the owner. This repo never submitted itself to SlopScore. The Cap'm picked it by hand: a vibe coded experimental cryptopgraphic research project exploring whether a nonlinear dynamical system built; its own README says "a vibe coded experimental cryptopgraphic research project exploring whether a nonlinear dynamical system built from prime-field arit". It carries the MIT license. The disclosures above are his best guess from what GitHub shows.

Is this yours? Commit a real slopscore.md and press Refresh to replace this, or remove the listing in one click. There's no account to make: you log in with GitHub.

README — the repo's own words, folded up so the grading fits on one screen

Pure Manifold Trajectory Cipher (PMTC)

Research and educational use only. No warranty is provided regarding cryptographic security.
PMTC is not a replacement for AES-256, ChaCha20, XChaCha20, or any standardized cipher.


Overview

The Pure Manifold Trajectory Cipher (PMTC) is an experimental cryptographic research project exploring whether a nonlinear dynamical system — built from prime-field arithmetic, manifold-inspired high-dimensional state space, ARX transformations (Addition-Rotation-XOR), and cross-coupled state trajectories — can generate cryptographically useful keystreams.

Unlike conventional stream ciphers, PMTC treats encryption as the evolution of a high-dimensional nonlinear state manifold whose trajectory is continuously perturbed by ciphertext feedback.

This project was developed experimentally — including some AI-assisted or "vibe-coded" iteration — while exploring cryptography, software architecture, and the interaction between abstract mathematics and computation. It is presented openly as a learning and research project rather than as a claim of professional cryptographic validation.

Repository Lineage

This repository continues an earlier PMTC prototype of mine. It was initialized as a new repository after substantial changes to the cipher specification, testing framework, and research direction.

It is computationally heavy, so it may not have practical use cases. A possible future direction is to explore whether ideas from this symmetric-key experiment can inform public-key research.


Design Goals

  • Explore manifold-inspired nonlinear state evolution
  • Utilize prime-field arithmetic as a source of algebraic complexity
  • Introduce cross-coupled state trajectories
  • Investigate whether complex deterministic dynamics can produce cryptographically useful behavior
  • Probe behavior under statistical, differential, and prediction-style tests

High-Level Architecture

Genesis Seed
      ↓
PBKDF2-HMAC-SHA256 Key Derivation  (600,000 iterations)
      ↓
Prime Field Manifold Initialization (secondary PBKDF2, 10,000 iterations + 16 warm-up rounds)
      ↓
Nonlinear State Evolution
      ↓
  ┌─────────────────────────────────────────────┐
  │  Per Full Manifold Round:                   │
  │    Prime Field Round                        │
  │    × 6: ARX Quarter Round                  │
  │          Cross-Coupling Round               │
  │          Permutation Round                  │
  └─────────────────────────────────────────────┘
      ↓
Keystream Extraction  (2 manifold rounds + finalizer per byte)
      ↓
XOR Encryption + Ciphertext Feedback (2 manifold rounds per byte)
      ↓
HMAC-SHA256 Authentication

Internal State

The system maintains two interacting state spaces, totaling 12 state variables plus a counter (13 values total).

Prime Field States

Four variables, each evolving inside its own large prime field:

Variable Prime Modulus
x 2147483647
y 4294967291
z 9223372036854775783
w 18446744073709551557
MOD_X = 2147483647
MOD_Y = 4294967291
MOD_Z = 9223372036854775783
MOD_W = 18446744073709551557

Each state is initialized from the seed material and sanitized to be non-zero (zero is replaced with 1) before any rounds run.

ARX States

Eight 64-bit integer variables: a, b, c, d, e, f, g, h.

These provide fast diffusion and mixing across the full state space.


Genesis Seed

The Genesis Seed is the master secret from which all keys are derived.

9dc598e1de13406673664556e228a7bd89ca341818d1773f7c9442e4ef4e0061

It is a 64-character hex string (32 random bytes) generated via secrets.token_hex(32). The implementation rejects malformed or short seeds. It is never transmitted. Without it, decryption is infeasible under the assumptions of the experiment.


Key Derivation

Stage 1 — Main KDF

The Genesis Seed is processed with PBKDF2-HMAC-SHA256:

Parameter Value
Input Normalized Genesis Seed (ASCII hex)
Salt Random 16-byte salt
Iterations 600,000
Output 64 bytes

The 64-byte output is split into:

  • Bytes 0–31 → 32-byte encryption key
  • Bytes 32–63 → 32-byte authentication key

Stage 2 — Cipher Initialization KDF

Inside PureManifoldCipher.__init__, a second PBKDF2-HMAC-SHA256 pass is run:

Parameter Value
Input Encryption key
Salt Random 32-byte IV
Iterations 10,000
Output 64 bytes

This 64-byte seed material initializes all 12 state variables (x, y, z, w, a, b, c, d, e, f, g, h) and the counter. After initialization, 16 warm-up rounds are executed with payload byte 0xA5 to mix the state before any keystream is produced.


Cipher Layers

Prime Field Round

The primary source of nonlinear behavior. Each call updates all four prime-field variables using:

  • Modular exponentiation: pow(x, 3, MOD_X), pow(y, 5, MOD_Y), etc.
  • Modular inverse: native modular inversion via pow(v, -1, prime). If an inverse target is 0 mod p, the implementation substitutes 1 as a deterministic fallback, so that transition is a defined rule rather than a true inverse.
  • Cross-state interaction: ARX states feed into prime-field updates

Conceptually:

x(n+1) = f(x, y, z, w, a, counter, payload)

The modular inverse introduces strong nonlinearity while remaining deterministic:

a × a⁻¹ ≡ 1 (mod p)

ARX Quarter Round

Six ARX quarter rounds execute per full manifold round. Each round applies Addition, Rotation, and XOR to all eight ARX variables, with prime field states injected directly:

a = (a + b + x) & MASK64
d ^= a
d = rotl64(d, 32)

c = (c + d + y) & MASK64
b ^= c
b = rotl64(b, 24)
# ... continued across all 8 variables

ARX constructions provide fast mixing and are commonly used as diffusion layers. Their presence here does not by itself prove resistance to linear attacks.

Cross-Coupling Round

Executed once per ARX iteration, this layer directly ties the prime-field states into the ARX variables and vice versa:

a ^= ((x << 33) | y | m) & MASK64
b  = (b + rotl64(z & MASK64, 19) + m) & MASK64
g ^= rotr64((x * 0x9E3779B97F4A7C15) & MASK64, 31)

This is intended to make independent analysis of either subsystem harder by tying the update paths together.

Permutation Round

Executed once per ARX iteration. Variables are swapped and then mixed with rotations:

a, b, c, d = c, d, a, b
e, f, g, h = g, h, e, f

a ^= rotl64(e, 7)
b  = (b + rotr64(f, 11)) & MASK64
# ...

This increases diffusion and reduces the chance that local structure survives across rounds.

Full Manifold Round

One complete round consists of:

  1. One prime field round
  2. Six iterations of:
    • ARX quarter round
    • Cross-coupling round
    • Permutation round
  3. Counter increment
  4. State sanitization

Keystream Extraction

Per-Byte Cost

For each keystream byte, get_keystream_byte() executes two full manifold rounds before extracting:

self._full_manifold_round(0x00)
self._full_manifold_round(0x5A)
return self._extract_byte_from_manifold()

Extractor

The extractor combines the 12 state variables plus the counter with rotations and XOR, then applies a 3-step integer finalizer (similar to MurmurHash3/xxHash) to collapse the 64-bit combined value to a single output byte:

out = (a ^ rotr64(b,7) ^ rotl64(c,13) ^ rotr64(d,29)
       ^ e ^ rotl64(f,37) ^ rotr64(g,43) ^ h
       ^ x ^ y ^ z ^ w ^ counter) & MASK64

out ^= out >> 33
out  = (out * 0xff51afd7ed558ccd) & MASK64
out ^= out >> 33
out  = (out * 0xc4ceb9fe1a85ec53) & MASK64
out ^= out >> 33

return out & 0xFF

Encryption and Decryption

Encryption

For each plaintext byte:

ciphertext_byte = plaintext_byte XOR keystream_byte

After each byte is encrypted, mutate_manifold(ciphertext_byte) runs two additional full manifold rounds, injecting the ciphertext byte back into the state:

self._full_manifold_round(payload_byte)
self._full_manifold_round(payload_byte ^ 0xA5)

This creates ciphertext feedback: future state evolution depends on all previous ciphertext output.

Decryption

Decryption is structurally identical — the same ciphertext byte is used to mutate the manifold in both directions, keeping the state synchronized:

plaintext_byte = ciphertext_byte XOR keystream_byte
mutate_manifold(ciphertext_byte)   # same call as encryption

Token Format

The encrypted output is a Base64-encoded JSON package containing:

Field Description
header Cipher metadata (version, algorithm identifiers)
salt Base64-encoded 16-byte random salt
iv Base64-encoded 32-byte random IV
ciphertext Base64-encoded encrypted bytes
tag Base64-encoded HMAC-SHA256 authentication tag

The token format version used by main_2.py is 6.


Authentication

HMAC-SHA256 is computed over the concatenation of:

header_bytes || salt || iv || ciphertext

using the 32-byte authentication key derived in Stage 1. This detects tampering, modification attempts, and forged ciphertexts when the Genesis Seed is unknown. Authentication is verified before any decryption occurs.


Usage

Encryption

Create the project-local Python environment once after cloning:

python3 -m venv .venv

The shared PyCharm run configuration named PMTC v6 uses .venv/bin/python automatically.

.venv/bin/python main_2.py
[1] Enter existing Genesis Seed
[2] Generate new random Genesis Seed

[>] Select mode 1 or 2: 2

[+] Genesis Seed: 9dc598e1de13406673664556e228a7bd89ca341818d1773f7c9442e4ef4e0061

[>] Enter a message to encrypt: Hello World

[+] ENCRYPTED TOKEN:
eyJ...

Save both the Genesis Seed and the Encrypted Token. Both are required for decryption.

Decryption

python decrypt.py

Provide the Genesis Seed and the Encrypted Token. Decryption succeeds only if:

  • The HMAC tag is valid
  • The Genesis Seed is correct
  • The ciphertext has not been modified

Configuration & Testing

Active Cipher Module

The framework uses main_2.py as its sole cipher implementation:

# In security test scripts or decrypt.py
TARGET_CIPHER_MODULE = "main_2"

The decryptor and standalone security scripts are configured to use this module.

Running Test Suites

# Dependency-free regression and security-characterization suite
python -m unittest discover -s tests -v

# Structural avalanche, randomized prefix uniqueness, and tamper verification
python security_tests_attack.py

# N-gram prediction, position matrices, and distinguisher tests
python state_recovery_attack_test.py

# Basic and advanced smoke/security checks
python security_tests_basic.py
python security_tests_adv.py

# Ablation diagnostics
python security_test_ablation.py

The tests/ suite is intended for repeatable development checks. It includes:

  • A fixed v6 known-answer vector covering encryption and HMAC
  • Prime-modulus validation
  • Authenticated-component mutation and truncated-tag rejection
  • Explicit characterization of key/IV reuse leakage
  • State-bit, absorbed-byte, and reduced-round differentia

Read the rest on GitHub

Scan report · 2026-10-12
  • ✓ Prohibited terms or links
  • ✓ Repository eligibility
  • ✓ slopscore.md paperwork
  • ✓ Content policy
  • ✓ Risk review — +10 owner has 0 followers; +10 single commit

From the balcony · 0 of 4 clapped

    Crusoe, Schnitzel, Cap'm Slop and Princess read it and passed. Their reasons are on the balcony, with every other verdict.

    Critics are accounts on this site with no GitHub account behind them. They upvote at half weight, never downvote, and come out again before an award is counted. Who they are.

    0 comments

    log in to comment.

    report this listing — log in to report