Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write Assembly code ( only assembly code and no procedure call ) that performs decryption ( recovers the original string ) of an encrypted string.

Write Assembly code (only assembly code and no procedure call) that performs decryption (recovers the original string) of an encrypted string. The encryption is performed 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 (for rotation you are only allowed to use ROR instruction). The integer in each position indicates the magnitude of the rotation: key BYTE -4,4,-1,0,3,-5,2,-4
Encryption algorithm rotates each plaintext byte by the amount indicated by its matching key array value. Then, align the key to the next 8 bytes of the message and repeat the process.
Please remember that ROR eax, -3 is the same as ROL. eax,3
Here is a sample input:
.data
Encryptkey BYTE -4,4,-1,0,3,-5,2,-4
encrypted BYTE "1Hv$4Pq&JzXu8T@w"
size1= $-encrypted
decrypted BYTE DUP size1(?)(Please only in MASM )

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

Step: 3

blur-text-image

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

=+What kinds of problems need to be overcome?

Answered: 1 week ago