Implementation of RSA signature generation and verification system with OAEP padding.
- RSA key generation with 1024-bit primes
- Miller-Rabin primality testing
- OAEP (Optimal Asymmetric Encryption Padding)
- Modular arithmetic operations
- Python 3.8+
from src.rsa_core import RSACore, OAEP
# Generate RSA keys
rsa = RSACore()
pub_key, priv_key = rsa.generate_keypair()
# Use OAEP padding
oaep = OAEP(2048)
message = b"Your message here"
padded = oaep.pad(message)
Project Structure
rsa_signature_project/
├── src/
│ └── rsa_core.py
├── tests/
├── docs/
├── README.md
└── .gitignore
Esta implementação inclui:
- Geração de chaves RSA com primos cujo produto tem 2048 bits
- Teste de primalidade Miller-Rabin
- Implementação de OAEP
- Funções auxiliares para operações modulares
- Funções para assinatura