Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking forward to pass data from a node A to a node B using asymmetric cryptography, but with one (huge) constraint: When A sends data to B, it is possible that B is offline. I would like to be able to read the message as soon as B came online, even if A is not online any longer.

It is not a problem to add other number of nodes online 24/7, as long as the servers can't read the message sent from A to B

Is there a way to achieve this? How?

share|improve this question
I'm new here and not a security expert, so please feel free to edit my question using the correct terms (not sure if node is a correct term) and the tags. Thanks! – fotanus Aug 30 '13 at 16:49
Have you thought of email, sftp, connect direct, in fact any form of asynchronous communication which supports encryption. – Rory Alsop Aug 30 '13 at 16:58
@RoryAlsop Can I send you an encrypted e-mail without changing a symmetric key with you that my e-mail server will not be able to read? Or any of the other options? How? (This is the question basically) – fotanus Aug 30 '13 at 17:05
up vote 1 down vote accepted

This is the model of encrypted emails. So see OpenPGP, in particular its open-source implementation GnuPG. With your notations, node B has a public/private key pair, and node A knows the public key of B. Node A asymmetrically encrypts the message with node B's public key, and only node B can decrypt it, using its private key, which no other node knows. When A sends the message, it actually sends it to some repository server (B's "mailbox"), which B will consult when it goes online again. The repository does not have a copy of B's private key, and therefore cannot decrypt the message.

For the encryption process, node A only needs a copy of B's public key, which is public, and does not change; node A can use B's public to encrypt one billion successive messages without any security problem. B's public key does not "wear off" upon usage. Node B needs not be online at any point for the encryption to work.

There are a lot of tricky details to care of when designing a format for asymmetric encryption, so you are warmly encouraged not to do it, and instead rely on some existing protocol (like OpenPGP) which has been thoroughly reviewed by many cryptographers. Similarly, implementation is also a dangerous part, and you cannot test for involuntary data leaks, so reusing some existing code is also a smart move.

The hard part in asymmetric encryption is how to make sure that what node A considers to be "B's public key" is really the public key of B, not a fake public key whose corresponding private key is known to the attacker. Depending on your context, this "making sure" part can be as simple as a one-time configuration, or as complex as a full-blown PKI.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.