You are on page 1of 18

Question 1. Make a list of cryptographic tools.

Encryption tools are very useful in keeping valuable information


hidden from cyber criminals, because it renders the data inaccessible
to prying eyes.
Various cryptographic tools are:
1) LastPass
To protect your passwords and increase your online safety, a
recommendation of a password manager likes LastPass is
suggested. Using a password manager means youll only need to
remember one password, the one you use to access Last Pass.
Last Pass provides extensions for the main web browsers, like Mozilla
Firefox and Google Chrome, so its easy to use.
2) Bit Locker
Bit Locker is a full-disk encryption tool incorporated in the latest
Windows operating systems, which supports AES (128 and 256-bit)
encryption (military grade). Its easy to use and its already integrated
into your Windows operating system.

BitLocker Drive Encryption is mainly a tool you can use to prevent data
breaches and data ex-filtration from your hard disk. Thats because
BitLocker encrypts the entire drive, which makes it impossible for
anyone stealing your laptop to remove the hard drive and read the files.
Its a also a good safeguard if you should lose your PC.

3) Vera Crypt
VeraCrypt is free and its available for Windows, OS X and Linux
operating systems.
VeraCrypt adds enhanced security to the algorithms used for system
and partitions encryption making it immune to new developments in
brute-force attacks.
VeraCrypt also solves many vulnerabilities and security issues found in
TrueCrypt.
4) 7Zip
7Zip is a powerful and lightweight solution whose main asset is
simplicity. As many users noticed, 7Zip is capable of extracting most
archives and it features strong AES-256 encryption.

The program is easy to get used to when encrypting your own files and
it uses one of the best compression formats.

5) AxCrypt
Like 7Zip, AxCrypt is a lightweight free encryption tool that integrates
with Windows. You can use it mainly for protecting valuable files from
the system.

The files can be encrypted for a specific period of time and can auto-
decrypt later on, when that file reaches the destination. Its a fast tool
that enables you to select an entire folder or a group of files and
encrypt them fast. Its main purpose is to protect specific files and not
entire hard drives, although it does offer protection against major
cracking methods used by cyber criminals. Plus, you can use it to
encrypt your sensitive data before backing it up in the cloud or on
external hard drives.

6) CrypTool
CrypTool 1 (CT1) is an open-source Windows program for cryptography
and cryptanalysis. Its the most wide-spread e-learning software of its
kind.

The CrypTool Portal raises awareness and interest in encryption


techniques for everyone.
All learning programs in the CrypTool project are open source and
available for free. The CrypTool project develops the world most-
widespread free e-learning programs in the area of cryptography and
cryptanalysis.

7) GNU Privacy Guard


GnuPG is a complete and free implementation of the OpenPGP standard
as defined by RFC4880 (also known as PGP). GnuPG allows encrypting
and signing your data and communication, features a versatile key
management system as well as access modules for all kinds of public
key directories. GnuPG, also known as GPG, is a command line tool with
features for easy integration with other applications.

GnuPG is Free Software (meaning that it respects your freedom). It can


be freely used, modified and distributed under the terms of the GNU
General Public License .
Question 2. Comparative analysis of 5 best cryptographic tools.

Tools Opensou Suppor Cryptography Features


rce/close ted os algorithm
d
VeraCry Open Window Individual cipher It can create a virtual
pt source s/OS s supported by encrypted disk within a file
X/Linux VeraCrypt or encrypt a partition or
are AES, Serpent, (under Microsoft
Twofish, Camellia Windows except Windows
, and Kuznyechik. 8 or GPT) the
entire storage
device with pre-boot
authentication.
AxCrypt Open Window AES-128, AES- It's entirely a file
source s 256 encryption tool however,
meaning creating
encrypted volumes or
drives is out of its
capabilities. It supports
128-bit AES encryption
only, offers protection
against brute force
cracking attempts, and is
exceptionally lightweight
(less than 1MB.)
BitLocke Open Window It uses BitLocker is a full-disk
r source s the AES encrypti encryption tool . it also
on algorithm supports encrypting other
in cipher block volumes or a virtual drive
chaining (CBC) that can be opened and
or XTS mode accessed like any other
with a 128-bit or drive on your computer.
256-bit key
GNU Open Window It supports GNU Privacy Guard
Privacy source s/OS RSA, ElGamal, D (GnuPG) is actually an
Guard X/Linux SA open-source
implementation of Pretty
Good Privacy (PGP). GnuPG
is a hybrid-
encryption software
program because it uses a
combination of
conventional symmetric-
key cryptography for
speed, and public-key
cryptography for ease of
secure key exchange,
typically by using the
recipient's public key to
encrypt a session
key which is only used
once
7-zip Open Window AES-256 Even though it's amazing
source s/OS at compressing and
X/Linux organizing files for easy
storage or sending over
the internet, it's also a
strong file encryption tool,
and is capable of turning
individual files or entire
volumes into encrypted
volumes that only you
have the keys to.

Question 3: WAP to demonstrate Caesar Cipher

In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift


cipher, Caesar's code or Caesar shift, is one of the simplest and most
widely known encryption techniques. It is a type of substitution cipher in
which each letter in the plaintext is replaced by a letter some fixed
number of positions down the alphabet. For example, with a left shift of
3, D would be replaced by A, E would become B, and so on. The method is
named after Julius Caesar, who used it in his private correspondence.
#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
Int key,i;
char data[30];
clrscr();
printf("\nEnter the plain text: ");
gets(data);
printf("\nEnter the key value: ");
scanf("%d",&key);
for(i=0;i<strlen(data);i++)
{
if(data[i]!=' ')
{
if(data[i]>= 'x')
{
data[i]=data[i]-26;
}
data[i]=data[i]+key;
}
}
printf("Your cipher text is: %s",data);

getch();
return 0;
}

OUTPUT :---
Question 4: WAP for encryption and decryption of text using
Vernam Cipher

The Vernam Cipher is based on the principle that each plaintext character
from a message is 'mixed' with one character from a key stream. If a
truely random key stream is used, the result will be a truely
'random' ciphertext which bears no relation to the original plaintext. In
that case the cipher is similar to the unbreakable One-Time Pad (OTP).
The ciphertext is generated by applying the logical XOR operation to the
individual bits of plaintext and the key stream. The advantage of using the
XOR operation for this, is that it can be undone by carrying out the same
operation again.
#include<stdio.h>
char arr[26][26];
char message[22],key[22],emessage[22],retMessage[22];
intfindRow(char);
intfindColumn(char);
intfindDecRow(char,int);
int main()
{
inti=0,j,k,r,c;
clrscr();
k=96;
for(i=0;i<26;i++)
{
k++;
for(j=0;j<26;j++)
{
arr[i][j]=k++;
if(k==123)
k=97;
}
} printf("\nEnter message\n");
gets(message);
printf("\nEnter the key\n");
gets(key);
// Encryption
for(i=0;key[i]!=NULL;i++)
{
c=findRow(key[i]);
r=findColumn(message[i]);
emessage[i]=arr[r][c];
}
emessage[i]='\0';
printf("\n Encrypted message is:\n\n");
for(i=0;emessage[i]!=NULL;i++)
printf("%c",emessage[i]);

//decryption
for(i=0;key[i]!=NULL;i++)
{
c=findColumn(key[i]);
r=findDecRow(emessage[i],c);
retMessage[i]=arr[r][0];
}
retMessage[i]='\0';
printf("\n\nMessage Retrieved is:\n\n");
for(i=0;retMessage[i]!=NULL;i++)
printf("%c",retMessage[i]);
getch();
return(0);
}
intfindRow(char c) {
inti;
for(i=0;i<26;i++) {
if(arr[0][i]==c)
return(i);
}}
intfindColumn(char c) {
inti;
for(i=0;i<26;i++)
{
if(arr[i][0]==c)
return(i);
}
}
intfindDecRow(char c,int j)
{
inti;
for(i=0;i<26;i++)
{
if(arr[i][j]==c)
return(i);
}
}

OUTPUT :----
Question 5: WAP for encryption and decryption of text using Hill
Cipher
Each letter is represented by a number modulo 26. Often the simple
scheme A = 0, B = 1, ..., Z = 25 is used, but this is not an essential
feature of the cipher. To encrypt a message, each block of n letters
(considered as an n-component vector) is multiplied by an
invertible n n matrix, against modulus 26. To decrypt the message, each
block is multiplied by the inverse of the matrix used for encryption. The
matrix used for encryption is the cipher key, and it should be chosen
randomly from the set of invertible n n matrices (modulo 26).

#include<stdio.h>
int check(int x)
{
if(x%3==0)
return 0;
int a=x/3;
int b=3*(a+1);
int c=b-x;
return c;
}
void main()
{
intl,i,j;
int temp1;
int k[3][3];
int p[3][1];
int c[3][1];
charch;
printf("\nThis cipher has a key of length 9. ie. a 3*3 matrix.\nEnter the 9
character key. ");
for(i=0;i<3;++i)
{
for(j=0;j<3;++j)
{
scanf("%c",&ch);
if(65<=ch&&ch<=91)
k[i][j]=(int)ch%65;
else
k[i][j]=(int)ch%97;
}}
for(i=0;i<3;++i)
{
for(j=0;j<3;++j)
{
printf("%d ",k[i][j]);
}
printf("\n");
}
printf("\nEnter the length of string to be encoded(without spaces). ");
scanf("%d",&l);
temp1=check(l);
if(temp1>0)
printf("You have to enter %d bogus characters.",temp1);
char pi[l+temp1];
printf("\nEnter the string. ");
for(i=-1;i<l+temp1;++i)
{
scanf("%c",&pi[i]);
}
int temp2=l;
int n=(l+temp1)/3;
int temp3;
int flag=0;
int count;
printf("\n\nThe encoded cipher is : ");
while(n>0)
{
count=0;
for(i=flag;i<flag+3;++i)
{
if(65<=pi[i] && pi[i]<=91)
temp3=(int)pi[i]%65;
else
temp3=(int)pi[i]%97;
p[count][0]=temp3;
count=count+1;
}
int k1;
for(i=0;i<3;++i)
c[i][0]=0;
for(i=0;i<3;++i)
{
for(j=0;j<1;++j)
{
for(k1=0;k1<3;++k1)
c[i][j]+=k[i][k1]*p[k1][j];}}
for(i=0;i<3;++i)
{
c[i][0]=c[i][0]%26;
printf("%c ",(char)(c[i][0]+65));
}
n=n-1;
flag=flag+3;
}
}

OUTPUT :---
Question 6: WAP for encryption and decryption of text using
Vigenere Cipher
The Vigenre cipher, was invented by a Frenchman, Blaise de Vigenre in
the 16th century. It is a polyalphabetic cipher because it uses two or more
cipher alphabets to encrypt the data. In other words, the letters in the
Vigenre cipher are shifted by different amounts, normally done using a
word or phrase as the encryption key .Unlike the monoalphabetic ciphers,
polyalphabetic ciphers are not susceptible to frequency analysis, as more
than one letter in the plaintext can be represented by a single letter in the
encryption.

#include<iostream>
#include<string>
usingnamespace std;
classVigenere{
public:
string key;
Vigenere(string key){
for(inti=0;i<key.size();++i){
if(key[i]>='A'&& key[i]<='Z')
this->key += key[i];
elseif(key[i]>='a'&& key[i]<='z')
this->key += key[i]+'A'-'a';
}}
string encrypt(string text){
string out;
for(inti=0, j =0;i<text.length();++i){
char c = text[i];
if(c >='a'&& c <='z')
c +='A'-'a';
elseif(c <'A'|| c >'Z')
continue;
out+=(c + key[j]-2*'A')%26+'A';
j =(j +1)%key.length();
}
return out;
}
string decrypt(string text){
string out;
for(inti=0, j =0;i<text.length();++i)
{char c = text[i];
if(c >='a'&& c <='z')
c +='A'-'a';
elseif(c <'A'|| c >'Z')
continue;
out+=(c - key[j]+26)%26+'A';
j =(j +1)%key.length();
}
return out;
}
};
int main()
{
Vigenerecipher("VIGENERECIPHER");
string original ="Beware the Jabberwock, my son! The jaws that bite, the
claws that catch!";
string encrypted =cipher.encrypt(original);
string decrypted =cipher.decrypt(encrypted);
cout<< original <<endl;
cout<<"Encrypted: "<< encrypted <<endl;
cout<<"Decrypted: "<< decrypted <<endl;
}
Question 7: WAP to demonstrate DES Algorithm

There are 16 identical stages of processing, termed rounds. There is also


an initial and final permutation. Before the main rounds, the block is
divided into two 32-bit halves and processed alternately; this crises-
crossing is known as the Festal scheme. The Festal structure ensures that
decryption and encryption are very similar processesthe only difference
is that the sub keys are applied in the reverse order when decrypting. The
rest of the algorithm is identical. This greatly simplifies implementation,
particularly in hardware, as there is no need for separate encryption and
decryption algorithms. The F-function scrambles half a block together with
some of the key. The output from the F-function is then combined with the
other half of the block, and the halves are swapped before the next round.
After the final round, the halves are swapped; this is a feature of the
Feistel structure which makes encryption and decryption similar
processes.
Question 8: WAP to demonstrate RSA Algorithm

RSA is one of the first practical public-key cryptosystems and is widely


used for secure data transmission. In such a cryptosystem, the encryption
key is public and differs from the decryption key which is kept secret. In
RSA, this asymmetry is based on the practical difficulty of factoring the
product of two large prime numbers, the factoring problem. RSA is made
of the initial letters of the surnames of Ron Rivest, Adi Shamir,
and Leonard Adleman, who first publicly described the algorithm in 1977
Question 9: Recent Cyber attacks that occurred in Cyber Space

SN DATE TARGET TARGET ATTACK DESCRIPTION COU


O CLASS NTR
Y
1 28/02/1 Singapor Governme Targeted Singapore's Ministry of Defence SG
7 e's nt Attack (Mindef) confirms that the
Ministry personal details more than 850
of national servicemen and
Defence employees were stolen in a
(Mindef) "targeted and well-planned"
cyberattack earlier this month.

2 28/02/1 Aptos Industry: Malware Shoppers of 40 online stores US


7 Retail have had their bank card
Services numbers and addresses stolen
by a malware infection at
backend provider Aptos
occurred late last year

3 27/02/1 Luxembo Governme DDos The Luxembourg government's LU


7 urg nt servers are hit in a massive
Governm DDoS attack that lasts over 24
ent's hours. The attack is believed to
servers have affected over a hundred
websites hosted by the
government's servers.

4 23/02/1 Apple Hardware Malware A mid-2016 security incident US


7 and led to Apple purging its data
software centers of servers built by
industry Supermicro, including returning
recently purchased systems,
after malware-infected firmware
was reportedly detected in an
internal development
environment for Apple's App
Store, as well as some
production servers handling
queries through Apple's Siri
service.

5 15/02/1 Yahoo! Internet Forged Yahoo sends out another round US


7 Services Cookie of notifications to users,
industry warning some that their
accounts may have been
breached as recently as last
year. The accounts were
affected by a flaw in Yahoo's
mail service that allowed an
attackermost likely a "state
actor," according to Yahooto
use a forged "cookie" created
by software stolen from within
Yahoo's internal systems to gain
access to user accounts without
a password.

You might also like