| Welcome to Crypto. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| A New Kind Of Hill Cipher; a New Cipher and a Challenge | |
|---|---|
| Topic Started: Apr 3 2009, 01:14 AM (127 Views) | |
| weux082690 | Apr 3 2009, 01:14 AM Post #1 |
|
Just registered
![]() ![]() ![]()
|
I invented a new cipher based on the Hill Cipher and I want to find how secure it is. I call it the "Overlapping Hill Cipher". First, I'll explain the general idea, then I'll provide one example to be cracked. The basic point of inventing this cipher was to find a way to expand the block size of a hill cipher. Your key is just an invertible (with respect to some modulus) n x n matrix like in the hill cipher. You also choose another number which is a multiple of n, we'll call this number m*n. For all of the following examples I use a modulus of 26 Encryption: 1. Take out spaces, punctuation marks, and anything that's not a letter from your message, and convert the letters into numbers from 0 to 25 (i.e. A=0, B=1, C=2, ..., Z=25) example: Attack at dawn becomes 0,19,19,0,2,10,0,19,3,0,22,13 2. Divide your message into blocks of size m*n adding nulls if necessary example: let's use n=2 and m*n=16 adding nulls creates 0,19,19,0,2,10,0,19,3,0,22,13,0,0,0,0 (I tend to favor a's as nulls in examples) 3. Starting with the first block, put a marker in front of the first number and divide the block of size m*n into m blocks of size n example: |0,19 19,0 2,10 0,19 3,0 22,13 0,0 0,0 4. Encode each block of size n using your matrix key, like the hill cipher example: using the 2x2 key 19,7;4,13 ("then") the message becomes |3,13 23,24 4,8 3,13 5,12 15,23 0,0 0,0 5. Recombine your block of size m*n, move the marker one space forward, then divide the block of size m*n into blocks of size n again but make sure the marker is between blocks (this is the tricky and pivitol step) example: recombining and moving the marker produces 3,|13,23,24,4,8,3,13,5,12,15,23,0,0,0,0 re-division produces 3 |13,23 24,4 8,3 13,5 12,15 23,0 0,0 0 6. Encode each block of size n using your matrix key, treating the block of size m*n as if it is a loop (to be explained in the example if you don't get it already) example: one of our blocks in the wrap-around block 0,3 coming from the last and first of the current message encoding this produces 13 |18,13 16,18 17,19 22,13 21,14 0,0 21 7. Repeat steps 5 and 6 until the marker is right before the last number (do the dividing and encoding with the marker right before the last number) then move on to the next block of size m*n in your message example: after all the repetitions you get 13,12,2,15,5,15,13,0,14,23,16,15,0,3,0,|24 8. After all blocks of size m*n have been encoded convert the numbers back into letters and break it up into 5-letter blocks (or whatever size you choose) example: the above becomes nmcpf pnaox qpada y Decoding: Basically the same as encoding only the marker starts right before the last number and moves back instead of forward and you use the inverse of the matrix key example: our example matrix's inverse is 13,23;2,23 Challenge: pakuh iycmj idmwe ontar kpanl tlvdp cbivr oromf putqh hadhr qwpml uqhad The size of the key and (m*n) blocks are Spoiler: click to toggle If you want to try a known plaintext attack the plaintext is Spoiler: click to toggle The goal of the challenge is to discover the key I used for the above message and use that key to send me the ciphertext of Spoiler: click to toggle In case anyone cares, I used a simple spreadsheet program to do all the above encoding |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Challenges · Next Topic » |





![]](http://209.85.122.85/static/1/pip_r.png)



7:30 AM Nov 8