Question: Write a program ( FeistelEncryption . asm ) in HACK assembly, that implements the described Feistel encryption system. The initial key, K 0 , will
Write a program FeistelEncryptionasm in HACK assembly, that implements the described Feistel encryption system. The initial key, K will be stored in RAM and the plaintext to be encrypted will be represented by a bit value stored in RAM The result of the encryption should be stored in RAM Why does this code not work? When i run it with tests where ram and are all the required output is but i get as the output. Please explain why it doesnt work and how i can fix it THank you
FeistelEncryption.asm
Function to perform Feistel encryption
Load plaintext into registers
@
DM
Load key into registers
@
DM
Perform Feistel rounds
@
DA
LOOP
Perform Feistel round
Extract left and right halves of plaintext
@
DA
@D
ADA
DM
@
MD Store L in R
@
DM
@
AM
DDM
@
AM
MD Store FR K in RAM
Perform Feistel round
@
DM
@
MD Store R in R
@
DM
@
AM
DDM
@
AM
MD Store FR K in RAM
Perform Feistel round
@
DM
@
MD Store R in R
@
DM
@
AM
DDM
@
AM
MD Store FR K in RAM
Perform Feistel round
@
DM
@
MD Store R in R
@
DM
@
AM
DDM
@
AM
MD Store FR K in RAM
End of loop
@LOOP
D;JLT
End of program
END
@END
;JMP
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
