Suppose you're constantly being menaced by high profile hackers and agencies that try to intercept messages sent between you and a friend.
The question is: what's the safest way to send messages to him without any malicious user or agency being able to either:
- Intercept and decrypt yours or your friend's messages.
- Interrupt your communication by means of MiTM or DDoS. Do cloud servers hosted in different parts of the world help offloading DDoS traffic and making it difficult to shut down the servers? What about multiple proxies without any sensible info forwarded in the headers, so that your internet provider doesn't know about the server you're contacting in case someone manages to seize internet browsing logs?
- Any other attack such as replay attack, Meet-in-the-Middle-Attack and so on that in a nutshell would finally derive message content or lead to impersonation.
Also suppose you're a student and can't afford a powerful laptop to crunch big numbers, so a cryptographically slow algorithm is to exclude to begin with.
This is the situation we're in:
C B
---------------- ------------------
A | | | |
------- | Server |'''''| Friend |
| You |''''''''''| | | |
------- ---------------- ------------------
| |
| D |
---------------------------------------
| |
| |
| Malicious user or agency |
| |
| |
---------------------------------------
A should be able to send anything to B through C without D being able to interact.
Is exchanging the key through RSA and using it as encryption/decryption with say AES128 enough? What about using both RSA and PGP so that after you decrypt with the RSA key you have to decrypt with PGP too? Or is that superfluous?
I've thought about a sort of MAC-then-encrypt-and-encrypt-again schema: AES128(Message + RSA pub key) + (PGP pub key + nonce) <-> server <-> ((AES128(Message + RSA pub key) + (PGP pub key + nonce)) - nonce) == PGP priv key == RSA priv key | stop
Let's throw a diagram in there once again to understand it better:
Sender
------------- ---------------
| | | |
| Message |--+--| RSA pub key |
| | | |
------------- ---------------
\ /
\ /
\ D /
\ /
\ /
\/
------------- ----------------- -----------
| | | | | |
| AES128 |--+--| PGP pub key |--+--| Nonce |
| | | | | |
------------- ----------------- -----------
Receiver
\ /
------------- ----------------- ----\--/---
| | | | | \/ |
| AES128 |--+--| PGP pub key |--+--| No/\ce |
| | | | | / \ |
------------- ----------------- ---/----\--
/ \ / / \
/ \ +
/ \ /
--------------- ----------- + -----------------
| | | | \ | |
| RSA pubkey |--+--| Message | \ | PGP priv key | <----- Symmetric
| | | | \| |
--------------- ----------- -----------------
\
+
\
----------------
| |
| RSA priv key | <---- Asymmetric. Only the receiver knows this key.
| |
----------------
\
\
-------------
| |
| Message |
| |
-------------
Coupling this with (Perfect)Forward secrecy would make it even more secure?
The outcome should be one and only one: unbreakability or very-slow breakability (that would take hundred years even for a supercomputer) by the malicious user.
If possible add facts, references, specific expertise or anything else that doesn't make your answer opinion based.