Creating a Vigenère Cipher Encryption/Decryption in Assembly Language NASM/YASM
With these instructions so far we created some variables for the data and the outputs for them but are very confused on how to integrate the cipher portion so help would be appreciated.
As seen in the picture below we are supposed to use a Vigenere cipher which uses key and plaintext variables in nasm/yasm assembly. The key is extended to the size of the text and then for each letter the corresponding shift is due to the letter coinciding in the key variable (ex. O - A in ascii values equals 15, so the shift of the first character would increase by 15). The shifted letters are stored in a new variable and outputed once done. We know how to do this in python/c++ but are lacking the knowledge to understand/start it in assembly.
Our code is below:
Here we are asking the user for inputs for the plaintext and key. W do not know how to apply string concepts to convert each letter in the encryption.
begin:
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,stacktop
%define encoderkey 'sample'
%strlen encryption_key encoderkey
main:
mov dx,detail1
mov ah,9
int 0x21
mov dx,detail2
mov ah,9
int 0x21
mov dx,blankline
mov ah,9
int 0x21
mov dx,text1
mov ah,9
int 0x21
mov dx,text2
mov ah,9
int 0x21
mov dx,blankline
mov ah,9
int 0x21
select:
mov ah,00
int 16h
mov dl,al
cmp al, '1'
jz encryption
cmp al,'2'
jz decryption
encryption:
mov dx,message3
mov ah,9
int 0x21
mov dx,blankline
mov ah,9
int 0x21
main_encryption:
mov ah,00
int 16h
mov dl,al
cmp al, 'q'
jz done
mov ah,encryption_key
add dl, ah
mov ah,2
int 0x21
jmp main_encryption
decryption:
mov dx,message4
mov ah,9
int 0x21
mov dx,blankline
mov ah,9
int 0x21
main_decryption:
mov ah,00
int 16h
mov dl,al
cmp al, 'q'
jz done
mov ah,-encryption_key
add dl, ah
mov ah,2
int 0x21
jmp main_decryption
done:
mov ax,0x4c00
int 0x21
Creating a Vigenère Cipher Encryption/Decryption in Assembly Language NASM/YASM With these instructions so far we created...
Decrypting the APCO cipher without the key. Decryption without the key is obviously a much more difficult process. Indeed, the purpose of encryption is to make it as difficult as possible for anyone who does not know the key to read the plain text. We will be using an unsophisticated password cracking technique called a brute force attack. A brute force attack on the APCO cipher works by trying every possible four digit key (from 0000 to 9999) and keeping...
Computer Science C++ Help, here's the question that needs to be answered (TASK D): Task D. Decryption Implement two decryption functions corresponding to the above ciphers. When decrypting ciphertext, ensure that the produced decrypted string is equal to the original plaintext: decryptCaesar(ciphertext, rshift) == plaintext decryptVigenere(ciphertext, keyword) == plaintext Write a program decryption.cpp that uses the above functions to demonstrate encryption and decryption for both ciphers. It should first ask the user to input plaintext, then ask for a right...
1. This project will extend Project 3 and move the encryption of a password to a user designed class. The program will contain two files one called Encryption.java and the second called EncrytionTester.java. 2. Generally for security reasons only the encrypted password is stored. This program will mimic that behavior as the clear text password will never be stored only the encrypted password. 3. The Encryption class: (Additionally See UML Class Diagram) a. Instance Variables i. Key – Integer...
JAVA Problem: With the recent news about data breaches and different organizations having their clients’ information being exposed, it is becoming more and more important to find ways to protect our sensitive data. In this program we will develop a simple tool that helps users generate strong passwords, encrypt and decrypt data using some cyphering techniques. You will need to create two classes. The first class is your driver for the application and contains the main method. Name this class...
JAVA PROJECT Part 1 - Normalize Text The first thing we will do is normalize the input message so that it’s easier to work with. Write a method called normalizeText which does the following: Removes all the spaces from your text Remove any punctuation (. , : ; ’ ” ! ? ( ) ) Turn all lower-case letters into upper-case letters Return the result. The call normalizeText(“This is some \“really\” great. (Text)!?”) should return “THISISSOMEREALLYGREATTEXT” Part 2 - Obfuscation...
X86 Assembly Language Help to implement the CipherChar Procedure at the end of the given code INCLUDE Irvine32.inc .data KeyPrompt BYTE "Enter the passphrase: ",0 TextPrompt BYTE "Enter the plaintest: ",0 str1 BYTE "The passphrase has length:",0 str2 BYTE "The plaintest has length:",0 KeyIs BYTE "The passphrase: ",0 PlainTextIs BYTE "The plaintext: ",0 CipherTextIs BYTE "The ciphertext: ",0 KMAX = 64 ; passphrase buffer maximum size BMAX = 128 ; test...