SlideShare a Scribd company logo
Security Protocols and Applications of Cryptography
                                        By: Abhijit Mondal

Needham-Schroeder Protocol :
Suppose A wants to talk with B over the network. How will B know that he is really talking to A.
This protocol authenticates A to B at the same time allowing them to exchange session keys over
the network.
    1. A sends a message to Trent( a trusted individual or a computer program over the network)
        consisting of his name a, B's name b and a random number rA
    2. Trent generates a random session key k .
        Trent then computes c2 = (beA , keA , rA eA , keAeB , aeAeB , teAeB ) mod p , where eA and eB are the
        secret keys that Trent shares with A and B respectively, and t is the current system time.
        Trent sends c2 to A. The time t is sent to prevent replay attacks, i.e. an adversary pretending
        to be A may sent an old message to Bob.
    3. A decrypts the message with eA and extracts the session key k and confirms that rA is the
        same value that he sent to Trent. Then A sends to B, c3 = ( keB , aeB , teB ) mod p.
    4. B decrypts the message with eB and extracts the session key k, generates a random value rB ,
        and sends to A the message c4 = rBk mod p.
    5. A decrypts the message with k and computes rB -1 and send to B the message c5 = (rB -1)k
        mod p.
    6. B decrypts the message with k and verifies that it is rB -1 so A must have the same session
        key and he is the real person.
Kerberos Protocol :
Suppose A wants some service from a server S. Then A must authenicate himself to the server
before using it's services. In this symmetric key cryptographic protocol (using DES as encryption
algorithm) , there are 2 doors that needs to be opened before getting access to the server. The first
door is guarded by Kerberos and the second is the Ticket Granting Service(TGS) of the server.

    1. A sends a message to the Kerberos server with his identity/password 'a' and the identity of
       the Ticket Granting Service(TGS) of the server 'tgs'.
    2. The Kerberos server generates a timestamp t, a lifetime for the timestamp l, a random
       session key Ka,tgs . It then computes Ta,tgs = {tgs, DES(a, N, l, Ka,tgs ) (etgs) } , where N is the
       network address of A, and etgs is the secret key of the TGS shared with Kerberos.
       The Kerberos then encrypts the following with A's secret key eA , c1 = DES(Ka,tgs)(eA) and the
       following with the TGS's secret key etgs : c2 = DES(Ta,tgs)(etgs). It then sends c1 and c2 to A.
    3. A decrypts c1 and extracts Ka,tgs and computes the following Aa,tgs = {DES(a, t, key) (Ka,tgs) },
       where key is an additional session key . Then A computes c3 = DES(Aa,tgs)(Ka,tgs ) and sends
       c2 and c3 to the TGS of the server.
    4. The TGS then decrypts c2 using etgs and extracts Ta,tgs . Then uses Ta,tgs to extract Ka,tgs . The
       TGS then decrypt c3 using Ka,tgs and extracts Aa,tgs . The TGS then decrypts Aa,tgs and
       compares the information in Aa,tgs with the information in Ta,tgs . If they match then the TGS
       sends the following to the client A: c4 = {DES( Ka,s) (Ka,tgs )} and c5 = {DES(Ta,s) ( es )},
       where Ta,s = {s, DES(a, N, l, Ka,s ) (es) }, Ka,s is the secret session key for A and the server
       and es is the secret key the TGS shares with the server.
    5. A then decrypts c4 with Ka,tgs and computes the following Aa,s = {DES(a, t, key) (Ka,s) }and
       then c6 = {DES(Aa,s ) (Ka,s )}. A then sends c5 and c6 to the server for communication.



Secret Sharing Protocol :
Handing over the control of a missile to one military general or handing over the key of the locker
at the Swiss bank to any one individual would be a risky issue since he may turn out to be crooked.
So to minimise risk of a missile disaster or a bankruptcy is to partition the single key into n parts
and give each part to a trusted individual responsible for the control of the missile or the locker at
Swiss Bank, such that no less than m individuals can recover the orginal key from their share of the
keys. e.g. If the key is K and n = 3, and m =3 then choose k1 and k2 and compute K⊕k1⊕k2 = k3 .
Then distribute k1 , k2 and k3 to three trusted individuals. To construct the original key K , they need
all three keys such that k1⊕k1⊕k3 = K.

Algorithm :
   1. Construct a (m-1) degree polynomial f(x) = am-1xm-1 + am-2xm-2 +.....+ a1x + K, where K is the
       original secret key and ai ∈Zp for prime p, ai 's are the secrets that must be destroyed.
   2. Evaluate f(1), f(2),....., f(n) (mod p) and distribute these values to the n trusted officials
       assigned for the execution of the task.
   3. To find K atleast m officials must come together and disclose their values, then perform
       Gaussian elimination to solve the linear system of equations for ai 's and K. Less than m
       individual cannot find K without a brute force search over Zp .

Zero Knowledge Proofs :
How to prove someone your identity without revealing information about you? How do you prove
someone that you know the proof of a problem without showing him/her the actual proof ?
This is called Zero Knowledge Proofs since you are not revealing information about your secret to
the verifier at the same time convincing him/her that you are the authentic person. The verifier may
be a spy who is looking to know your secret and pass on that secret to his nation.
e.g. Proving Graph Isomorphism to a verifier V.
Problem : P wants to prove to V the isomorphism between graphs G1 and G2 .
    1. P generates a random permutation H of G1 such that H is isomorphic to G1 . P knows the
        isomorphism between H and G2 . Finding the isomorphism between G1 and H or G2 and H is
        as hard as finding the isomorphism between G1 and G2 , hence nobody knows the relations
        between them.
    2. P sends H to V.
    3. V flips a coin and if its a head then V asks P to prove that H and G1 are isomorphic, else if
        its a tail then V asks P to prove that H and G2 are isomorphic.
    4. P then complies and proves to V either H and G1 are isomorphic or H and G2 are isomorphic.
    5. P then again generates a random permutation graph H' isomorphic to either G1 or G2 and
        both of them then follows the steps through 1 to 4. They do these n times until V is
        convinced that P knows the isomorphism between G1 and G2 .

Here is how it works:
If P knows the isomorphism between G1 and G2 :
Then whether V asks P to prove H and G1 are isomorphic or H and G2 are isomorphic, P will be able
to prove V everytime until V is convinced of P's identity.
If P does not know the isomorphism between G1 and G2 :
Then if V asks P to prove H and , the graph from which P generated H, are isomorphic then P will
be able to fool V else P will be caught as some false guy. The probability that P will be able to fool
V after n round is 1 in 2n because in one round P fools V with a chance of ½. For n large, the
chances of a false P passing the test is very small.

Here is another variant of Zero Knowledge Proof :
Suppose P wants to prove to V that he knows the solution to the DLP : my = x (mod p) without
telling V what is the value of y.
     1. P sends to V the values m, x and p.
     2. V generates a random number a and computes the four combinations{am, a-1m-1, a-1m, am-1}
(mod p) in any random order and sends the quadruple to P, but does not reveal to P what is
        the ordering of the values. V only sends {u,v,w,z} ∈ {am, a-1m-1, a-1m, am-1} (mod p) and
        asks P to compute {uy, vy, wy, zy} (mod p).
   3.   P computes {uy, vy, wy, zy} (mod p) and sends them to V.
   4.   V then sends a (mod p) to P and asks him to find ay (mod p).
   5.   P computes ay (mod p) and sends to V.
   6.   Now V checks : {uy, vy, wy, zy} (mod p) ∈{ayx, a-yx-1, a-yx, ayx-1} (mod p) expects to be in the
        correct order as he sent it before.
   7.   If all of the above relations hold and are in the correct order then V starts another round of
        computation from step 2 and continues until V is convinced that P truly knows the value of
        y. If any of the above results does not match then P is an impostor.

If P knows the ordering of {am, a-1m-1, a-1m, am-1} (mod p), then P can compute a and P can
construct values such that they give the same relations as when V computes them, thus V has no
chance of knowing whether P really did the computation V desired or P just constructed values to
fool him. Thus an impostor P has a chance of 1 in 24 of correctly guessing the exact permutation
and thus fooling V. In n rounds the chances that an impostor P successfully passes the test is 1/(24)n,
which is extremely small for large n. For n=10, chances that P fools V is of the order of 10-14.
V can still decrease this probability by choosing s random numbers and sending a permutation of
2s+1 elements modulo p. In that case chances of P fooling V in n rounds is 1/(2s+1 !)n . But for large s
the computation performed on the part of V increases exponentially, so s = 2 and n = 10 will be a
good enough choice to catch even the most notorious masterminds.

More Related Content

PDF
Authentication protocols based on zero knowledge proof (Part 2 - Brief talk)
PPT
Zero knowledge proofsii
PDF
ZeroKnowledge Nominative Signatures
PPTX
Diffie hellman key exchange algorithm
PDF
Ntewrok secuirty cs7
PDF
Twenty years of attacks on the rsa cryptosystem
PPT
Improving-The-Round-Complexity-of-VSS-in-Point-To-Point-Networks
PDF
Authentication protocols based on zero knowledge proof (Part 2 - Brief talk)
Zero knowledge proofsii
ZeroKnowledge Nominative Signatures
Diffie hellman key exchange algorithm
Ntewrok secuirty cs7
Twenty years of attacks on the rsa cryptosystem
Improving-The-Round-Complexity-of-VSS-in-Point-To-Point-Networks

What's hot (20)

PPT
Diffie-hellman algorithm
DOCX
Number Theory In Cryptography
PDF
Network security CS2
ODP
Diffie_Hellman-Merkle Key Exchange
PDF
CRYPTOGRAPHY AND NETWORK SECURITY
PPTX
Block coding, error detection (Parity checking, Cyclic redundancy checking (C...
PDF
Fast Multiparty Threshold ECDSA with Fast TrustlessSetup
PDF
Basics of coding theory
PDF
Answers computer networks 159334 assignment_2_2010
PDF
Cs8792 cns - Public key cryptosystem (Unit III)
PPT
Diffiehellman
PPT
Hamming codes
PDF
G0423538
PDF
Classical programming interview questions
PPTX
RSA-W7(rsa) d1-d2
PDF
Fibonacci using matlab
PDF
Data Protection Techniques and Cryptography
PPTX
Al-Gamal-W6(al gamal)-d1-d2
PPTX
linear codes and cyclic codes
Diffie-hellman algorithm
Number Theory In Cryptography
Network security CS2
Diffie_Hellman-Merkle Key Exchange
CRYPTOGRAPHY AND NETWORK SECURITY
Block coding, error detection (Parity checking, Cyclic redundancy checking (C...
Fast Multiparty Threshold ECDSA with Fast TrustlessSetup
Basics of coding theory
Answers computer networks 159334 assignment_2_2010
Cs8792 cns - Public key cryptosystem (Unit III)
Diffiehellman
Hamming codes
G0423538
Classical programming interview questions
RSA-W7(rsa) d1-d2
Fibonacci using matlab
Data Protection Techniques and Cryptography
Al-Gamal-W6(al gamal)-d1-d2
linear codes and cyclic codes
Ad

Viewers also liked (20)

DOC
Compiler design file
DOC
Storyboard.
PDF
ひとりでできるもん
PDF
Anteprima Legge266
PDF
Ma4 set-u-s54
ODP
Casbase presentation
PDF
File management 101
DOC
Formato planeacion
PPT
GMC Ukraine 2011/2012
PPTX
TUGAS TIK KOMPUTER MENURUT UKURAN DAN KAPASITAS
PPTX
Evaluation Question 2
PDF
Mif special print_offer - 14.09.2011
PPS
快樂,腫瘤就消失了
PPT
Studio appartment in taj expressway 7428424386
DOCX
Kkp sce 3106
PPTX
เครื่องใช้ไฟฟ้า
PPT
Simo Corporation Overview
PDF
Computer and cleaning service it outsourcing
PDF
Ibope - relatório completo aprovação do governo - Julho 2016
PPT
Spanish powerpoint presentation
Compiler design file
Storyboard.
ひとりでできるもん
Anteprima Legge266
Ma4 set-u-s54
Casbase presentation
File management 101
Formato planeacion
GMC Ukraine 2011/2012
TUGAS TIK KOMPUTER MENURUT UKURAN DAN KAPASITAS
Evaluation Question 2
Mif special print_offer - 14.09.2011
快樂,腫瘤就消失了
Studio appartment in taj expressway 7428424386
Kkp sce 3106
เครื่องใช้ไฟฟ้า
Simo Corporation Overview
Computer and cleaning service it outsourcing
Ibope - relatório completo aprovação do governo - Julho 2016
Spanish powerpoint presentation
Ad

Similar to Security protocols (20)

PPTX
Statistics Coursework Help
PPTX
Mathematical Statistics Assignment Help
PPTX
Statistics Coursework Help
PPT
Cryptography
PPTX
Cryptography and its types and Number Theory .pptx
PPT
jalalam.ppt
PPTX
Statistics Coursework Exam Help
DOCX
Senior Research Final Draft3
PPTX
Mathematical Statistics Assignment Help
PDF
Derivation of a prime verification formula to prove the related open problems
PPTX
The Complexity Of Primality Testing
PDF
AUTHENTICATED PUBLIC KEY ENCRYPTION SCHEME USING ELLIPTIC CURVE CRYPTOGRAPHY
PDF
AUTHENTICATED PUBLIC KEY ENCRYPTION SCHEME USING ELLIPTIC CURVE CRYPTOGRAPHY
PDF
Authenticated Public Key Encryption Scheme using Elliptic Curve Cryptography
PPTX
MATHS_HOLIDAY_HOMEWORK.pptx useeee fulll
PPTX
Algorithms Exam Help
DOCX
Question 1 of 215.0 PointsPseudo-random generators, pseudo.docx
PPT
combinatorial optimization in biology .ppt
PPTX
Mathematical Statistics Assignment Help
PPTX
Programming Exam Help
Statistics Coursework Help
Mathematical Statistics Assignment Help
Statistics Coursework Help
Cryptography
Cryptography and its types and Number Theory .pptx
jalalam.ppt
Statistics Coursework Exam Help
Senior Research Final Draft3
Mathematical Statistics Assignment Help
Derivation of a prime verification formula to prove the related open problems
The Complexity Of Primality Testing
AUTHENTICATED PUBLIC KEY ENCRYPTION SCHEME USING ELLIPTIC CURVE CRYPTOGRAPHY
AUTHENTICATED PUBLIC KEY ENCRYPTION SCHEME USING ELLIPTIC CURVE CRYPTOGRAPHY
Authenticated Public Key Encryption Scheme using Elliptic Curve Cryptography
MATHS_HOLIDAY_HOMEWORK.pptx useeee fulll
Algorithms Exam Help
Question 1 of 215.0 PointsPseudo-random generators, pseudo.docx
combinatorial optimization in biology .ppt
Mathematical Statistics Assignment Help
Programming Exam Help

More from Abhijit Mondal (8)

PDF
Pagerank
PDF
Poster Presentation
ODP
Mysql Performance Optimization Indexing Algorithms and Data Structures
ODP
MySQL Performance Optimization
PDF
My MSc. Project
PDF
Public Key Cryptography
PDF
Number Theory for Security
ODP
Quantum games
Pagerank
Poster Presentation
Mysql Performance Optimization Indexing Algorithms and Data Structures
MySQL Performance Optimization
My MSc. Project
Public Key Cryptography
Number Theory for Security
Quantum games

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Empathic Computing: Creating Shared Understanding
PPTX
A Presentation on Artificial Intelligence
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Big Data Technologies - Introduction.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation theory and applications.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Tartificialntelligence_presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Empathic Computing: Creating Shared Understanding
A Presentation on Artificial Intelligence
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx
cuic standard and advanced reporting.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Electronic commerce courselecture one. Pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Machine learning based COVID-19 study performance prediction
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation theory and applications.pdf
Programs and apps: productivity, graphics, security and other tools
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
1. Introduction to Computer Programming.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Tartificialntelligence_presentation.pptx

Security protocols

  • 1. Security Protocols and Applications of Cryptography By: Abhijit Mondal Needham-Schroeder Protocol : Suppose A wants to talk with B over the network. How will B know that he is really talking to A. This protocol authenticates A to B at the same time allowing them to exchange session keys over the network. 1. A sends a message to Trent( a trusted individual or a computer program over the network) consisting of his name a, B's name b and a random number rA 2. Trent generates a random session key k . Trent then computes c2 = (beA , keA , rA eA , keAeB , aeAeB , teAeB ) mod p , where eA and eB are the secret keys that Trent shares with A and B respectively, and t is the current system time. Trent sends c2 to A. The time t is sent to prevent replay attacks, i.e. an adversary pretending to be A may sent an old message to Bob. 3. A decrypts the message with eA and extracts the session key k and confirms that rA is the same value that he sent to Trent. Then A sends to B, c3 = ( keB , aeB , teB ) mod p. 4. B decrypts the message with eB and extracts the session key k, generates a random value rB , and sends to A the message c4 = rBk mod p. 5. A decrypts the message with k and computes rB -1 and send to B the message c5 = (rB -1)k mod p. 6. B decrypts the message with k and verifies that it is rB -1 so A must have the same session key and he is the real person. Kerberos Protocol : Suppose A wants some service from a server S. Then A must authenicate himself to the server before using it's services. In this symmetric key cryptographic protocol (using DES as encryption algorithm) , there are 2 doors that needs to be opened before getting access to the server. The first door is guarded by Kerberos and the second is the Ticket Granting Service(TGS) of the server. 1. A sends a message to the Kerberos server with his identity/password 'a' and the identity of the Ticket Granting Service(TGS) of the server 'tgs'. 2. The Kerberos server generates a timestamp t, a lifetime for the timestamp l, a random session key Ka,tgs . It then computes Ta,tgs = {tgs, DES(a, N, l, Ka,tgs ) (etgs) } , where N is the network address of A, and etgs is the secret key of the TGS shared with Kerberos. The Kerberos then encrypts the following with A's secret key eA , c1 = DES(Ka,tgs)(eA) and the following with the TGS's secret key etgs : c2 = DES(Ta,tgs)(etgs). It then sends c1 and c2 to A. 3. A decrypts c1 and extracts Ka,tgs and computes the following Aa,tgs = {DES(a, t, key) (Ka,tgs) }, where key is an additional session key . Then A computes c3 = DES(Aa,tgs)(Ka,tgs ) and sends c2 and c3 to the TGS of the server. 4. The TGS then decrypts c2 using etgs and extracts Ta,tgs . Then uses Ta,tgs to extract Ka,tgs . The TGS then decrypt c3 using Ka,tgs and extracts Aa,tgs . The TGS then decrypts Aa,tgs and compares the information in Aa,tgs with the information in Ta,tgs . If they match then the TGS sends the following to the client A: c4 = {DES( Ka,s) (Ka,tgs )} and c5 = {DES(Ta,s) ( es )}, where Ta,s = {s, DES(a, N, l, Ka,s ) (es) }, Ka,s is the secret session key for A and the server and es is the secret key the TGS shares with the server. 5. A then decrypts c4 with Ka,tgs and computes the following Aa,s = {DES(a, t, key) (Ka,s) }and then c6 = {DES(Aa,s ) (Ka,s )}. A then sends c5 and c6 to the server for communication. Secret Sharing Protocol : Handing over the control of a missile to one military general or handing over the key of the locker
  • 2. at the Swiss bank to any one individual would be a risky issue since he may turn out to be crooked. So to minimise risk of a missile disaster or a bankruptcy is to partition the single key into n parts and give each part to a trusted individual responsible for the control of the missile or the locker at Swiss Bank, such that no less than m individuals can recover the orginal key from their share of the keys. e.g. If the key is K and n = 3, and m =3 then choose k1 and k2 and compute K⊕k1⊕k2 = k3 . Then distribute k1 , k2 and k3 to three trusted individuals. To construct the original key K , they need all three keys such that k1⊕k1⊕k3 = K. Algorithm : 1. Construct a (m-1) degree polynomial f(x) = am-1xm-1 + am-2xm-2 +.....+ a1x + K, where K is the original secret key and ai ∈Zp for prime p, ai 's are the secrets that must be destroyed. 2. Evaluate f(1), f(2),....., f(n) (mod p) and distribute these values to the n trusted officials assigned for the execution of the task. 3. To find K atleast m officials must come together and disclose their values, then perform Gaussian elimination to solve the linear system of equations for ai 's and K. Less than m individual cannot find K without a brute force search over Zp . Zero Knowledge Proofs : How to prove someone your identity without revealing information about you? How do you prove someone that you know the proof of a problem without showing him/her the actual proof ? This is called Zero Knowledge Proofs since you are not revealing information about your secret to the verifier at the same time convincing him/her that you are the authentic person. The verifier may be a spy who is looking to know your secret and pass on that secret to his nation. e.g. Proving Graph Isomorphism to a verifier V. Problem : P wants to prove to V the isomorphism between graphs G1 and G2 . 1. P generates a random permutation H of G1 such that H is isomorphic to G1 . P knows the isomorphism between H and G2 . Finding the isomorphism between G1 and H or G2 and H is as hard as finding the isomorphism between G1 and G2 , hence nobody knows the relations between them. 2. P sends H to V. 3. V flips a coin and if its a head then V asks P to prove that H and G1 are isomorphic, else if its a tail then V asks P to prove that H and G2 are isomorphic. 4. P then complies and proves to V either H and G1 are isomorphic or H and G2 are isomorphic. 5. P then again generates a random permutation graph H' isomorphic to either G1 or G2 and both of them then follows the steps through 1 to 4. They do these n times until V is convinced that P knows the isomorphism between G1 and G2 . Here is how it works: If P knows the isomorphism between G1 and G2 : Then whether V asks P to prove H and G1 are isomorphic or H and G2 are isomorphic, P will be able to prove V everytime until V is convinced of P's identity. If P does not know the isomorphism between G1 and G2 : Then if V asks P to prove H and , the graph from which P generated H, are isomorphic then P will be able to fool V else P will be caught as some false guy. The probability that P will be able to fool V after n round is 1 in 2n because in one round P fools V with a chance of ½. For n large, the chances of a false P passing the test is very small. Here is another variant of Zero Knowledge Proof : Suppose P wants to prove to V that he knows the solution to the DLP : my = x (mod p) without telling V what is the value of y. 1. P sends to V the values m, x and p. 2. V generates a random number a and computes the four combinations{am, a-1m-1, a-1m, am-1}
  • 3. (mod p) in any random order and sends the quadruple to P, but does not reveal to P what is the ordering of the values. V only sends {u,v,w,z} ∈ {am, a-1m-1, a-1m, am-1} (mod p) and asks P to compute {uy, vy, wy, zy} (mod p). 3. P computes {uy, vy, wy, zy} (mod p) and sends them to V. 4. V then sends a (mod p) to P and asks him to find ay (mod p). 5. P computes ay (mod p) and sends to V. 6. Now V checks : {uy, vy, wy, zy} (mod p) ∈{ayx, a-yx-1, a-yx, ayx-1} (mod p) expects to be in the correct order as he sent it before. 7. If all of the above relations hold and are in the correct order then V starts another round of computation from step 2 and continues until V is convinced that P truly knows the value of y. If any of the above results does not match then P is an impostor. If P knows the ordering of {am, a-1m-1, a-1m, am-1} (mod p), then P can compute a and P can construct values such that they give the same relations as when V computes them, thus V has no chance of knowing whether P really did the computation V desired or P just constructed values to fool him. Thus an impostor P has a chance of 1 in 24 of correctly guessing the exact permutation and thus fooling V. In n rounds the chances that an impostor P successfully passes the test is 1/(24)n, which is extremely small for large n. For n=10, chances that P fools V is of the order of 10-14. V can still decrease this probability by choosing s random numbers and sending a permutation of 2s+1 elements modulo p. In that case chances of P fooling V in n rounds is 1/(2s+1 !)n . But for large s the computation performed on the part of V increases exponentially, so s = 2 and n = 10 will be a good enough choice to catch even the most notorious masterminds.