1. Homepage
  2. Programming
  3. COMP1212 Computer Processors - Coursework: Feistel cipher

COMP1212 Computer Processors - Coursework: Feistel cipher

Engage in a Conversation
LeedsCOMP1212Computer ProcessorsHack AssemblyFeistel cipher


CourseNana.COM

1. Assignment guidance CourseNana.COM

The Feistel cipher is a symmetric block cipher encryption framework which is the basis of many modern day encryption algorithms. In this coursework you will implement a Feistel cipher system as a software implementation in Hack Assembly. CourseNana.COM

In a Feistel cipher the plaintext, P, to be encrypted is split into two equal size parts L0 and R0 such that P = L0R0. A function F is applied to one half of the plaintext, combined with a key, and the result is XOR’d with the other half of the plaintext. Feistel ciphers often employ multiple rounds of this scheme. In general the scheme works as follows, for all i = 0,...,n, CourseNana.COM

Li+1 = Ri
Ri+1 =Li F(Ri,Ki) CourseNana.COM

To decrypt an encrypted message using this cipher we can apply the same procedure inreverse. Fori=n,n1,...,0, CourseNana.COM

Ri = Li+1
Li =Ri+1 F(Li+1,Ki) CourseNana.COM

For this coursework we are interested in the 16-bit Feistel cipher which uses 4 rounds. The function F (A, B) = A ⊕ ¬B. CourseNana.COM

The keys are derived from a single 8-bit key K0 such that, CourseNana.COM

K0 = b7b6b5b4b3b2b1b0 K1 = b6b5b4b3b2b1b0b7 K2 = b5b4b3b2b1b0b7b6 K3 = b4b3b2b1b0b7b6b5 CourseNana.COM

2. Assessment tasks CourseNana.COM

(a) Write a program (XOR.asm) in HACK assembly that implements a bit-wise XOR function between two 16-bit values stored in RAM[3] and RAM[4] and stores the result in RAM[5]. CourseNana.COM

[4 marks] CourseNana.COM

CourseNana.COM

  1. (b)  Write a program (Rotate.asm) in HACK assembly that implements an algorithm to rotate the bits of a 16-bit number left (Least Significant bit (LSb) to Most Significant bit (MSb)). The original number should be stored in RAM[3], the number of times to rotate the bits should be in RAM[4] and the result stored in RAM[5], i.e. 1010111100000000 rotated left 3 times would be 0111100000000101 where the MSb is used to replace the LSb on each rotation. CourseNana.COM

    [8 marks] CourseNana.COM

  2. (c)  Write a program (FeistelEncryption.asm) in HACK assembly, that implements the described Feistel encryption system. The initial key, K0, will be stored in RAM[1], and the plaintext to be encrypted will be represented by a 16-bit value stored in RAM[2]. The result of the encryption should be stored in RAM[0]. CourseNana.COM

    [10 marks] CourseNana.COM

[Total 22 marks]
3. General guidance and study support CourseNana.COM

Tools required to simulate the hardware and CPU are provided on Minerva under Learning resources: Software. You may find it easier to implement cipher in a high level language first. This will also allow you to test the results of your HACK program. Support will be available during lab classes. Please ensure the files you upload work with the test files provided and use the filenames provided in this sheet. Do not alter the format of the lines of these test files in any way. The spacing in each line needs to be preserved You are of course welcome to build your own test files in the same format or add to these files. CourseNana.COM

4. Assessment criteria and marking process
This coursework will be automatically marked using Gradescope. Feedback will be CourseNana.COM

provided through Gradescope. CourseNana.COM

Marks are awarded for passing the automated tests on the submitted programs. These will not necessarily be the same tests that are provided to help you develop the solution. You should therefore test your solution thoroughly using other values for the plaintext and keys before your final submission. CourseNana.COM

5. Presentation and referencing
Submitted code should provide suitable comments where possible. CourseNana.COM

6. Submission requirements CourseNana.COM

Links to submit your work can be found on Minerva under Assessment and feed- back/Submit my work. The HACK assembly (asm) files for each part must be up- loaded individually. Ensure you use only the filenames provided in this specification sheet. CourseNana.COM

CourseNana.COM

7. Academic misconduct and plagiarism CourseNana.COM

Academic integrity means engaging in good academic practice. This involves essential academic skills, such as keeping track of where you find ideas and information and referencing these accurately in your work. CourseNana.COM

By submitting this assignment you are confirming that the work is a true expression of your own work and ideas and that you have given credit to others where their work has contributed to yours. CourseNana.COM

8. Assessment/marking criteria
No marks will be awarded for tests which fail CourseNana.COM

  • Part a) is graded using 4 tests, each worth 1 mark. [max 4 marks] CourseNana.COM

  • Part b) is graded using 4 tests, each worth 2 marks. [max 8 marks] CourseNana.COM

  • Part c) is graded using 4 tests, each worth 2 marks and a further 2 marks for optimised solutions that require a lower number of operations to complete the encryption [max 10 marks] CourseNana.COM

    [Total 22 marks] CourseNana.COM

CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
Leeds代写,COMP1212代写,Computer Processors代写,Hack Assembly代写,Feistel cipher代写,Leeds代编,COMP1212代编,Computer Processors代编,Hack Assembly代编,Feistel cipher代编,Leeds代考,COMP1212代考,Computer Processors代考,Hack Assembly代考,Feistel cipher代考,Leedshelp,COMP1212help,Computer Processorshelp,Hack Assemblyhelp,Feistel cipherhelp,Leeds作业代写,COMP1212作业代写,Computer Processors作业代写,Hack Assembly作业代写,Feistel cipher作业代写,Leeds编程代写,COMP1212编程代写,Computer Processors编程代写,Hack Assembly编程代写,Feistel cipher编程代写,Leedsprogramming help,COMP1212programming help,Computer Processorsprogramming help,Hack Assemblyprogramming help,Feistel cipherprogramming help,Leedsassignment help,COMP1212assignment help,Computer Processorsassignment help,Hack Assemblyassignment help,Feistel cipherassignment help,Leedssolution,COMP1212solution,Computer Processorssolution,Hack Assemblysolution,Feistel ciphersolution,