Cubic cipher
Download
1 / 25

Cubic cipher - PowerPoint PPT Presentation


  • 287 Views
  • Uploaded on

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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Cubic cipher' - Gideon


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Key generation l.jpg
key generation

First, form a Keystring like Playfair

E.g. Keyword=COLUMBIA

Keystring=COLUMBIADEFGHJKNPQRSTVWXYZ


Key generation3 l.jpg
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


Encryption l.jpg
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.


Encryption5 l.jpg
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


Encryption6 l.jpg
encryption

  • Two other examples:

    CIU CDM


Encryption7 l.jpg
encryption

  • A less intuitive example: CPV

    COL EFG QRS

    UMB H J TVW

    IAD KNP XYZ


Encryption8 l.jpg
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


Encryption9 l.jpg
encryption

  • Each pair has two directions

  • E.g. COL or LO

  • So, total of 13X2 = 26 pairs


Encryption10 l.jpg
Encryption

  • But 2 of them involve the empty space in the middle, so drop them.

  • Overall, 24 possible encryptions for each letter.


Encryption11 l.jpg
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.


Decryption l.jpg
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.


Decryption13 l.jpg
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


Decryption14 l.jpg
decryption

  • Case 2: lie on different x-coordinates

  • That means cleartext lies on the third, unoccupied x-coordinate


Decryption15 l.jpg
decryption

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


Nulls l.jpg
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


Nulls17 l.jpg
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’ ‘


Nulls18 l.jpg
nulls

  • Some examples:

    MVEPVMVMPEVMMVEP

    VMMVVMMVOLMVMVMVC

    PEEPLOPEEPOLPEEPCC

  • The cipher sprinkles nulls at random throughout the ciphertext


Nulls19 l.jpg
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)


Sample encryptions l.jpg
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


Further development l.jpg
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);

    }


Further development22 l.jpg
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)


Further development23 l.jpg
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)


Weaknesses l.jpg
Weaknesses

  • subject to bigraph frequency analysis, although nulls and 1-to-24 help a little

  • too simple?


Thanks l.jpg
Thanks!

All Hail the Fu


ad