Welcome Guest [Log In] [Register]
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:

Username:   Password:
Add Reply
Arcanum (another new cipher); a simple symetric key cipher.
Topic Started: May 22 2009, 10:22 PM (159 Views)
dabombguyman
Member Avatar
Just registered
[ * ]
I was thinkin' about the chaocipher and came up with this. It probably is nowhere close to the chaocipher but it's still a great cipher.

It's pretty simple. Find the numerical difference between the key and the plaintext and then add it to the key. You can find the full
description here: Arcanum

I'd like some help cryptanalyzing this. Please let me know of any properties you find.
Q3J5cHRvZ3JhcGh5IGlzIGFuIGFydCBmb3Jt
Offline Profile Quote Post Goto Top
 
jdege
Member Avatar
Elite member
[ *  *  *  *  * ]
The classic Viigenere used a Caesar shift with a rotating key, where the primitive encryption operation was c=p+k (c=ciphertext, p=plaintext, k=key). Decryption reversed this: p=c-k. The Beaufort cipher (officially invented by Admiral Francis Beaufort, though some believe it was really the work of his friend and colleague, Charles Babbage) is the same as the Vigenere, except that it changes the primitive to c=k-p. There are two other possibilities, c=p-k, which is called the Variant Beaufort, and c=-p-k, which never seems to have picked up a name.

You'll notice that Variant Beaufort encryption is exactly the same as Vigenere decryption. Beaufort, though, is unique. Since c=k-p, p=k-c. The process for encryption and decryption is exactly the same.

What you have is a minor variation on the Vigenere family of periodic polyalphabetic ciphers. You are using as a primitive c=2*k-p. If you think about that, that's simply the same as c=k'-p, using a different key. In other words, it's the Beaufort cipher.

Your example uses the key CRYPTO. If you do a Beaufort encryption using the keyword FJXFND, you get the same result. (Actually, it's usual to assign the integers A=0, instead of A=1, as you have, so for most Beaufort software, the key would be EIWEMC).

Cryptanalysis of the Beaufort is pretty much identical to cryptanalysis of the Vigenere - use the Index of Coincidence to determine the key length, then use the chi^2 test to identify the necessary shifts.

Your example text is very short, but running it through vigsolve (click here) correctly identifies the keylength.

Code:
 
Index of Coincidence and Periodic Key Find

23 Characters read, 19 Alphas

Len     Index    Vigenere         Var. Beaufort    Beaufort
---     ------   c = p+k          c = p-k          c = k-p
                 p = c-k          p = c+k          p = k-c
                 k = c-p          k = p-c          k = p+c
  2   0.058333   ee                         ww                         mk
  3   0.076190   aey                        awc                        eqy
  4   0.050000   eeik                       wwsq                       eidq
  5   0.000000   eteet                      whwwh                      jalqx
  6   0.111111   aesaiy                     awiasc                     ebegzj
  7   0.047619   tetruzi                    hwhjgbs                    xlevqja
  8   0.041667   meiyzqwe                   owscbkew                   eizcfiol
  9   0.037037   meuoixata                  owgmsdaha                  eocgmdsqi


Note that a keyword length of 6 yields the higheest IC, but only one of the letters in the key is properly assigned. With a text as short as this, the statistics are often unclear.

Using the same key on a longer text works better. Text:

Quote:
 
NXEVK SQVNG NXAKM DLWLM TGBQA ORYHV NBRIL QXXNO KVNIL ZZQNX OMRSA JGSFQ
QZXGM DAZTS GCAJS SFWLB WTXYW PDYMD WJQWZ WBKAG OUNNY PZXSX NODFE KLZVB
NZTYN IWOYF LVLJL SDVNR WTXJM XEULP RIEYM RXNKV WRKYB CMYGJ PPRWY HPYMQ
XXSYW GTXQB GCAPE ESBRX NSLX


Result:

Code:
 
Index of Coincidence and Periodic Key Find

245 Characters read, 204 Alphas

Len     Index    Vigenere         Var. Beaufort    Beaufort
---     ------   c = p+k          c = p-k          c = k-p
                 p = c-k          p = c+k          p = k-c
                 k = c-p          k = p-c          k = p+c
  2   0.050281   ..                         ..                         e.
  3   0.048142   ...                        ...                        ...
  4   0.048235   ....                       ....                       e.e.
  5   0.044278   .....                      .....                      .....
  6   0.064765   jv....                     rf....                     ebegzj
  7   0.039573   .......                    .......                    .......
  8   0.049455   y.l.....                   c.p.....                   e.e.....
  9   0.048832   .v.u.....                  .f.g.....                  eb.as...e
 10   0.055038   ...ft..k..                 ...vh..q..                 ..eqek.qyj


You'll note that it not only identified the key length, it correctly identified each of the key letters. On texts of moderate length, this will usually be the case. On shorter textx, usually only some of the individual key letters will be identified.

I wrote up something about how this method works in other threads:

Cracking a Vig with IC

The Index of Coincidence - the Chi Test, the Kappa Test, and the mixed-alphabet Vig

When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
Offline Profile Quote Post Goto Top
 
dabombguyman
Member Avatar
Just registered
[ * ]
Wow! Thanks! I'll take note. Also, I remembered why I thought this might be the choacipher. In a way it's using 3 (identical) alphabets but 2 of them actually MOVE compared to the key. I'll explain some more. The P alphabet and the C alphabet are 2 (counter-rotating) discs and the key is a stationary ring in between them.

ABCDEFGHIJKLMNOPQRSTUVWXYZ - P
----------------------------------------------------------------- VVVVVVVVVVVVVVVVVVVVVVVVVV
ABCDEFGHIJKLMNOPQRSTUVWXYZ - K (gears inside): ....................<O> (rotatng gear)
----------------------------------------------------------------- ^^^^^^^^^^^^^^^^^^^^^
ABCDEFGHIJKLMNOPQRSTUVWXYZ - C

When you rotate the P letter to match the K letter, the C disc rotates the other way until the correct letter matches up. Example: P=A, K=C.

YZABCDEFGHIJKLMNOPQRSTUVWX
ABCDEFGHIJKLMNOPQRSTUVWXYZ
CDEFGHIJKLMNOPQRSTUVWXYZAB

Ta-dah! Something that consists of two rotating discs and when fabricated, can fit in a cigar box (at ten dollars each). Also easily demonstrated with paper (As Byrne did with the gov.). Also a 'home made' version would be quite hefty. And the method of encryption is the same as decryption. Even easily relates to the 'Hero of Alexandria''s rotor system. Finally it's "scarcely more than a toy".

Chaocipher info

This might or might not be it, but it's definitely a possibility, unless someone has already experimented with this. ^_^
Q3J5cHRvZ3JhcGh5IGlzIGFuIGFydCBmb3Jt
Offline Profile Quote Post Goto Top
 
jdege
Member Avatar
Elite member
[ *  *  *  *  * ]
Just after WWI, Gilbert Vernam invented the stream cipher. His machine was intended to attach to a mechanical teletype, that used the five-bit Baudot code, and was fed by a punched tape. His machine used a second punch tape, and added the two tapes together by a bit-wise XOR. In Vernam's original system, the key tape was a loop, resulting in a long, but repeating periodic key. It was this system for which Joseph Mauborgne proposed that if the key tape was totally random, and was longer than the message, and was never re-used, security would be ideal. Claude Shannon later proved that Mauborgne's system was theoretically unbreakable.

Of course, distributing a unique key tape for every message is impractical, so the other modification to Vernam's tape cipher was to use two tapes, one slightly longer than the other. If the first key was 1000 characters long and the second was 1001, the result would repeat only every 1,001,000 characters.

So this is an idea that dates back to 1919. Still, like most good crypto ideas, it's been reinvented by enthusiastic amateurs many times, over the years.

Charles Babbage once wrote:
Quote:
 
One of the most singular characteristics of the art of deciphering is the strong conviction possessed by every person, even moderately acquainted with it, that he is able to construct a cipher which nobody else can decipher. I have also observed that the cleverer the person, the more intimate is his conviction. In my earliest study of the subject I shared in this belief, and maintained it for many years.}


My own "unbreakable" cipher I invented in the seventh grade. I don't remember where I learned about the Vig, perhaps from Martin Gardner's book, but I knew about it, and decided that multiple keywords would be better. It seemed clear to me that using keywords with prime lengths would result in the longest periods. And I'd noticed that 3+5+7+11 = 26. So,

Take your keyword, and write it out horizontally, If it contains any repeated letters, keep only the first occurance, drop the rest. Under it, in lines of the same length, write the rest of the alphabet.
Code:
 
S E C R T K Y
A B D F G H I
J L M N O P Q
U V W X Z


Now, read off the letters vertically, in alphabetic order of the keyword:
Code:
 
C[space]D[space]M[space]W[space]E[space]B[space]L[space]V[space]K[space]H[space]P[space]R[space]F[space]N[space]X[space]S[space]A[space]J[space]U[space]T[space]G[space]O[space]Z[space]Y[space]I[space]Q


Now, split this into four keys, of lengths 3, 5, 7, and 11:
Code:
 

Key[space]1:[space]C[space]D[space]M
Key[space]2:[space]W[space]E[space]B[space]L[space]V
Key[space]3:[space]K[space]H[space]P[space]R[space]F[space]N[space]X
Key[space]4:[space]S[space]A[space]J[space]U[space]T[space]G[space]O[space]Z[space]Y[space]I[space]Q


Now, encrypt your message using the standard Vigenere method, once for each of the four keys:
Code:
 
  ATTACKATDAWN
+ CDMCDMCDMCDM
= CWFCFWCWPCZZ
+ WEBLVWEBLVWE
= YAGNASGXAXVD
+ KHPRFNXKHPRF
= IHVEFFDHHMMI
+ SAJUTGOZYIQS
= AHEYYLRGFUCA


The result repeats only after 3*5*7*11 = 1155 characters, and I thought that meant you'd need at least that much ciphertext in order to break it. Of course, I was wrong. There's an easy known-plaintext break if you know just 26 characters.
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
Offline Profile Quote Post Goto Top
 
dabombguyman
Member Avatar
Just registered
[ * ]
It would appear to me that almost every "simple" pencil and paper cipher has been invented probably a hundred times or more. I understood when I made it that someone would most likely have already made something similar, even though my method is still almost completely unique, the principle behind it has been exploited many times over. And today the only safe ciphers are complicated ("non-pencil and paper") ciphers, and so anything otherwise would be but a 'hobbie'. I'll eventually work my way up to more "complicated" cryptography, but right now it's just a curiosity.

Also, I want to know what you think about my ciphers relation to the "chaocipher". Maybe even put some choacipher texts thorugh "Vigsolve" and see what you get.

I'm into mysteries too. ^_^
Q3J5cHRvZ3JhcGh5IGlzIGFuIGFydCBmb3Jt
Offline Profile Quote Post Goto Top
 
jdege
Member Avatar
Elite member
[ *  *  *  *  * ]
dabombguyman
May 24 2009, 09:16 PM
Also, I want to know what you think about my ciphers relation to the "chaocipher". Maybe even put some choacipher texts thorugh "Vigsolve" and see what you get.
I've not looked into Chaocipher. All I can do is point to The Chaocipher Clearing House
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · General · Next Topic »
Add Reply