0
$\begingroup$

I'm working on an app and need to encrypt some structured data. The data will be turned into a string form (JSON) before getting encrypted.

The data format I'm using will always start with a { character and end with a } character. Does this make encryption less secure? Are there any methods for more securely encrypting a JSON string?

$\endgroup$
  • 3
    $\begingroup$ PGP should work just fine. It is meant to take any sort of data as input and securely encrypt it. $\endgroup$ – mikeazo May 2 '15 at 1:24
3
$\begingroup$

There are no known-plain-text-attacks known for the symmetric encryption protocols used by OpenPGP with the OpenPGP CFB mode in use, so you can safely rely on it.

In the end, the very first few bytes of OpenPGP packets are generally rather easily guessable by design, as they usually introduce a compression-packet and literal (data) packet with either very small parameter ranges each -- and this is not considered a problem for OpenPGP but for some very esoteric and hardly usable adaptive cypertext attack relying on a decryption oracle, that is partially exploiting this.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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