Score:-3

modern version of a book cypher

kw flag

I'm a computer programmer and I'm working on a truly unbreakable cypher and I keep going back to a book cypher (each letter of the message is referenced by a page,row,and column number in a random book where both the sender and receiver have identical copies.) In my update we use data files and auto lookup. here is my version:

Step 1) create a book

  • generate a "book" of 5,000,000,000 characters writing the characters randomly. (5 gb)

Step 2) the spys each go there own way

  • both sender and receiver have a copy of the file, but its exists nowhere else. (think 2 raspberry pi's that have never been on the internet)

Step 3) encrypter

 - for each letter of message, pick a random number from 1- 4,500,000,000
 - from that index find a matching character looking forward in the file
 - write to the encrypted file an unsigned 64-bit integer of the sum of 
   the index plus some random large number say for example,715073703555645

Step 4) decrypter

  -reverse the encrypter easy enough for a software program. 

If that isn't enough take another random large number, say for example: 36854775 and write that many characters characters out in random before and after the message to the encrypted file.

So how exactly can this be broken?

poncho avatar
my flag
"write to the encrypted file an unsigned 64-bit integer of the sum of the index plus some random large number say for example,715073703555645"; how is the decryptor supposed to know the random large number you've just added?
Amit avatar
ci flag
Apart from poncho's question, which requires clarification indeed, note that block ciphers are similar in every respect to book ciphers but there's no need to generate the entire book in order to use them. In other words, a block cipher, given a key and plaintext/ciphertext which you may as well call "page number, row number, column number" can generate both the corresponding ciphertext (for plaintext) or plaintext (for ciphertext) without precomputing the entire book. It's like a capsule sized code book :)
Jonathan Leslie avatar
kw flag
"how is the decryptor supposed to know the random large number you've just added? " the large number is fixed with both the encrypter and decrypter. the decrypter reads the 64-bit unsigned integer and subtracts the base number. then the decrypter can look at the character at that address in the file.
Jonathan Leslie avatar
kw flag
Amit, I don't understand "s, a block cipher, given a key and plaintext/ciphertext which you may as well call "page number, row number, column number" can generate both the corresponding ciphertext (for plaintext) or plaintext (for ciphertext) without precomputing the entire book. " If all it takes is the key and the plaintext/cihertext, what is guaranteeing that some other program can't repeat the decrypt?
fgrieu avatar
ng flag
The review of such cryptographic designs is off-topic.
Amit avatar
ci flag
@JonathanLeslie Similar to how the secret component of a book cipher is the book itself, in a block cipher the secret component is the key. Only two parties should have this secret key. The "magic" of a block cipher is that it recreates an entire book from a small key and the cipher algorithm, the latter of course isn't even secret
Score:1
vu flag

From OP's comment:

If all it takes is the key and the plaintext/cihertext, what is guaranteeing that some other program can't repeat the decrypt?

Because the key is long enough, just long enough to make brutal-force attack impossible.

There are some basic models against which a cipher algorithm must be secure, and yours are clearly isn't.

In fact, you've been using "truely unbreakable ciphers" all the time, when you browse a HTTPS website. These websites use TLS or QUIC protocols, which use ciphers to protect both the secrecy and integrity of data exchanged between your computer and the server.

3 of the most popular "truely unbreakable ciphers" are:

  • ChaCha20-Poly1305: a software-friendly design.
  • GCM-AES: a hardware-friendly design.
  • CCM-AES: used most-often in WiFi encryption

A short critique of the OP's proposed cipher.

  1. The codebook is 5GB in size, no practical key exchange algorithm can support that (ECDH are typically no bigger than ~500 bits, finite-field DH can go bigger than that, but isn't in any capacity information-theoretically secure).

  2. How are you supposed to generate that big a key? How are you supposed to pick a character in that codebook? Why can't we use such technique to make a stream-cipher (which is much more efficient than carrying a 5GB code book around)?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.