mi_crypto_lib
Biblioteca educativa de criptografía desarrollada en Python puro (sin dependencias externas).
Estructura
mi_crypto_lib/
├── __init__.py # Fachada: import mi_crypto_lib as cripto
│
├── teoria_numeros/ # Ejercicios 1–4: Teoría de números
│ ├── __init__.py
│ ├── utilidades.py # mcd, es_primo, phi, factorizar_entero (compartido)
│ ├── crr.py # Ej 1: Conjunto Reducido de Residuos
│ ├── ejercicio_rsa_base.py # Ej 2: Primos seguros para RSA
│ ├── n_generico.py # Ej 3: Factorización y φ(n) genérico
│ └── inversos.py # Ej 4: Inversos multiplicativos (Euler / Euclides ext.)
│
├── cifrados_clasicos/ # Ejercicios 5–6: Cifrados y criptoanálisis
│ ├── __init__.py
│ ├── auto_clave.py # Ej 5: Cifrado Autoclave (Vigenère clave continua) + Kasiski
│ └── ataque_hill.py # Ej 6: Cifrado Hill + ataque Gauss-Jordan
│
├── setup.py
├── pyproject.toml
├── README.md
└── LICENSE
Instalación
# Desde el directorio raíz del proyecto:
pip install -e .
Uso rápido
La librería expone todas las funciones con un solo import:
import mi_crypto_lib as cripto
# ── Ej 1: Conjunto Reducido de Residuos ──
print(cripto.calcular_crr(10)) # [1, 3, 7, 9]
print(cripto.phi(10)) # 4
# ── Ej 2: Primos seguros (RSA) ──
p = cripto.generar_primo_seguro(10) # 11
# ── Ej 3: Factorización genérica ──
print(cripto.factorizar(60)) # {2: 2, 3: 1, 5: 1}
print(cripto.euler_phi(60)) # 16
# ── Ej 4: Inversos multiplicativos ──
print(cripto.inverso_euler(3, 26)) # {'inverso': 9, ...}
print(cripto.inverso_extendido(3, 26)) # {'inverso': 9, ...}
# ── Ej 5: Cifrado Autoclave + Kasiski ──
cifrado = cripto.cifrar_autoclave("HOLAMUNDO", "KEY")
plano = cripto.descifrar_autoclave(cifrado, "KEY")
analisis = cripto.kasiski(cifrado)
# ── Ej 6: Ataque Hill (Gauss-Jordan) ──
clave = cripto.CifradoMatriz.recuperar_clave("TEXTO", "CIFRA", 2)
Requisitos
- Python ≥ 3.8
- Sin dependencias externas (solo librería estándar)
Licencia
MIT License — ver LICENSE
Metadata
Release files for mi-crypto-lib 1.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mi_crypto_lib-1.0.10.tar.gz | 15.4 kB | Without provenance | Details for mi_crypto_lib-1.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mi_crypto_lib-1.0.10-py3-none-any.whl | Python 3 | none | any | Details for mi_crypto_lib-1.0.10-py3-none-any.whl |
Total release size: 49.4 kB
Release files / mi_crypto_lib-1.0.10.tar.gz
| Download URL | mi_crypto_lib-1.0.10.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
009df82ed395ff0f501730e1efc7829c34ef497c5d2ea6d2a399e6b3e7c0e74f
|
|
BLAKE2b-256 checksum How to use checksums |
4b9985954aa342409e8edae8d45899e5a56fe9660eb36b8222b661ebecfdd63b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / mi_crypto_lib-1.0.10-py3-none-any.whl
| Download URL | mi_crypto_lib-1.0.10-py3-none-any.whl |
|---|---|
| Size | 34.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fef50273e467ceba71919f28a7c69f4d4a33a7b6d0f38ce8a6325595254f738a
|
|
BLAKE2b-256 checksum How to use checksums |
61f9442d95153fa53835a87385fc12379b514de7cc61e6a81234990919e7af05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Security for mi-crypto-lib 1.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.