# How secure would hand ciphers be using a Block Cipher Mode?

I've been looking into different ciphers that require very minimal computation power (calculator, deck of cards, index cards and a pencil), i.e. hand ciphers. For the most part all methods typically discussed are considered insecure with the advent of computers. Searching for patterns, testing against linguistic statistics, etc. are all simple to perform with computers let alone just having a small key space and not requiring a lot of operations (which is a requirement of a hand cipher).

So I was thinking, what if you were to incorporate a Block Cipher Mode into a hand cipher. How much more secure would it become? Most BCM don't require a lot of additional effort so the power required by a human wouldn't be ridiculous. And hopefully they would provide some protection from the operations a computer can do to intelligently decipher the key/plaintext.

Lets use the Two-Square Cipher and Output Feedback Mode.

If we allow both squares to use all upper case letters and 0-9 we have 36 characters possible in a 6x6 square. That is a key space of

36! x 36! = 1.378e83


A 256 bit key would be 2^256 = 1.158e77 so I'd think our hand cipher has a pretty good start.

I picked Output Feedback Mode because you can't perform parallelized decryption and it contains a single operation. There are lots of modes but I thought this would be simple enough for the point. Pick a better one, my use here is just to get rid of the fact that Two-Square is just a map between Ciphertext and Cleartext.

Lets say we encrypt a 10 character message. Its very short, can't really use any type of analysis on the data to guess at the key or plaintext (even though the BCM would hopefully resolve those concerns). For really simple math, lets make the following assumptions for the operations required to perform the decryption:

• Block Cipher Encryption: 1 operation per character (its a lookup table of two points)
• XOR Encryption and Plaintext/Ciphertext: 1 operation per character

To make these even more simple, we'll assume there is no cost for loading data, or anything else. Not realistic but I/O is always a bottleneck in anything we do so we'll skip it.

A 10 character Ciphertext would require 20 operations to decrypt assuming you had the key. If we say that the average brute force method should take half of the key space to break a system we'd have

20 * (1.378e83 / 2) = 1.378e84 operations


Looks like the fastest i7 chip currently can do 240,000 MIPS so bad math shows us that

1.378e84 ops / 240,000 MIPS = 5.742e72 seconds


Or 1.821e65 years.

So what is it that I'm missing here because that seems like a pretty simple algorithm, with a huge load of work to brute force even for a very small message. I know I'm using rough numbers, but even 1/1,000,000 of that is still a huge amount of time. If the Block Cipher Mode can allow for even larger messages without giving away statistical information about the message, wouldn't this constitute a pretty secure method of encryption? And because humans are slow and lazy, no one would really want to encrypt huge tomes of data by hand. So really a short letter shouldn't be that simple to crack.

Edit:

Just to make it a little more clear, here is the Wikpedia image of Output Feedback:

The Block Cipher Encryption step would just be using the Two-Square cipher (rather than something like AES). So basically my question boils down to, if you have a big enough key space, a small enough cipher text, can a very simple encryption algorithm provide security?

Edit 2

Each character can be mapped to a numerical value. A=1, B=2, 0=27, etc. Since XOR is a little difficult for the human brain to perform, you could add two characters together on encryption and subtract them on decryption. A+B=C, C-B=A. If you roll over the end of your list, you start at the beginning. 8 + C = B Subtraction works the same way.

The question is really about the fact that most classical ciphers had flaws based on their dependence on the clear text and independence on other cipher text or any other data. For example, if two characters in clear text appear in the same block multiple times, they produce the same cipher text values. But what if these classic ciphers were used for pseudo random stream generation? Unless you are generating large amounts of data, shouldn't many of the flaws of classic ciphers be minimized or completely removed?

• I'm probably missing something, but where's the block cipher? Why do you think that a mode of encryption would somehow increase the complexity of the underlying cipher? – Maarten Bodewes Mar 28 '16 at 22:01
• The faults of Two Square is that the cipher text directly maps to clear text so frequency can be used to attempt to decipher the key. If that flaw were to be removed then you'd have an OK algorithm that is nothing like AES but still not instantly cracked via brute force. – jecxjo Mar 28 '16 at 22:35
• People are not that good at doing binary operations, and I don't think that the output of the two-step cipher is binary either. So you would have to do additional mapping. You cannot just connect classical ciphers and modern modes of operation. Try and create a formal description and a simple program implementing this; that should not be too hard, right? – Maarten Bodewes Mar 28 '16 at 23:32
• Instead of true XOR it would be adding for encryption and subtraction for decryption. A=1, B=2 so A "pseudo xor" B would be C. I made a list of letters and their corresponding numbers and I can do the lookup in 2Square and "Xor" with a calculator at a rate of a dozen or so characters a minute. – jecxjo Mar 28 '16 at 23:58
• I think that RC4 is probably doable by humans, since you just need 256 numbered cards to swap around and a preprinted XOR table to help the human do the XORs required. It's not a block cipher, though, like you wanted. It's also not secure by modern standards, but is rather strong among ciphers with small keys feasible for humans. – Myria Jan 14 '17 at 3:46

what if you were to incorporate a Block Cipher Mode into a hand cipher

That line is a bit misleading and hints at a potential misunderstanding. A "mode of operation" is more something you wrap around a block cipher… not something you incorporate or embed into a cipher algorithm.

if you have a big enough key space, a small enough cipher text, can a very simple encryption algorithm provide security?

Generally speaking: yes.

The probably most well-known example would be OTP (One Time Pad) where the key space is as large as the message to be encrypted/decrypted.

And you can even push that assumption ad absurdum if you want, by going double-OTP etc. In the end, your sub-question will start and end with asking yourself "how much security" you expect and "how much inconvenience" you are willing and/or able to handle (think: key exchange, key storage, etc.) to achieve that level of security.

Yet, things like the Two-Square Cipher you mention are pretty different and provide way less information-theoretical security than OTP… to say the least. And that’s exactly the point where my “Generally speaking: yes.” quickly turns into a “In that case: no.” (with a strong urge to add the usual byline: “please, don’t even think about it when you really expect cryptographic security”.)

Looks like the fastest i7 chip currently can do 240,000 MIPS so bad math shows us that…

That may be more relevant when talking about things like brute-force attacks, but even when assuming that to be the main attack vector – keep in mind that brute-force attackers will most definitely use faster things like dedicated ASICs, FPGAs, and/or whole “computing farms” to ensure they attack at optimal speed.

Now, compare that to your comment where you say

with a calculator at a rate of a dozen or so characters a minute

…and the fact that you’ll not even be using 2⁸ bits per char.

I’ll keep it short by saying that your gut feeling should already hint at the fact you won’t have much of a chance winning that race and a mode of operation isn’t a magic shield that makes weak or broken ciphers stronger. Individual weaknesses will still be there; you’ll just be wrapping them in a nice gift paper for an attacker to unwrap. This may cause a minor hickup for the attacker, but it won’t save your message as the cipher flaws are still existent and (in most cases) detectable. In the end, what you hope to gain by applying a mode of operation will be voided by a problem at the core: the weak or broken cipher algorithm.