How kokinf/cryptocore works
CryptoCore is a command-line cryptography utility. The main workflow parses a user command, processes an input file through encryption/decryption, hashing or key derivation, and optionally writes a result. Its cryptographic capabilities include AES modes, authenticated encryption, HMAC, SHA-256/SHA3-256, and PBKDF2/HKDF-style derivation. The graph reflects calls visible in excerpts and relationships documented in the README; some operation implementations were not sampled, so those links rely on README evidence rather than inspected source.
Main entry points: file_io.go File operations · main.go Hash operation · modes AES modes · hmac.go HMAC
Components 19
Command line
- Command entry
src/main.go - Argument parser
src/cli_parser.go - File operations
src/file_io.go
Encryption
- AES modes
src/modes - CBC mode
src/modes/cbc.go - ECB mode
src/modes/ecb.go - CFB CTR OFB
src/modes - GCM AEAD
src/aead/gcm.go - Encrypt-then-MAC
src/aead/encrypt_then_mac.go - Secure randomness
src/csprng/csprng.go
Integrity
- Hash operation
src/main.go - SHA-256
src/hash/sha256.go - SHA3-256
src/hash/sha3.go - HMAC
src/mac/hmac.go
Key derivation
- Derive operation
src/file_io.go - PBKDF2
src/kdf/pbkdf2.go - HKDF-style derivation
src/kdf/hkdf.go
Other components
- CLI user
- Input/output files
Connections 24
- CLI user → Argument parser: provides flags
README.md - Command entry → Argument parser: parses arguments
src/main.go - Command entry → File operations: dispatches crypto
src/main.go - Command entry → Hash operation: dispatches hash
src/main.go - Command entry → Derive operation: dispatches derive
src/main.go - File operations → Input/output files: reads and writes
README.md - File operations → AES modes: processes AES files
README.md - File operations → GCM AEAD: uses AEAD
README.md - File operations → Encrypt-then-MAC: uses AEAD
README.md - AES modes → CBC mode: includes
README.md - AES modes → ECB mode: includes
README.md - AES modes → CFB CTR OFB: includes
README.md - GCM AEAD → Secure randomness: generates nonce
src/aead/gcm.go - Encrypt-then-MAC → AES modes: encrypts with
src/aead/encrypt_then_mac.go - Encrypt-then-MAC → HMAC: computes MAC
src/aead/encrypt_then_mac.go - Hash operation → Input/output files: hashes input
README.md - Hash operation → SHA-256: computes digest
README.md - Hash operation → SHA3-256: computes digest
README.md - Hash operation → HMAC: supports HMAC
README.md - HMAC → SHA-256: uses SHA-256
src/mac/hmac.go - Derive operation → PBKDF2: derives key
README.md - Derive operation → HKDF-style derivation: offers key hierarchy
README.md - HKDF-style derivation → HMAC: computes blocks
src/kdf/hkdf.go - Derive operation → Secure randomness: generates salt
README.md