How mainakaruoya/py_rsa works
Data Flow and Interactions
a) Key Generation Flow:
• From rsa_primes.py to py_rsa.py:
• Public key tuple (n, e)
• Private key tuple (n, e, d, p, q)
b) Operation Flow:
• From rsa_cli.py to py_rsa.py:
• Encryption requests
• Signature requests
• From py_rsa.py back to rsa_cli.py:
• Encrypted output
• Digital signatures
Component Details
For each major component, include these elements:
a) py_rsa.py:
• RSAES-OAEP encryption scheme
• RSASSA-PSS signature scheme
• Primitive operations
• Standards compliance (PKCS #1 v2.2)
b) rsa_primes.py:
• NIST FIPS 186-5 compliance
• Provable prime generation
• Key pair creation
• Supported key sizes (2048, 3072, 4096 bits)
c) rsa_cli.py:
• Command-line interface
• Operation modes (encrypt, sign, both)
• Input validation
• Output formatting (using colorama)
Additional Elements
• Version/standard references:
• PKCS #1 v2.2
• NIST FIPS 186-5
• Supported key sizes
• Security considerations
Technical Details
• Supported message size limitations
• Key size options (2048, 3072, 4096 bits)
• Implementation constraints
• External dependency (colorama)
Remember to add a note about the implementation being for educational/demonstration purposes, not for production use, as mentioned in the disclaimer.