no matter what i read about e2e i just don't get it. can someone be so kind to answer my questions?
public_key = ...
private_key = ...
# Encrypt the message using the public key
message = b'The secret message no one should read'
ciphertext = public_key.encrypt(message, ...)
# Decrypting the message (=cyphertext) using your private key
decrypted_message = private_key.decrypt(ciphertext, ...)
1. everywhere it says that you shouldn't persist keys and should generate a new pair every time you have to encrypt something. but if you lose the private key doesn't that mean no one can decrypt it later?
2. how can two clients use different keys to decrypt the same message? (like in a chat app)