How amanmaurya-406/rsa works
This is a menu-driven C RSA utility. Its main workflow dispatches key generation, file encryption/decryption, and message signing/verification; key generation writes PEM keys, while key loading decodes them for cryptographic operations. ASN.1 serialization supports key encoding, and file reading and SHA-512 are supporting runtime capabilities. The graph follows calls visible in the excerpts and documented features; some implementation details, including cipher and hash internals, were not excerpted, so their internal relationships are omitted.
Main entry points: main.c Menu dispatcher · encodeKey.c PEM key codec · RSA_generateKey.c RSA key generation · RSA_cipher.c RSA encryption
Components 11
Application workflow
- Menu dispatcher
src/main.c
Key management
- RSA key generation
src/RSA_generateKey.c - PEM key codec
src/encodeKey.c - PEM key files
RSA operations
- RSA encryption
src/RSA_cipher.c - Signature operations
src/signAndVerify.c - SHA-512 hashing
src/sha512.c
Data and encoding
- ASN.1 encoding
src/asn1.c - File reading
src/readFile.c - Message and cipher files
Other components
- CLI user
Connections 11
- CLI user → Menu dispatcher: selects action
src/main.c - Menu dispatcher → RSA key generation: generates keys
src/main.c - RSA key generation → PEM key codec: writes PEM
src/RSA_generateKey.c - PEM key codec → ASN.1 encoding: serializes key
src/encodeKey.c - Menu dispatcher → PEM key codec: loads keys
src/main.c - RSA key generation → PEM key files: stores key
src/RSA_generateKey.c - PEM key codec → PEM key files: reads and writes
src/encodeKey.c - Menu dispatcher → RSA encryption: encrypts or decrypts
src/main.c - Menu dispatcher → File reading: reads message
src/main.c - Menu dispatcher → Signature operations: signs or verifies
src/main.c - Menu dispatcher → Message and cipher files: uses message files
src/main.c