encrypted groups paper
I've decided that encrypted groups is complicated enough that I need to write a paper for it, like I did with secret-handshake. This thread is for my notes as i go.
reading pgp spec. ignoring signatures and other cruft - a basic pgp message is:
((public key encrypted session key: receiver.id | zeros, pk_alg.id, pk_alg.encrypt(sessionkey, reciever.public, sender.private) | (symmetrically encrypted session key: string-to-key))+,
(symmetrically encrypted data: sym_alg.id, sym_alg.encrypt(message, session_key))
guide to notation: () means a "packet" which is length delimited and has a "tag" 1 byte id number. for symmetric algorithms: encrypt(plaintext, key) => ciphertext, for asymmetric algorithms encrypt(plaintext, public_key, private_key) => ciphertext
(note, asymmetric algorithms are only used to encrypt session keys for symmetric algorithms.
if the receiver.id | zeros
is zeros, then the recipient is not specified so the receiver should attempt decryption with all their keys. This is intended to hide metadata.
The message contains at least one either public key encrypted session key (section 5.2), or symetrically encrypted key (section 5.3), and finally the symmetrically encrypted data (section 5.7)
usually a pgp message identifies the recipient (but it tends to be sent over email, with the to field unencrypted, anyway) if the recipient.id
is replaced with zeros
then the number of recipients are shown.
I didn't know this, but pgp can also encrypt symetrically, the way suggested "to a passphrase" sounds dubious, though.
following this description (so it should apply to real pgp) if you are the recipient of a group message, you could reuse the session key to encrypt another message, and reuse the same session key packets (even if you couldn't decrypt some of them)
also, you could replay someone elses encrypted messages, to the same receiver, which may have confusing effects. Since pgp signatures are an optional separate packet, you could replay a message and remove the signature.