1.2b caesar done

This commit is contained in:
Kaushik Narayan R 2024-02-11 14:01:03 -07:00
parent 20a60a5381
commit 8b7829025e
2 changed files with 28 additions and 1 deletions

View File

@ -9,3 +9,9 @@ which is not english text, also sha512 sum doesn't match
a - julia
(the thing has a space at the end lol)
mile Vinay and Joseph Gaussinthough not with the speed and ease of a typewriter keyboard. Rather it was the assimilation of encipherment into the overall communication process. Vernam created what came to be called "on-line encipherment" (because it was done directly on the open telegraph circuit) to distinguish it from the old, separate, off-line encipherment. He freed a fundamental process in cryptography from the shackles of time and error. He eliminated a human beingthe cipher clerkfrom the chain of communication. His great contribution was to bring to cryptography the automation that had benefited mankind so much in so many fields of endeavor. These values were immediately recognized, and Ver-nam's idea quickly kicked up a flurry of activity. He put it down on paper in a sketch dated December 17. A.T. & T. notified the Navy, with which it had worked closely in a communications demonstration the previous year, and on February 18, 1918, Vernam, Parker, Lyman F. Morehouse, equipment
b - caesar
key shift 3, left shift gives:
EMASWALDSRINGSHIGHLANDSSNOOTIESTASCENDSETTERSFLARESTHINKINGSCARPINGSEDERSSWELLEDMERCILESSOVERSENSITIVEADVENTURERDIVANSYPSILANTISJOCASTAHEADRESTSDISSERTATIONSJOISTSBUSSSERAPUPPETRYSBUNTEDAMPHITHEATRESSTEREOSUNJUSTIFIEDZEPHYRUSSABDICATIONSHUSSERLPALMISTFERALMANNERLEONIDSDILLONSWHEREFORESFERTILIZEDDUCKBILLDUNNESSCORESHAIRCUTBOTTICELLIREPELGLIDESFELICESBRAINSTORMINGSCLEMENCYREDOINGMEDICAIDSBLUNDERBUSS
b - julia

View File

@ -0,0 +1,21 @@
with open("3/withoutkey/ciphertext.txt", "r") as caesar_cipher_file:
caesar_cipher_content = caesar_cipher_file.read()
for key_shift in range(1,27): # both left and right, 13x2=26
print("key shift", key_shift)
caesar_plaintext_content_left_shift = ""
caesar_plaintext_content_right_shift = ""
for char in caesar_cipher_content:
caesar_plaintext_content_left_shift += chr(
(ord(char) - ord("A") - key_shift) % 26 + ord("A")
)
caesar_plaintext_content_right_shift += chr(
(ord(char) - ord("A") + key_shift) % 26 + ord("A")
)
print("left shift")
print(caesar_plaintext_content_left_shift)
print()
print("right shift")
print(caesar_plaintext_content_right_shift)