Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

given keylength, crack ciphertext by "ranking" the plaintext output #20

Closed
evanrichter opened this issue Feb 23, 2021 · 3 comments
Closed
Assignees
Labels
Projects

Comments

@evanrichter
Copy link
Owner

after guessing key values, there needs to be a way to figure out the best candidates for true key value.

we have access to the dictionary of plaintext words, so we can use character frequency with either strategy:

  • just read every word from the dict and get a frequency. simple, words are sampled randomly so should be representative
  • take the dict and build a plaintext of 10,000 words or so. then take character frequency of that

have a way to see how "close" a string of characters is to the expected character frequency distribution

@evanrichter
Copy link
Owner Author

Key:   abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcde
CT:    ______________________________________________________
PT:    this is normal plaintext attack at dawn blah blah blah

CT under the a's (assuming we got the keylength correct): _________
    for all the shift possibilities (0-26):
        apply the shift
        see what the character frequencies are
pick the shift amount that got you closest to the expected char frequency

@evanrichter
Copy link
Owner Author

evanrichter commented Feb 24, 2021

  • create a branch with skeleton code

@evanrichter evanrichter moved this from To do to In progress in Tasks Feb 24, 2021
@evanrichter evanrichter changed the title ability to "rank" a plaintext output given keylength, crack ciphertext by "ranking" the plaintext output Feb 24, 2021
@evanrichter
Copy link
Owner Author

skeleton code created! I imagine most of this code can go in this file on this branch

@evanrichter evanrichter removed their assignment Feb 24, 2021
@evanrichter evanrichter moved this from In progress to To do in Tasks Feb 24, 2021
@amp813 amp813 assigned amp813 and unassigned mittelmg Mar 1, 2021
Tasks automation moved this from To do to Done Mar 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Tasks
Done
Development

No branches or pull requests

3 participants