Given some input plaintext and output ciphertext, is there a group of crypto algorithms that mean that a change in the ending x bytes of the input plaintext makes some y change at the end of the ciphertext as well? The point is to conserve the visual pattern, but to still be encrypted.

  • 5
    $\begingroup$ This normally is not a desirable property, see en.wikipedia.org/wiki/Block_cipher_mode_of_operation#ECB $\endgroup$
    – bmm6o
    Dec 15, 2020 at 16:57
  • 4
    $\begingroup$ Can you elaborate on what you mean by conserve the visual pattern? $\endgroup$
    – Modal Nest
    Dec 15, 2020 at 16:59
  • 1
    $\begingroup$ no one wants that. If that happens then your encryption algorithm is weak and can be broken easily! $\endgroup$
    – Aven Desta
    Dec 15, 2020 at 17:24
  • $\begingroup$ Given something like a 156 byte string of encrypted data, if the plaintext was to change the last 20 bytes of the string then the ciphertext will have changed the last 20/25/32/etc bytes, but always at the end and if its a 20 byte change the output change is always the same amount. $\endgroup$
    – Monteven
    Dec 15, 2020 at 21:35

1 Answer 1


Name for crypto algorithm that preserves visual pattern

I'm not sure exactly what you're looking for, but one interpretation of your question is that you're looking for a way to 'hide' a message within a picture in a way that the picture isn't obviously changed.

The general technique to do this is known as "steganography"; that has the goal of hiding a message into something innocuous (such as a JPEG) in such a way that it's hard to discern (without the key) that there's a message there. Steganography isn't an algorithm; instead, it is the general term for any algorithm that attempts to achieve this.

One common (and rather simple-minded) technique is to take the various bits of the message, and hide them within lsbits of various pixels the picture (tweaking the pixels only slightly); which pixels you use would depend on the key.

Standard joke: for more information, see the steganography stack exchange - just be warned, it is very well hidden...


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.