I need this assignment in 12 hours from now. Please let me know anyone can do this.
P
roblem1
G
iven encrypted text, decipher the text using an analytical attack.
I
mplement your solution in the following programming languages:
C
++
,
C# or
O
bjective C
F
#
Convert the imperative C++ style to the Functional style as much as possible
T
he simplest method for encrypting text is the substitution cipher.
H
istorically this type of cipher has been used many times, and it is a good illustration of basic cryptography.
The goal of the substitution cipher is the encryption of text.
W
e substitute each letter of the alphabet with another one.
E
xample:
A
k
B
d
C w
…
The letter frequency analysis is an analytical attack that exploits the weakness of the substitution cipher. The statistical properties of the plain text are preserved in the cipher, and an algorithm should be able to successfully attack it.
1.
D
etermine the frequency of every cipher text letter
2. Determine pairs and tuples
3. If word separators have been found, blanks, commas, etc., then short words such as THE, A
N
D, etc. can be determined fairly fast.
R
elative letter frequencies of the English language
L etter |
Frequency |
|||
A |
0.0817 |
N |
0.0675 |
|
B |
0.0150 |
O |
0.0751 |
|
C |
0.0278 |
P |
0.0193 |
|
D |
0.0425 |
Q |
0.0010 |
|
E |
0.1270 |
R |
0.0599 |
|
F |
0.0223 |
S |
0.0633 |
|
G |
0.0202 |
T |
0.0906 |
|
H |
0.0609 |
U |
0.0276 |
|
I |
0.0697 |
V |
0.0098 |
|
J |
0.0015 |
W |
0.0236 |
|
K |
0.0077 |
X |
||
L |
0.0403 |
Y |
0.0197 |
|
M |
0.0241 |
Z |
0.0007 |
Problem 2
Given a set of encrypted numbers, decrypt the numbers. Use the case of addition only.
Implement the algorithm using the following programming languages:
C++
C# or Objective C
F#
Prolog
Example Problem:
ABCD 1234
ABCD 1234
BDEF 2468
There are numerous possible solutions. Your algorithm needs to produce only one of the possible solutions. A simple but effective method is to use brute force. That is trying and testing every possible combination of numbers. This can be greatly improved by testing the first two least significant numbers.
Limit this problem to 4 digit numbers. The result of the addition can generate 5 digits.