Classical Security Protocols For QKD Systems
Classical Security Protocols For QKD Systems
Nikolaos Papanikolaou
Rajagopal Nagarajan
Department of Computer Science, The University of Warwick
Abstract
The purpose of this report is to document the three principal classes of classic cryptographic protocols which are needed in systems for quantum key distribution. We
will detail the protocols used for secretkey reconciliation by public discussion, privacy amplication by public discussion, and unconditionally secure authentication.
We suggest the use of the model checking method for the analysis of these protocols
and the verication of relevant security requirements; the model checking technique
is described, and the PRISM model checker is presented.
Key words: quantum cryptography secret-key reconciliation privacy
amplication authentication unconditional security model checking
Introduction
may arise in practice, including possible attack strategies. This leads to the
e cient detection of protocol aws, and contributes in a direct way to ensuring protocol correctness and suitability for particular applications, even before
the protocols are actually implemented in practice.
Wellknown tools for automated verication of classical security protocols include FDR [5], Mur [6], Brutus [7] and the NRL Protocol Analyzer [8]. Theoretical approaches to this problem include BAN Logic [9], Strand Spaces [10],
and the inductive approach [2] associated with the HOL theorem prover. A
widely known result in the area of automated verication of classical protocols
is the discovery, by Gavin Lowe [3], of a subtle aw in the NeedhamSchroeder
Public Key protocol using the FDR model checker.
1.1 Roadmap
This report will detail some of the most important classical protocols needed
in the design of any practical QKD system, and it will present directions for
research in the formal verication of these protocols. We will discuss the Shell
and Cascade protocols for secret-key reconciliation by public discussion [18],
the privacy amplication techniques discussed in [16], and the WegmanCarter
scheme for unconditionally secure authentication. These will be dealt with in
sections 2, 3 and 4 respectively.
Section 5.1 discusses the model checking technique and presents the probabilistic model checking tool PRISM; this section is based on [32].
1.2 Setup
We assume in the following discussion that Alice and Bob are able to communicate through two channels with dierent properties, namely a quantum
channel for performing QKD and an authenticated public channel. Formally,
the setup involves the two users, Alice and Bob, an attacker Eve, and two
channels between Alice and Bob with the following specications:
(1) a classicalchannel, with perfect authenticity but no privacy;
(2) a quantumchannel, with imperfect privacy but perfect authenticity.
The objective of Alice and Bob, after having performed a basic QKD protocol
on the quantum channel obtaining respective bit strings A and B of length
n, is to establish a shorter, common secret string S. After reconciliation of
strings A and B is performed, a common string T is produced, of length n:
The process of privacy amplication discards some of the bits in T , resulting in
Ai and Bi denote the ith bit in Alices and Bobs sequence, respectively;
the symbol denotes bitwise exclusive disjunction (the XOR operation). The
PARITE primitive is as follows.
(1) Alice sends to Bob the value:
p :=
n
M
Ai
n
M
Bi
i=1
i=1
^ B)
^ (recursive
(5) If (pA 6= pB ), then Alice and Bob perform DICHOT(A;
call with left halves).
^ 0 ) (recursive
(6) If (pA = pB ), then Alice and Bob perform DICHOT(A^0 ; B
call with right halves).
Example 2 Suppose A = f1; 0; 1; 1; 1g and B = f1; 1; 1; 1; 1g. Calling DICHOT(A; B)
^ = f1; 1g, for which pA = 1 and pB = 0 reproduces A^ = f1; 0g and B
spectively. The recursive call DICHOT(f1; 0g; f1; 1g) is then made, setting
^ = f1g and pA = pB = 1, so the next recursive call is made on the right
A^ = B
halves of f1; 0g and f1; 1g, i.e. DICHOT(f0g; f1g). Since the length of the
arguments is now 1, the error in the second location of B has been found. In
order to implement DICHOT in practice, the index (with respect to A and
^ must be recorded, so that the actual index
B) of the rst element in A^ and B
of the error can be returned.
A related primitive, known as DIPAR, performs a parity check and calls
DICHOT if the parities of its arguments do not match. We write:
DIPAR(A; B) := If PARITE(A; B) = false then DICHOT(A; B)
DIPAR is used in the protocol Cascade, described later.
2.1.3 The CONFIRME Primitive
The CONFIRME primitive allows Bob to determine if his bit string, B,
diers from A. CONFIRME succeeds in detecting a discrepancy between
A and B (if there is indeed one) with probability 12 ; however, if A and B
are identical, CONFIRME is guaranteed to detect this. If CONFIRME is
applied repeatedly, namely k times, to A and B, it has a probability of failure
of 21k . CONFIRME consists of the following steps:
(1) Alice and Bob decide publicly (i.e. over the public channel) on a random
subset of A and B by choosing a random bit string
2 f0; 1gn
where i = 1 indicates that the ith bit of Alices and Bobs sequences
will be used in the following calculation.
(2) Alice and Bob compare the parities of the chosen subset of A and B
(denoted by A or A, and by B or B respectively, where denotes
bitwise conjuction). In other words, they perform PARITE( A; B).
(3) If (p0 6= p) then Bob knows that A 6= B. Otherwise he concludes A = B.
CONFIRME is part of the DICONFk primitive, discussed next. An illustration of CONFIRME is shown in Example 3.
6
p=
p0 =
6
M
i=1
6
M
i Ai
= (0 0)
(0 1)
(0 0)
(0 1)
(1 1)
(0 1) = 1
i Bi
= (0 0)
(0 0)
(0 0)
(0 1)
(0 1)
(0 0) = 0
i=1
Since (p0 6= p), Alice and Bob have detected that A 6= B. They now run
BINARY and locate the discrepancy between A5 and B5 . The error is corrected and the procedure nishes with B 0 = f0; 0; 0; 1; 1; 0g.
2.1.5 Kernels for Reconciliation Protocols
A kernel for a reconciliation protocol is a minimum-distance decoding procedure that Bob performs on his received sequence in order to correct some
errors. In [20], the complexity and optimality of such procedures is studied
in detail. The following protocol kernel, which is of interest to us, has been
jHj
jBj
repeatedly in order to locate and correct errors; then pairs of adjacent blocks
are joined together, and the procedure is repeated on the resulting superblocks.
The steps of Shell are detailed below. Each repetition of the procedure is
referred to as a pass.
(1) Alice and Bob split their bit strings into disjoint blocks of length k,
namely
for Alice : A0 [1]; A0 [2]; : : : ; A0 [dn=ke]
for Bob : B0 [1]; B0 [2]; : : : ; B0 [dn=ke]
(2) Alice and Bob perform KERNEL1 (A0 [1]; B0 [1]), KERNEL1 (A0 [2]; B0 [2]),
. . . , KERNEL1 (A0 [dn=ke]; B0 [dn=ke]) in that order.
(3) s := 0: This variable is used as a subscript specifying the current pass.
The following is lrepeated
(s + 1) times.
m
n
(a) For 1 6 i 6 2s k repeat the following:
(i) Alice and Bob perform DICONF1 (As [i]; Bs [i]):
(ii) If Bob locates an error, he asks Alice for the contents of the
whole block that contains the error. He replaces his correspondm block with the block sent by Alice.
l ing
(b) If 2ns k > 1 do the following:
(i) s := s + 1:
(ii) Alice and Bob concatenate the block left of the current one with
the block to the right of the current one and this forms the block
used in the next pass ( denotes concatenation of binary strings):
As [i] : = As 1 [2i
Bs [i] : = Bs 1 [2i
1] As 1 [2i]
1] Bs 1 [2i]
The Shell protocol is optimal, in the sense that the average amount of information gained by an attacker (his equivocation) is minimal. However Shell has
a substantial running time and is not e cient enough to be used for practical
purposes. The Cascade protocol, described next, is more e cient.
2.3 The Cascade Reconciliation Protocol
Reconciliation protocols and the primitives they involve make extensive use of
parity checks; thus, some of the primitives for detecting and correcting errors
can only succeed if there is an odd number of errors in the pairs of strings or
substrings to which they are applied. It follows that an e cient reconciliation
protocol is one which splits Alices and Bobs strings into substrings with an
odd number of errors as frequently as possible. In order to reduce the number
of misses, a protocol should vary the block size used at each pass and perform
parity calculations repeatedly. The Shell protocol has a xed block size k,
9
which is established at the beginning of the protocol; on each pass, the size
of the block is doubled, since adjacent blocks from pass s are joined together
to form the block in pass s + 1. The Cascade protocol, on the other hand, is
distinguished by the following two characteristics:
varying block sizes at each pass;
a random permutation is chosen and applied to the current block at each
pass.
Below is a listing of the Cascade protocol.
(1) Alice sets A0 := A.
(2) Bob sets B0 := B:
(3) For 1 6 i 6 repeat the following:
(a) Alice and Bob select at random a permutation i of f1; 2; : : : ; ng and
exchange the details of this permutation over the public channel.
(b) Alice computes the string Ai := i (Ai 1 ).
(c) Bob computes the string Bi := i (Bi 1 ).
(d) For 1 6 j 6 dn=k1 e repeat the following:
(i) Alice and Bob run DIPAR(Aki i [j]; Biki [j]):
(ii) If Bob corrects a single error in B, then Alice and Bob run
procedure CASCOR, which is detailed in [20].
The CASCOR procedure starts with a block containing an odd number of
errors and splits it repeatedly until all the errors have been corrected. The
idea is to perform the splitting so that on each iteration of CASCOR there
is an odd number of errors to correct, and the details of how this is performed
are to be found in L. Salvails M.Sc. thesis, cited above.
2.4 Summary
In this section we have considered several primitives for detecting and correcting errors in Bobs received bit string, assuming the scenario/setup established
in Section 1.2. Most of the primitives detailed in section 2.1 are combined together to form other primitives (e.g. DICONFk combines BINARY and
CONFIRM, and both of the latter make use of PARITE). Reconciliation
protocols make use of a kernel, which is a basic decoding procedure for correcting some errors in Bobs string. Kernels involve a random choice of a binary
decoding function, and in practice the universal2 class of hash functions is
used. The Shell protocol for reconciliation makes use of a kernel which selects
among universal2 functions, and the protocol has been shown to be optimal
but ine cient [20]. Finally, the Cascade protocol is more e cient than Shell,
and is characterised by a varying choice of block size and the use of a random
permutation.
10
edge includes the description of f and the value of f (T ). Thus Eve knows the
set of all binary strings with length k which are similar to T (i.e. strings Z
with a Hamming distance dist(Z; T ) 6 ` for ` chosen by Eve):
C = fZ 2 f0; 1gn j f (Z) = f (T )g
For Eve, all elements of C are equally probable candidates for T .
A protocol (which we will call PA1 ) for reducing Eves information about T
is given below. The security parameter s is a value between 0 and (n k).
(1) Alice chooses at random a function
g : f0; 1gn ! f0; 1gn
k s
where a; b are the same values that were used in the decoding function
for reconciliation.
(2) Alice sends a description of ga;b to Bob over the classical/public channel.
(3) Alice and Bob apply g to their (common) strings, so that the nal secret
key is S = ga;b (T ).
The average information gained by Eve, if PA3 is used, is bounded above by
the value of 2 bits (for a proof, see [15, p.40]).
3.2 Reducing the Information of a Private Channel Eavesdropper
If Eve eavesdrops on the private/quantum channel, and no reconciliation is
performed at all, then Eve gains a certain amount of information on the key T
established by Alice and Bob, but is deprived of highly valuable information
regarding T that would have been disclosed over the public channel. In this
case, the information about T available to Eve consists of the set
E = fZ 2 f0; 1gn j e(Z) = e(T )g
where e : f0; 1gn ! f0; 1gk is a function chosen randomly by Eve (and unknown to Alice and Bob). This function e represents the kbit information
Eve has about T . Alice and Bob only have a previously agreed upper bound
on k. Since Alice and Bob do not have complete knowledge of E, it is not
possible for them to eliminate Eves information with certainty.
Alice and Bob need to agree on some function g : f0; 1gn ! f0; 1gr , for some
r 6 n k, so that knowledge of e; e(x); and g leaves Eve with an arbitrarily
small fraction of 1 bit of information about g(x). Diering in the manner
in which the function g is chosen, two privacy amplication protocols are
available in this case lets call them PA4 and PA5 . In PA4 , g is chosen
uniformly at random from the set of all functions f0; 1gn ! f0; 1gr . For this
protocol, the expected amount of information on g(x) gained by knowledge of
e; g; e(x) where e : f0; 1gn ! f0; 1gk , s < n k, r = (n k s) is at most
2 s
bits.
ln 2
In protocol PA5 , the function g(x) is selected from the class of strongly
universal2 hash functions [13,15]. The expected amount of information gained
s
by Eve on g(x) is the same as before, i.e. at most 2ln 2 bits.
13
14
scribed accurately in some generalpurpose specication language; the description, or model, must incorporate all the salient features of the systems
behaviour, and particularly those aspects of the system relevant to verication.
For a general communications protocol, there are several levels of abstraction
at which a description can be made; frequently in protocol verication the
emphasis is put on concurrency aspects and timing. It is of utmost importance
that all users of a protocol interact in the correct order, and that data is
not lost due to synchronisation errors. At this level of abstraction, however,
it is immaterial what data representation is used, or whether a particular
compression algorithm is involved. A suitable protocol model for analysing
timing and other concurrencyrelated issues will abstract away from lowlevel
considerations such as those just mentioned.
The situation is similar, but certainly more complex, in the analysis of security
protocols. A suitable model in this case must take into account the details of
encrypting and decrypting procedures, the availability and secrecy of keys,
and the nature of the communication channels used. A specication language
for security protocols will necessarily be more expressive than one intended
for the protocols of the previous paragraph.
The use of process calculi as specication languages for protocols is quite common. Robin Milners ccs, which was developed on similar lines as csp, evolved
into the calculus [25] and is also wellsuited for this task. Interestingly, [26]
extended the calculus with cryptographic primitives and other features relevant to security protocols; the result is the so-called spicalculus . In more
recent work, Gay and Nagarajan used ccs to model the BB84 quantum cryptographic protocol [27] and demonstrated the inability of an eavesdropper to
succeed for a certain kind of attack. They subsequently developed a quantum
process algebra, cqp, especially for the denition of quantum protocols [28].
5.1.2 Property Specication
Thus far, we have only considered means for describing system behaviour.
However, this is insu cient for model checking, whose purpose is to demonstrate conclusively that a system operates in a desirable manner, and that it
is free from design faults. Expressing precisely what features of a system are
desirableand exactly what constitutes a fault are the objectives of property
specication. A property is any pattern of observable behaviour that a system
should or should not exhibit; the function of a model checker is, thus, to show
whether a system satises a given set of properties.
A property can be expressed as a formula in a given logic. Typically a system
model is represented by a nite or innite automaton, and the model checker
16
(1)
! sn
then one such state si may be regarded as the presentmoment in time, and
all subsequent states are then moments in the future. The modal operators of
temporal logic are used to quantify over present and future states.
Modal operators are applied to logical propositions; logical propositions consist
of atomic propositions (which are regarded as uninterpreted symbols) and
connectives such as : (not), ^ (and), _ (or) and ) (implies).
The most commonly used operators in temporal logic are
(henceforth),
3 (eventually), and (next). The formula P (henceforth, P ) means
that P is true for all states in a computation. For a computation whose present
state is si and whose futureare all states sj (j > i), the formula P states
that the proposition P is true in state si and will remain true for all sj .
The formula 3P (eventually, P ) states that there is some point in the
computation at which P is true. If si is the present state of a computation,
then 3P means that, either P is true in si or it will be true at some time in
the future.
17
19
References
[1] C. Boyd and A. Mathuria. Protocols for Authentication and Key Establishment,
SpringerVerlag, 2003.
[2] L. Paulson. The Inductive Approach to Verifying Cryptographic Protocols. In
Journal of Computer Security 6, pp. 85128, 1998.
[3] G. Lowe. Breaking and Fixing the NeedhamSchroeder Public Key Protocol using
FDR. In Tools and Algorithms for the Construction and Analysis of Systems,
pp. 147166. SpringerVerlag, 1996.
[4] Jrgen Cederlf. Authentication in quantum key growing. Masters thesis, Dept.
of Applied Mathematics, Linkpings Universitet, 1995.
[5] P. Ryan and S. Schneider. Modelling and Analysis of Security Protocols,
AddisonWesley, 2001.
[6] J. Mitchell, M. Mitchell and U. Stern. Automated Analysis of Cryptographic
Protocols using Mur . In Proceedings of the 1997 IEEE Symposium on Security
and Privacy, pp. 141151. IEEE Computer Society Press, 1997.
[7] E.M. Clarke, S. Jha and W. Marrero. Verifying Security Protocols with Brutus.
In ACM Transactions on Software Engineering and Methodology 9(4), pp. 443
487, 2000.
[8] C. Meadows. The NRL Protocol Analyzer: An Overview. In Journal of Logic
Programming 26(2), pp. 113131, 1996.
[9] M. Burrows, M. Abadi and R. Needham. A Logic of Authentication. In ACM
Transactions on Computer Systems 8(1), pp. 1836, 1990.
[10] F.J.T. Fabrega, J. Herzog, and J. Guttman. Strand Spaces: Why is a security
protocol correct? In Proceedings of the 1998 IEEE Symposium on Security and
Privacy, pp. 160171. IEEE Computer Society Press, 1998.
[11] D. Mayers. Unconditional Security in Quantum Cryptography. In Journal of the
ACM 48(3), pp. 351406, 2001.
[12] C. Bennett and G. Brassard. Quantum cryptography: Public Key Distribution
and Coin Tossing. In Proceedings of the IEEE International Conference on
Computers, Systems and Signal Processing, Bangalore, India, pp. 175179,
1984.
[13] M.N. Wegman and J.L. Carter. New Hash Functions and their Use in
Authentication and Set Equality. In Journal of Computer and System Sciences
22, pp. 265279, 1981.
[14] C. Bennett. Quantum Cryptography Using Any Two Nonorthogonal States. In
Physical Review Letters 68(21), pp. 31213124, 1992.
20
Calculus. Cambridge
[26] M. Abadi and A. Gordon. A calculus for cryptographic protocols: The spi
calculus. Information and Computation, 148:170, 1999.
[27] R. Nagarajan and S. Gay. Formal verication of quantum protocols. Available
at arXiv.org. Record: quant-ph/0203086, 2002.
[28] S. Gay and R. Nagarajan. Communicating quantum processes. In POPL
05: Proceedings of the 32nd ACM Symposium on Principles of Programming
Languages, Long Beach, California, January 2005.
[29] G. Holzmann. The Design and Validation of Computer Protocols. PrenticeHall,
1991.
[30] A. Pnueli. The temporal logic of programs. In Proceedings of the 18th ieee
Symposium on Foundations of Computer Science. ieee Press, 1977.
21
[31] M. Vardi. Branching vs. linear time: Final showdown. In Proceedings of the
7th International Conference on Tools and Algorithms for the Construction and
Analysis of Systems, pp. 122. SpringerVerlag, 2001.
[32] N. Papanikolaou. Techniques for design and validation of quantum protocols.
Masters thesis, Department of Computer Science, University of Warwick, 2005.
[33] N. Papanikolaou. Introduction to quantum cryptography. ACM Crossroads
Magazine, 11.3, Spring 2005 Issue.
[34] R. Nagarajan, N. Papanikolaou, G. Bowen and S. Gay. An automated analysis
of the security of quantum key distribution. CoRR Preprint cs.CR/0502048,
available at www.arxiv.org.
[35] S. Gay, R. Nagarajan, and N. Papanikolaou. Probabilistic modelchecking of
quantum protocols. Quantum Physics Repository Preprint quant-ph/0504007,
available at www.arxiv.org.
[36] F. Ciesinski and M. Gr
er. On probabilistic computation tree logic.
Validation of Stochastic Systems (2004), pp. 147188.
In
22