SlideShare a Scribd company logo
1 of 12
For any Homework related queries, Call us at : - +1 678 648 4277
You can mail us at : - support@computernetworkassignmenthelp.com or
reach us at : - www.computernetworkassignmenthelp.com/
Problem 1. IND-CCA
Alice and Bob have taken 6.857, and would like to send confidential messages to
each other in a way that meets the IND-CCA definition given there.
Bob suggests the following method.
Let EncCBC(K, M) denote the process of padding M with a 1 bit and then as many 0
bits as needed to make the message length a multiple of 128 bits, and then using AES
in CBC mode to encrypt the result, using a randomly-chosen 128-bit IV. The result is:
EncCBC(K, M) = IV, C1,C2,...,Cn .
Let Rev(S) denote the reverse of a sequence S. That is, S is parsed as a sequence of
128-bit blocks (the length of S must be a multiple of 128 bits), and these blocks are
re-arranged into reverse order.
Bob then proposes that he and Alice secretly agree on two AES keys K1 and K2, and
then define the encryption of a message M as
computernetworkassignmenthelp.com
E(K1,K2; M) = EncCBC(K2, Rev(EncCBC(K1,M ))) .
The intent here is that the reversal avoids the problem noted in class, that “ciphertext
prefixes decode as prefixes of the message.”
Show that this method does not meet the IND-CCA security definition given in class.
That is, show how the adversary can “win” the security game against this method.
Problem 2. Kalns
Ben Bitdiddle has designed a new cryptosystem called Kalns, but we suspect it might
not be as strong as we would like to be. Therefore we ask your help to break it.
In this problem we will be working with a finite field GF16. The elements of our field
are all 4-bit strings. The f ield addition is computed as xor: GF16(x) + GF16(y) =
GF16(x ⊕ y). We provide the two tables describing addition and multiplication laws
on the course web page.
If you are curious, these tables are obtained by interpreting 4-bit field elements as
degree ≤ 4 polynomials 4 over GF2 and performing addition and multiplication
modulo the irreducible polynomial x + x + 1.
computernetworkassignmenthelp.com
However, for the purposes of this problem you do not need to understand how our GF16
is constructed; the solutions we know assume black-box access to GF16. We have
provided a GF16 implementation for you.
Kalns is a 64-bit block cipher. The secret key consists of three parts:
•an invertible 16-by-16 matrix A over GF16;
•a 16-element vector b over GF16; and
•a permutation (bijection) S that maps GF16 one-to-one and onto GF16.
To encrypt a 64-bit block B we first break it up in sixteen 4-bit chunks and interpret each
of them as a GF16 element. So block B corresponds to length 16 vector x = (x0,...,x15)
over GF16.
The encryptions consists of the following: y = S(Ax + b), where the permutation S is
individually applied to each of 16 elements of v = Ax + b. The 16-element vector y is
later re-interpreted as 64-bit integer to obtain the encrypted block B'.
(a) Ben suspects that his cryptosystem is very secure. After all it has around 16162
possible keys. However, we suspect that there are many equivalent keys. These keys have
different values for (A, b, S), but produce the same ciphertext for any given plaintext. Is
our suspicion wellfounded?
computernetworkassignmenthelp.com
(b) Describe a chosen-ciphertext attack on Kalns that recovers the unknown key (A,
b, S) or an equivalent key.
(c) To demonstrate that your attack works, write an implementation that can break a
randomly generated key. We have set up a web server that implements Kalns
algorithm at Prove that your implementation works by getting your team’s name on
the list of successful teams. The server is powered by scripts.mit.edu shared hosting
infrastructure. Please don’t issue denial of service attacks or try to attack their servers.
computernetworkassignmenthelp.com
Solution 1. IND-CCA
Theorem: Bob’s method E is not IND-CCA secure
Proof: The adversary picks m0 = 0x, m1 = 1x for large x ≥ 3·128 in phase I. Then y =
EK1,K2 (md). Let z = y with the first bit flipped. Since z = y, the adversary is allowed
to ask for DK1,K2 (z) in phase II. This correctly gives the first 128-bit block of md,
revealing d (zeroes if d = 0 or ones if d = 1). Therefore, the adversary wins the game
Why does this work? Consider the steps of E, where md is divided into n 128-bit
blocks (n ≥ 3)
1. Start with md = m1,...,mn. (1) (1)
2. EncCBCK1 (m (1) 1,...,mn) = IV , C1 ,...,Cn .
3. Rev(IV (1) (1) (1) (1) (1) , C1 ,...,Cn ) = Cn ,...,C ,IV (1) 1 . EncCBC (1) (1) (1)
(2) (2) (2) (2)
4. K2 (Cn ,...,C1 ,IV ) = IV , C1 ,...,Cn , Cn+1. (2) (2) (2)
5. End with IV (2), C1 ,...,Cn , Cn+1 = y
computernetworkassignmenthelp.com
Now, consider the steps of D, which reverses E.
1. Start with y = IV (2), C1 ,...,Cn , Cn+1. DecCBC
2. K2 (IV , C1 ,...,Cn , Cn+1) = Cn ,...,C ,IV (1) 1 .
3. Rev(Cn ,...,C1 ,IV (1)) = IV (1), C1 ,...,Cn .
4. DecCBCK1 (IV (1), C1 ,...,Cn ) = m1,...,mn.
5. End with m1,...,mn = md.
Finally, consider the steps of D when the input is z instead of y (the first bit is
flipped). Denote any changed blocks in red. As we observed in Lecture 9, the bit
flip only affects the decryption of the current block and the next block, since each
decrypted block only depends on Ci and Ci 1 (and only the first block depends on
IV ).
1. Start with z = IV (2), C1
(2) ,...,Cn
(2) , Cn+1
(2).
2. DecCBC K2 (IV (2) , C1 (2),...,Cn (2) , Cn+1 (2) ) = Cn ,...,C1 ,IV (1).
3. Rev(Cn ,...,C ,IV (1) 1 ) = IV (1), C1 ,..., Cn .
4. DecCBC (1) K1 (IV , C1 ,..., Cn ) = m1,..., mn.
5. End with m1,..., mn.
Therefore, the first block m1 of md is correct, revealing d
computernetworkassignmenthelp.com
Problem 2. Kalns
a) Our suspicion is well founded, which we can see from a very simple analysis.
Consider an orig inal key combination (A, b, S), where we call Ax + b = v. Let us
then consider a possible key combination (n*A, n*b, S’), where n is some number
in GF16. The output of this new key pair will be S/(nAx + nb) = S/(nv). Thanks to
the properties of GF16, we know that n ∗ m, where n is a GF16 value held constant
and m is a GF16 value varied from 0 to 16, return all different values ranging from
0 to 16. (Of course, the case where m = 0 maps to 0, but the other cases map more
interestingly.) Thus, multiplying v by n can be considered as just an extra
permutation, P(v). (This is true if n is nonzero, but we are simply choosing this to
be the case.) This means we can just adjust S’ to look like S after canceling out this
original mapping, i.e S/(x) = S(P −1(x)), and we have an equivalent key pair. Thus
we have generated several equivalent key pairs. It turns out that, since we have
such freedom with S, we can actually generate even more equivalent key pairs by
basically generating new v’s and adjusting our S accordingly, as shown above.
Thus, we know that there will be many equivalent key pairs.
b) Let’s consider a series of possible inputs and outputs that we could try
encrypting/decrypting, and consider the information gleaned from each. u
computernetworkassignmenthelp.com
If we encrypt the vector x0 = [0, 0, 0, 0, ..., 0], we will get y0 = S(b). Additionally, if
we encrypt the vectors xi , which are the 16 unit vectors (i.e. the vectors with all 0’s
except a 1 at position i), we i will get back y = S(Ai + b), where Ai is the i’th column of
A.
We now have information about A and b, but they are embedded in S, the permutation.
In order to get information about this, we can decrypt the values yi = [i, 0, 0, 0, ...0].
Reversing our algorithm, v we can see that x = A−1(S−1(y) − b), which means we will
get back x = (A−1)0(S−1(y ) − b). If i i v i v we take the first element of these x , we
will get (A−1)0,0(S−1(i)−b0), and if we take the differences v 0 v i v di = x − x , we
will get (A−1)0,0(S−1(0) − S−1(i)). Here, we take advantage of the properties of GF16
to define a new, valid permutation, S/ such that S/−1 = (A−1)0,0S−1, such that the
values di are actually differences between the inverse permutation values for 0 and i.
Defining S’(0) = 0, we thus have a valid permutation that we have fully defined, and
which we can construct an equivalent key pair using. (Recall from part a that we can do
this because our permutation is correct up to a multiplicative constant!).
Using this new S’, we can decrypt S(b) such that S/−1(S(b)) = b/, and similarly extract
each column of A as a column of a new matrix A’. This new key combination (A/,b/,S/)
is equivalent to the orig inal combination (A, b, S). Since we now have an equivalent
key set to the original combination, we can freely encrypt and decrypt data as we please,
completely compromising the Kalns encryption scheme.
computernetworkassignmenthelp.com
c) We have successfully implemented this algorithm. See MCRBFinalFast on
http://6857.scripts. mit.edu/kalns/. Our code follows the exact process detailed in part
b. The MITx submission site only allows one uploaded file, so we did not submit our
actual code file, but the code we used is reproduced below using the verbatim tag.
from kalns import *
tokenString = remote_query(’keygen?team=MCRBFinalFast’)
theToken = tokenString[80:112]
rk = RemoteKalns(theToken)
b = int64_to_GF16_vec(rk.enc(0))
r_unit = []
for i in range(16):
r_unit.append(int64_to_GF16_vec(rk.enc(2**(4*(15-i)))))
A = []
for row in range(16):
computernetworkassignmenthelp.com
A.append([])
for col in range(16):
A[row].append(r_unit[col][row])
iTimesAInv = []
for i in range(16):
#print int64_to_GF16_vec(i*(2**(4)))
iTimesAInv.append(int64_to_GF16_vec(rk.dec(i*(2**(4)))))
topVals = []
for i in range(16):
topVals.append(iTimesAInv[i][0])
#These for loops are actually irrelevant, they were
#originally to ensure that we didn’t need to try cyclic permutations of
#the S that we derived. It turns out we don’t, so we just set the ranges
#to 1. for i in range(1):
for ii in range(1):
AA = []
BB = []
s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
computernetworkassignmenthelp.com
sinv = []
for iii in range(16):
x = topVals[iii]
x0 = topVals[0]
s[int((GF16(i) - ((x0-x)/GF16(ii+1))).val)] = int(iii)
for ij in range(16):
sinv.append(s.index(ij))
for k in range(16):
AA.append([])
for l in range(16):
AA[k].append(GF16(sinv[A[k][l].val]))
BB.append(GF16(sinv[b[k].val]))
for kk in range(16):
for ll in range(16):
newVar = AA[kk][ll] - BB[kk]
AA[kk][ll] = newVar
print "s = " + str(i) + ", Ainv[0][0] = " + str(ii)
print rk.answer(AA, BB, s)
computernetworkassignmenthelp.com

More Related Content

Similar to Computer Network Homework Help

Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...Spark Summit
 
Engineering fast indexes (Deepdive)
Engineering fast indexes (Deepdive)Engineering fast indexes (Deepdive)
Engineering fast indexes (Deepdive)Daniel Lemire
 
Bca1040 imc1040 digital logic
Bca1040 imc1040  digital logicBca1040 imc1040  digital logic
Bca1040 imc1040 digital logicsmumbahelp
 
Ijmsr 2016-05
Ijmsr 2016-05Ijmsr 2016-05
Ijmsr 2016-05ijmsr
 
An ElGamal Encryption Scheme of Adjacency Matrix and Finite Machines
An ElGamal Encryption Scheme of Adjacency Matrix and Finite MachinesAn ElGamal Encryption Scheme of Adjacency Matrix and Finite Machines
An ElGamal Encryption Scheme of Adjacency Matrix and Finite MachinesComputer Science Journals
 
Aes128 bit project_report
Aes128 bit project_reportAes128 bit project_report
Aes128 bit project_reportNikhil Gupta
 
Differential Equations Homework Help
Differential Equations Homework HelpDifferential Equations Homework Help
Differential Equations Homework HelpMath Homework Solver
 
Design and Analysis of algorithms
Design and Analysis of algorithmsDesign and Analysis of algorithms
Design and Analysis of algorithmsDr. Rupa Ch
 
Introduction to Python Programming.pptx
Introduction to Python Programming.pptxIntroduction to Python Programming.pptx
Introduction to Python Programming.pptxPython Homework Help
 
Real World Haskell: Lecture 5
Real World Haskell: Lecture 5Real World Haskell: Lecture 5
Real World Haskell: Lecture 5Bryan O'Sullivan
 
Differential Equations Assignment Help
Differential Equations Assignment HelpDifferential Equations Assignment Help
Differential Equations Assignment HelpMaths Assignment Help
 
Symmetric ciphers questions and answers
Symmetric ciphers questions and answersSymmetric ciphers questions and answers
Symmetric ciphers questions and answersprdpgpt
 
N Queen Problem using Branch And Bound - GeeksforGeeks.pdf
N Queen Problem using Branch And Bound - GeeksforGeeks.pdfN Queen Problem using Branch And Bound - GeeksforGeeks.pdf
N Queen Problem using Branch And Bound - GeeksforGeeks.pdfakashreddy966699
 
Quantum Computing Notes Ver 1.2
Quantum Computing Notes Ver 1.2Quantum Computing Notes Ver 1.2
Quantum Computing Notes Ver 1.2Vijayananda Mohire
 
MATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfMATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfahmed8651
 

Similar to Computer Network Homework Help (20)

Algorithms Design Exam Help
Algorithms Design Exam HelpAlgorithms Design Exam Help
Algorithms Design Exam Help
 
Algorithms Design Homework Help
Algorithms Design Homework HelpAlgorithms Design Homework Help
Algorithms Design Homework Help
 
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
 
Engineering fast indexes (Deepdive)
Engineering fast indexes (Deepdive)Engineering fast indexes (Deepdive)
Engineering fast indexes (Deepdive)
 
Bca1040 imc1040 digital logic
Bca1040 imc1040  digital logicBca1040 imc1040  digital logic
Bca1040 imc1040 digital logic
 
Ijmsr 2016-05
Ijmsr 2016-05Ijmsr 2016-05
Ijmsr 2016-05
 
An ElGamal Encryption Scheme of Adjacency Matrix and Finite Machines
An ElGamal Encryption Scheme of Adjacency Matrix and Finite MachinesAn ElGamal Encryption Scheme of Adjacency Matrix and Finite Machines
An ElGamal Encryption Scheme of Adjacency Matrix and Finite Machines
 
Aes128 bit project_report
Aes128 bit project_reportAes128 bit project_report
Aes128 bit project_report
 
Calculus Homework Help
Calculus Homework HelpCalculus Homework Help
Calculus Homework Help
 
Differential Equations Homework Help
Differential Equations Homework HelpDifferential Equations Homework Help
Differential Equations Homework Help
 
Design and Analysis of algorithms
Design and Analysis of algorithmsDesign and Analysis of algorithms
Design and Analysis of algorithms
 
Introduction to Python Programming.pptx
Introduction to Python Programming.pptxIntroduction to Python Programming.pptx
Introduction to Python Programming.pptx
 
Calculus Assignment Help
Calculus Assignment HelpCalculus Assignment Help
Calculus Assignment Help
 
Real World Haskell: Lecture 5
Real World Haskell: Lecture 5Real World Haskell: Lecture 5
Real World Haskell: Lecture 5
 
Differential Equations Assignment Help
Differential Equations Assignment HelpDifferential Equations Assignment Help
Differential Equations Assignment Help
 
Symmetric ciphers questions and answers
Symmetric ciphers questions and answersSymmetric ciphers questions and answers
Symmetric ciphers questions and answers
 
N Queen Problem using Branch And Bound - GeeksforGeeks.pdf
N Queen Problem using Branch And Bound - GeeksforGeeks.pdfN Queen Problem using Branch And Bound - GeeksforGeeks.pdf
N Queen Problem using Branch And Bound - GeeksforGeeks.pdf
 
Quantum Computing Notes Ver 1.2
Quantum Computing Notes Ver 1.2Quantum Computing Notes Ver 1.2
Quantum Computing Notes Ver 1.2
 
Digi qestions
Digi qestionsDigi qestions
Digi qestions
 
MATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfMATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdf
 

More from Computer Network Assignment Help

Elevate Your Networking Game with Expert Computer Network Assignment Help
Elevate Your Networking Game with Expert Computer Network Assignment HelpElevate Your Networking Game with Expert Computer Network Assignment Help
Elevate Your Networking Game with Expert Computer Network Assignment HelpComputer Network Assignment Help
 

More from Computer Network Assignment Help (20)

Elevate Your Networking Game with Expert Computer Network Assignment Help
Elevate Your Networking Game with Expert Computer Network Assignment HelpElevate Your Networking Game with Expert Computer Network Assignment Help
Elevate Your Networking Game with Expert Computer Network Assignment Help
 
Get 15% off on Computer Network Assignment Help
Get 15% off on Computer Network Assignment HelpGet 15% off on Computer Network Assignment Help
Get 15% off on Computer Network Assignment Help
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 
Advanced Computer Network Assignment Help
Advanced Computer Network Assignment HelpAdvanced Computer Network Assignment Help
Advanced Computer Network Assignment Help
 
Computer Network Assignment Help.pptx
Computer Network Assignment Help.pptxComputer Network Assignment Help.pptx
Computer Network Assignment Help.pptx
 
Computer Network Homework Help
Computer Network Homework HelpComputer Network Homework Help
Computer Network Homework Help
 
Computer Network Homework Help
Computer Network Homework HelpComputer Network Homework Help
Computer Network Homework Help
 
Online Computer Network Security Assignment Help
Online Computer Network Security Assignment HelpOnline Computer Network Security Assignment Help
Online Computer Network Security Assignment Help
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 
Networking Assignment Help
Networking Assignment HelpNetworking Assignment Help
Networking Assignment Help
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 
Design & Analysis of Algorithms Assignment Help
Design & Analysis of Algorithms Assignment HelpDesign & Analysis of Algorithms Assignment Help
Design & Analysis of Algorithms Assignment Help
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 
Proficient Computer Network Assignment Help
Proficient Computer Network Assignment HelpProficient Computer Network Assignment Help
Proficient Computer Network Assignment Help
 
Network Design Assignment Help
Network Design Assignment HelpNetwork Design Assignment Help
Network Design Assignment Help
 
Computer Networking Assignment Help
Computer Networking Assignment HelpComputer Networking Assignment Help
Computer Networking Assignment Help
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 

Recently uploaded

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 

Recently uploaded (20)

TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 

Computer Network Homework Help

  • 1. For any Homework related queries, Call us at : - +1 678 648 4277 You can mail us at : - support@computernetworkassignmenthelp.com or reach us at : - www.computernetworkassignmenthelp.com/
  • 2. Problem 1. IND-CCA Alice and Bob have taken 6.857, and would like to send confidential messages to each other in a way that meets the IND-CCA definition given there. Bob suggests the following method. Let EncCBC(K, M) denote the process of padding M with a 1 bit and then as many 0 bits as needed to make the message length a multiple of 128 bits, and then using AES in CBC mode to encrypt the result, using a randomly-chosen 128-bit IV. The result is: EncCBC(K, M) = IV, C1,C2,...,Cn . Let Rev(S) denote the reverse of a sequence S. That is, S is parsed as a sequence of 128-bit blocks (the length of S must be a multiple of 128 bits), and these blocks are re-arranged into reverse order. Bob then proposes that he and Alice secretly agree on two AES keys K1 and K2, and then define the encryption of a message M as computernetworkassignmenthelp.com
  • 3. E(K1,K2; M) = EncCBC(K2, Rev(EncCBC(K1,M ))) . The intent here is that the reversal avoids the problem noted in class, that “ciphertext prefixes decode as prefixes of the message.” Show that this method does not meet the IND-CCA security definition given in class. That is, show how the adversary can “win” the security game against this method. Problem 2. Kalns Ben Bitdiddle has designed a new cryptosystem called Kalns, but we suspect it might not be as strong as we would like to be. Therefore we ask your help to break it. In this problem we will be working with a finite field GF16. The elements of our field are all 4-bit strings. The f ield addition is computed as xor: GF16(x) + GF16(y) = GF16(x ⊕ y). We provide the two tables describing addition and multiplication laws on the course web page. If you are curious, these tables are obtained by interpreting 4-bit field elements as degree ≤ 4 polynomials 4 over GF2 and performing addition and multiplication modulo the irreducible polynomial x + x + 1. computernetworkassignmenthelp.com
  • 4. However, for the purposes of this problem you do not need to understand how our GF16 is constructed; the solutions we know assume black-box access to GF16. We have provided a GF16 implementation for you. Kalns is a 64-bit block cipher. The secret key consists of three parts: •an invertible 16-by-16 matrix A over GF16; •a 16-element vector b over GF16; and •a permutation (bijection) S that maps GF16 one-to-one and onto GF16. To encrypt a 64-bit block B we first break it up in sixteen 4-bit chunks and interpret each of them as a GF16 element. So block B corresponds to length 16 vector x = (x0,...,x15) over GF16. The encryptions consists of the following: y = S(Ax + b), where the permutation S is individually applied to each of 16 elements of v = Ax + b. The 16-element vector y is later re-interpreted as 64-bit integer to obtain the encrypted block B'. (a) Ben suspects that his cryptosystem is very secure. After all it has around 16162 possible keys. However, we suspect that there are many equivalent keys. These keys have different values for (A, b, S), but produce the same ciphertext for any given plaintext. Is our suspicion wellfounded? computernetworkassignmenthelp.com
  • 5. (b) Describe a chosen-ciphertext attack on Kalns that recovers the unknown key (A, b, S) or an equivalent key. (c) To demonstrate that your attack works, write an implementation that can break a randomly generated key. We have set up a web server that implements Kalns algorithm at Prove that your implementation works by getting your team’s name on the list of successful teams. The server is powered by scripts.mit.edu shared hosting infrastructure. Please don’t issue denial of service attacks or try to attack their servers. computernetworkassignmenthelp.com
  • 6. Solution 1. IND-CCA Theorem: Bob’s method E is not IND-CCA secure Proof: The adversary picks m0 = 0x, m1 = 1x for large x ≥ 3·128 in phase I. Then y = EK1,K2 (md). Let z = y with the first bit flipped. Since z = y, the adversary is allowed to ask for DK1,K2 (z) in phase II. This correctly gives the first 128-bit block of md, revealing d (zeroes if d = 0 or ones if d = 1). Therefore, the adversary wins the game Why does this work? Consider the steps of E, where md is divided into n 128-bit blocks (n ≥ 3) 1. Start with md = m1,...,mn. (1) (1) 2. EncCBCK1 (m (1) 1,...,mn) = IV , C1 ,...,Cn . 3. Rev(IV (1) (1) (1) (1) (1) , C1 ,...,Cn ) = Cn ,...,C ,IV (1) 1 . EncCBC (1) (1) (1) (2) (2) (2) (2) 4. K2 (Cn ,...,C1 ,IV ) = IV , C1 ,...,Cn , Cn+1. (2) (2) (2) 5. End with IV (2), C1 ,...,Cn , Cn+1 = y computernetworkassignmenthelp.com
  • 7. Now, consider the steps of D, which reverses E. 1. Start with y = IV (2), C1 ,...,Cn , Cn+1. DecCBC 2. K2 (IV , C1 ,...,Cn , Cn+1) = Cn ,...,C ,IV (1) 1 . 3. Rev(Cn ,...,C1 ,IV (1)) = IV (1), C1 ,...,Cn . 4. DecCBCK1 (IV (1), C1 ,...,Cn ) = m1,...,mn. 5. End with m1,...,mn = md. Finally, consider the steps of D when the input is z instead of y (the first bit is flipped). Denote any changed blocks in red. As we observed in Lecture 9, the bit flip only affects the decryption of the current block and the next block, since each decrypted block only depends on Ci and Ci 1 (and only the first block depends on IV ). 1. Start with z = IV (2), C1 (2) ,...,Cn (2) , Cn+1 (2). 2. DecCBC K2 (IV (2) , C1 (2),...,Cn (2) , Cn+1 (2) ) = Cn ,...,C1 ,IV (1). 3. Rev(Cn ,...,C ,IV (1) 1 ) = IV (1), C1 ,..., Cn . 4. DecCBC (1) K1 (IV , C1 ,..., Cn ) = m1,..., mn. 5. End with m1,..., mn. Therefore, the first block m1 of md is correct, revealing d computernetworkassignmenthelp.com
  • 8. Problem 2. Kalns a) Our suspicion is well founded, which we can see from a very simple analysis. Consider an orig inal key combination (A, b, S), where we call Ax + b = v. Let us then consider a possible key combination (n*A, n*b, S’), where n is some number in GF16. The output of this new key pair will be S/(nAx + nb) = S/(nv). Thanks to the properties of GF16, we know that n ∗ m, where n is a GF16 value held constant and m is a GF16 value varied from 0 to 16, return all different values ranging from 0 to 16. (Of course, the case where m = 0 maps to 0, but the other cases map more interestingly.) Thus, multiplying v by n can be considered as just an extra permutation, P(v). (This is true if n is nonzero, but we are simply choosing this to be the case.) This means we can just adjust S’ to look like S after canceling out this original mapping, i.e S/(x) = S(P −1(x)), and we have an equivalent key pair. Thus we have generated several equivalent key pairs. It turns out that, since we have such freedom with S, we can actually generate even more equivalent key pairs by basically generating new v’s and adjusting our S accordingly, as shown above. Thus, we know that there will be many equivalent key pairs. b) Let’s consider a series of possible inputs and outputs that we could try encrypting/decrypting, and consider the information gleaned from each. u computernetworkassignmenthelp.com
  • 9. If we encrypt the vector x0 = [0, 0, 0, 0, ..., 0], we will get y0 = S(b). Additionally, if we encrypt the vectors xi , which are the 16 unit vectors (i.e. the vectors with all 0’s except a 1 at position i), we i will get back y = S(Ai + b), where Ai is the i’th column of A. We now have information about A and b, but they are embedded in S, the permutation. In order to get information about this, we can decrypt the values yi = [i, 0, 0, 0, ...0]. Reversing our algorithm, v we can see that x = A−1(S−1(y) − b), which means we will get back x = (A−1)0(S−1(y ) − b). If i i v i v we take the first element of these x , we will get (A−1)0,0(S−1(i)−b0), and if we take the differences v 0 v i v di = x − x , we will get (A−1)0,0(S−1(0) − S−1(i)). Here, we take advantage of the properties of GF16 to define a new, valid permutation, S/ such that S/−1 = (A−1)0,0S−1, such that the values di are actually differences between the inverse permutation values for 0 and i. Defining S’(0) = 0, we thus have a valid permutation that we have fully defined, and which we can construct an equivalent key pair using. (Recall from part a that we can do this because our permutation is correct up to a multiplicative constant!). Using this new S’, we can decrypt S(b) such that S/−1(S(b)) = b/, and similarly extract each column of A as a column of a new matrix A’. This new key combination (A/,b/,S/) is equivalent to the orig inal combination (A, b, S). Since we now have an equivalent key set to the original combination, we can freely encrypt and decrypt data as we please, completely compromising the Kalns encryption scheme. computernetworkassignmenthelp.com
  • 10. c) We have successfully implemented this algorithm. See MCRBFinalFast on http://6857.scripts. mit.edu/kalns/. Our code follows the exact process detailed in part b. The MITx submission site only allows one uploaded file, so we did not submit our actual code file, but the code we used is reproduced below using the verbatim tag. from kalns import * tokenString = remote_query(’keygen?team=MCRBFinalFast’) theToken = tokenString[80:112] rk = RemoteKalns(theToken) b = int64_to_GF16_vec(rk.enc(0)) r_unit = [] for i in range(16): r_unit.append(int64_to_GF16_vec(rk.enc(2**(4*(15-i))))) A = [] for row in range(16): computernetworkassignmenthelp.com
  • 11. A.append([]) for col in range(16): A[row].append(r_unit[col][row]) iTimesAInv = [] for i in range(16): #print int64_to_GF16_vec(i*(2**(4))) iTimesAInv.append(int64_to_GF16_vec(rk.dec(i*(2**(4))))) topVals = [] for i in range(16): topVals.append(iTimesAInv[i][0]) #These for loops are actually irrelevant, they were #originally to ensure that we didn’t need to try cyclic permutations of #the S that we derived. It turns out we don’t, so we just set the ranges #to 1. for i in range(1): for ii in range(1): AA = [] BB = [] s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] computernetworkassignmenthelp.com
  • 12. sinv = [] for iii in range(16): x = topVals[iii] x0 = topVals[0] s[int((GF16(i) - ((x0-x)/GF16(ii+1))).val)] = int(iii) for ij in range(16): sinv.append(s.index(ij)) for k in range(16): AA.append([]) for l in range(16): AA[k].append(GF16(sinv[A[k][l].val])) BB.append(GF16(sinv[b[k].val])) for kk in range(16): for ll in range(16): newVar = AA[kk][ll] - BB[kk] AA[kk][ll] = newVar print "s = " + str(i) + ", Ainv[0][0] = " + str(ii) print rk.answer(AA, BB, s) computernetworkassignmenthelp.com