Secure Email Specification (version 2) Discussion |
This message document a discription of what I have so far as a specification for secure business document transmission. There is also a discussion about the proposed specification. Please feel free to email peterha@nothingbutnet if you have any comments to add. Notes regarding PGP and S/MIME: I am looking at how I can be compatible with either PGP or S/MIME, while still being able to achieve the project objectives. |
SMTP / POP3 |
Messages are transmitted via attachments within standard SMTP messages. The Message Bodies themselves are not encrypted, only the attachments. Each Attachment is a Encrypted File. Each attachment potentially can be separatly opened or saved to disk for later decryption. Attachments are via standard MIME. Text Messages can still be sent however, by including a text file inside the attachment. |
Encrypted Attachments |
Each Encrypted Attachment has a five types of data
'block': Version Block Session Key Block Directory Block Signature Block Data Block |
Version Block |
The Version Block provides information about which
version of the software was used to create the encrypted
file. 1 byte - Literally 'V' to signify start of a
Version Block. |
Session Key Block |
The Encrypted Session Key is a random session key
used by the symetric AES algorithm to encrypt and decrypt
the main file data. By using RSA to encrypt the session
key only the recipient can decrypt the session, and
therefore decrypt the main file. The encrypted session
key is stored in the following format : 1 byte -
Literally 'K' to signify start of a Session Key Block. When encrypting a random session key is generated and encrypted with RSA using the public key of the recipient. The receiver uses his private key to decrypt the session key, which is then used for the main data. There can be multiple Session Key Blocks, one for each recipient. |
Directory Block |
The Directory Block consists of the filenames and
sizes of the data being sent.. 1 byte - Literally 'D'
to signify start of a Directory Block. (All data from this point is encrypted with the
session key) |
Signature Block |
The Signature Block is a MD5 hash of the original
data in the files, encrypted with RSA using the private
key of the sender. On decrypting the main data the
recipient can check the hash provided with one calculated
from the decrypted main data. If the hashes match the
recipient can be sure that the file was encrypted by
someone with access to the private key that corresponds
with the public key on file for the sender. In other
words, it ensures the apparent sender of the file is the
actual sender of the file. The format of the signature
block is in the following format : 1 byte - Literally
'S' to signify start of a Signature Block. |
Data Block |
The Data Block is simply the data of the original
files appended sequencially according to the Directory
Block compressed with the Zip algorithm, and encrypted
with the Session Key using the Rijndael algorithm. Its
format is simple : 1 byte - Literally 'M' to signify
start of a Main Data Block |
Home |