I'm starting to create a puzzle, but I'm going to need a cipher that will be impossible (or at least very difficult) to crack, but can be easily decoded with a key. I first looked at the one-time pad cipher, but the message I'll be encrypting will likely be longer than the key. Does anybody have recommendations?

As bobble pointed out, there are lots of different ciphers, so here are some criteria:

  • Simple to encode / decode
  • Extremely difficult to impossible to crack without the key
  • Key can be any length (or at least smaller than the message, unlike OTP)

The checkmark will be given to the answer that meets these criteria best.

  • 1
    $\begingroup$ Could you please provide the exact criteria you require and/or will judge answers by? Lots of ciphers use passwords and if this isn't precisely specified you'll attract an endless list. $\endgroup$
    – bobble
    Sep 18, 2023 at 13:43
  • $\begingroup$ Does the second bullet point mean that, for example Vigenère would not work, since there are techniques to crack that cipher by letter frequency etc.? $\endgroup$
    – bobble
    Sep 18, 2023 at 13:52
  • $\begingroup$ @bobble Probably, because that wouldn't be extremely difficult to crack, especially for a longer message. $\endgroup$ Sep 18, 2023 at 14:02
  • $\begingroup$ If you just loop around the key, your one-time pad cipher actually becomes a Vigenere cipher, which should work fine for most puzzle-related purposes. If your requirement is to have a cipher that is near-impossible to crack, but the key can be a lot shorter than the message, you're sadly out of luck. $\endgroup$
    – Bass
    Sep 19, 2023 at 5:45
  • 1
    $\begingroup$ Why is it important that this be a cipher? Is it a requirement that the players be able to decipher the text once in possession of the key using pen and paper or other "offline" methods? If not, you could put the plaintext into a password-protected Pastebin. $\endgroup$ Sep 19, 2023 at 9:48

1 Answer 1


I had the same idea already mentioned in comments by bobble and Bass but I feel it is a suitable answer for the purpose of puzzling.

A Vigenere cipher, meaning you use a one-time-pad but just loop the pass phrase should work perfectly fine. Statistical techniques like letter frequencies work well for long encoded texts but are fairly hopeless for say a pass phrase of 10 letters and a 100 letter message.

Brute forcing will sort of work but needs a computer and a good bit of cleverness as the computer will need to decide which of the enormous number of messages decoded with a guessed pass phrase look like a possible solution. You can make the bruteforcing even harder by not giving away the exact length of the pass phrase in the puzzle and choosing a random collection of letters instead of a dictionary word as the pass phrase.

  • $\begingroup$ The Vigenere cipher can be broken using word-list or stochastic search techniques (neither of which is "brute force") even if the key is random nonsense. All that is needed is that the key is used more than once. Online Vigenere solvers do well even if the message is as little as four times the length of the key. If the message is only twice the length of the key, the solver may subtract the two halves of the text from each other to negate the key, and then solve it as a running-key cipher. $\endgroup$ Sep 19, 2023 at 10:01
  • $\begingroup$ @Looks like I underestimated how good computers are at that kind of thing. I would still claim that breaking a vigenere with 10 letter pass phrase and 100 letter message with pen and paper is quite hard (much harder than 10 letter pass phrase and 1000 letter message). $\endgroup$
    – quarague
    Sep 19, 2023 at 10:45
  • $\begingroup$ The computers aren't what you're underestimating. The 1940s codebreaking manual Military Cryptanalysis gives a pen-and-paper method for breaking a Vigenere cipher using only the first ten letters under each key letter. It works because out of the 26 possibilities for each key letter, only a few of them give a sensible collection of plain letters, and the possibilities can be examined quickly using strips of paper printed with the alphabet. $\endgroup$ Sep 19, 2023 at 16:07

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.