mirror of
https://github.com/20kaushik02/CSE548_ACNS_Work.git
synced 2025-12-06 07:44:07 +00:00
1.2b caesar done
This commit is contained in:
parent
20a60a5381
commit
8b7829025e
@ -8,4 +8,10 @@ which is not english text, also sha512 sum doesn't match
|
|||||||
|
|
||||||
a - julia
|
a - julia
|
||||||
(the thing has a space at the end lol)
|
(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
|
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
|
||||||
21
hw1.2/caesar_without_key.py
Normal file
21
hw1.2/caesar_without_key.py
Normal 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)
|
||||||
Loading…
x
Reference in New Issue
Block a user