How insanum/ecies works
Main Components
a. Receiver Component:
• Loads an EC key from a DER file (created via the provided make cert command).
• Sends its public key and curve information to the Transmitter.
b. Transmitter Component:
• Generates a new ephemeral EC key on the same curve.
• Computes the shared symmetric key using the Diffie-Hellman primitive.
• Encrypts the plaintext using AES-GCM with the shared key.
• Sends the ephemeral public key, initialization vector (IV), tag, and ciphertext to the Receiver.
c. Cryptographic Operations:
• Utilizes two core external libraries: OpenSSL and WolfSSL.
• Uses AES-GCM for encryption/authentication.
d. Data Flow Elements:
• EC Key generation/loading.
• Public key exchange.
• Shared secret computation.
• Encryption and decryption processes.
Relationships and Interactions
• Finally, illustrate the Receiver using the received ephemeral public key to derive the shared symmetric key and decrypt the ciphertext.
Architectural Patterns
• This project follows a typical secure communication flow where key exchange (using ECC/Diffie-Hellman) is followed by symmetric encryption (AES-GCM).
• That there are dual implementations (OpenSSL vs. WolfSSL) which are essentially “plug and play” alternatives chosen at build time via a Makefile.
• That the proof-of-concept purposely simplifies the standard ECIES by omitting a KDF and HMAC and substituting them with AES-GCM.
Relevant Technologies
• C Programming language for core implementation.
• Cryptographic libraries: OpenSSL and WolfSSL.
• AES-GCM for symmetric encryption.
• ECC for public/private key operations.
• The Makefile for build automation and configuration.