I've now implemented folder encryption. If you encrypt folder 'foo', you get the file 'foo.encrypted'. When you decrypt it using the same tool, you get file 'foo.zip' which you download and uncompress into a folder 'foo'.
> “ When WhatsApp was pressured to leave a backdoor into the encryption, it said “no” but instead agreed to log and report all dubious communication before it is encrypted. ”
The check digits solve the MITM problem. You should compare them by another channel than email, such as text message. This is called "Short Authentication String" (SAS).
https://en.wikipedia.org/wiki/ElGamal_encryption
https://en.wikipedia.org/wiki/ElGamal_signature_scheme
https://en.wikipedia.org/wiki/Taher_Elgamal