Académique Documents
Professionnel Documents
Culture Documents
Abstract
The main objective of this project is to provide various encryption and decryption techniques
to the user. The system also provides Morse code translation. It is concerned with embedding
information in a secure and robust manner.
This allows the user to choose whether or not the end user want to encrypt the data
and the type of algorithm to use for encryption. It also allows the user to convert text to
Morse code so it can be transmitted easily. Making use of the encryption and decryption
techniques one can imply methods of secure communication in the presence of third party.
The project basically allows a dynamic and robust means of encryption and decryption of the
message allowing the user to select from various types of these methods.
BVIMIT 1
Hydra-Cryptor
Synopsis
It is the process of converting ordinary information (called plaintext) into unintelligible text
(called cipher text). Decryption is the reverse, in other words, moving from the unintelligible
cipher text back to plaintext. A cipher is a pair of algorithms that create the encryption and
the reversing decryption. The detailed operation of a cipher is controlled both by the
algorithm and in each instance by a "key". This is a secret (ideally known only to the
communicants), usually a short string of characters, which is needed to decrypt the cipher text
Encryption is the most effective way to achieve data security. The process of Encryption
hides the contents of a message in a way that the original information is recovered only
through a decryption process
The purpose of Encryption is to prevent unauthorized parties from viewing or modifying the
data. Encryption occurs when the data is passed through some substitute technique, shifting
technique, table references or mathematical operations.
Key-based algorithms:
use an Encryption key to encrypt the message. There are two general categories for key-based
Encryption:
i)Symmetric Encryption
which uses a single key to encrypt and decrypt the message
ii)Asymmetric Encryption:
which uses two different keys – a public key to encrypt the message, and a private key to
decrypt it. Currently, there are several types of key based Encryption algorithms such as:
DES, RSA, PGP, Elliptic curve, and others but all of these algorithms depend on high
mathematical manipulations.
Morse Code:
Straight keys where the machines that were used at the world war time to encode the
message into Morse code and also to decode them as the set of code with dot and dashes
BVIMIT 2
Hydra-Cryptor
where already defined and are universal. The length of the dashes could depend upon the
specific encoder,
Objective
The main goal is to deliver a platform with basic message encryption and decryption
techniques, the project only implies with the symmetric type of text encryption. And also
consist the Morse code message passing which involves (DOT & DASHES), in which we
only use this two characters to encrypt the message with pre-defined set of code assigned to
each and every alphabet.
As compared to the traditional techniques the system would be less time consuming, efficient
and very convenient to use which involves very less paper work and eliminates all the third
party because of which there is rise in the chances of data or message ambiguity.
BVIMIT 3
Hydra-Cryptor
2. Business Case
2.1 Introduction
The main objective of this project is to provide various encryption and decryption
techniques to the user. The system also provides Morse code translation. It is concerned with
embedding information in a secure and robust manner.
This allows the user to choose whether or not they want to encrypt the data and the
type of algorithm to use for encryption. It also allows the user to convert text to Morse code
so it can be transmitted easily. Making use of the encryption and decryption techniques one
can imply methods of secure communication in the presence of third party. The project
basically allows a dynamic and robust means of encryption and decryption of the message
allowing the user to select from various types of these methods.
Encryption is the most effective way to achieve data security. The process of Encryption
hides the contents of a message in a way that the original information is recovered only
through a decryption process
The purpose of Encryption is to prevent unauthorized parties from viewing or modifying the
data. Encryption occurs when the data is passed through some substitute technique, shifting
technique, table references or mathematical operations.
User need more convenient way to get their required results in proper time. In today’s era
where technology plays a vital role in each person's life, they are bound to use the old
fashioned manual techniques to implement the message passing methods, which are not at all
safe secure and convenient.
The traditional techniques of message encryption involved a lot of paper work which was
very time consuming and was having no security to the message. The involvement of third
BVIMIT 4
Hydra-Cryptor
party or many unnecessary users increase the chances of data/message ambiguity and
redundancy.
Morse code traditionally where made with the help of straight key with is very stressful and
time taking criteria. Hence it is required to deliver something convenient, reliable, and has no
paper work and provides security and the safety to the both message and the sender and also
at the receiving end.
Hence to tackle the above problems there is need to develop a system that is more powerful
efficient and convenient to the user.
Current problem:
According to the current progress of the project the module wise coding is
been done and they are being unit tested individually to check whether they are functional
acquiring the results positive, each individual modules are functional individually as of now
with respect to the current progress.
But there might be situation where the system may not function correctly when they are being
integrated together and been tested. As there are different encryption techniques hence it
becomes important to avail the user with different choices from which the end user has to
make the decision of selecting one.
There might be problem with the Input/output operations which would affect both the
encryption and the decryption process.
With respect to the current progress of the project there are above expected problems that
might occur.
BVIMIT 5
Hydra-Cryptor
1. Time estimates drive the setting of deadlines for delivery and planning of projects,
and hence will impact on other people’s assessment of your reliability and competence as a
project manager.
2. Time estimates often determine the pricing of contracts and hence the profitability
of the contract/project in commercial terms.
Mentor:
A person who gives a younger or less experienced person help and advice over a
period of time, especially at work or school. The stakeholders for the system are both the
mentors of the respective subjects.
As mentioned above the project is all about secure communication medium and to tackle the
various issues uncovered in the traditional system and provide the end user with best
experience and make essential use of technology.
Mentors under the agreement of whom the respective project was verified and brought into
development.
BVIMIT 6
Hydra-Cryptor
2.3.3 Scope
The future of encryption is brighter than ever before. The demand for more control
and protection of corporation information assets and third-party information is increasing
dramatically. The amount of information being communicated and stored electronically is
vastly greater than even five years ago. As a result, the need for more effective information
security products is growing at a higher rate than any other aspect of IT technology within the
enterprise today. The Internet and the mobility of its users have removed the perimeters of
communication. Encryption is the last line of defence for the modern day enterprise.
There are seven critical market drivers that will shape the future of encryption and the
applications that embodied it:
• Email privacy and regulatory requirements
• Increasing compromises and unauthorized access to critical business information
• The expanding enterprise
• User mobility
• Communications appliances
• Increased enterprise control vs. third-party supply of messaging and storage solutions
• The art of storing and retrieving corporate information assets
A recent independent survey conducted by industry analyst firm Aberdeen Group shows an
increasing use of encryption and a growing need for centralized and automated key
management.
Eighty-one percent of respondents had increased the number of applications using encryption,
50 percent had increased the number of locations implementing encryption and 71 percent
had increased the number of encryption keys under management compared with one year
ago.
Conclusion:
At the end of the day we need to protect our data. Increasingly, encryption is being
seen as the best way to ensure that data is protected, but the ever growing use of encryption
creates a management challenge.
The challenge, however, doesn’t need to be daunting. Implementing a flexible and extensible
solution that automates many of the time-consuming and error-prone key management tasks
BVIMIT 7
Hydra-Cryptor
BVIMIT 8
Hydra-Cryptor
Solution 1:
According to the current problem if for some reasons the system won’t function when
they modules are been integrated together then the alternative could be used so as to keep all
the modules separate and then integrate them by using another module, by including each and
every module in a new file/module with the help of the header files.
Which would make the task much easier but would increase the handling of the input/output
operations and manipulation. Hence by including each module separately would remove the
problem in the current system of accepting the Input’s from the end user.
Solution 2:
As a second alternative to make all the modules functional the last option would be to
enhance the program with making chances in the code and the interface sections and making
the program more basic and simple rather than complicating the modules.
Which would ultimately remove the conflicts between the modules when they are integrated
together.
Technical feasibility:
Hydra-cryptor is able to handle all the strings number and character
type of values. The end user is able to encrypt decrypt them with given
techniques.
With the addition of the Morse code module the user is now also able
to encrypt the message into Morse code and again decrypt it into a
normal plain text to retrieve the original message.
No other existing system provide options with both the encryption and
Morse modules, hence the system is more feasible than other existing.
There is no additional Hardware required for the project as it may run
on the requirements specified and also with the current system.
BVIMIT 9
Hydra-Cryptor
Behavioural feasibility:
The project entitled “Hydra-Cryptor” would be very successful as per the growing
demands for the security and ambiguity issues in the confidential information. Hence the
project is Declared with the above specified Modules and Objectives.
BVIMIT 10
Hydra-Cryptor
3. Project Charter
BVIMIT 11
Hydra-Cryptor
It is the process of converting ordinary information (called plaintext) into unintelligible text
(called cipher text). Decryption is the reverse, in other words, moving from the unintelligible
cipher text back to plaintext. A cipher is a pair of algorithms that create the encryption and
the reversing decryption. The detailed operation of a cipher is controlled both by the
algorithm and in each instance by a "key". This is a secret (ideally known only to the
communicants), usually a short string of characters, which is needed to decrypt the cipher text
Encryption is the most effective way to achieve data security. The process of Encryption
hides the contents of a message in a way that the original information is recovered only
through a decryption process
The purpose of Encryption is to prevent unauthorized parties from viewing or modifying the
data. Encryption occurs when the data is passed through some substitute technique, shifting
technique, table references or mathematical operations.
3.3.1 Scope
The future of encryption is brighter than ever before. The demand for more control
and protection of corporation information assets and third-party information is increasing
dramatically. The amount of information being communicated and stored electronically is
vastly greater than even five years ago. As a result, the need for more effective information
security products is growing at a higher rate than any other aspect of IT technology within the
enterprise today. The Internet and the mobility of its users have removed the perimeters of
communication. Encryption is the last line of defence for the modern day enterprise.
There are seven critical market drivers that will shape the future of encryption and the
applications that embodied it:
• Email privacy and regulatory requirements
• Increasing compromises and unauthorized access to critical business information
• The expanding enterprise
• User mobility
• Communications appliances
• Increased enterprise control vs. third-party supply of messaging and storage solutions
BVIMIT 12
Hydra-Cryptor
A recent independent survey conducted by industry analyst firm Aberdeen Group shows an
increasing use of encryption and a growing need for centralized and automated key
management.
Eighty-one percent of respondents had increased the number of applications using encryption,
50 percent had increased the number of locations implementing encryption and 71 percent
had increased the number of encryption keys under management compared with one year
ago.
BVIMIT 13
Hydra-Cryptor
BVIMIT 14
Hydra-Cryptor
BVIMIT 15
Hydra-Cryptor
BVIMIT 16
Hydra-Cryptor
Revision History
BVIMIT 17
Hydra-Cryptor
4.1 Introduction
4.1.1 Purpose
The purpose of this document is to describe functionality and behaviour of the Hydra
cryptor. This document is intended to be viewed only by project advisor, the development
team members and all the stake holders.
This document provides all of the requirements for the system and are intended primarily
for customers of the application, but will also be of interest to all the other stake holders. The
document will also be of interest to customers.The purpose of this project is to demonstrate
how some of the more popular encrypting algorithms work their “magic”. The system will
allow the user to enter a message, select an encryption method, and then view the message
encrypted by the selected algorithm. When an encryption method is selected, options
pertaining to that specific algorithm will be displayed. Algorithm will then begin encrypting
the message.
4.1.2 Scope
The scope of this project is limited to factors incorporated by the program itself. In the
future, additional components may be added.
This document covers the requirements for release 0.1 of Cryptic. Mention will be
madethroughout this document of selected probable features of future releases. The purpose
of thisis to guide developers in selecting a design that will be able to accommodate the full-
scale application.
Caesar Cipher - A cipher in which each letter is translated to the letter a fixed number of
letters after it in the alphabet.
Vigenère cipher- The Vigenère cipher is a method of encrypting alphabetic text by using a
series of different Caesar ciphers based on the letters of a keyword. It is a simple form of
polyalphabetic substitution.
Atbash Cipher- The Atbash cipher is a substitution cipher with a specific key where the
letters of the alphabet are reversed. I.e. all 'A's are replaced with 'Z's, all 'B's are replaced with
'Y's, and so on. It was originally used for the Hebrew alphabet, but can be used for any
alphabet.
BVIMIT 18
Hydra-Cryptor
Software Required
Operating system : Windows, Linux
Developing Tool : Turbo C, G++
BVIMIT 19
Hydra-Cryptor
BVIMIT 20
Hydra-Cryptor
RAD Model
Rapid Application Development model is to used to develop project in less time. This
provide system’s prototype, which can be shown to the users for their understanding. And
better understanding for the developer as the customer is not aware of the technical term.
Whenever there is any change the developer has to follow the same process again.
BVIMIT 21
Hydra-Cryptor
Adaptability and reusability: The suite is simple (and intuitive) enough that it should not be
difficult to adapt it to user’s needs. The code is standards compliant and is therefore easily
reusable in other applications.
• Availability: The complete code Hydra cryptor can be easily extracted.
BVIMIT 22
Hydra-Cryptor
• Portability: The code is done in C++ with basic functionality, it should be easily portable
to different architectures and operating systems.
• Reliability: Serious attempts are made to make sure code is reliable and of enterprise
quality. Still, the code is reliable and functional enough to perform the basic specified
functionality.
• Usability: The project is still in planning stage as of SRS version-1, but when the
development starts, the code is not expected to be usable at least until all the modules are
been developed separately.
BVIMIT 23
Hydra-Cryptor
5. System Designing
BVIMIT 24
Hydra-Cryptor
6. Code
#include <iostream>
#include <string>
#include <cstring>
#include <sstream>
using namespace std;
class morse
{
char morse1[43] =
{'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','0','1','2','3','4'
,'5','6','7','8','9','.',',','?','!',':','"','='};
char morse1_cap[43] =
{'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','0','1','2','3','4'
,'5','6','7','8','9','.',',','?','!',':','"','='};
string morse2[43] = {".-","-...","-.-.","-..",".","..-
.","--.","....","..",".---","-.-",".-..","--","-.","---",".--
.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--
..","-----",".----","..---","...--","....-",".....","-....","-
-...","---..","----.",".-.-.-","--..--","..--..","..--.","---
...",".-..-.","-...-"};
string input,input_lower,*input_str;
char *input1;
int i,j;
public:
void input_char()
{
cout<<"Enter the text to be converted: ";
getline(cin,input);
input1 = new char[input.size()+1];
input1 = strcpy(input1,input.c_str());
}
BVIMIT 25
Hydra-Cryptor
void input_string()
{
cout<<"Enter the code to be converted: ";
getline(cin,input);
input_str = new string[input.size()+1];
i=0;
stringstream ssin(input);
while (ssin.good() && i < input.size())
{
ssin >> input_str[i];
++i;
}
}
void encode()
{
int len=input.size();
for(i=0; i<len; i++)
{
int counter = 0;
for(j=0;j<43;j++)
{
if (input1[i] == morse1[j] || input1[i] ==
morse1_cap[j])
{
counter++;
cout<<morse2[j]<<" ";
break;
}
}
if (input1[i]== ' ')
{
BVIMIT 26
Hydra-Cryptor
cout<<"/ ";
}
if(input1[i] != ' ' && counter == 0)
cout<<"# ";
}
cout<<endl;
}
void decode()
{
int len=input.size();
for(i=0; i<len; i++)
{
for(j=0; j<43; j++)
{
if(input_str[i] == morse2[j])
{
cout<<morse1[j];
break;
}
}
if(input_str[i] == "/")
{
cout<<" ";
}
}
cout<<endl;
}
};
class atbash
{
BVIMIT 27
Hydra-Cryptor
string input;
int i,j,len;
char arr[26],arr_c[26],arr_reverse[26],arr_reverse_c[26];
char arr1[10] =
{'0','1','2','3','4','5','6','7','8','9'};
char arr1_reverse[10] =
{'9','8','7','6','5','4','3','2','1','0'};
char *input_arr;
public:
void array()
{
len=input.size();
char a = 'a';
for(i=0; i<26; i++)
{
arr[i]=a;
a++;
}
a = 'z';
for(i=0;i<26;i++)
{
arr_reverse[i]=a;
a--;
}
a = 'A';
for(i=0; i<26; i++)
{
arr_c[i]=a;
a++;
}
a = 'Z';
BVIMIT 28
Hydra-Cryptor
for(i=0;i<26;i++)
{
arr_reverse_c[i]=a;
a--;
}
}
void input_encrypt_atbash()
{
cout<<"Enter the text to be encrypted: ";
getline(cin,input);
input_arr = new char[input.size()+1];
input_arr = strcpy(input_arr,input.c_str());
cout<<endl;
}
void input_decrypt_atbash()
{
cout<<"Enter the cipher to be decrypted: ";
getline(cin,input);
input_arr = new char[input.size()+1];
input_arr = strcpy(input_arr,input.c_str());
cout<<endl;
}
void encrypt_atbash()
{
int x = 0;
array();
for(i=0;i<len;i++)
{
x = 0;
for(j=0;j<26;j++)
BVIMIT 29
Hydra-Cryptor
if(input_arr[i] == arr[j])
{
x = 1;
cout<<arr_reverse[j];
break;
}
for(j=0;j<26;j++)
if(input_arr[i] == arr_c[j])
{
x = 1;
cout<<arr_reverse_c[j];
break;
}
if(input_arr[i] == ' ')
{
x = 1;
cout<<" ";
}
for(j=0;j<10;j++)
if(input_arr[i] == arr1[j])
{
x = 1;
cout<<arr1_reverse[j];
break;
}
if(x == 0)
cout<<input_arr[i];
}
cout<<endl;
}
BVIMIT 30
Hydra-Cryptor
};
class ceaser
{
string input,input1;
char arr[26],arr_c[26],*input_arr;
char arr1[10] =
{'0','1','2','3','4','5','6','7','8','9'};
int i,j,len;
public:
void array()
{
len=input.size();
char a = 'a';
for(i=0; i<26; i++)
{
arr[i]=a;
a++;
}
a = 'A';
for(i=0; i<26; i++)
{
arr_c[i]=a;
a++;
}
}
void input_encrypt_ceaser()
{
cout<<"Enter the text to be encrypted: ";
getline(cin,input);
input_arr = new char[input.size()+1];
input_arr = strcpy(input_arr,input.c_str());
BVIMIT 31
Hydra-Cryptor
cout<<endl;
}
void input_decrypt_ceaser()
{
cout<<"Enter the cipher to be decrypted: ";
getline(cin,input);
input_arr = new char[input.size()+1];
input_arr = strcpy(input_arr,input.c_str());
cout<<endl;
}
void encrypt_ceaser()
{
int x;
array();
for(i=0;i<len;i++)
{
x = 0;
for(j=0;j<26;j++)
if(input_arr[i] == arr[j])
{
if(j+13 > 25)
{
int x = j-13;
cout<<arr[x];
}
else
cout<<arr[j+13];
x = 1;
}
for(j=0;j<26;j++)
BVIMIT 32
Hydra-Cryptor
if(input_arr[i] == arr_c[j])
{
if(j+13 > 25)
{
int x = j-13;
cout<<arr_c[x];
}
else
cout<<arr_c[j+13];
x = 1;
}
if (input_arr[i] == ' ')
{
cout<<" ";
x = 1;
}
for(j=0;j<10;j++)
if(input_arr[i] == arr1[j])
{
if(j+3 > 9)
{
int x = j-7;
cout<<arr1[x];
}
else
cout<<arr1[j+3];
x = 1;
}
if (x == 0)
cout<<input_arr[i];
BVIMIT 33
Hydra-Cryptor
}
cout<<endl;
}
void decrypt_ceaser()
{
int x;
array();
for(i=0;i<len;i++)
{
x = 0;
for(j=0;j<26;j++)
if(input_arr[i] == arr[j])
{
if(j+13 > 25)
{
int x = j-13;
cout<<arr[x];
}
else
cout<<arr[j+13];
x = 1;
}
for(j=0;j<26;j++)
if(input_arr[i] == arr_c[j])
{
if(j+13 > 25)
{
int x = j-13;
cout<<arr_c[x];
}
BVIMIT 34
Hydra-Cryptor
else
cout<<arr_c[j+13];
x = 1;
}
if (input_arr[i] == ' ')
{
cout<<" ";
x = 1;
}
for(j=0;j<10;j++)
if(input_arr[i] == arr1[j])
{
if(j-3 < 0)
{
int x = j+7;
cout<<arr1[x];
}
else
cout<<arr1[j-3];
x = 1;
}
if (x == 0)
cout<<input_arr[i];
}
cout<<endl;
}
};
class vignere
{
string input,key;
BVIMIT 35
Hydra-Cryptor
int i,j,len,counter;
char *key_arr,*input_arr;
int *input_arr1,*key_arr1;
char arr[26],arr_c[26];
int arr1[10] = {'0','1','2','3','4','5','6','7','8','9'};
public:
void input_encrypt_vignere()
{
cout<<"Enter the text to be encrypted: ";
getline(cin,input);
cout<<"Enter the key: ";
getline(cin,key);
input_arr = new char[input.size()+1];
input_arr = strcpy(input_arr,input.c_str());
input_arr1 = new int[input.size()+1];
key_arr = new char[key.size()+1];
key_arr = strcpy(key_arr,key.c_str());
key_arr1 = new int[key.size()+1];
check_encrypt();
cout<<endl;
}
void input_decrypt_vignere()
{
cout<<"Enter the cipher to be decrypted: ";
getline(cin,input);
cout<<"Enter the key: ";
getline(cin,key);
input_arr = new char[input.size()+1];
input_arr = strcpy(input_arr,input.c_str());
input_arr1 = new int[input.size()+1];
BVIMIT 36
Hydra-Cryptor
BVIMIT 37
Hydra-Cryptor
counter++;
if(key.size() > (input.size()-counter))
{
cout<<"Error: The key size should be less than
or equal to the cipher"<<endl;
input_decrypt_vignere();
}
else
for(i=0; i<key.size(); i++)
if(key_arr[i] == ' ')
{
cout<<"Error: The key should not
contain blank spaces"<<endl;
input_decrypt_vignere();
break;
}
}
void array()
{
len=key.size();
char a = 'a';
for(i=0; i<26; i++)
{
arr[i]=a;
a++;
}
a = 'A';
for(i=0; i<26; i++)
{
arr_c[i]=a;
a++;
BVIMIT 38
Hydra-Cryptor
}
}
void calc_key()
{
array();
counter = 0;
for(i=0; i<len; i++)
for(j=1; j<=26; j++)
if(key_arr[i] == arr[j-1])
{
key_arr1[i] = j;
break;
}
for(i=0; i<input.size(); i++)
{
for(j=1; j<=26; j++)
{
if(input_arr[i] == ' ')
input_arr1[i] = -1;
if(input_arr[i] == arr[j-1])
{
input_arr1[i] = j;
break;
}
}
for(j=1; j<=26; j++)
if(input_arr[i] == arr_c[j-1])
{
input_arr1[i] = j;
break;
BVIMIT 39
Hydra-Cryptor
}
for(j=0; j<10; j++)
if(input_arr[i] == arr1[j])
{
input_arr1[i] = j;
break;
}
}
}
void encrypt_vignere()
{
int x=0;
for(i=0; i<input.size(); i++)
{
if(input_arr[i] == ' ')
cout<<" ";
else
{
if(x == key.size())
x = 0;
if(input_arr[i] >='0' &&
input_arr[i]<='9')
{
int z = input_arr1[i]+key_arr1[x];
while (z >= 10)
z -= 10;
cout<<static_cast<char>(arr1[z]);
x++;
}
else if(input_arr[i] != ' ' &&
input_arr1[i] <= 0)
BVIMIT 40
Hydra-Cryptor
cout<<input_arr[i];
else
{
if(input_arr1[i]+key_arr1[x]>26)
{
cout<<static_cast<char>(input_arr[i]+key_arr1[x]-26);
x++;
}
else
{
cout<<static_cast<char>(input_arr[i]+key_arr1[x]);
x++;
}
}
}
}
cout<<endl;
}
void decrypt_vignere()
{
int x=0;
for(i=0; i<input.size(); i++)
{
if(input_arr[i] == ' ')
cout<<" ";
else
{
if(x == key.size())
x = 0;
BVIMIT 41
Hydra-Cryptor
cout<<static_cast<char>(input_arr[i]-key_arr1[x]+26);
x++;
}
else
{
cout<<static_cast<char>(input_arr[i]-key_arr1[x]);
x++;
}
}
}
}
cout<<endl;
}
};
BVIMIT 42
Hydra-Cryptor
int main()
{
int choice,m1,a1,c1,v1;
cout<<"1. Morse Code"<<endl;
cout<<"2. Atbash Cipher"<<endl;
cout<<"3. Ceaser's Cipher (ROT13)"<<endl;
cout<<"4. Vignere's Cipher"<<endl;
cout<<"Enter your choice: ";
cin>>choice;
cin.ignore();
switch(choice)
{
case 1:
{
cout<<"1. Convert to Morse code"<<endl;
cout<<"2. Convert from Morse code"<<endl;
cout<<"Enter your choice: ";
cin>>m1;
cin.ignore();
switch(m1)
{
case 1:
{
morse m;
m.input_char();
m.encode();
break;
}
case 2:
{
BVIMIT 43
Hydra-Cryptor
morse m;
m.input_string();
m.decode();
break;
}
default:
cout<<"Invalid choice"<<endl;
}
break;
}
case 2:
{
cout<<"1. Convert to cipher text"<<endl;
cout<<"2. Convert from cipher text"<<endl;
cout<<"Enter your choice: ";
cin>>a1;
cin.ignore();
switch(a1)
{
case 1:
{
atbash a;
a.input_encrypt_atbash();
a.encrypt_atbash();
break;
}
case 2:
{
atbash a;
a.input_decrypt_atbash();
BVIMIT 44
Hydra-Cryptor
a.encrypt_atbash();
break;
}
default:
cout<<"Invalid choice"<<endl;
}
break;
}
case 3:
{
cout<<"1. Convert to cipher text"<<endl;
cout<<"2. Convert from cipher text"<<endl;
cout<<"Enter your choice: ";
cin>>c1;
cin.ignore();
switch(c1)
{
case 1:
{
ceaser c;
c.input_encrypt_ceaser();
c.encrypt_ceaser();
break;
}
case 2:
{
ceaser c;
c.input_decrypt_ceaser();
c.decrypt_ceaser();
break;
BVIMIT 45
Hydra-Cryptor
}
default:
cout<<"Invalid choice"<<endl;
}
break;
}
case 4:
{
cout<<"1. Convert to cipher text"<<endl;
cout<<"2. Convert from cipher text"<<endl;
cout<<"Enter your choice: ";
cin>>v1;
cin.ignore();
switch(v1)
{
case 1:
{
vignere v;
v.input_encrypt_vignere();
v.calc_key();
v.encrypt_vignere();
break;
}
case 2:
{
vignere v;
v.input_decrypt_vignere();
v.calc_key();
v.decrypt_vignere();
break;
BVIMIT 46
Hydra-Cryptor
}
default:
cout<<"Invalid choice"<<endl;
}
break;
}
default:
cout<<"Invalid choice"<<endl;
}
return 0;
}
BVIMIT 47
Hydra-Cryptor
7.IMPLEMENTATION
Conversion of text to Morse code and vice versa for a single sentence.
BVIMIT 48
Hydra-Cryptor
Conversion of text to Atbash cipher and vice versa for a single sentence.
BVIMIT 49
Hydra-Cryptor
Conversion of text to Ceaser’s cipher and vice versa for a single sentence.
BVIMIT 50
Hydra-Cryptor
Conversion of text to Vignere’s cipher and vice versa for a single sentence with the key
‘example’.
BVIMIT 51
Hydra-Cryptor
Conversion of text to Vignere’s cipher and vice versa for a single sentence with the key ‘test’.
BVIMIT 52
Hydra-Cryptor
BVIMIT 53
Hydra-Cryptor
BVIMIT 54
Hydra-Cryptor
BVIMIT 55
Hydra-Cryptor
Conversion of text to Vignere’s cipher and vice versa for a single sentence with the key
‘encryption’.
BVIMIT 56
Hydra-Cryptor
Conversion of text to Vignere’s cipher and vice versa for a single sentence withthe key
‘cipher’.
BVIMIT 57
Hydra-Cryptor
Future Enhancement:
BVIMIT 58
Hydra-Cryptor
9. References
Bibliography:
Programming in C by E.balgurusamy.
Let us C by Yashwant Kanetakar.
Webliography:
http://moluch.ru/archive/80/14319/
https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher
https://en.wikipedia.org/wiki/Atbash
https://en.wikipedia.org/wiki/Caesar_cipher
https://en.wikipedia.org/wiki/Morse_code
BVIMIT 59