Envelope Mail's exact format hasn't been decided on yet. What's needed is an implementation of the following API which performs 'adequately', has a 'reasonable' security margin, isn't encumbered by patents, and can be easily coded using public domain libraries -
- String make_random_seed()
- (String private_key, String public_key, String key_identifier) make_key(String seed)
- String encrypt(String plaintext, String[] public_keys)
- (String plaintext, String failure_reason) decrypt(String ciphertext, String private_key)
- String[] get_key_identifiers(String ciphertext)
Seeds are 112 bits long, to make key encoding clean.
This API is not parameterized by key length - standardizing on one which will last the next 30 years is fine.
Since no implementation of this API is forthcoming, a dummy one is being used for now.
Below are explanations of all the features in this API, each new one is marked in bold.
-
Here is an unacceptably minimal encryption/decryption API
-
- (String private_key, String public_key) make_random_key()
- String encrypt(String plaintext, String public_key)
- (String plaintext, String failure_reason) decrypt(String ciphertext, String private_key)
-
We want encyption to multiple public keys, so the sender can read a message later as well
-
- (String private_key, String public_key) make_random_key()
- String encrypt(String plaintext, String[] public_keys)
- (String plaintext, String failure_reason) decrypt(String ciphertext, String private_key)
-
An extra method to get the public keys encypted avoids having to try every private key available.
-
- (String private_key, String public_key) make_random_key()
- String encrypt(String plaintext, String[] public_keys)
- (String plaintext, String failure_reason) decrypt(String ciphertext, String private_key)
- String[] get_public_keys(String ciphertext)
-
Since the private keys probably won't be short enough to write down easily (around 128 bits), they should be derived from a seed which is.
-
- (String private_key, String public_key) make_key(String seed)
- String encrypt(String plaintext, String[] public_keys)
- (String plaintext, String failure_reason) decrypt(String ciphertext, String private_key)
- String[] get_public_keys(String ciphertext)
-
Including the whole public key in the ciphertext is an unnecessary waste of resources, so only an identifier should be used
-
- (String private_key, String public_key, String key_identifier) make_key(String seed)
- String encrypt(String plaintext, String[] public_keys)
- (String plaintext, String failure_reason) decrypt(String ciphertext, String private_key)
- String[] get_key_identifiers(String ciphertext)
-
It makes sense for random seed generation to be part of the crypto API as well
-
- String make_random_seed()
- (String private_key, String public_key, String key_identifier) make_key(String seed)
- String encrypt(String plaintext, String[] public_keys)
- (String plaintext, String failure_reason) decrypt(String ciphertext, String private_key)
- String[] get_key_identifiers(String ciphertext)
Back to index