Professional Documents
Culture Documents
Algorithm
PROJECT REPORT
For
Microprocessor and Interfacing (CSE2006)
Submitted By
Dr .Manish Kumar
November,2021
Table of Contents
Content Page Number
Abstract 3
Introduction 3
Objective 4
Literature Survey 4
Flowchart 7
Algorithm 9
Software Components 9
Output Screenshots 11
Code 14
Conclusion 25
References 25
• Abstract
Cryptography is a term used in computer science to describe the secure
information and communication systems used in mathematical concepts and a set
of legal statistics known as algorithms to transform communication in ways that
are difficult to explain. The Emu8086, Intel 8086 (compatible with AMD)
microprocessor emulator with integrated 8086 assembler and introductory scholars,
was used as a device. The emulator runs programs step by step, like a real CPU.
We are using emu8086 for this project to create a cryptography tool that can
encrypt and decrypt your favorite message.
• Introduction
Cryptography can be found almost anywhere. It has evolved into an integrated
defense platform for all digital transformation activities, now known as the digital
business. Cryptography is used to protect transactions and communications, to
protect personal information (PII) and other confidential information, to prove your
identity, to prevent document fraud, and to build trust between servers as a basis
for modern security systems. Cryptography is one of the most important strategies
used by businesses to protect systems that contain their valuable assets - data -
whether on the go or at rest.
• Literature Survey
Design and use Paul et al., 2012 ResearchGate The goal of this
real-time AES- proposed structure
128 in real-time is to provide real-
FPGA multi- time data
network communications
operating system while maintaining
a high level of
security and, if
appropriate,
providing faster
processing time.
The key used in
our test has a
minimum length
of 128 bits, and
the result is good.
Design of Mondal et al., ACM Journal The proposed
Functional 2020 design and
Structures for implementation
AES-128 requires minimal
Algorithm in calculation
Embedded resources, making
Systems them suitable for
embedded systems
with limited
resources and
power. The
proposed parallel
and pipeline
structure achieves
the maximum
performance and
minimum delay
desired in real-
time systems.
• Flowchart
• Software Components
➢ Windows 10
➢ Emu8086-8086 Microprocessor Emulator, often known as EMU8086, is a
microprocessor emulator for the 8086 software. It has a built-in 8086
assembler for development. On both PC desktops and laptops, this
application may run apps. This program's main purpose is to replicate or
simulate hardware.
• Output Screenshots
• Code
.model small
org 100h
.data
; name type initializer
sum DW 0
delta DW 02ACh
v0 DW ?
v1 DW ?
k0 DW ?
k1 DW ?
k2 DW ?
k3 DW ?
msgV DB 'Please enter the input string of 4 characters: $'
msgK DB 0Dh,0Ah,'Please enter thekey of 4 characters : $'
encrypting DB 0Dh,0Ah,'Encrypting... $'
decrypting DB 0Dh,0Ah,'Decrypting... $'
encryptedMsg DB 0Dh,0Ah,'Encrypted text: $'
decryptedMsg DB 0Dh,0Ah,'Decrypted text again: $'
; DB 8-bit integer
; DW 16-bit integer
; DD 32-bit integer or real
; DQ 64-bit integer or real
; DT 80-bit integer (10 byte)
.code
main proc
; reading v0
mov ah, 01h
int 21h
mov bh, al
int 21h
mov bl, al
mov v0, bx
; reading v1
mov ah, 01h
int 21h
mov bh, al
int 21h
mov bl, al
mov v1, bx
; k[0] read
mov ah, 01h
int 21h
xor bx, bx
mov bl, al
mov k0, bx
call encrypt
mov bx, v1
mov dl, bh
int 21h
mov dl, bl
int 21h
call decrypt
mov bx, v0
mov dl, bh
int 21h
mov dl, bl
int 21h
mov bx, v1
mov dl, bh
int 21h
mov dl, bl
int 21h
endp
; ============================================== encryption
procedure of the code
============================================== ;
encrypt proc
mov cx, 8 ; loop instruction counter
encLoop:
mov ax, v1
shl ax, 4
mov bx, k0
add ax, bx
mov dx, ax
mov ax, v1
mov bx, sum
add ax, bx
xor dx, ax
mov ax, v1
shr ax, 5
mov bx, k1
add ax, bx
xor dx, ax
mov ax, v0
add ax, dx
mov v0, ax
mov ax, v0
shl ax, 4
mov bx, k2
add ax, bx
mov dx, ax
mov ax, v0
mov bx, sum
add ax, bx
xor dx, ax
mov ax, v0
shr ax, 5
mov bx, k3
add ax, bx
xor dx, ax
mov ax, v1
add ax, dx
mov v1, ax
ret
encrypt endp
; ============================================= END of code's
encryption proedure
============================================= ;
; ============================================== decryption
procedure of code ==============================================
;
decrypt proc
mov cx, 8
decLoop:
mov ax, v0
shl ax, 4
mov bx, k2
add ax, bx
mov dx, ax
mov ax, v0
mov bx, sum
add ax, bx
xor dx, ax
mov ax, v0
shr ax, 5
mov bx, k3
add ax, bx
xor dx, ax
mov ax, v1
sub ax, dx
mov v1, ax
mov ax, v1
shl ax, 4
mov bx, k0
add ax, bx
mov dx, ax
mov ax, v1
mov bx, sum
add ax, bx
xor dx, ax
mov ax, v1
shr ax, 5
mov bx, k1
add ax, bx
xor dx, ax
mov ax, v0
sub ax, dx
mov v0, ax
loop decLoop
ret
decrypt endp
; ============================================= END of code's
decryption procedure
============================================= ;
end
• Conclusion
In this project, we were introduced to the concept of Cryptography and its
important uses i.e., to ensure the security of information and communication
methods. We implemented the AES128 algorithm, an asymmetric mode to encrypt
and decrypt messages using 8086 microprocessor. We used 8086 emu to emulate
this project. The results were positive, showing how a string is encrypted first and
the decrypted string is displayed successfully.
• References
[1] Guzmán et al., 2016, FPGA implementation of the AES-128 algorithm in non-
feedback modes of operation, Dyna, vol. 83, no. 198, pp. 37-43, 2016 Universidad
Nacional de Colombia.
[2] Bilgin et al., 2014, A More Efficient AES Threshold Implementation, Springer
International
[3] Paul et al., 2012, Design and implementation of real time AES-128 on real time
operating system for multiple FPGA communication, ResearchGate
[4] Mondal et al., 2020, Efficient Architecture Design for the AES-128 Algorithm
on Embedded Systems, ACM Journal
[5] Abdullah et al., 2017, Advanced Encryption Standard (AES) Algorithm to
Encrypt and Decrypt Data, ResearchGate
[6] https://www.researchgate.net/figure/AES-Encryption-Decryption-
Flowchart_fig2_221958203
[7] https://engineering.purdue.edu/kak/compsec/NewLectures/Lecture8.pdf