0
Enigma Information
Main Index
EG Manual
Disclaimer
Legal Information
Contributions
Hall of Fame
Hall of Shame
Member Rankings
Members List
Meet the Staff

Knowledge Bank
Discussion Forums
EnigmaGroup's IRC
RSS Feeds
Articles / Tutorials
Videos
Enigma Zine
Downloads
Tools

Training Missions
Basic Skills
Realistic Scenarios
Cryptography
Software Cracking
Logical Thinking
Programming
Patching
Steganography
Deface This Wall

Ajax
ASM
Bash
C
CPP
Csharp
Delphi
Haskell
Java
Javascript
Jython
Lisp
mIRC
MySQL
Perl
PHP
Python
QBASIC
VisualBasic

hakipedia
Enigma Group's Articles

The Gronsfeld Cipher - Submitted By: invas10n 2008-08-27 13:34:48
The Gronsfeld Cipher

The Gronsfeld Cipher is a variation on the Vigenere Cipher developed by F. Pratt in 1939. Instead of using a keyword and 26 possible Caeser Shifts, the Gronsfeld Cipher uses a combination on numbers, normally 4 or 5. A single digit is not used more than once and the combination is repeated along the entire length of the message. Each number represents a number of shifts of the alphabet. So, instead of there being 26 different possible shifts like the Vigenere Cipher, there are only a maximum of 10 possible shifts, making the Gronsfeld Cipher easier to decypher.

Here is my example message being decrypted with a key number of 67824.

Number Sequence:  67824 678 246  7824678 246 7824  678 246 78 24678
Original Message: Roses are red, Violets are blue, and now im bored
New Message:     xvagw gym tij  cqqpkaa cvk itwi  gul psc pu dsxll

*Note: Most messages are organized into a template of 4 or 5 letters per word. I will reorganize my encrypted message to stick with the convention most commonly used.

Re-organized:    xvagw gymti jcqqp kaacv kitwi gulps cpuds xll

Now that you know how to encrypt a message using this method, lets discover how to break this form of encryption. The easiest way ofcourse would be to actually know the key number and work backwards using Caeser Shifts to decypher it, but this would only be possible if you were the recipient of the message. The most common method is by trail and error. Start by arranging the letters into columns and rows starting at 0. Seeing as the key goes up to 8, we will write out each letter corresponding to the number of caeser shifts 1-8. Make sure that the caeser shifts applied in this grid are in the opposite direction to the encrypted message. In most cases, the shift is right, therefore this grid will hold leftward caeser shifts. (In normal cases, you would need to draw a grid with 10 rows to (0-9) to cater for the use of any number). This grid is displayed below. Note that we only need about 8 columns or so because once we work out the repeating number, we can just apply it to the other letters.

   0 1 2 3 4 5 6 7
      0 x v a g w g y m    ...   ti jcqqp kaacv kitwi gulps cpuds xll    (note: same order as original)
      1 w u z f v f x l
      2 v t y e u e w k
      3 u s x d t d v j
      4 t r w c s c u i
      5 s q v b r b t h
      6 r p u a q a s g
      7 q o t z q z r f
      8 p n s y p y q e

After constructing this grid, start by writing down all possible words that the first 3 columns can create. Note that I do not write out all possible combinations. It would be pointless to write out a combinations such as "qvz" because there is no such word with a start like that. Go for possible word beginnings. E.g

ups   put   qua   rut   sou   tra
upt   pus      rus   spa   tot
uns   pos      rua   spu   tos
unt   pot      roa   sot   tow
ust   pov      roy   sos   toy
uss   pox      row   sov   tou
usa         rov   soy   tus
utt         rou   sow   tut
         rot   sna   tux
         ros   snu
            sut
            sus

These are just some of the possible combinations available in the grid. To demonstrate how I created some, here's the example code of:

sov   575
usa   331
tut   418
ros   678

Just by taking these 4, you will notice that the first 2 have douplicate values in the code. 575 and 331 are therefore invalid and this narrows down the search for the correct value. You will notice that "ros" with the key of 678 is the same as our secret key.

The time consuming part comes now. You have to step through bits of the message as shown above until you can create the whole key word. Once you have it, its just a matter of applying the keyword to the message, do the shifts and bingo! you have the decrypted message.

Good luck cracking.

Invas10n
[Ask the Experienced, Not the Learned]

Return to Cryptography category list

 
Who's Online
212 Guests, 43 Users
psychomarine, data, hakman, Link-, Lockdown, Evo, Teksaid, ishkur88, LIMINZ, Frebius, Xero, kermy, invas10n, Ausome1, Freedom Fry, NotMyOwn, BinaryShinigami, ruio, Zamani, themastersinner, C, system_meltdown, wasnow, blink_212, Chunky1106, cr4ck3rj4ck, N4g4c3N, RHVSorin, Ops, 0rijin4l, Rik, m-monkey, SFDriver, The_Flash, gadjomatto, Evil1, Psiber_Syn, eman626, Kit, nameless, jinx, BIBER, vapour