1 / 25

Cubic cipher

Cubic cipher. key generation. First, form a Keystring like Playfair E.g. Keyword=COLUMBIA Keystring=COLUMBIADEFGHJKNPQRSTVWXYZ. key generation. Then wrap keystring around a 3X3X3 cube, but leave center empty. 2D and 3D views: z=0 z=1 z=2 COL EFG QRS UMB H J TVW IAD KNP XYZ.

Gideon
Télécharger la présentation

Cubic cipher

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Cubic cipher

  2. key generation First, form a Keystring like Playfair E.g. Keyword=COLUMBIA Keystring=COLUMBIADEFGHJKNPQRSTVWXYZ

  3. key generation • Then wrap keystring around a 3X3X3 cube, but leave center empty. • 2D and 3D views: z=0 z=1 z=2 COL EFG QRS UMB H J TVW IAD KNP XYZ

  4. encryption • Basic idea: for a cleartext letter, ciphertext = pair of letters around it on a straight line • E.g. FEG and VRY COL EFG QRS UMB H J TVW IAD KNP XYZ • Since there’re multiple adjacent pairs, there’re multiple ways to encrypt.

  5. Encryption • Adjacent pairs can go beyond the cube and “wrap back” to it (or think of the cube as being surrounded by copies of itself) • E.g. CLO is also a valid encryption LCOL EFG QRS UMB H J TVW IAD KNP XYZ

  6. encryption • Two other examples: CIU CDM

  7. encryption • A less intuitive example: CPV COL EFG QRS UMB H J TVW IAD KNP XYZ

  8. encryption • 13 such symmetric pairs (above/below, left/right, in front/behind, in front-above/behind-below, …) • Mathematically… (x, y, z = coordinates of letter) 1. x+1 and x-1 2. y+1 and y-1 3. z+1 and z-1 4. x+1, y-1 and x-1, y+1 5. x+1, y+1 and x-1, y-1 6. x+1, z-1 and x-1, z+1 7. x+1, z+1 and x-1, z-1 8. y+1, z-1 and y-1, z+1 9. y+1, z+1 and y-1, z-1 10. x+1, y+1, z+1 and x-1, y-1, z-1 11. x+1, y+1, z-1 and x-1, y-1, z+1 12. x+1, y-1, z+1 and x-1, y+1, z-1 13. x+1, y-1, z-1 and x-1, y+1, z+1

  9. encryption • Each pair has two directions • E.g. COL or LO • So, total of 13X2 = 26 pairs

  10. Encryption • But 2 of them involve the empty space in the middle, so drop them. • Overall, 24 possible encryptions for each letter.

  11. encryption • Which of the 24 encryptions to pick? • Use a distribution function to decide • Right now, distribution function simply returns random integer from 0 to 24 All 24 encryptions have equal chance • More on this later.

  12. decryption • Basic idea: take the two ciphertext characters, find the letter that forms a straight line with them. • Technical term? Zeph: “It’s called Cubic projection… or something like that.” • Very simple, but not sure how to describe in English.

  13. decryption • Use 2D as example. Only 2 possibilities • Case 1: lie on the same x-coordinate • That means cleartext lies on the same coordinate also

  14. decryption • Case 2: lie on different x-coordinates • That means cleartext lies on the third, unoccupied x-coordinate

  15. decryption • For our case, basically repeat the above for all 3 planes (xy, xz, yz) of the cube

  16. nulls • Nulls = meaningless characters in the ciphertext to confuse cryptanalyst • In my cipher, you can produce nulls by encrypting the empty space in the middle

  17. nulls • E.g. EP/PE and MV/VM are adjacent pairs of the empty space. COL EFG QRS COL EFG QRS UMB H J TVW UMB H J TVW IAD KNP XYZ IAD KNP XYZ • So, when decrypted, EP, PE, MV, and VM conveniently become the empty character and disappear: EP’ ‘

  18. nulls • Some examples: MVEPVMVMPEVMMVEP VMMVVMMVOLMVMVMVC PEEPLOPEEPOLPEEPCC • The cipher sprinkles nulls at random throughout the ciphertext

  19. nulls • (Note: since the adjacent pairs of the empty space cannot contain the empty space itself, all adjacent pairs are valid. So there are 26 possible nulls, not just 24.) • (Another note: because of nulls, ciphertext is in general more than twice as long as cleartext)

  20. Sample encryptions • Cleartext: “If one examines dialectic materialism, one is faced with a choice: either accept textual neocultural theory or conclude that narrative is created by the masses. Many narratives concerning the role of the observer as reader exist.” (From Postmodernism Generator) • Ciphertext: YUNENIQMBITVHESQKOJOHEXFHGFNNZPXZAWYXJQOTVRNQIHEUYTXGELWCXVPBIATRVTRMTXFCFBKNIUXEHOUPVZAQXDVBVNRYXIDNKYWIGTQRACIHMPZGNZDXFOWWYAQUOWGOSSHEHZYANUOBQSDOWYMDJTOEHMLARANMGPDLMQWWLUKWVPSGRKZAULBFBDIYVGYJRSLZIGXLMRWBICWTAHZZDWYVIHEUAXBXUIHGXJCMZCBPSHSWYQFWLPOPLSDMDPVHWIZQIFXMXUOZKAZEPRNGONFMFPYSHWKPVYQEIHZSHRXTSNFLTOKGBIDGBMGSOQXGEUCTJEHHZXUEQGOUTKYKOHSBEHOFNYJYMJMJTPZZRTAVPTJNOZSSBVECIYXUTWHUEDHWKEUSCCXIDAMHETVQLYNQXIBHWSUXRMGMDWLDALSYXGFPXWKBQSPUNQGVRKIIQ

  21. Further development? • As I mentioned, right now all 24 (26 for null) ciphers for each letter have equal probability. • Dist.Func. just returns random int in [0, 25] int distFunc(char X) { return rand.nextInt(26); }

  22. Further development? • But can make it more complicated by limiting the choices for some letters to less than 24 • E.g. frequency balancing for homophony • Or the opposite: “unbalance” it (make the ciphertext for ‘Z’ the most frequency bigraph) to throw people off (Shane’s suggestion)

  23. Further development? • Encrypt the ciphertext again using the same key or some key derived from it? • Instead of adjacent pairs, use weirder pairs (or perhaps determine what to use by looking at the keyword)

  24. Weaknesses • subject to bigraph frequency analysis, although nulls and 1-to-24 help a little • too simple?

  25. Thanks! All Hail the Fu

More Related