0% found this document useful (0 votes)
24 views7 pages

Lab 1

1. This document discusses classical symmetric encryption, specifically the Caesar cipher encryption algorithm. 2. It provides an overview of the objectives of learning about cryptographic algorithms and their applications. 3. It then describes how to write a program in NetBeans to encrypt and decrypt text using the Caesar cipher algorithm, allowing the user to input text, a key, and read from and write to files.

Uploaded by

Như Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views7 pages

Lab 1

1. This document discusses classical symmetric encryption, specifically the Caesar cipher encryption algorithm. 2. It provides an overview of the objectives of learning about cryptographic algorithms and their applications. 3. It then describes how to write a program in NetBeans to encrypt and decrypt text using the Caesar cipher algorithm, allowing the user to input text, a key, and read from and write to files.

Uploaded by

Như Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

CLASSICAL SYMMETRIC ENCRYPTION 1

Practice 1: CLASSICAL SYMMETRIC


ENCRYPTION

OVERVIEW

1.1.1 Introduction

- Lab 1: Ceasar Encryption Algorithm


- Practice time: class: 3 study hour, self-studying: 3 study hour.
- Requiment: Students using Netbean Software

1.1.2 Objective

- This course provides students with knowledge of cryptographic algorithms and how they
are used in today's world.
- The content emphasizes the principles, topics, approaches, and problem solving related to
the underlying technologies and architectures of the field.

1.1.3 Program Learning Outcome

CONTENTS

1.2.1 Summary

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.

PRACTICE INFORMATION SECURITY FACULTY OF INFORMATION TECHNOLOGY


CLASSICAL SYMMETRIC ENCRYPTION 2

− We in turn index the letters starting from 0.


− Let “k” be an integer from 0 -> 25 called key.
− Encryption function: E(p,k)=(p+k)mod26 where p is the index of the character to be
encoded.
− Decryption function: D(c,k)=|c-k|mod26 where c is the index of the character to be
decoded

1.2.2 Ceasar Cipher

Write a program to encrypt and decrypt text with Ceasar encryption algorithm. The
program can perform the following functions:
− Allow text input into the system.
− Allows entering text protection keys.
− Allows to write File and open File.

PRACTICE INFORMATION SECURITY FACULTY OF INFORMATION TECHNOLOGY


CLASSICAL SYMMETRIC ENCRYPTION 3

Guide:
❖ Step 1: Starting NetBean sofware → File → New Project → Next:
− Categories: Java
− Project: Java Application

❖ Step 2: Tying for project → Finish:


− Project Name: Lab1
− Project Location: Optional

PRACTICE INFORMATION SECURITY FACULTY OF INFORMATION TECHNOLOGY


CLASSICAL SYMMETRIC ENCRYPTION 4

❖ Step 3: Create new jFrame Form:

❖ Step 4: Typing Class Name: Ceasar_Cipher

❖ Step 5: Design Form:

PRACTICE INFORMATION SECURITY FACULTY OF INFORMATION TECHNOLOGY


CLASSICAL SYMMETRIC ENCRYPTION 5

❖ Step 6: Design follow:

❖ Step 7: Write an event handler function:


• 7.1 Encrypt function:

PRACTICE INFORMATION SECURITY FACULTY OF INFORMATION TECHNOLOGY


CLASSICAL SYMMETRIC ENCRYPTION 6

• 7.2 Write File:

• 7.3 Decrypt function

• 7.4 Open File:

PRACTICE INFORMATION SECURITY FACULTY OF INFORMATION TECHNOLOGY


CLASSICAL SYMMETRIC ENCRYPTION 7

Rerult:

PRACTICE INFORMATION SECURITY FACULTY OF INFORMATION TECHNOLOGY

You might also like