Anda di halaman 1dari 9

SUBSTITUTION/STREAM CIPHER (SYMMETRIC)

Encrypt the below:

1. RUNFORESTRUN; key=3
2. KILLEMALL; key=4
3. RETREATNOW; key =5

Decrypt the below:

1. VWDUVXQPRRQ ; key=3
2. YRHIVEXXEGO; key=4
3. YFWLJYIJXYWTDJI; key=5
SUBSTITUTION/STREAM CIPHER (SYMMETRIC) - ANSWER

Encrypt the below:

1. RUNFORESTRUN; key=3; UXQIRUHVWUXQ


2. KILLEMALL; key=4; OMPPIQEPP
3. RETREATNOW; key =5; WJYWJFYSTB

Decrypt the below:

1. VWDUVXQPRRQ ; key=3; STARSUNMOON


2. YRHIVEXXEGO; key=4; UNDERATTACK
3. YFWLJYIJXYWTDJI; key=5; TARGETDESTROYED
TRANSPOSITION/BLOCK CIPHER (SYMMETRIC)

Encrypt the below:

1. THISISAMESSAGETOSHOW; key=5
2. YOUARELEGEND; key=4

Decrypt the below:

1. IEABVNEEFLILICY; key=5
2. HGAAATHYNUJA; key=3
TRANSPOSITION/BLOCK CIPHER (SYMMETRIC) - ANSWER

Encrypt the below:

1. THISISAMESSAGETOSHOW; key=5; TSSOHAASIMGHSEEOISTW


2. YOUARELEGEND; key=4; YRGOEEULNAED

Decrypt the below:

1. IEABVNEEFLILICY; key=5; IBELIEVEICANFLY


2. HGAAATHYNUJA; key=3; HANGTUAHJAYA
RSA ENCRYPTION EXERCISE

QUESTION_1
Our spy have intercepted an encrypted code, believed to be a type of daily
supplement for the human body that can act as a cure for Israels chemical
weapon warfare. During cryptanalysis stage, they discovered that p=13,
q=5 and the public key used to lock the code is e=29. Decrypt the FOUR
(4) secret codes [42, 29, 50, 49] to recover the cure. (Note: Assume A=1,
B=2, C=3 Z=26 to convert your finalized answer digits, back into
alphabetical plaintext.)
RSA ENCRYPTION EXERCISE

QUESTION_1 ANSWER

N = p.q 13 x 5 = 65 ; some call it modulus M instead of modulus N.

r = (p-1)(q-1)=12 x 4 = 48 ; r also known as the variable phi.

e =29, public key given (check and ensure that value e must relatively
prime to r, so yes 29 is relatively prime to r)

So we need to find the value for the private key, (d).

To do this, start by generating a list of candidate numbers to find (d),


Using trial and error approach, a series of number in sequence, we can
generate the candidate number.
(n * r ) + 1 / e = round number (where n = 1,2,3 n)
RSA ENCRYPTION EXERCISE

QUESTION_1 ANSWER cont.

(n * r ) + 1 / e = round number (where n = 1,2,3 n)

Try n=1;
(1 * 48) + 1 / 29 = 48 + 1 / 29 = 49 / 29 = 1.68965517241 not round no.

Try n=2;
(2 * 48) + 1 / 29 = 96 + 1 / 29 = 97 / 29 = 3.3448275862 not round no.

Try n=3;
(3 * 48) + 1 / 29 = 144 + 1 / 29 = 145 / 29 = 5 ROUND NUMBER!
Is 5 a prime number? Yes 5 is prime, So d is equal to 5, d=5.

So our cryptosystem is complete, we have e=29, d=5


RSA ENCRYPTION EXERCISE
QUESTION_1 ANSWER cont.

Note: Calculation below, finding [mod 65] mod at calculator without mod button
technique, where a mod b = a (a/b) * b. Note a/b take its round number only,
omit digits after decimal points.

FORMULA :- M = Cd mod N
425 mod 65 = 130,691,232 (130,691,232 / 65) * 65 Note: If you get
2,010,634.33846, we omit
= 130,691,232(2,010,634 * 65)
.33846 after decimal point,
=130,691,232130,691,210 = 22 V we care for 2,101,634 only!
295 mod 65 = 20,511,149(315,556 x 65)
= 20,511,14920,511,140= 9 I
505 mod 65 = 312,500,000(4,807,692 x 65)
= 312,500,000312,499,980= 20 T
495 mod 65 = 282,475,249(4,345,773 x 65)
= 282,475,249282,475,245= 4 D
ANSWER: [VITD] which means Vitamin D
RSA ENCRYPTION EXERCISE (cont.)

QUESTION_2
We have successfully recovered a stolen data from a traitor within our
military task force. However the data is locked with encrypted secret
password, perhaps using RSA encryption. We manage to obtain from our
spies the secret random prime number of p & q as p=11, q=5 and the
public key used to lock the code is suspected to be e=23. Decrypt the
FOUR (4) secret alphabets [m, t, w, i] to recover this secret password.
(Note: Assume A=1, B=2, C=3 Z=26 to convert your finalized answer
digits, back into alphabetical plaintext.)

Anda mungkin juga menyukai