Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with Assembly .386 .model flat,stdcall .stack 4096 ExitProcess proto,dwExitCode:dword .data key BYTE -2, 4, 1, 0, -3, 5, 2, -4, -4, 6 keySize =

Help with Assembly

image text in transcribed

image text in transcribed

image text in transcribed

.386

.model flat,stdcall

.stack 4096

ExitProcess proto,dwExitCode:dword

.data

key BYTE -2, 4, 1, 0, -3, 5, 2, -4, -4, 6

keySize = $ - key

plainText BYTE "COMSC 260 is my favorite computer science course at DVC",0

.code

main PROC

; IMPLEMENT MAIN

; IMPLEMENT MAIN

; IMPLEMENT MAIN

invoke ExitProcess, 0

main ENDP

;-----------------------------------------------------

Encode PROC

; Encode a string by rotating each byte in a different

; direction and amount.

; Receives: ECX = key length, ESI = starting address of the plainText,

; EDI = starting address of the key

; Returns: ZF = 1 if the end of string was found

;-----------------------------------------------------

; IMPLEMENT ENCODE

; IMPLEMENT ENCODE

; IMPLEMENT ENCODE

Encode ENDP

END main

For this assignment you wil1 be writing an assembly program that performs encryption by rotating each plaintext byte a varying number of positions in different directions For example, in the following array that represents the encryption key, a negative value indicates a rotation to the left and a positive value indicates a rotation to the right. The integer in each position indicates the magnitude of the rotation: key BYTE-2, 4, 1, e, -3, 5, 2, -4, -4, 6 For example, the first character wil1 be rotated two positions to the left, and the second character will be rotated four positions to the right. If a e appears in the key, it means the character in that position is not rotated at all. The program loops through a plaintext message and aligns the key to the first 1e bytes of the message. It rotates each plaintext byte by the amount indicated by its matching key array value. Then, the key is aligned to the next 10 bytes of the message and the process is repeated. NOTE: The code for the encoding algorithm should be inside of the Encode procedure. For this assignment you wil1 be writing an assembly program that performs encryption by rotating each plaintext byte a varying number of positions in different directions For example, in the following array that represents the encryption key, a negative value indicates a rotation to the left and a positive value indicates a rotation to the right. The integer in each position indicates the magnitude of the rotation: key BYTE-2, 4, 1, e, -3, 5, 2, -4, -4, 6 For example, the first character wil1 be rotated two positions to the left, and the second character will be rotated four positions to the right. If a e appears in the key, it means the character in that position is not rotated at all. The program loops through a plaintext message and aligns the key to the first 1e bytes of the message. It rotates each plaintext byte by the amount indicated by its matching key array value. Then, the key is aligned to the next 10 bytes of the message and the process is repeated. NOTE: The code for the encoding algorithm should be inside of the Encode procedure

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions