Skip to content

nguzinski/Simple_Permutation_Cypher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To compile

g++ hello.c++

To Run

./a.out

Program Notes

  1. frequency analysis occurs automatically upon program launchin a table mapping characters to their frequency

  2. Various key permutations are tried via swapping characters with the keys to the left and right, and the program outputs the best key and begins accepting input (either swaps or a new key).

  3. An option will be prompted to the user if they would like to enter a full key at any point, entering the proper 26 alphabetical key will result in a decrypted text, or the ability to swap an out of place letter for a different one.

  4. The key is the plaintext mapping to an ordered ciphertext (aka: index 0 of the key maps to ciphertext A).

How we decrypted the message manually:

  1. Start with key: DHIKNVTRUXAMPCYFSGEZOBJWQL and text = THEWOITELSTATESFASATMEADEFITHTHATOATINOAOLATTHESNUIDITATINONGJAMAOFASSTIUUIODNOBERSATINOFITHITSYNBEROCEOTAOLITSECMERNRUNNKIOYTNFARLTHECAIOTEOAODENGMEADEIOTHEMADIGIDIOLEELNOEHNWRAGTERJAMAOESEAIRSZWALRNOSHALDNCCEODELVNCVIOYIONAHWTHEJAMAOESEACVASSALNRTNTHEWOITELSTATESAOLHISDNUUEAYWELEUIBERELTNTHESEDRETARPNGSTATEAGNRCAUREMUPTNAREDEOTACERIDAOCESSAYEFHIUETHISREMUPSTATELTHATITSEECELWSEUESSTNDNOTIOWETHEEXISTIOYLIMUNCATIDOEYNTIATINOSITDNOTAIOELONTHREATNRHIOTNGFARNRARCELATTADK
  2. Complete the following swaps:
    • F for W
    • F for U
    • O for N
    • L for D
    • M for P
    • L for C
    • B for V
    • F for L
    • G for F
    • Y for G
    • Y for M
    • Z for Q
  3. Final key: CHIKOBTRLXAPYMGWSFEQNVJUZD and plaintext: THEUNITEDSTATESWASATPEACEWITHTHATNATIONANDATTHESOLICITATIONOFJAPANWASSTILLINCONVERSATIONWITHITSGOVERNMENTANDITSEMPERORLOOKINGTOWARDTHEMAINTENANCEOFPEACEINTHEPACIFICINDEEDONEHOURAFTERJAPANESEAIRSQUADRONSHADCOMMENCEDBOMBINGINOAHUTHEJAPANESEAMBASSADORTOTHEUNITEDSTATESANDHISCOLLEAGUEDELIVEREDTOTHESECRETARYOFSTATEAFORMALREPLYTOARECENTAMERICANMESSAGEWHILETHISREPLYSTATEDTHATITSEEMEDUSELESSTOCONTINUETHEEXISTINGDIPLOMATICNEGOTIATIONSITCONTAINEDNOTHREATORHINTOFWARORARMEDATTACK

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages