Codec criptográfico post-cuántico híbrido con endurecimiento online verificable (VOPRF) y canal visual de glifos.
Project description
Quipu
Librería de codificación con protección criptográfica y simbología propia.
🇬🇧 Quipu is a free/libre (AGPL-3.0) library that encrypts and encodes data using only vetted cryptographic primitives (XChaCha20-Poly1305, Argon2id, HKDF), with a hybrid post-quantum mode (X25519 + ML-KEM-768) and a verifiable online hardening mode (VOPRF + DLEQ). It never invents primitives — security lives in the keys, not in hiding the format.
Filosofía "rueda y oruga": donde existe buena criptografía, la reutilizamos (XChaCha20-Poly1305, Argon2id, HKDF, ML-KEM, X25519); donde hay terreno nuevo (representación, simbología, formato), innovamos. Nunca inventamos primitivas criptográficas: la seguridad vive en la clave + el AEAD, no en la representación.
Qué hace
Protege datos y los representa como símbolos (texto denso, glifos, o una imagen), de forma reversible y autenticada.
datos → KDF(passphrase+pepper) → AEAD → contenedor → codec base-N → diccionario → símbolos
Modos
| Modo | API (Rust) | Descripción |
|---|---|---|
| Simétrico (passphrase) | api::encode / api::decode |
Argon2id + XChaCha20-Poly1305 |
| Post-cuántico (clave pública) | api::encode_to_recipient / decode_as_recipient |
Híbrido X25519 + ML-KEM-768 (transcript ligado estilo X-Wing) |
| Canal visual | api::encode_to_image / decode_from_image |
Salida PNG lossless |
| Canal robusto (impreso) | api::encode_to_robust_image / decode_from_robust_image |
+ Reed-Solomon (corrige errores de canal) |
| Glifos nativos | api::encode_to_glyph_image / decode_from_glyph_image |
Alfabeto de glifos propio, reconocible |
| Online (endurecimiento) | api::encode_online / decode_online |
VOPRF verificable (prueba DLEQ): el cliente detecta un servidor deshonesto |
Diccionarios (simbología enchufable)
dictionaries::ascii94()— 94 símbolos ASCII (copy-paste universal).dictionaries::flagship()— 4096 glifos (12 bits/símbolo, ~2× más denso).dictionaries::from_range(start, count)— alfabeto a medida.glyphopt— selección de glifos por máxima separabilidad (base para glifos por IA).
Galería de glifos
La misma carga cifrada puede representarse como texto denso, como una imagen PNG, o con un alfabeto de glifos propio (geométrico o generado orgánicamente). La simbología es pública (Kerckhoffs): no aporta ni resta seguridad, solo representación.
| Alfabeto de glifos | Secreto en glifos | Glifos nativos | Glifos generativos |
|---|---|---|---|
Seguridad y endurecimiento
- Precapas: normalización NFKC, pepper, padding Padmé (oculta longitud), binding de contexto (AAD), HKDF (separación de subclaves).
- Antihacker: borrado de claves en memoria (
zeroize), comparación en tiempo constante, validación de parámetros KDF, errores uniformes. - Hackerbot: red-team interno (tamper/truncation/uniqueness). Encontró y se corrigió un DoS por parámetros Argon2 maliciosos.
Uso (Rust)
use quipu::api::{encode, decode, Options};
use quipu::dictionaries;
let dict = dictionaries::ascii94();
let sym = encode(b"secreto", "passphrase", &dict, &Options::default());
let data = decode(&sym, "passphrase", &dict, b"").unwrap();
Uso (Python)
pip install quipu-crypto # se instala como "quipu-crypto", se importa como "quipu"
import quipu
s = quipu.encode(b"secreto", "passphrase")
assert quipu.decode(s, "passphrase") == b"secreto"
# Post-cuántico
pub, sec = quipu.generate_keypair()
s = quipu.encode_to_recipient(b"secreto", pub)
assert quipu.decode_as_recipient(s, sec) == b"secreto"
Ejemplos funcionales
Round-trip de todos los modos, listo para correr:
cargo run --example quickstart # Rust (examples/quickstart.rs)
python examples/quickstart.py # Python (examples/quickstart.py)
Construir y probar
cargo test # tests unit + property
cargo clippy --all-targets # lint
cargo run --example demo # demo simétrico + glifos
cargo run --example v2demo # post-cuántico + OPRF + imagen
cargo run --example hackerbot # red-team
cargo run --example testplatform --release # batería completa
# Fuzzing (nightly)
cargo +nightly fuzz run parse_container
# Bindings Python
source venv/bin/activate
maturin develop --features python
python tests/python/test_quipu.py
Estado
v1 + v1.1 + v2 implementados con TDD estricto. 89 tests Rust + Wycheproof + 5
Python verdes, clippy limpio, fuzzing sin crashes, Miri sin UB. Modo online con
VOPRF verificable (prueba DLEQ), KEM híbrido con transcript ligado estilo
X-Wing, y pre-auditoría propia (ver INFORME_PREAUDITORIA.txt y
MODELO_DE_AMENAZA.txt).
⚠️ Proyecto en desarrollo. La pre-auditoría interna NO sustituye una auditoría criptográfica independiente: no usar para proteger datos críticos reales hasta ese sello externo.
Documentación y auditoría
INFORME_PREAUDITORIA.txt— pre-auditoría interna (cargo-audit, Wycheproof, Miri, fuzzing, análisis de composición).MODELO_DE_AMENAZA.txt— modelo de amenaza (activos, adversarios, supuestos, garantías por modo, riesgos residuales).LICENSING.md— modelo de licenciamiento dual.
La pre-auditoría interna es preparación, no sustituye una auditoría independiente. Ese sello externo es el siguiente paso del proyecto.
Licencia
Modelo de licencia dual (open-core):
- AGPL-3.0-or-later para uso abierto (ver
LICENSE). - Licencia comercial para producto propietario cerrado o SaaS sin abrir código.
- El servidor OPRF se ofrece además como servicio gestionado de pago.
Detalles en LICENSING.md. Contacto: isazajuancarlos@gmail.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quipu_crypto-0.1.0.tar.gz.
File metadata
- Download URL: quipu_crypto-0.1.0.tar.gz
- Upload date:
- Size: 102.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3ee52bd8c416a5b4986a850f2d77185b57b248bf4b9781df8d830071cfc66f4
|
|
| MD5 |
ad94ec510761949d9274af4393d8d8ff
|
|
| BLAKE2b-256 |
e18d5910dbcf03d82263ce15686b92703137544f3bdb5690b77ee29192f2672b
|
Provenance
The following attestation bundles were made for quipu_crypto-0.1.0.tar.gz:
Publisher:
release.yml on isazajuancarlos/quipu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quipu_crypto-0.1.0.tar.gz -
Subject digest:
b3ee52bd8c416a5b4986a850f2d77185b57b248bf4b9781df8d830071cfc66f4 - Sigstore transparency entry: 2038541241
- Sigstore integration time:
-
Permalink:
isazajuancarlos/quipu@25e623887b95476acb4aaa4d10dca1edaf0c5064 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/isazajuancarlos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@25e623887b95476acb4aaa4d10dca1edaf0c5064 -
Trigger Event:
push
-
Statement type:
File details
Details for the file quipu_crypto-0.1.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: quipu_crypto-0.1.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 322.5 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
695ec3c49596d8191e51b71e63c0e52baa3615f02acd004b7e3b9adeb4aa6e46
|
|
| MD5 |
fe2fa7ac3ffc4df7970c5c93c1d7452b
|
|
| BLAKE2b-256 |
79b5f4a716b6c3b61f8cc769cdb26ed5ca7b95c2c0575c2d2a90cc089b424ec6
|
Provenance
The following attestation bundles were made for quipu_crypto-0.1.0-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on isazajuancarlos/quipu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quipu_crypto-0.1.0-cp39-abi3-win_amd64.whl -
Subject digest:
695ec3c49596d8191e51b71e63c0e52baa3615f02acd004b7e3b9adeb4aa6e46 - Sigstore transparency entry: 2038542280
- Sigstore integration time:
-
Permalink:
isazajuancarlos/quipu@25e623887b95476acb4aaa4d10dca1edaf0c5064 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/isazajuancarlos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@25e623887b95476acb4aaa4d10dca1edaf0c5064 -
Trigger Event:
push
-
Statement type:
File details
Details for the file quipu_crypto-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: quipu_crypto-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 475.7 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1e1cc599dcc91a30361db7443dfef5b6ea14e3a7ca2a7cacc78404e64dc94f6
|
|
| MD5 |
dad05323586e67ea7fb84c8b6ea83c09
|
|
| BLAKE2b-256 |
2882f5fc34f8df308edc03802cd2fdf0079f5ec3088ee695eaa134c6c3133018
|
Provenance
The following attestation bundles were made for quipu_crypto-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on isazajuancarlos/quipu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quipu_crypto-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
a1e1cc599dcc91a30361db7443dfef5b6ea14e3a7ca2a7cacc78404e64dc94f6 - Sigstore transparency entry: 2038541962
- Sigstore integration time:
-
Permalink:
isazajuancarlos/quipu@25e623887b95476acb4aaa4d10dca1edaf0c5064 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/isazajuancarlos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@25e623887b95476acb4aaa4d10dca1edaf0c5064 -
Trigger Event:
push
-
Statement type:
File details
Details for the file quipu_crypto-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: quipu_crypto-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 432.4 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e1946df5d4c2f0c22058668c6b63561cbebf196291980b144d8f5480a12fa4c
|
|
| MD5 |
54b1a5dbe1bc5965f32576467d551692
|
|
| BLAKE2b-256 |
9fa1ee6f3cc3e4176f90521a03739413d1a8fb89188f8299a779c4eb871b9831
|
Provenance
The following attestation bundles were made for quipu_crypto-0.1.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on isazajuancarlos/quipu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quipu_crypto-0.1.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
6e1946df5d4c2f0c22058668c6b63561cbebf196291980b144d8f5480a12fa4c - Sigstore transparency entry: 2038541681
- Sigstore integration time:
-
Permalink:
isazajuancarlos/quipu@25e623887b95476acb4aaa4d10dca1edaf0c5064 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/isazajuancarlos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@25e623887b95476acb4aaa4d10dca1edaf0c5064 -
Trigger Event:
push
-
Statement type: