Professional Documents
Culture Documents
Programming Assignments:
Exp-1
Aim: To implement a program in java for password cracking using Brute Force.
A brute-force attack is a cryptanalytic attack that can, in theory, be used to attempt to decrypt
any encrypted data (except for data encrypted in an information-theoretically
secure manner. Such an attack might be used when it is not possible to take advantage of
other weaknesses in an encryption system (if any exist) that would make the task easier.
We assume the input to be a password to be of length 4 and having only lowercase letters.
We try all possible combinations of lower-case letters to try and decode the password.
Input:
Output:
Exp-2
Example:
It is a type of substitution cipher in which each letter in the plaintext is shifted by a certain
number of places. The key is the number of characters to shift the cipher alphabet.
First we translate all of our characters to numbers, 'a'=0, 'b'=1, 'c'=2, ... , 'z'=25.
We can now represent the caesar cipher encryption function, e(x), where x is the character we
are encrypting, as: