Documente Academic
Documente Profesional
Documente Cultură
Amir Izzat bin Mohd Zin, Muhammad Khairul Azri bin Kamal, Wan Mohd Nasri bin Wan Muhamad Saidin
Departmen of Computer System and Communication,Universiti Teknologi Malaysia
81310 Skudai, Malaysia
amirizzatzin@gmail.com
muhammadkhairulazri@gmail.com
wanmohdnasri@gmail.com
Abstract— This document contains the design of a simple II. DESIGN OF THE ALGORITHM
encryption algorithm named Shift Keyed Caesarean
cryptosystem. A shift keyed Caesarean cryptosystem is a hybrid
between two classical ciphers which are the Shift Caesarean This algorithm can be separated into two modules during
cipher(Substitution Caesar cipher) and Keyed Caesarean cipher. the encryption and decryption process, which are the standard
This document explained the design, implementation and the Shift Caesarean cipher (Substitution Caesar cipher) and Keyed
testing phases of the cryptosystem. Caesar Cipher. We use CrypTool2 to understand and illustrate
the flow of each cipher (module) works.
Keywords— cryptosystem, classical cipher, encryption,
decryption, classical ciphers, shift caesarean cipher, keyed MODULE 1: Caesar Cipher
caesarean cipher.
I. INTRODUCTION
temp2 += storeletter[f].ToString();
}
}
}
Figure 4: Encryption Process
for (int g = 0; g <= temp2.Length - 1; g++)
{
for (int h=0;h <= storeletter.Length - 1; h++)
{ IV. RESULT
if (temp2[g] == storeletter[h])
{
lettere = h;
temp3 += letter[h]; A. Test 1
}
} Key 1: 2
} Key 2: 2
Substitution Key: CIPHER
CIPHERABDFGJKLMNOQSTUVWXYZ
B. Decryption Keyed Caesar Cipher
temp3 += storeletter[f].ToString();
} 1) Encryption
} Plaintext:
} the roman republic was governed by a complex
constitution, which centered on the principles of a
separation of powers and checks and balances
Corresponding ciphertext:
DVPACSLEAPRFMZWNHLBUCGPAEPOMJLNC
SRZPINCEBDWDFDWCEHVWNVNPEDPAPOC
EDVPRAWENWRZPBCQLBPRLALDWCECQRC
HPABLEONVPNYBLEOMLZLENPB
illustration of each cipher (module) flow to make it easier for
2) Decryption the user to understand the concept of the cryptosystem. We
Ciphertext: also demonstrated the cryptosystem by giving the input and
DVPACSLEAPRFMZWNHLBUCGPAEPOMJLNC the output of three testing of the cryptosystem. Hence, we
SRZPINCEBDWDFDWCEHVWNVNPEDPAPOC hope the proposed cryptosystem can be used in the real
EDVPRAWENWRZPBCQLBPRLALDWCECQRC environment of a simple messages encryption and decryption
HPABLEONVPNYBLEOMLZLENPB process.
C. Test 3
APPENDIX
Key 1: 20
Key 2: 6 A. Source Code
Substitution Key: CRYPTO
CRYPTOABDEFGHIJKLMNQSUVWXZ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
3) Encryption using System.Drawing;
Plaintext: using System.Linq;
caesar is sometimes thought to have suffered from using System.Text;
epilepsy modern scholars is sharply divided on the using System.Windows.Forms;
subject and it is more certain that he was plagued by
malaria namespace WindowsFormsApplication4
{
public partial class Form1 : Form
Corresponding ciphertext:
{
YCTNCMDNNJHTQDHTNQBJSABQQJBCUTNS public Form1()
OOTMTPOMJHTKDGTKNXHJPTMINYBJGCMN {
DNNBCMKGXPDUDPTPJIQBTNSRETYQCIPDQ InitializeComponent();
DNHJMTYTMQCDIQBCQBTVCNKGCASTPRX }
HCGCMDC
private int ToDecimal(int ky1)
4) Decryption {
Ciphertext: throw new NotImplementedException();
}
YCTNCMDNNJHTQDHTNQBJSABQQJBCUTNS
int k01, k02 = 0;
OOTMTPOMJHTKDGTKNXHJPTMINYBJGCMN private void button1_Click(object sender, EventArgs e)
DNNBCMKGXPDUDPTPJIQBTNSRETYQCIPDQ {
DNHJMTYTMQCDIQBCQBTVCNKGCASTPRX char[] storeletter = new char[26] { 'a', 'b', 'c', 'd', 'e', 'f',
HCGCMDC 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y',
'z' };
Corresponding plaintext: char[] newletter = new char[26];
Caesarissometimesthoughttohavesufferedfromepileps int k1 = k01;
ymodernscholarsissharplydividedonthesubjectanditis int k2 = k02;
int lettere = 0;
morecertainthathewasplaguedbymalaria
string temp1 = string.Empty;
string temp2 = string.Empty;
string temp3 = string.Empty;
string Enterletter = string.Empty;
V. CONCLUSIONS string letter = phrase.Text;
Enterletter = encrypt.Text;
In this paper, we have proposed a new cryptosystem named
“Shift Keyed Caesarean cryptosystem” to be implemented for
for (int a = 0; a <= Enterletter.Length - 1; a++)
a simple message encryption. We presented the design and the
{
for (int b = 0; b <= storeletter.Length - 1; b++) string temp1 = string.Empty;
{ string temp2 = string.Empty;
if (Enterletter[a] == storeletter[b]) string temp3 = string.Empty;
{ string Enterletter = string.Empty;
lettere = b; string letter = phrase.Text;
int c = (lettere + k1)%26; Enterletter = encrypt.Text;
temp1 += storeletter[c].ToString();
} for (int g = 0; g <= Enterletter.Length - 1; g++)
} {
} for (int h = 0; h <= letter.Length - 1; h++)
{
for (int d = 0; d <= temp1.Length - 1; d++) if (Enterletter[g] == letter[h])
{ {
for (int i = 0; i <= storeletter.Length - 1; i++) lettere = h;
{ temp1 += storeletter[h];
if (temp1[d] == storeletter[i]) }
{ }
lettere = i; }
int f = (lettere + k2) % 26;
temp2 += storeletter[f].ToString();
} for (int a = 0; a <= temp1.Length - 1; a++)
} {
} for (int b = 0; b <= storeletter.Length - 1; b++)
{
for (int g = 0; g <= temp2.Length - 1; g++) if (temp1[a] == storeletter[b])
{ {
for (int h = 0; h <= storeletter.Length - 1; h++) lettere = b;
{ int c = (lettere + k2)%26;
if (temp2[g] == storeletter[h])
{ temp2 += storeletter[c].ToString();
lettere = h; }
temp3 += letter[h]; }
} }
}
} for (int d = 0; d <= temp2.Length - 1; d++)
{
result.AppendText(temp3); for (int i = 0; i <= storeletter.Length - 1; i++)
} {
if (temp2[d] == storeletter[i])
private void textBox1_TextChanged(object sender, {
EventArgs e) lettere = i;
{ int f = (lettere + k1) % 26;
string num = textBox1.Text;
k01 = int.Parse(num); temp3 += storeletter[f].ToString();
} }
}
private void textBox2_TextChanged(object sender, }
EventArgs e)
{
string num = textBox2.Text; result.AppendText(temp3);
k02 = int.Parse(num); }
}
}
private void button2_Click(object sender, EventArgs e) }
{
char[] storeletter = new char[26] { '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' };
char[] newletter = new char[26];
int k1 = 26-k01;
int k2 = 26-k02;
int lettere = 0;
B. Interfaces