The Feistel cipher 代做、Python/Java程序设计代写
1. Assignment guidance
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.
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,
Li+1 = Ri
Ri+1 = Li ⊕ F(Ri
, Ki)
To decrypt an encrypted message using this cipher we can apply the same procedure
in reverse. For i = n, n − 1, . . . , 0,
Ri = Li+1
Li = Ri+1 ⊕ F(Li+1, Ki)
For this coursework we are interested in the 16-bit Feistel cipher which uses 4 rounds.
The function F(A, B) = A ⊕ ¬B.
The keys are derived from a single 8-bit key K0 such that,
K0 = b7b6b5b4b3b2b1b0
K1 = b6b5b4b3b2b1b0b7
K2 = b5b4b3b2b1b0b7b6
K3 = b4b3b2b1b0b7b6b5
2. Assessment tasks
(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].
[4 marks]
2
(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.
[8 marks]
(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].
[10 marks]
[Total 22 marks]
3. General guidance and study support
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.
4. Assessment criteria and marking process
This coursework will be automatically marked using Gradescope. Feedback will be
provided through Gradescope.
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.
5. Presentation and referencing
Submitted code should provide suitable comments where possible.
6. Submission requirements
Links to submit your work can be found on Minerva under Assessment and feedback/Submit my work. The HACK assembly (asm) files for each part must be uploaded individually. Ensure you use only the filenames provided in this specification
sheet.
3
7. Academic misconduct and plagiarism
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.
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.
8. Assessment/marking criteria
No marks will be awarded for tests which fail
• Part a) is graded using 4 tests, each worth 1 mark. [max 4 marks]
• Part b) is graded using 4 tests, each worth 2 marks. [max 8 marks]
• 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]
请加QQ:99515681 邮箱:99515681@qq.com WX:codinghelp
- 威雅学校:2024威雅升学规划国际教育展圆满收官,卓越未来正始于此刻!
- 智慧驱动 共创未来| 东芝硬盘创新数据存储技术
- 掌上汽车:引领智能出行新风尚
- 以前没有WhatsApp拉群工具 我的推广活动就像是在大海里撒网 茫茫人海 难以寻觅到真正有意向的顾客 投入的时间和精力都像是石沉大海 难以泛起一丝波澜
- Instagram采集指定地区 - ins接粉软件/ig打粉软件/ins私信软件/ig采集工具
- Instagram营销软件 - ins私信博主/ig批量养号/ins自动登录
- WhatsApp拉群平台,ws云控注册系统/ws混合协议号优势/ws筛选器高效
- Telegram定位采集营销助手,TG全球坐标定位采集软件,电报群组坐标采集利器
- TG/Telegram如何群发,电报群发工具购买/TG协议号群发推荐
- Telegram批量私信营销软件,TG一键群发私信助手,电报群发私信软件
- 聚焦新质生产力:从年报解读粤企“新”动向
- WhatsApp全球拉群,ws协议号自动注册工具/ws群发/ws养号
- Instagram引流神器 - ins自动登录/ig采集指定地区/ins群发软件
- 求臻医学满分通过CAP NGS−B 及CAP NEO-A能力验证!
- 求臻医学MRD产品斩获2023年度肿瘤标志物年度十大创新技术产品奖
- 热辣滚烫!2024低代码6大趋势
- 电报/TG群发营销高效策略工具,Telegram/TG全自动群发软件,TG/纸飞机拉群助推器
- Instagram群发软件 - ins自动登录/ig采集指定地区/ins群发助手/ig引流助手
- Instagram采集指定地区 - ins接粉软件/ig打粉软件/ins私信软件
- 鼎阳科技发布8GHz带宽12-bit高分辨率示波器,加速自身高端化进程
- Instagram营销群发软件,Ins自动群发助手,助你实现营销梦想!
- WhatsApp怎么养号,ws协议号购买/ws群发助手/咨询大轩
- Telegram自动采集营销软件,TG全自动脚本采集,电报群组采集利器
- Instagram采集器,ins自动化精准采集博主工具震撼登场!
- WhatsApp群发营销软件,ws协议号/ws群发工具咨询大轩
- Ins自动私信/强私教程,Instagram营销引流神器全方位解析!
- 聪明选择WhatsApp工具是我外贸起步时不可或缺的趋势智能助手
- Instagram引粉营销神器,ins全球引流营销必选软件大公开!
- 创新引爆业绩 WhatsApp拉群营销工具为您的业务开创新的成功篇章
- COMP 2049 代做代写 c++,java 编程
推荐
- 老杨第一次再度抓握住一瓶水,他由此产生了新的憧憬 瘫痪十四年后,老杨第一次再度抓握住一瓶水,他 科技
- 疫情期间 这个品牌实现了疯狂扩张 记得第一次喝瑞幸,还是2017年底去北京出差的 科技
- 全力打造中国“创业之都”名片,第十届中国创业者大会将在郑州召开 北京创业科创科技中心主办的第十届中国创业 科技
- 智慧驱动 共创未来| 东芝硬盘创新数据存储技术 为期三天的第五届中国(昆明)南亚社会公共安 科技
- 创意驱动增长,Adobe护城河够深吗? Adobe通过其Creative Cloud订阅捆绑包具有 科技
- 丰田章男称未来依然需要内燃机 已经启动电动机新项目 尽管电动车在全球范围内持续崛起,但丰田章男 科技
- 如何经营一家好企业,需要具备什么要素特点 我们大多数人刚开始创办一家企业都遇到经营 科技
- 升级的脉脉,正在以招聘业务铺开商业化版图 长久以来,求职信息流不对称、单向的信息传递 科技
- B站更新决策机构名单:共有 29 名掌权管理者,包括陈睿、徐逸、李旎、樊欣等人 1 月 15 日消息,据界面新闻,B站上周发布内部 科技
- 苹果罕见大降价,华为的压力给到了? 1、苹果官网罕见大降价冲上热搜。原因是苹 科技