Question
This is a cryptography class . I need to create a python programs atbash.py , SpartanScytale.py and kidkrypto.py can anyone help please? these are the
This is a cryptography class . I need to create a python programs atbash.py , SpartanScytale.py and kidkrypto.py can anyone help please? these are the answered just the code I need
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
Z | Y | X | W | V | U | T | S | R | Q | P | O | N | M | L | K | J | I | H | G | F | E | D | C | B | A |
Solution: ZMW ZUGVI GSVN GSV PRMT LU HSVHSZXS HSZOO WIRMP
Solution : THIS WHOLE LAND SHALL BECOME A RUIN AND A WASTE
DECIPHER
Solution : JUSTA SWATE RREFL ECTST
HEFAC ESOON EHUMA NHEAR
TREFL ECTSA NOTHE R
The message was written on the Scytale that allowed for 6 lines that means we can separate the message into chunks that are six characters long:
EIEPAA -
DSNERD
UATREV
CNIFE
AONTUR
TRPYGS
INRAEI
OAONIT
NMSDNY
Reading columns we get Education is an ornament in prosperity and a refuge in adversity.
THESCYTALE
The scytale was an early example o a transposition cypher
7- Ijmc&miclTzvvgxgzthAfmaneokoLy&qfkcydIak
Printed out copy of the wheels from the book, using K as the pointer . mention J drop , polyalphabetic
9- First write the plain text as it is. For the key start with the primary key corresponding to the first letter of the plain text. The next corresponding keys just follow from the main text. Then use vigenere square to get the cypher text.
Plane Text: WALTER RALEIGH BRINGS TOBACCO TO ENGLAND FROM AMERICA
key: BWALTE RRALEIG HBRING STOBACC OT OENGLAN DFRO MAMERIC
cipher text: XWAEXV IRAPMON ISZVTY LHPBAEQ HH SRTVLAQ IWFA MAQVZKC
14- The pigpen cipher relies on its users memorizing the diagrams shown in the book on page 35 in figure 1.12. Decipher the message : Well got wealth may meet disaster but ill got wealth destroys its master
19- Well be writing them in a column 6 characters wide to encode the message Army moves 6 December using the ADFGVX table . Subtitution
The next step is using the keyword Berlin we order the columns 126435 and the solution is : AFGVFF GFVAAG VAXGVG AVXDXX VVAXVA GVGDGG
24-
M = ab -1
e= AM +a
d= BM +b
10 digit no.
N = (ed-1)/
Y= e.x mod n
N = 1722629
E= 41996
Y= 1305808
X= ?
X = (y/e)mod n e^-1 =a
= ye^-1 modn
Multiplication inverse
Another way of doing it
D = d.y mod n
= d.(e.x) mod n
ed = Mn+1 mod n
ed = 16 + 1 mod 16
ed1 = 32 +1 mod 16 potential answer
ed2 = 48 +1 mod 16 potential answer
ed = Mn +1
2.5 = 10 +1 mod 10
10 = 20 + 1 mod 10
M:1033, e: 11410, d:5187, n:57293
Y:53803, undone: 1958
You can find Walters pin easily. Since you know how to find the ciphered text and theres only 9999 or so pins just loop through each pin and encrypt it and find which ever matches the enciphered pin.
ATBASH.py
Import string
Cipher =
Qfhgz hdzgv iivuo vxghg
Svuzx vhllm vsfnz msvzi
Gvuo vxghz mlgsv i
Alpha = abcdefghegklmnopqrstuvwxyz
Cipher = cipher.lower()
# basically tr/abc./cba/
Deciphered = cipher.translate ( string.maketrans9alpha, alpha[ ::-11]))
Print Deciphered/Ciphered: + str(deciphered)
SpartanScytale.py
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started