Professional Documents
Culture Documents
Coding Theory
CSM25 Secure Information Hiding
Get an overview of basic concepts in coding theory Get an idea of how matrix coding can be implemented Suggested Reading
Raymond Hill: A rst course in coding theory Oxford Applied Mathematics and Computing Science Series. 1986 Suggested Reading Fridrich et al: Writing on Wet Paper IEEE Trans. Signal Proc. Oct 2005, pp. 3923-,
Spring 2007
Coding Theory
Spring 2007
1 / 31
Coding Theory
Spring 2007
2 / 31
Coding Theory
Overview
Coding Theory
Overview
Overview
Matrix Coding and Error-Control Coding
Basic denitions
Duality between
Error-Control Coding Matrix Coding (e.g. F5)
Coding Theory
Spring 2007
4 / 31
Coding Theory
Spring 2007
5 / 31
Coding Theory
Overview
Coding Theory
Overview
Example
The [7, 4]2 Hamming code. Generator matrix 1 0 G= 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1 0 1 1 0 1 1 0 1 1 (1)
p3 11p3 110
s3 s3 = 010s3 1
Coding Theory
Spring 2007
6 / 31
Coding Theory
Spring 2007
7 / 31
Coding Theory
Hamming Distance
Coding Theory
Hamming Distance
Hamming Distance
Alice sends c Bob receives r Assumption: few errors more likely than many errors
i.e. probably d (c, r) is small
if r C , look for c
minimising d (c, r). This is called closest neighbour decoding
Coding Theory
Spring 2007
9 / 31
Coding Theory
Spring 2007
10 / 31
Coding Theory
Hamming Distance
Coding Theory
Hamming Distance
Minimum distance
Covering radius
Denition The covering radius is the largest distance between a word a C and the closest codeword c C . Draw spheres of radius around each codeword c C These spheres covers the entire space Smaller spheres would not cover the space
Let e =
d 1 2
spheres of radius e around each c C non-overlapping spheres closest neighbour decoding returns centre of sphere
Coding Theory
Spring 2007
11 / 31
Coding Theory
Spring 2007
12 / 31
Coding Theory
Hamming Distance
Coding Theory
Hamming Distance
Perfect codes
Exercise
Coding parameters
Denition If = (d 1)/2 (= e), we say that the code is perfect. The decoding spheres of radius e covers the space It is impossible to add another codeword without
reducing the error-correction capacity.
Let a code be given by generator matrix 11111 G = 11100 00111 What are the parameters [n, k , d ]q ?
Find n Find k Find d Find q
(2)
Hint: you may want to list all possible codewords rst. What is the covering radius ?
Dr Hans Georg Schaathun Coding Theory Spring 2007 13 / 31 Dr Hans Georg Schaathun Coding Theory Spring 2007 14 / 31
Coding Theory
The syndrome
Coding Theory
The syndrome
Hamming code
[n, k ] code C Described by k n generator matrix G Also, described by (n k ) n parity check matrix H
where G H T = 0
1 0 G= 0 0 1 H= 1 1 Systematic form:
1 0 , 1 1 1 1 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1 0 1 1 0 1
(3)
(4)
Coding Theory
Spring 2007
16 / 31
Coding Theory
Spring 2007
17 / 31
Coding Theory
The syndrome
Coding Theory
The syndrome
The Syndrome
Exercise
Syndrome Decoding
Denition Let c be the transmitted codeword and r the received word. The vector e = c r is called the error pattern. Make a table of all possible syndromes for the Hamming code
list the most likely error pattern for each syndrome i.e. the error pattern of lowest Hamming weight
s = 0 corresponds to no error
Coding Theory
Spring 2007
18 / 31
Coding Theory
Spring 2007
19 / 31
Coding Theory
Design issues
Coding Theory
Design issues
Block length
Compare two codes Encoding is simple matrix-vector multiplication Decoding of arbitrary codes is NP-complete
Small codes can easily be decoded
Exhaustive search Syndrome lookup table
[400, 200] code C1 able to correct 60 errors [100, 50] code C2 able to correct 15 errors
Since errors are random, they are rarely evenly distributed In general, larger block lengths give better robustness.
Coding Theory
Spring 2007
21 / 31
Coding Theory
Spring 2007
22 / 31
Matrix coding
Matrix coding
Matrix coding
[n, k ] matrix code C with low covering radius. k -bit message transmitted as the syndrome s. n-bit host signal corresponds to codeword/received word Encoder: change as few bits as possible, such that
the resulting syndrome match the message
Coding Theory
Spring 2007
24 / 31
Coding Theory
Spring 2007
25 / 31
Matrix coding
Implementation issues
The hard job is at the Sender. Embedding requires solving the decoding problem
which is NP-complete
Matrix coding
forbids more than P changes in the host allows changes in arbitrary positions
Coding Theory
Spring 2007
26 / 31
Coding Theory
Spring 2007
28 / 31
Random codes
Hc = m
Coding Theory
Spring 2007
29 / 31
Coding Theory
Spring 2007
30 / 31
Simplication
Shorter blocks
Less optimal, i.e. slightly increased distortion
Coding Theory
Spring 2007
31 / 31