
Verschlüsselung aus nichtlinearen Garbenmorphismen über Graphen
Garbenbasierte Post-Quanten-Verschlüsselung durch vektorwertige endliche Körperpermutationen
Ein kryptografisches Primitiv, das auf dem Inversionsproblem für nichtlineare Garbenmorphismen (NL-SMIP) basiert: ein Polynomsystem mit geheimen Koeffizienten, gekoppelt durch Garbenkohomologie über Graphen.
Paper (v3): L. Alaniz Pintos, "The Alaniz Cipher v3: Sheaf-Based Post-Quantum Encryption via Vector-Valued Finite Field Permutations", 2026.
Version 2 führte σ_SPN ein, um den Skalierungsangriff auf v1 zu besiegen. Allerdings wird v2 selbst durch einen allgemeineren Angriff gebrochen, der Polynominterpolation mit Gröbner-Basis-Berechnung kombiniert: jede deterministische Verschlüsselung der Form c = As + Bσ(As) mit σ von beschränktem Polynomgrad ermöglicht einen CPA-Angriff zur Schlüsselwiederherstellung. Siehe Paper Abschnitt 3 und experiments/02_cpa_attack_analysis.py.
Version 3 adressiert dies auf struktureller Ebene:
| Merkmal | v2 | v3 |
|---|---|---|
| Verschlüsselung | Deterministisch | Probabilistisch (Nonce + PRG) |
| σ | Komponentenweise SPN über F_p | Vektorwertig: π_e(x) = x^e in F_{p^d} |
| Sekundärschlüssel | Matrix B_v ∈ GL(d, F_p) | Skalar β_v ∈ F_{p^d}^* |
| Entschlüsselung | Brute Force über F_p^d | Univariate Faktorisierung in F_{p^d}[τ] |
| Differenzielle Uniformität von σ | δ ≥ 2p (~34 für p=17) | δ ∈ {2, 4} (APN oder fast-APN) |
| IND-CCA-Ziel | Nicht anwendbar | Erreicht mittels FO-Transformation |
14 getestete Semi-Regularitätskonfigurationen, 14 stimmen exakt mit Hilbert-Poincaré-Vorhersagen überein. Keine MinRank-Verwundbarkeit nach Theorem 6.5 (Zentralisator-Argument). Keine schwachen Schlüssel in 69 Konfigurationen erkannt.
Nachrichten werden als globale Schnitte einer zellularen Garbe auf einem Graphen mit Zyklenrang β_1 ≥ 1 kodiert. Verschlüsselung pro Knoten:
r_v = PRG(nonce, v)
u_v = ι(A_v · s_v + r_v) ∈ F_{p^d}
w_v = β_v · u_v + (β_v − 1) · (L · u_v + 1)^e
c_v = ι^{-1}(w_v) − r_v
wobei A_v ∈ GL(d, F_p), β_v ∈ F_{p^d}^* und L ∈ F_{p^d}^* öffentlich ist. Die Entschlüsselung reduziert sich auf das Finden von Wurzeln von γ·τ^e + α·τ − (c′ + α) = 0 in F_{p^d}[τ] mittels Cantor-Zassenhaus, gefolgt von Filtern mittels der kohomologischen Konsistenz an allen n − 1 Nicht-Wurzel-Knoten.
| Satz | d | log₂ p | n | e | |sk| | |pk| | |c| | Sicherheit | |---|---|---|---|---|---|---|---|---| | Demo | 2 | 4 | 4 | 17 | 30 B | 10 B | 16 B | nicht sicher | | Akademisch | 3 | 16 | 8 | 17 | 0,3 KB | 30 B | 96 B | ~80 Bit klassisch | | PQ-128 | 6 | 61 | 32 | 17 | 16 KB | 64 B | 1,5 KB | ≥128 Post-Grover | | PQ-256 | 8 | 127 | 64 | 17 | 170 KB | 128 B | 8 KB | ≥256 Post-Grover |
git clone https://github.com/QuantuSync/alaniz-cipher.git
cd alaniz-cipher
pip install -e .[test]
# Führe die v2-Demo aus (historisch)
python -m alaniz.demo.demo_basic
# Führe alle Tests aus
pytest tests/ -v
# Führe v3-Verifikationsexperimente aus
python experiments/07_semi_regularity.py
python experiments/08_weak_keys.py
python experiments/09_nonce_robustness.py
python experiments/10_centralizer.py
python experiments/11_kem_verification.py
from alaniz.core.field import FiniteField
from alaniz.core.graph import Graph
from alaniz.core.sheaf import Sheaf
from alaniz.crypto.protocol import ProtocolV3, PublicParamsV3
from alaniz.crypto.kem import KEM
Fp = FiniteField(17)
graph = Graph.cycle(4)
sheaf = Sheaf.random_with_cohomology(graph, dv=2, Fp=Fp)
proto = ProtocolV3(PublicParamsV3.generate(sheaf))
kem = KEM(proto)
sk = kem.keygen()
K, ct = kem.encaps(sk) # Sender: zufällige Nachricht + gemeinsamer Schlüssel
K_recv = kem.decaps(sk, ct) # Empfänger: gleicher K, falls gültig
assert K == K_recv
alaniz-cipher/
├── alaniz/
│ ├── core/
│ │ ├── field.py # F_p arithmetic (v2, still used by v1/v2)
│ │ ├── field_ext.py # F_{p^d} arithmetic via galois (v3)
│ │ ├── graph.py # Graph topologies (trees, cycles, etc.)
│ │ └── sheaf.py # Cellular sheaves + cohomology constraints
│ ├── crypto/
│ │ ├── sigma.py # σ maps: monomial_power (v3), id_spn (v2), cube/inverse (v1)
│ │ ├── protocol.py # Protocol (v2), ProtocolV3 (v3)
│ │ ├── prg.py # SHAKE-256 PRG for nonce derivation (v3)
│ │ └── kem.py # Fujisaki-Okamoto → IND-CCA KEM (v3)
│ └── demo/
│ └── demo_basic.py # v2 demo (historical)
├── experiments/
│ ├── 01-06_*.py # v1 analyses (historical, paper v2 Appendix)
│ ├── 14_v2_redteam.py # v2 red team (historical)
│ ├── 07_semi_regularity.py # v3: Hilbert-Poincaré verification
│ ├── 08_weak_keys.py # v3: 69-config weak-key sweep
│ ├── 09_nonce_robustness.py # v3: Theorem 6.7
│ ├── 10_centralizer.py # v3: Theorem 6.5
│ └── 11_kem_verification.py # v3: KEM IND-CCA empirical tests
├── tests/
│ ├── test_protocol.py # v2 tests (kept for regression)
│ └── test_protocol_v3.py # v3 tests
├── pyproject.toml
└── README.md
v1: Gebrochen durch Langas Skalierungsangriff auf σ_cube(λy) = λ³ σ_cube(y) (Alaniz 2026, Anhang A des v3-Papers). Wiederherstellung in O(d) Abfragen.
v2: Gebrochen durch Polynominterpolation + Gröbner-Angriff gegen jede deterministische c = As + Bσ(As) mit σ von beschränktem Grad. Für d=2, p=17, vollständige Schlüsselwiederherstellung in 20 CPA-Abfragen und ~5,7s SymPy-Berechnung über 10/10 zufällige Instanzen. Siehe experiments/02_cpa_attack_analysis.py und Paper Abschnitt 3.
Sowohl v1- als auch v2-Klassen bleiben in diesem Repository für historische Reproduzierbarkeit zugänglich. Für jede neue Verwendung ProtocolV3 nutzen.
@misc{alaniz2026cipherv3,
author = {Alaniz Pintos, Lucas},
title = {The Alaniz Cipher v3: Sheaf-Based Post-Quantum Encryption
via Vector-Valued Finite Field Permutations},
year = {2026},
url = {https://github.com/QuantuSync/alaniz-cipher}
}
A. Rodríguez Langa (INECO) für die Kryptanalyse von v1, die den Neugestaltungsprozess hin zu v2 und schließlich v3 motivierte.
Lucas Alaniz Pintos Smart Products Division, INECO [email protected] ORCID: 0009-0008-5179-2534
MIT