Professional Documents
Culture Documents
Textbook Codes Cryptology and Curves With Computer Algebra 1St Edition Ruud Pellikaan Ebook All Chapter PDF
Textbook Codes Cryptology and Curves With Computer Algebra 1St Edition Ruud Pellikaan Ebook All Chapter PDF
https://textbookfull.com/product/cryptology-classical-and-modern-
with-maplets-2nd-edition-klima/
https://textbookfull.com/product/abstract-algebra-with-
applications-1st-edition-audrey-terras/
https://textbookfull.com/product/codes-for-homeowners-electrical-
plumbing-construction-mechanical-current-
with-2018-2021-codes-4th-edition-bruce-a-barker/
Black and Decker Codes for Homeowners 4th edition
Electrical Plumbing Construction Mechanical current
with 2018 2021 codes Bruce A. Barker
https://textbookfull.com/product/black-and-decker-codes-for-
homeowners-4th-edition-electrical-plumbing-construction-
mechanical-current-with-2018-2021-codes-bruce-a-barker/
https://textbookfull.com/product/linear-algebra-and-matrix-
computations-with-matlab-1st-edition-dingyu-xue/
https://textbookfull.com/product/algebra-and-trigonometry-with-
analytic-geometry-college-algebra-and-trigonometry-13th-edition-
swokowski-earl-w-cole-jeffery-a/
RU U D P E L L IK A A N
Technische Universiteit Eindhoven, The Netherlands
XIN-W E N W U
Griffith University, Australia
S TA N IS L AV BU LY G IN
RE L IN D E J U RRIU S
Université de Neuchâtel, Switzerland
www.cambridge.org
Information on this title: www.cambridge.org/9780521817110
DOI: 10.1017/9780511982170
c Ruud Pellikaan, Xin-Wen Wu, Stanislav Bulygin and Relinde Jurrius 2018
This publication is in copyright. Subject to statutory exception
and to the provisions of relevant collective licensing agreements,
no reproduction of any part may take place without the written
permission of Cambridge University Press.
First published 2018
Printed in the United Kingdom by Clays, St Ives plc
A catalogue record for this publication is available from the British Library.
ISBN 978-0-521-81711-0 Hardback
ISBN 978-0-521-52036-2 Paperback
Cambridge University Press has no responsibility for the persistence or accuracy of
URLs for external or third-party internet websites referred to in this publication
and does not guarantee that any content on such websites is, or will remain,
accurate or appropriate.
Contents
Preface page xi
1 Error-correcting Codes 1
Ruud Pellikaan and Xin-Wen Wu
1.1 Block Codes 2
1.2 Linear Codes 11
1.3 Parity Checks and Dual Code 18
1.4 Decoding and the Error Probability 27
1.5 Equivalent Codes 39
1.6 Notes 48
2 Code Constructions and Bounds on Codes 49
Ruud Pellikaan and Xin-Wen Wu
2.1 Code Constructions 49
2.2 Bounds on Codes 70
2.3 Asymptotic Bounds 87
2.4 Notes 94
3 Weight Enumeration 96
Relinde Jurrius, Ruud Pellikaan and Xin-Wen Wu
3.1 Weight Enumerator 96
3.2 Extended Weight Enumerator 109
3.3 Generalized Weight Enumerator 125
3.4 Error Probability 135
3.5 Notes 139
4 Cyclic Codes 141
Ruud Pellikaan
4.1 Cyclic Codes 141
viii Contents
Contents ix
9 Cryptology 368
Stanislav Bulygin
9.1 Symmetric Encryption Schemes and Block Ciphers 368
9.2 Stream Ciphers and Linear Feedback Shift Registers 385
9.3 Authentication, Orthogonal Arrays and Codes 392
9.4 Secret Sharing 402
9.5 Asymmetric Encryption Schemes 406
9.6 Encryption Schemes from Error-correcting Codes 417
9.7 Notes 425
10 Gröbner Bases for Coding and Cryptology 430
Stanislav Bulygin
10.1 Polynomial System Solving 431
10.2 Decoding Codes with Gröbner Bases 444
10.3 Algebraic Cryptanalysis 456
10.4 Notes 464
11 Codes on Curves 467
Ruud Pellikaan
11.1 Algebraic Curves 467
11.2 Codes from Algebraic Curves 492
11.3 Order Functions 503
11.4 Evaluation Codes 513
11.5 Notes 522
12 Coding and Cryptology with Computer Algebra 524
Stanislav Bulygin
12.1 Singular 524
12.2 Magma 527
12.3 GAP 530
12.4 Sage 531
12.5 Error-correcting Codes with Computer Algebra 532
12.6 Cryptography with Computer Algebra 553
12.7 Gröbner Bases with Computer Algebra 559
References 565
Index 586
Preface
xii Preface
1 → 2 → 4 → 5 ← 6
↓ ↓ ց
3 → 8 7 11
ց ւ ↓
9 → 10 → 12
The authors may be contacted at:
15:21:38, subject to
.001
xii Preface
1 → 2 → 4 → 5 ← 6
↓ ↓
3 → 8 7 11
↓
9 → 10 → 12
The authors may be contacted at:
15:21:38, subject to
.001
1
Error-correcting Codes
15:22:41, subject to
.002
2 Error-correcting Codes
15:22:41, subject to
.002
1.1 Block Codes 3
m1 m2 r1
m3 m4 r2
r3 r4 r5
15:22:41, subject to
.002
4 Error-correcting Codes
The number of ones in every row and column should be even, so the
receiver fills a 1 at the blank in the first row and the last column, and
consequently a 1 in the middle.
If in the transmission of the word of 9 bits, one symbol is flipped from 0
to 1 or vice versa, then the receiver will notice this, and is able to correct
it. Since if the error occurred in row i and column j, then the receiver will
detect an odd parity in this row and this column and an even parity in
the remaining rows and columns. Suppose that y = (1, 1, 0, 1, 0, 0, 1, 0, 1)
is the received word.
1 1 0
0 1 0 ←
1 0 1
↑
Then the receiver detects an error in row 2 and column 3 and will change
the corresponding symbol.
So this product code can also correct one error as the repetition code
but its information rate is improved from 1/3 to 4/9.
This decoding scheme is incomplete in the sense that in some cases it is
not decided what to do and the scheme will fail to determine a candidate
for the transmitted word. That is called a decoding failure. Sometimes
two errors can be corrected. If the first error is in row i and column j,
and the second in row i and column j with i > i and j = j, then the
receiver will detect odd parities in rows i and i and in columns j and
j . There are two error patterns of two errors with this behavior. That
15:22:41, subject to
.002
1.1 Block Codes 5
is errors at the positions (i, j) and (i , j ) or at the two pairs (i, j ) and
(i , j). If the receiver decides to change the first two pairs if j > j and the
second two pairs if j < j, then it will recover the transmitted word half
of the time this pattern of two errors takes place. If for instance the word
c = (1, 1, 0, 1, 0, 1, 1, 0, 1) is transmitted and y = (1, 0, 0, 1, 0, 0, 1, 0, 1) is
received, then the above decoding scheme will change it correctly in c.
But if y = (1, 1, 0, 0, 1, 1, 1, 0, 1) is received, then the scheme will change
it in the codeword c = (1, 0, 0, 0, 1, 0, 1, 0, 1) and we have a decoding
error.
1 0 0 ← 1 1 1 ←
0 1 0 ← 0 0 1 ←
1 0 1 1 0 1
↑ ↑ ↑ ↑
If two errors take place in the same row, then the receiver will see an
even parity in all rows and odd parities in the columns j and j . We can
expand the decoding rule to change the bits at the positions (1, j) and
(1, j ). Likewise we will change the bits in positions (i, 1) and (i , 1) if
the columns give even parity and the rows i and i have an odd parity.
This decoding scheme will correct all patterns with one error correctly,
and sometimes the patterns with two errors. But it is still incomplete,
since the received word (1, 1, 0, 1, 1, 0, 0, 1, 0) has an odd parity in every
row and in every column and the scheme fails to decode.
One could extend the decoding rule to get a complete decoding in
such a way that every received word is decoded to a nearest codeword.
This nearest codeword is not always unique.
In case the transmission is by means of certain electromagnetic pulses
or waves one has to consider modulation and demodulation. The message
consists of letters of a finite alphabet, say consisting of zeros and ones,
and these are modulated, transmitted as waves, received and demodu-
lated in zeros and ones. In the demodulation part one has to make a hard
decision between a zero or a one. But usually there is a probability that
the signal represents a zero. The hard decision together with this prob-
ability is called a soft decision. One can make use of this information
in the decoding algorithm. One considers the list of all nearest code-
words, and one chooses the codeword in this list that has the highest
probability.
15:22:41, subject to
.002
6 Error-correcting Codes
In every block of 7 bits the receiver can correct one error. Since the parity
in every circle should be even. So if the parity is even we declare the circle
correct, if the parity is odd we declare the circle incorrect. The error is
in the incorrect circles and in the complement of the correct circles. We
see that every pattern of at most one error can be corrected in this
way. For instance, if m = (1, 1, 0, 1) is the message, then r = (0, 0, 1) is
the redundant information added and c = (1, 1, 0, 1, 0, 0, 1) the codeword
sent. If after transmission one symbol is flipped and y = (1, 0, 0, 1, 0, 0, 1)
is the received word as given in Figure 1.3, then we conclude that the
error is in the left and upper circle, but not in the right one.
Figure 1.3 Venn diagram of a received word for the Hamming code
And we conclude that the error is at m2 . But in case of two errors and
for instance the word y = (1, 0, 0, 1, 1, 0, 1) is received, then the receiver
would assume that the error occurred in the upper circle and not in
15:22:41, subject to
.002
1.1 Block Codes 7
the two lower circles, and would therefore conclude that the transmitted
codeword was (1, 0, 0, 1, 1, 0, 0). Hence the decoding scheme creates an
extra error.
The redundant information r can be obtained from the message m by
means of three linear equations or parity checks modulo two
⎧
⎨ r1 = m2 + m3 + m4
r = m1 + m3 + m4
⎩ 2
r3 = m1 + m2 + m4 .
The information rate is improved from 1/3 for the repetition code and
4/9 for the product code to 4/7 for the Hamming code.
15:22:41, subject to
.002
8 Error-correcting Codes
codewords, hence its rate is 4/9. The Hamming code has length 7 and
24 codewords, therefore its rate is 4/7.
Example 1.1.6 Let C be the binary block code of length n consisting
of all words with exactly two ones. This is an (n, n(n − 1)/2) code. In
this example the number of codewords is not a power of the size of the
alphabet.
Definition 1.1.7 Let C be an [n, k] block code over Q. An encoder of
C is a one-to-one map
E : Qk −→ Qn
15:22:41, subject to
.002
1.1 Block Codes 9
Proof. Properties (1) and (2) are trivial from the definition. We leave
(3) to the reader as an exercise.
Figure 1.5 shows the ball in the Euclidean plane. This is misleading in
some respects, but gives an indication of what we should have in mind.
Figure 1.6 shows Q2 , where the alphabet Q consists of 5 elements. The
ball B0 (x) consists of the points in the circle, B1 (x) is depicted by the
points inside the cross and B2 (x) consists of all 25 dots.
15:22:41, subject to
.002
10 Error-correcting Codes
√
Figure 1.5 Ball of radius 2 in the Euclidean plane
equal to i. And (q − 1)i is the number of words y ∈ Si (x) that have the
same fixed I. The number of possibilities to choose the subset I with a
fixed number of elements i is equal to ni . This shows the formula for
the number of elements of Si (x).
Furthermore Br (x) is the disjoint union of the subsets Si (x) for i =
0, . . . , r. This proves the statement about the number of elements of
Br (x).
Exercises
1.1.1 Consider the code of length 8 that is obtained by deleting the last
entry r5 from the product code of Example 1.1.2. Show that this code
corrects one error.
1.1.2 Let C be the code of all n×n binary arrays that have an even num-
ber of ones in every row and column. What is the number of codewords
of C? What is the minimum distance of C? Show that every pattern of
three erasures can be corrected.
1.1.3 Let Q = {1, 2, . . . , n}. Let C be the code in Qn of all (c1 , c2 , . . . , cn )
such that {c1 , c2 , . . . , cn } = Q. What is the number of codewords of C?
What is the minimum distance of C? Show that for every received word
with one error there are exactly two nearest codewords.
15:22:41, subject to
.002
1.2 Linear Codes 11
1.1.4 Give a proof of Proposition 1.1.9 (3), that is the triangle inequality
of the Hamming distance.
1.1.5 Let di be a metric on the set Xi . Define for (x1 , y1 ), (x2 , y2 ) ∈
X1 × X2 : d((x1 , x2 ), (y1 , y2 )) = d1 (x1 , y1 ) + d2 (x2 , y2 ). Show that d s a
metric on X1 × X2 .
n
1.1.6 Let Q = {0, 1, . . . , q − 1}. Let d(x, y) = i=1 min{|xi − yi |, q −
|xi − yi |} for x, y ∈ Qn . Show that d is a metrixc on Qn . It is called the
Lee metric.
15:22:41, subject to
.002
12 Error-correcting Codes
15:22:41, subject to
.002
1.2 Linear Codes 13
E : Fkq −→ Fnq ,
c = E(m) := mG.
A given [n, k] code C can have more than one generator matrix, however
every generator matrix of C is a k ×n matrix of rank k. Conversely every
k × n matrix of rank k is the generator matrix of an Fq -linear [n, k] code.
G = ( 1 1 · · · 1 ).
Example 1.2.13 The binary even weight code of length n has for
instance the following two generator matrices
15:22:41, subject to
.002
14 Error-correcting Codes
⎛ ⎞ ⎛ ⎞
1 1 0 ... 0 0 0 1 0 ... 0 0 1
⎜ 0 1 1 ... 0 0 0 ⎟ ⎜ 0 1 ... 0 0 1 ⎟
⎜ ⎟ ⎜ ⎟
⎜ .. .. .. .. .. .. .. ⎟ and ⎜ .. .. . . . . . ⎟
⎜ . . . . . . . ⎟ ⎜ . . . .. .. .. ⎟.
⎜ ⎟ ⎜ ⎟
⎝ 0 0 0 ... 1 1 0 ⎠ ⎝ 0 0 ... 1 0 1 ⎠
0 0 0 ... 0 1 1 0 0 ... 0 1 1
0 0 0 1 1 1 1
From the example, the generator matrix G of the Hamming code has
the following form
(Ik | P )
15:22:41, subject to
.002
1.2 Linear Codes 15
Moreover for a given matrix G, there is exactly one row equivalent matrix
that is in reduced row echelon form, denoted by rref(G). In the following
proposition it is stated that rref(G) is also a generator matrix of C.
Proof.
(1) implies (2): The row spaces of G1 and G2 are the same, since C1 = C2 .
So G1 and G2 are row equivalent. Hence rref(G1 ) = rref(G2 ).
(2) implies (3): Let Ri = rref(Gi ). There is a k × k invertible matrix
Mi such that Gi = Mi Ri for i = 1, 2, by Proposition 1.2.16. Let M =
M2 M1−1 . Then
M G1 = M2 M1−1 M1 R1 = M2 R2 = G2 .
15:22:41, subject to
.002
16 Error-correcting Codes
15:22:41, subject to
.002
1.2 Linear Codes 17
Then
⎛ ⎞
1 0 1 0 1 0 1 0
⎜ 0 1 1 0 0 1 1 0 ⎟
rref(C) = rref(G) = ⎜
⎝ 0
⎟
0 0 1 1 1 1 0 ⎠
0 0 0 0 0 0 0 1
Exercises
1.2.1 Determine for the product code of Example 1.1.2 the number of
codewords, the number of codewords of a given weight, the minimum
weight and the minimum distance. Express the redundant bits rj for
j = 1, . . . , 5 as linear equations over F2 in the message bits mi for
i = 1, . . . , 4. Give a 5 × 9 matrix H such that c = (m, r) is a codeword
of the product code if and only if HcT = 0, where m is the message of
4 bits mi and r is the vector with the 5 redundant bits rj .
1.2.2 Let x and y be binary words of the same length. Show that
15:22:41, subject to
.002
Another random document with
no related content on Scribd:
—Oh! j’y ai déjà songé, fit le prêtre. Si je désire me trouver en
commerce galant avec elle, n’est-ce pas pour lire au fond de son
cœur?
—Elle n’a pas de cœur, dit vivement le duc, elle est encore plus
ambitieuse que nous ne le sommes.
—Tu es un brave capitaine, dit le cardinal à son frère; mais crois-
moi, nos deux robes sont bien près l’une de l’autre, et je la faisais
surveiller par Marie avant que tu ne songeasses à la soupçonner.
Catherine a moins de religion que n’en a mon soulier. Si elle n’est
pas l’âme du complot, ce n’est pas faute de désir; mais nous allons
la juger sur le terrain et voir comment elle nous appuiera.
Jusqu’aujourd’hui j’ai la certitude qu’elle n’a pas eu la moindre
communication avec les hérétiques.
—Il est temps de tout découvrir au roi et à la reine-mère qui ne
sait rien, dit le duc, et voilà la seule preuve de son innocence; peut-
être attend-on le dernier moment pour l’éblouir par les probabilités
d’un succès. La Renaudie va savoir par mes dispositions que nous
sommes avertis. Cette nuit, Nemours a dû suivre les détachements
de Réformés qui arrivaient par les chemins de traverse, et les
conjurés seront forcés de venir nous attaquer à Amboise, où je les
laisserai tous entrer. Ici, dit-il en montrant les trois côtés du rocher
sur lequel le château de Blois est assis comme venait de le faire
Chiverni, nous aurions un assaut sans aucun résultat, les Huguenots
viendraient et s’en iraient à volonté. Blois est une salle à quatre
entrées, tandis qu’Amboise est un sac.
—Je ne quitterai pas la Florentine, dit le cardinal.
—Nous avons fait une faute, reprit le duc en s’amusant à lancer
en l’air son poignard et à le rattraper par la coquille, il fallait se
conduire avec elle comme avec les Réformés, lui donner la liberté
de ses mouvements pour la prendre sur le fait.
Le cardinal regarda pendant un moment son frère en hochant la
tête.
—Que nous veut Pardaillan? dit le Grand-Maître en voyant venir
sur la terrasse ce jeune gentilhomme devenu célèbre par sa
rencontre avec la Renaudie et par leur mort mutuelle.
—Monseigneur, un homme envoyé par le pelletier de la reine est
à la porte, et dit avoir à lui remettre une parure d’hermine, faut-il le
laisser entrer?
—Eh! oui, un surcot dont elle parlait hier, reprit le cardinal; laissez
passer ce courtaud de boutique, elle aura besoin de cela pour
voyager le long de la Loire.
—Par où donc est-il venu, pour n’être arrêté qu’à la porte du
château? demanda le Grand-Maître.
—Je l’ignore, répondit Pardaillan.
—Je le lui demanderai chez la reine, se dit le Balafré, qu’il
attende le lever dans la salle des gardes; mais, Pardaillan, est-il
jeune?
—Oui, monseigneur; il se donne pour le fils de Lecamus.
—Lecamus est un bon catholique, fit le cardinal, qui, de même
que le Grand-Maître, était doué de la mémoire de César. Le curé de
Saint-Pierre-aux-Bœufs compte sur lui, car il est quartenier du
Palais.
—Néanmoins fais causer le fils avec le capitaine de la garde
écossaise, dit le Grand-Maître qui appuya sur ce verbe en y donnant
un sens facile à comprendre. Mais Ambroise est au château, par lui
nous saurons si c’est bien le fils de Lecamus qui l’a fort obligé jadis.
Demande Ambroise Paré.
Ce fut en ce moment que la reine Catherine alla seule au-devant
des deux frères qui s’empressèrent de venir à elle en lui témoignant
un respect dans lequel l’Italienne voyait de constantes ironies.
—Messieurs, dit-elle, daignerez-vous me confier ce qui se
prépare? La veuve de votre ancien maître serait-elle dans votre
estime au-dessous des sieurs de Vieilleville, Birague et Chiverni?
—Madame, répondit le cardinal sur un ton galant, notre devoir
d’hommes, avant celui de politiques, est de ne pas effrayer les
dames par de faux bruits. Mais ce matin il y a lieu de conférer sur les
affaires de l’État. Vous excuserez mon frère d’avoir commencé par
donner des ordres purement militaires et auxquels vous deviez être
étrangère: les choses importantes sont à décider. Si vous le trouvez
bien, nous irons au lever du roi et de la reine, l’heure approche.
—Qu’y a-t-il, monsieur le Grand-Maître? dit Catherine en jouant
l’effroi.
—La Réformation, madame, n’est plus une hérésie, c’est un parti
qui va venir en armes vous arracher le roi.
Catherine, le cardinal, le duc et les seigneurs se dirigèrent alors
vers l’escalier par la galerie où se pressaient les courtisans qui
n’avaient pas le droit d’entrée dans les appartements et qui se
rangèrent en haie.
Gondi, qui, pendant que Catherine causait avec les deux princes
lorrains, les avait examinés, dit en bon toscan, à l’oreille de la reine-
mère, ces deux mots qui devinrent proverbes et qui expliquent une
des faces de ce grand caractère royal: Odiate e aspettate! (Haïssez
et attendez.)
Pardaillan, qui vint donner l’ordre à l’officier de garde à la
conciergerie du château de laisser passer le commis du pelletier de
la reine, trouva Christophe béant devant le porche et occupé à
regarder la façade due au bon roi Louis XII où se trouvaient alors en
plus grand nombre qu’aujourd’hui des sculptures drôlatiques, s’il faut
en juger par ce qui nous en reste. Ainsi, les curieux remarquent une
figurine de femme taillée dans le chapiteau d’une des colonnes de la
porte, la robe retroussée et faisant railleusement voir
Ce que Brunel à Marphise montra