SlideShare a Scribd company logo
1 of 15
Download to read offline
Homework #1
Chap. 1, 3, 4
J. H. Wang
Oct. 1, 2019
Homework #1
• Chap.1:
– Review question 1.3
• Chap.3:
– Review question 3.4, 3.12
– Problem: 3.1, 3.3
– Programming problem: 3.23*, 3.25*
• Chap.4:
– Review question 4.4, 4.6
– Problem: 4.2, 4.6
– Programming problem: 4.20*
• Due: two weeks (Oct. 15, 2019)
• Chap. 1
– Review question 1.3: List and briefly define
categories of passive and active attacks.
• Chap. 3
– Review question 3.4: What is the difference
between a block cipher and a stream cipher?
– Review question 3.12: What are the two
problems with the one-time pad?
– Problem 3.1: A generalization of the Caesar
cipher, known as the affine Caesar cipher, has
the following form: For each plaintext letter p,
substitute the ciphertext letter C:
C = E([a,b], p) = (ap+b) mod 26
A basic requirement of any encryption algorithm is
that it be one-to-one. That is, if p!=q, then
E(k,p)!=E(k,q). Otherwise, decryption is impossible,
because more than one plaintext character maps
into the same ciphertext character.
(…to be continued)
(…continued from the previous slide)
The affine Caesar cipher is not one-to-one for all
values of a. For example, for a=2 and b=3, then
E([a,b],0)=E([a,b],13)=3.
(a) Are there any limitations on the value of b? Explain
why or why not.
(b) Determine which values of a are not allowed.
(c) Provide a general statement of which values of a
are and are not allowed. Justify your statement.
– Problem 3.3: A ciphertext has been generated
with an affine cipher. The most frequent letter
of the ciphertext is “C,” and the second most
frequent letter of the ciphertext is “Z.” Break
this code.
– Programming Problem 3.23: Write a program that
can encrypt and decrypt using the general
Caesar cipher, also known as an additive cipher.
– Programming Problem 3.25: Write a program that
can perform a letter frequency attack on an
additive cipher without human intervention. Your
software should produce possible plaintexts in
rough order of likelihood. It would be good if your
user interface allowed the user to specify “give
me the top 10 possible plaintexts.”
• Chap. 4
– Review question 4.4: Briefly define the terms
substitution and permutation.
– Review question 4.6: Which parameters and
design choices determine the actual algorithm
of a Feistel cipher?
– Problem 4.2: Consider a Feistel cipher
composed of sixteen rounds with a block
length of 128 bits and a key length of 128 bits.
Suppose that, for a given k, the key
scheduling algorithm determines values for
the first eight round keys, k1, k2, …, k8, and
then sets
k9=k8, k10=k7, k11=k6, …, k16=k1
(To be continued…)
– (…continued from the previous slide)
– Suppose you have a ciphertext c. Explain
how, with access to an encryption oracle, you
can decrypt c and determine m using just a
single oracle query. This shows that such a
cipher is vulnerable to a chosen plaintext
attack.
(To be continued….)
– (…continued from the previous slide)
(An encryption oracle can be thought of as a
device that, when given a plaintext, returns
the corresponding ciphertext. The internal
details of the device are not known to you and
you cannot break open the device. You can
only gain information from the oracle by
making queries to it and observing its
responses.)
– Problem 4.6: Suppose the DES F function mapped every
32-bit input R, regardless of the value of the input K, to:
(a) 32-bit string of zero
(b) R
Then,
1. What function would DES then compute?
2. What would the decryption look like?
Hint: Use the following properties of the XOR operation:
(A  B)  C = A  (B  C)
(A  A) = 0, (A  0) = A
A  1 = bitwise complement of A
where A, B, C are n-bit strings of bits
0 is an n-bit string of zeros,
1 is an n-bit string of ones.
• Programming Problem 4.20: Create
software that can encrypt and decrypt
using S-DES, described in Appendix G.
Test data: use plaintext, ciphertext, and
key of Problem 4.18.
Homework Submission
• For hand-written exercises, please hand in
your homework in class (paper version)
• For programming exercises, please submit to
our homework submission site.
– URL: http://mslin.ee.ntut.edu.tw/
– User account/Password: (You MUST use your student ID
at the first login even if you visited the site before)
• Please change your password as soon as possible
– Program uploading: a compressed file (in .zip format)
including source codes and compilation instructions if it
needs special environment to compile or run
• Please clearly name your program files using your ID
– Note: the uploaded file size must be less than 5MB
Thanks for Your Attention!

More Related Content

What's hot

Chapter Eight(1)
Chapter Eight(1)Chapter Eight(1)
Chapter Eight(1)
bolovv
 
Chapter Eight(2)
Chapter Eight(2)Chapter Eight(2)
Chapter Eight(2)
bolovv
 
C++ programming intro
C++ programming introC++ programming intro
C++ programming intro
marklaloo
 

What's hot (14)

Chapter Eight(1)
Chapter Eight(1)Chapter Eight(1)
Chapter Eight(1)
 
III EEE-CS2363-Computer-Networks-model-question-paper-set-1-for-may-june-2014
III EEE-CS2363-Computer-Networks-model-question-paper-set-1-for-may-june-2014III EEE-CS2363-Computer-Networks-model-question-paper-set-1-for-may-june-2014
III EEE-CS2363-Computer-Networks-model-question-paper-set-1-for-may-june-2014
 
Gsp 125 Future Our Mission/newtonhelp.com
Gsp 125 Future Our Mission/newtonhelp.comGsp 125 Future Our Mission/newtonhelp.com
Gsp 125 Future Our Mission/newtonhelp.com
 
Data and computer communication exam i
Data and computer communication exam iData and computer communication exam i
Data and computer communication exam i
 
Chapter Eight(2)
Chapter Eight(2)Chapter Eight(2)
Chapter Eight(2)
 
C++ programming intro
C++ programming introC++ programming intro
C++ programming intro
 
GSP 125 RANK Education for Service--gsp125rank.com
GSP 125 RANK  Education for Service--gsp125rank.comGSP 125 RANK  Education for Service--gsp125rank.com
GSP 125 RANK Education for Service--gsp125rank.com
 
C programming Ms. Pranoti Doke
C programming Ms. Pranoti DokeC programming Ms. Pranoti Doke
C programming Ms. Pranoti Doke
 
Demo learn python
Demo learn pythonDemo learn python
Demo learn python
 
Arithmetic coding
Arithmetic codingArithmetic coding
Arithmetic coding
 
Gsp 125 Education Organization -- snaptutorial.com
Gsp 125   Education Organization -- snaptutorial.comGsp 125   Education Organization -- snaptutorial.com
Gsp 125 Education Organization -- snaptutorial.com
 
GSP 125 Exceptional Education - snaptutorial.com
GSP 125 Exceptional Education - snaptutorial.comGSP 125 Exceptional Education - snaptutorial.com
GSP 125 Exceptional Education - snaptutorial.com
 
GSP 125 Education Specialist / snaptutorial.com
  GSP 125 Education Specialist / snaptutorial.com  GSP 125 Education Specialist / snaptutorial.com
GSP 125 Education Specialist / snaptutorial.com
 
Gsp 125 Enthusiastic Study / snaptutorial.com
Gsp 125 Enthusiastic Study / snaptutorial.comGsp 125 Enthusiastic Study / snaptutorial.com
Gsp 125 Enthusiastic Study / snaptutorial.com
 

Similar to NTUT Information Security Homework 1

Sample Exam Questions on Python for revision
Sample Exam Questions on Python for revisionSample Exam Questions on Python for revision
Sample Exam Questions on Python for revision
afsheenfaiq2
 
Lab 18 Answer TemplateProblem 1IP address 192.168.10.0 27 (giv.docx
Lab 18 Answer TemplateProblem 1IP address  192.168.10.0 27 (giv.docxLab 18 Answer TemplateProblem 1IP address  192.168.10.0 27 (giv.docx
Lab 18 Answer TemplateProblem 1IP address 192.168.10.0 27 (giv.docx
DIPESH30
 
D I G I T A L I C A P P L I C A T I O N S J N T U M O D E L P A P E R{Www
D I G I T A L  I C  A P P L I C A T I O N S  J N T U  M O D E L  P A P E R{WwwD I G I T A L  I C  A P P L I C A T I O N S  J N T U  M O D E L  P A P E R{Www
D I G I T A L I C A P P L I C A T I O N S J N T U M O D E L P A P E R{Www
guest3f9c6b
 

Similar to NTUT Information Security Homework 1 (20)

Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
 
SMU BSC IT FALL / SUMMER 2013 SOLVED ASSIGNMENTS
SMU BSC IT FALL / SUMMER 2013 SOLVED ASSIGNMENTSSMU BSC IT FALL / SUMMER 2013 SOLVED ASSIGNMENTS
SMU BSC IT FALL / SUMMER 2013 SOLVED ASSIGNMENTS
 
Devry CIS 355A Full Course Latest
Devry CIS 355A Full Course LatestDevry CIS 355A Full Course Latest
Devry CIS 355A Full Course Latest
 
final_2014.pdf
final_2014.pdffinal_2014.pdf
final_2014.pdf
 
Sample Exam Questions on Python for revision
Sample Exam Questions on Python for revisionSample Exam Questions on Python for revision
Sample Exam Questions on Python for revision
 
GSP 125 Perfect Education/newtonhelp.com
GSP 125 Perfect Education/newtonhelp.comGSP 125 Perfect Education/newtonhelp.com
GSP 125 Perfect Education/newtonhelp.com
 
GSP 125 Become Exceptional/newtonhelp.com
GSP 125 Become Exceptional/newtonhelp.comGSP 125 Become Exceptional/newtonhelp.com
GSP 125 Become Exceptional/newtonhelp.com
 
GSP 125 Doing by learn/newtonhelp.com
GSP 125 Doing by learn/newtonhelp.comGSP 125 Doing by learn/newtonhelp.com
GSP 125 Doing by learn/newtonhelp.com
 
Lab 18 Answer TemplateProblem 1IP address 192.168.10.0 27 (giv.docx
Lab 18 Answer TemplateProblem 1IP address  192.168.10.0 27 (giv.docxLab 18 Answer TemplateProblem 1IP address  192.168.10.0 27 (giv.docx
Lab 18 Answer TemplateProblem 1IP address 192.168.10.0 27 (giv.docx
 
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
 
Pgcet Computer Science 2015 question paper
Pgcet Computer Science 2015 question paperPgcet Computer Science 2015 question paper
Pgcet Computer Science 2015 question paper
 
RRB JE Stage 2 Computer and Applications Questions Part 2
RRB JE Stage 2 Computer and Applications Questions Part 2RRB JE Stage 2 Computer and Applications Questions Part 2
RRB JE Stage 2 Computer and Applications Questions Part 2
 
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4
COLLEGE OF COMPUTING AND INFORMATICS Assignment – 4
 
15_NEW-2020-ATTENTION-ENC-DEC-TRANSFORMERS-Lect15.pptx
15_NEW-2020-ATTENTION-ENC-DEC-TRANSFORMERS-Lect15.pptx15_NEW-2020-ATTENTION-ENC-DEC-TRANSFORMERS-Lect15.pptx
15_NEW-2020-ATTENTION-ENC-DEC-TRANSFORMERS-Lect15.pptx
 
D I G I T A L I C A P P L I C A T I O N S J N T U M O D E L P A P E R{Www
D I G I T A L  I C  A P P L I C A T I O N S  J N T U  M O D E L  P A P E R{WwwD I G I T A L  I C  A P P L I C A T I O N S  J N T U  M O D E L  P A P E R{Www
D I G I T A L I C A P P L I C A T I O N S J N T U M O D E L P A P E R{Www
 
Digital Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
Digital Ic Applications Jntu Model Paper{Www.Studentyogi.Com}Digital Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
Digital Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
 
GSP 125 Technology levels--snaptutorial.com
GSP 125 Technology levels--snaptutorial.comGSP 125 Technology levels--snaptutorial.com
GSP 125 Technology levels--snaptutorial.com
 
Gsp 125 Massive Success / snaptutorial.com
Gsp 125  Massive Success / snaptutorial.comGsp 125  Massive Success / snaptutorial.com
Gsp 125 Massive Success / snaptutorial.com
 
Smu bscit sem 2 fall 2014 assignments
Smu bscit sem 2 fall 2014 assignmentsSmu bscit sem 2 fall 2014 assignments
Smu bscit sem 2 fall 2014 assignments
 
C Programming Training in Ambala ! Batra Computer Centre
C Programming Training in Ambala ! Batra Computer CentreC Programming Training in Ambala ! Batra Computer Centre
C Programming Training in Ambala ! Batra Computer Centre
 

Recently uploaded

出售伯明翰大学毕业证研究生文凭证书原版质量
出售伯明翰大学毕业证研究生文凭证书原版质量出售伯明翰大学毕业证研究生文凭证书原版质量
出售伯明翰大学毕业证研究生文凭证书原版质量
kthcah
 
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
rgthdgf
 
一比一原版曼彻斯特城市大学毕业证成绩单原件一模一样
一比一原版曼彻斯特城市大学毕业证成绩单原件一模一样一比一原版曼彻斯特城市大学毕业证成绩单原件一模一样
一比一原版曼彻斯特城市大学毕业证成绩单原件一模一样
fsdfdsgf
 
一比一原版北雷克斯学院毕业证成绩单原件一模一样
一比一原版北雷克斯学院毕业证成绩单原件一模一样一比一原版北雷克斯学院毕业证成绩单原件一模一样
一比一原版北雷克斯学院毕业证成绩单原件一模一样
CC
 
mechanical vibrations pebbles.pptbbbbbbbbx
mechanical vibrations pebbles.pptbbbbbbbbxmechanical vibrations pebbles.pptbbbbbbbbx
mechanical vibrations pebbles.pptbbbbbbbbx
joshuaclack73
 
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
A
 
原版定制英国格鲁斯特大学毕业证原件一模一样
原版定制英国格鲁斯特大学毕业证原件一模一样原版定制英国格鲁斯特大学毕业证原件一模一样
原版定制英国格鲁斯特大学毕业证原件一模一样
AS
 
原版定做(ncl学位证书)英国纽卡斯尔大学毕业证文凭学历证书-国外学历学位认证
原版定做(ncl学位证书)英国纽卡斯尔大学毕业证文凭学历证书-国外学历学位认证原版定做(ncl学位证书)英国纽卡斯尔大学毕业证文凭学历证书-国外学历学位认证
原版定做(ncl学位证书)英国纽卡斯尔大学毕业证文凭学历证书-国外学历学位认证
eehzz
 
一比一原版(CCA毕业证书)加利福尼亚艺术学院毕业证成绩单原件一模一样
一比一原版(CCA毕业证书)加利福尼亚艺术学院毕业证成绩单原件一模一样一比一原版(CCA毕业证书)加利福尼亚艺术学院毕业证成绩单原件一模一样
一比一原版(CCA毕业证书)加利福尼亚艺术学院毕业证成绩单原件一模一样
zovambe
 
一比一定制加拿大新喀里多尼亚学院毕业证(UofL毕业证书)学位证书
一比一定制加拿大新喀里多尼亚学院毕业证(UofL毕业证书)学位证书一比一定制加拿大新喀里多尼亚学院毕业证(UofL毕业证书)学位证书
一比一定制加拿大新喀里多尼亚学院毕业证(UofL毕业证书)学位证书
egfdgfd
 
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
0uyfyq0q4
 

Recently uploaded (20)

出售伯明翰大学毕业证研究生文凭证书原版质量
出售伯明翰大学毕业证研究生文凭证书原版质量出售伯明翰大学毕业证研究生文凭证书原版质量
出售伯明翰大学毕业证研究生文凭证书原版质量
 
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
 
Benefits of Load Planning in Fleet Management
Benefits of Load Planning in Fleet ManagementBenefits of Load Planning in Fleet Management
Benefits of Load Planning in Fleet Management
 
一比一原版曼彻斯特城市大学毕业证成绩单原件一模一样
一比一原版曼彻斯特城市大学毕业证成绩单原件一模一样一比一原版曼彻斯特城市大学毕业证成绩单原件一模一样
一比一原版曼彻斯特城市大学毕业证成绩单原件一模一样
 
EV Charging Resources and Technical Assistance for Rural Communities and Trib...
EV Charging Resources and Technical Assistance for Rural Communities and Trib...EV Charging Resources and Technical Assistance for Rural Communities and Trib...
EV Charging Resources and Technical Assistance for Rural Communities and Trib...
 
What Causes The BMW X7 Power Supply Warning To Illuminate
What Causes The BMW X7 Power Supply Warning To IlluminateWhat Causes The BMW X7 Power Supply Warning To Illuminate
What Causes The BMW X7 Power Supply Warning To Illuminate
 
一比一原版北雷克斯学院毕业证成绩单原件一模一样
一比一原版北雷克斯学院毕业证成绩单原件一模一样一比一原版北雷克斯学院毕业证成绩单原件一模一样
一比一原版北雷克斯学院毕业证成绩单原件一模一样
 
mechanical vibrations pebbles.pptbbbbbbbbx
mechanical vibrations pebbles.pptbbbbbbbbxmechanical vibrations pebbles.pptbbbbbbbbx
mechanical vibrations pebbles.pptbbbbbbbbx
 
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
 
Why Won't My Mercedes Key Fob Function After A Battery Swap
Why Won't My Mercedes Key Fob Function After A Battery SwapWhy Won't My Mercedes Key Fob Function After A Battery Swap
Why Won't My Mercedes Key Fob Function After A Battery Swap
 
Access to Rural Charging by David Skakel
Access to Rural Charging by David SkakelAccess to Rural Charging by David Skakel
Access to Rural Charging by David Skakel
 
原版定制英国格鲁斯特大学毕业证原件一模一样
原版定制英国格鲁斯特大学毕业证原件一模一样原版定制英国格鲁斯特大学毕业证原件一模一样
原版定制英国格鲁斯特大学毕业证原件一模一样
 
Why Is The Glow Plug Light Flashing In My VW & What Does It Indicate
Why Is The Glow Plug Light Flashing In My VW & What Does It IndicateWhy Is The Glow Plug Light Flashing In My VW & What Does It Indicate
Why Is The Glow Plug Light Flashing In My VW & What Does It Indicate
 
原版定做(ncl学位证书)英国纽卡斯尔大学毕业证文凭学历证书-国外学历学位认证
原版定做(ncl学位证书)英国纽卡斯尔大学毕业证文凭学历证书-国外学历学位认证原版定做(ncl学位证书)英国纽卡斯尔大学毕业证文凭学历证书-国外学历学位认证
原版定做(ncl学位证书)英国纽卡斯尔大学毕业证文凭学历证书-国外学历学位认证
 
一比一原版(CCA毕业证书)加利福尼亚艺术学院毕业证成绩单原件一模一样
一比一原版(CCA毕业证书)加利福尼亚艺术学院毕业证成绩单原件一模一样一比一原版(CCA毕业证书)加利福尼亚艺术学院毕业证成绩单原件一模一样
一比一原版(CCA毕业证书)加利福尼亚艺术学院毕业证成绩单原件一模一样
 
What Might Be Behind Your Mercedes' Inoperative Cruise Control
What Might Be Behind Your Mercedes' Inoperative Cruise ControlWhat Might Be Behind Your Mercedes' Inoperative Cruise Control
What Might Be Behind Your Mercedes' Inoperative Cruise Control
 
一比一定制加拿大新喀里多尼亚学院毕业证(UofL毕业证书)学位证书
一比一定制加拿大新喀里多尼亚学院毕业证(UofL毕业证书)学位证书一比一定制加拿大新喀里多尼亚学院毕业证(UofL毕业证书)学位证书
一比一定制加拿大新喀里多尼亚学院毕业证(UofL毕业证书)学位证书
 
What Could Cause Your Audi To Keep Cutting Out
What Could Cause Your Audi To Keep Cutting OutWhat Could Cause Your Audi To Keep Cutting Out
What Could Cause Your Audi To Keep Cutting Out
 
AI for Smart Vehicles - A quick overview
AI for Smart Vehicles - A quick overviewAI for Smart Vehicles - A quick overview
AI for Smart Vehicles - A quick overview
 
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
 

NTUT Information Security Homework 1

  • 1. Homework #1 Chap. 1, 3, 4 J. H. Wang Oct. 1, 2019
  • 2. Homework #1 • Chap.1: – Review question 1.3 • Chap.3: – Review question 3.4, 3.12 – Problem: 3.1, 3.3 – Programming problem: 3.23*, 3.25* • Chap.4: – Review question 4.4, 4.6 – Problem: 4.2, 4.6 – Programming problem: 4.20* • Due: two weeks (Oct. 15, 2019)
  • 3. • Chap. 1 – Review question 1.3: List and briefly define categories of passive and active attacks. • Chap. 3 – Review question 3.4: What is the difference between a block cipher and a stream cipher? – Review question 3.12: What are the two problems with the one-time pad?
  • 4. – Problem 3.1: A generalization of the Caesar cipher, known as the affine Caesar cipher, has the following form: For each plaintext letter p, substitute the ciphertext letter C: C = E([a,b], p) = (ap+b) mod 26 A basic requirement of any encryption algorithm is that it be one-to-one. That is, if p!=q, then E(k,p)!=E(k,q). Otherwise, decryption is impossible, because more than one plaintext character maps into the same ciphertext character. (…to be continued)
  • 5. (…continued from the previous slide) The affine Caesar cipher is not one-to-one for all values of a. For example, for a=2 and b=3, then E([a,b],0)=E([a,b],13)=3. (a) Are there any limitations on the value of b? Explain why or why not. (b) Determine which values of a are not allowed. (c) Provide a general statement of which values of a are and are not allowed. Justify your statement.
  • 6. – Problem 3.3: A ciphertext has been generated with an affine cipher. The most frequent letter of the ciphertext is “C,” and the second most frequent letter of the ciphertext is “Z.” Break this code.
  • 7. – Programming Problem 3.23: Write a program that can encrypt and decrypt using the general Caesar cipher, also known as an additive cipher. – Programming Problem 3.25: Write a program that can perform a letter frequency attack on an additive cipher without human intervention. Your software should produce possible plaintexts in rough order of likelihood. It would be good if your user interface allowed the user to specify “give me the top 10 possible plaintexts.”
  • 8. • Chap. 4 – Review question 4.4: Briefly define the terms substitution and permutation. – Review question 4.6: Which parameters and design choices determine the actual algorithm of a Feistel cipher?
  • 9. – Problem 4.2: Consider a Feistel cipher composed of sixteen rounds with a block length of 128 bits and a key length of 128 bits. Suppose that, for a given k, the key scheduling algorithm determines values for the first eight round keys, k1, k2, …, k8, and then sets k9=k8, k10=k7, k11=k6, …, k16=k1 (To be continued…)
  • 10. – (…continued from the previous slide) – Suppose you have a ciphertext c. Explain how, with access to an encryption oracle, you can decrypt c and determine m using just a single oracle query. This shows that such a cipher is vulnerable to a chosen plaintext attack. (To be continued….)
  • 11. – (…continued from the previous slide) (An encryption oracle can be thought of as a device that, when given a plaintext, returns the corresponding ciphertext. The internal details of the device are not known to you and you cannot break open the device. You can only gain information from the oracle by making queries to it and observing its responses.)
  • 12. – Problem 4.6: Suppose the DES F function mapped every 32-bit input R, regardless of the value of the input K, to: (a) 32-bit string of zero (b) R Then, 1. What function would DES then compute? 2. What would the decryption look like? Hint: Use the following properties of the XOR operation: (A  B)  C = A  (B  C) (A  A) = 0, (A  0) = A A  1 = bitwise complement of A where A, B, C are n-bit strings of bits 0 is an n-bit string of zeros, 1 is an n-bit string of ones.
  • 13. • Programming Problem 4.20: Create software that can encrypt and decrypt using S-DES, described in Appendix G. Test data: use plaintext, ciphertext, and key of Problem 4.18.
  • 14. Homework Submission • For hand-written exercises, please hand in your homework in class (paper version) • For programming exercises, please submit to our homework submission site. – URL: http://mslin.ee.ntut.edu.tw/ – User account/Password: (You MUST use your student ID at the first login even if you visited the site before) • Please change your password as soon as possible – Program uploading: a compressed file (in .zip format) including source codes and compilation instructions if it needs special environment to compile or run • Please clearly name your program files using your ID – Note: the uploaded file size must be less than 5MB
  • 15. Thanks for Your Attention!