secureEmail_GUI is a very secure off-line email encryption function. The GUI uses elliptic curve cryptography (ECC) [Curve448], to generate a public key from a 448 bit hexadecimal randomly generated user private key input. If Alice wants to communicate with Bob via email, they both open up the off-line secureEmail_GUI function and generate their own 448 bit hexadecimal private key from whatever generator they desire. Both Alice and Bob enter their private key into the GUI and hit the calculate public key button.
Alice enters Bob's email address into the 'To email address' block and Bob correspondingly enters Alice's email. The GUI uses the send_msg() function developed by Georgios Papachristoudis, October 2014. Both Alice and Bob will need to insert their email address and password into the send_msg() function of their respective off-line functions and ensure their gmail account 'Less secure app access' is selected on in their security settings. When establishing a connection, both Alice and Bob should hit the 'Send PublicKey' button which will automatically email the respective public key.
Once the public key is received (manual process), Alice and Bob will have to cut and paste the receive public key into the 'PubKey-received' block and hit the 'Calculate SharedKey' button. Both Alice and Bob will now have the same SharedKey. The SharedKey is generated via ECC-Curve448 and then hashed via SHA3-256 to obtain a 256-bit key.
A new initiation vector should be used for each new email and a convenient 'Generate Random' button is available to generate new initiation vectors whenever a new message is to be sent.
Alice and Bob should type their messages into the message block and hit the 'Encode Message' button. The encoded message will show up in the 'EncodedMessage' block. The message is encoded using the shared key and AES-256 encryption.
Hitting the 'Send Message' button will automatically send the message to the email address selected with the initiation vector as the subject.
To decode the received message, Alice or Bob will have to cut and paste the received email into the 'ReceivedMessage' block and the corresponding initiation vector (subject line) into the 'intVector' block and hit the 'Decode Message' button.
The decoded message will appear in the 'DecodedMessage' block.
The 'Reset' button will clear the 'intVector' and message blocks. The SharedKey can be used for as many messages as you desire and its reuse will not compromise email security as long as a new initiation vector is used.
David Hill (2021). Secure Off-line Email Encryption GUI (https://www.mathworks.com/matlabcentral/fileexchange/76108-secure-off-line-email-encryption-gui), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!