I would like to encrypt a string asymmetrically.
I would like the ciphertext to be as short as as plaintext. (or shorter)

I've read about format preserving encryption functions - are there asymmetric variants of them?

  • 2
    $\begingroup$ I think this will answer your question security.stackexchange.com/a/26127/5882 $\endgroup$
    – mikeazo
    Commented Jul 10, 2013 at 14:47
  • $\begingroup$ Your only bet is to always have very much redundancy in the plaintext. This way, if you compress the plaintext, you'll be (possibly) able to produce shorter ciphertext. You'll never be able to produce information theoretically shorter ciphertext, and the comment above by mikeazo is a good pointer to explanation why you should expect ciphertext to be always somewhat longer. $\endgroup$
    – user4982
    Commented Oct 1, 2013 at 15:35

1 Answer 1


Yes, in fact there is at least one length-preserving asymmetric encryption scheme. It's deterministic, though, so there are some security tradeoffs that come with it. It's described in the paper "Deterministic and Efficiently Searchable Encryption" by Boldyreva et al. Look for "RSA-DOAEP".

  • 1
    $\begingroup$ Thanks for the reference. The paper is by Mihir Bellare so it possibly is on to something. Then again, "The plaintext space PtSp(k) consists of all strings of length at least max(k1, 2k0+1).", according to this the encryption will produce in some cases longer bitstring than plaintext input (well, pigeonhole principle predicts that already). Overall, it seems that RSA-DOAEP is not much in use (Bellare's OAEP is much more used), and that there are some risks when using RSA with rarely tried schemes and some known issues using RSA without padding so maybe better try another idea. $\endgroup$
    – user4982
    Commented Oct 1, 2013 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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