Skip to main content

Codec criptográfico post-cuántico híbrido con endurecimiento online verificable (VOPRF) y canal visual de glifos.

Project description

Quipu

License: AGPL v3 crates.io docs.rs CI post-quantum

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
alfabeto secreto nativos 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

quipu_crypto-0.1.0.tar.gz (102.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

quipu_crypto-0.1.0-cp39-abi3-win_amd64.whl (322.5 kB view details)

Uploaded CPython 3.9+Windows x86-64

quipu_crypto-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (475.7 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

quipu_crypto-0.1.0-cp39-abi3-macosx_11_0_arm64.whl (432.4 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

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

Hashes for quipu_crypto-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b3ee52bd8c416a5b4986a850f2d77185b57b248bf4b9781df8d830071cfc66f4
MD5 ad94ec510761949d9274af4393d8d8ff
BLAKE2b-256 e18d5910dbcf03d82263ce15686b92703137544f3bdb5690b77ee29192f2672b

See more details on using hashes here.

Provenance

The following attestation bundles were made for quipu_crypto-0.1.0.tar.gz:

Publisher: release.yml on isazajuancarlos/quipu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for quipu_crypto-0.1.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 695ec3c49596d8191e51b71e63c0e52baa3615f02acd004b7e3b9adeb4aa6e46
MD5 fe2fa7ac3ffc4df7970c5c93c1d7452b
BLAKE2b-256 79b5f4a716b6c3b61f8cc769cdb26ed5ca7b95c2c0575c2d2a90cc089b424ec6

See more details on using hashes here.

Provenance

The following attestation bundles were made for quipu_crypto-0.1.0-cp39-abi3-win_amd64.whl:

Publisher: release.yml on isazajuancarlos/quipu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quipu_crypto-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for quipu_crypto-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a1e1cc599dcc91a30361db7443dfef5b6ea14e3a7ca2a7cacc78404e64dc94f6
MD5 dad05323586e67ea7fb84c8b6ea83c09
BLAKE2b-256 2882f5fc34f8df308edc03802cd2fdf0079f5ec3088ee695eaa134c6c3133018

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quipu_crypto-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quipu_crypto-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6e1946df5d4c2f0c22058668c6b63561cbebf196291980b144d8f5480a12fa4c
MD5 54b1a5dbe1bc5965f32576467d551692
BLAKE2b-256 9fa1ee6f3cc3e4176f90521a03739413d1a8fb89188f8299a779c4eb871b9831

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page