Download presentation
Presentation is loading. Please wait.
1
Berlekamp Massey: Euclid in Disguise
Ishai Ilani March 2018 ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
2
Outline BCH Code – Parity Check Matrix Key Equation Derivation
Euclid and BM Algorithms Definition of Backward Polynomial Division Definition of Backward Euclid Algorithm BM Algorithm as a Backward Euclid Algorithm ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
3
BCH Parity Check matrix
For a primitive Galois field element 𝛼, and a matrix 𝐻 given by: 𝐻= 1 𝛼 𝛼 2 ⋯ ⋯ 𝛼 𝑛−1 1 𝛼 2 𝛼 2∙2 ⋯ ⋯ 𝛼 𝑛−1 ∙2 1 𝛼 3 𝛼 3∙2 ⋯ ⋯ 𝛼 𝑛−1 ∙3 ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ 1 𝛼 2𝑡 𝛼 2𝑡∙2 ⋯ ⋯ 𝛼 𝑛−1 ∙2𝑡 the code 𝐶= 𝒄∈𝐺𝐹 2 𝑛 | 𝐻𝒄=0 is a BCH code. If and 𝒄+𝒆 is read, (𝒆 - an error vector), then 𝐻 𝒄+𝒆 =𝐻𝒆. Denote the support of 𝒆 as: 𝑒 𝑖 1 , 𝑒 𝑖 2 ,…, 𝑒 𝑖 𝐿 . The vector 𝐻𝒆, also known as the syndrome vector, is given by: 𝑆 1 𝑆 2 𝑆 3 ⋮ 𝑆 2𝑡 = 𝛼 𝑖(1) 𝛼 𝑖(1)∙2 𝛼 𝑖(1)∙3 ⋮ 𝛼 𝑖(1)∙2𝑡 𝛼 𝑖(2) 𝛼 𝑖(2)∙2 𝛼 𝑖(2)∙3 ⋮ 𝛼 𝑖(2)∙2𝑡 +⋯+ 𝛼 𝑖(𝐿) 𝛼 𝑖(𝐿)∙2 𝛼 𝑖(𝐿)∙3 ⋮ 𝛼 𝑖(𝐿)∙2𝑡 Geometric Progressions ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
4
Errors and Geometric Progressions
Each column of 𝐻 is a geometric progression. The syndrome vector 𝑺 is a sum of 𝐿 geometric progressions, (𝐿 – the error vector support). CONCLUSION: Finding the errors of a BCH code is equivalent to finding a minimal number of geometric progressions such that their sum is equal to the syndrome vector. ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
5
Error Locator Polynomial (ELP)
Identify vectors with polynomials 𝑠 1 , 𝑠 2 ,⋯, 𝑠 2𝑡 𝑇 ↔𝑆 𝐷 = 𝑗=1 2𝑡 𝑠 𝑗 𝐷 𝑗−1 𝑆 𝐷 = 𝑙=1 𝐿 𝑌 𝑖 𝑙 𝛼 𝑖(𝑙) 𝑗=0 2𝑡−1 𝛼 𝑖 𝑙 𝐷 𝑗 = 𝑙=1 𝐿 𝑌 𝑖 𝑙 𝛼 𝑖(𝑙) 1− 𝛼 𝑖(𝑙) 𝐷 2𝑡 1− 𝛼 𝑖(𝑙) 𝐷 ELP = 𝐶 𝐷 = 𝑙=1 𝐿 1− 𝛼 𝑖(𝑙) 𝐷 =𝑐𝑜𝑚𝑚𝑜𝑛 𝑑𝑒𝑛𝑜𝑚𝑖𝑛𝑎𝑡𝑜𝑟 NOTE: For each 𝑙, 𝐶(𝐷) 1− 𝛼 𝑖 𝑙 𝐷 is a polynomial of order L−1. 𝑆 𝐷 𝐶 𝐷 = 𝑙=1 𝐿 𝑌 𝑖 𝑙 𝛼 𝑖(𝑙) ∙𝐶(𝐷) 1− 𝛼 𝑖 𝑙 𝐷 𝑚𝑜𝑑 𝐷 2𝑡 For 𝐿≤𝑖<2𝑡 the coefficients of 𝐷 𝑖 in 𝑆 𝐷 𝐶 𝐷 are 0. ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
6
Key Equation Denote: 𝛺 𝐷 = 𝑙=1 𝐿 𝑌 𝑖(𝑙) 𝛼 𝑖 𝑙 1− 𝛼 𝑖 𝑙 𝐷 𝐶(𝐷) .
Note that: deg 𝛺 𝐷 < deg 𝐶 𝐷 =𝐿=#𝐸𝑟𝑟𝑜𝑟𝑠 𝑐 0 ≠0 Key Equation: 𝑆 𝐷 𝐶 𝐷 = 𝛺 𝐷 𝑚𝑜𝑑 𝐷 2𝑡 Rephrase as: 𝑅 𝐷 =𝑆 𝐷 𝐶 𝐷 −𝛺 𝐷 =0 𝑚𝑜𝑑 𝐷 2𝑡 * 2𝑡 ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
7
Solving the Key Equation
Euclid Algorithm The (ordinary) Euclid algorithm applies to the pair 𝐺(𝐷)= 𝐷 2𝑡 , 𝐻(𝐷)=𝑆(𝐷). 𝐺 0 =𝐺, 𝐻 0 =𝐻, 𝐺 𝑖 = 𝐻 𝑖−1 , 𝐻 𝑖 = 𝐺 𝑖−1 𝑚𝑜𝑑 𝐻 𝑖−1 . It terminates at the first iteration 𝑖 for which deg( 𝐺 𝑖 𝑚𝑜𝑑 𝐻 𝑖 )<𝑡. At this point denote 𝛺= 𝐺 𝑖 𝑚𝑜𝑑 𝐻 𝑖 . Compute the (minimal degree) Bezout pair (𝐴,𝐶), such that 𝛺=𝐴𝐺+𝐶𝐻. 𝐶 is the ELP and 𝛺 is the evaluator polynomial. 1 𝑠 1 𝑠 2 𝑠 3 ⋯ 𝑠 2𝑡 𝐺 0 =𝐺 𝐻 0 =𝐻 Berlekamp Massey (BM) Algorithm Synthesize the shortest LFSR generating the syndrome 𝑆. ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
8
Massey Presentation of Berlekamp Algorithm
©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
9
BM – Pros, Cons and Notation
Simple to implement Cons Not intuitive In tribute to Massey we follow Massey’s notation. Thus the polynomials are presented in the indeterminate 𝐷. The parameters 𝑆, 𝐶, 𝐵 and 𝐿 have similar roles to their roles in Massey’s paper. ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
10
Solving the Key Equation by Backward Euclid Algorithm
Main Proposition Solving the Key Equation by Backward Euclid Algorithm The Key Equation may be solved by a Backward Euclid Algorithm applied to the polynomials 𝐺 𝐷 =𝐷∙𝑆 𝐷 = 𝑖=1 2𝑡 𝑠 𝑖 𝐷 𝑖 , 𝐻 𝐷 =1 1 𝑠 1 𝑠 2 𝑠 3 ⋯ 𝑠 2𝑡 𝐻 0 =𝐻=1 𝐺 0 =𝐺=𝐷𝑆(𝐷) The BM algorithm is a Backward Euclid Algorithm applied to the polynomials 𝐺 𝐷 =𝐷∙𝑆 𝐷 = 𝑖=1 2𝑡 𝑠 𝑖 𝐷 𝑖 , 𝐻 𝐷 =1+𝐺(𝐷) 1 𝑠 1 𝑠 2 𝑠 3 ⋯ 𝑠 2𝑡 𝐻 0 =1+𝐺(𝐷) 𝐺 0 =𝐺=𝐷𝑆(𝐷) ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
11
ם ו ל ש Crash Course in Hebrew Peace degree e e r g e d modulo o l u d
For a polynomial 𝒑(𝐷)= 𝑝 𝑛 𝐷 𝑛 + 𝑝 𝑛−1 𝐷 𝑛−1 +⋯ 𝑝 𝑙+1 𝐷 𝑙+1 + 𝑝 𝑙 𝐷 𝑙 with 𝑝 𝑛 ≠0, 𝑝 𝑙 ≠0 deg 𝒑 𝐷 =𝑛 ged 𝒑 𝐷 =𝑙 In other words for any polynomial 𝒑 𝐷 𝒑 𝐷 = 𝑖=𝑔𝑒𝑑(𝒑) deg(𝒑) 𝑝 𝑖 𝐷 𝑖 * 𝑔𝑒𝑑(𝒑) 𝑑𝑒𝑔(𝒑) ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
12
Polynomial Division - I
Ordinary Polynomial Division Backward Polynomial Division 𝐷 3 𝐷 4 + 𝐷 3 + 𝐷 + 1 𝐷+1 ⋯⋯+ ⋯⋯ Continue forever 𝐷 6 + 𝐷 5 𝐷 5 + 𝐷 6 𝐷 5 𝐷 4 + 𝐷 5 + 𝐷 4 𝐷 3 + 𝐷 2 𝐷 2 𝐷+1 𝐷 4 + 𝐷 3 + 𝐷 2 +0𝐷+0 𝐷 4 + 𝐷 3 + 𝐷 2 +0𝐷+0 𝐷+1 𝐷 2 +0𝐷+0 𝐷 4 𝐷 2 +𝐷 deg 𝑅 =deg(𝐻) 𝐷+0 1 deg 𝑅 <deg(𝐻) ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
13
Bezout Pairs and Minimal Degree Bezout Pairs
A Bezout pair (𝐴 𝐷 , 𝐵(𝐷)) relative to (𝐺,𝐻) is a pair of polynomials associated with 𝐴 𝐷 𝐺 𝐷 +𝐵 𝐷 𝐻(𝐷). Define the degree of any vector of polynomials 𝑷 𝐷 =( 𝑃 1 𝐷 , 𝑃 2 𝐷 , …,𝑃 𝑛 𝐷 ) as deg 𝑷 𝐷 = max 𝑖 (deg( 𝑃 𝑖 𝐷 ) . It follows that deg 𝐴, 𝐵 =max{ deg 𝐴 , deg(𝐵)} Example 𝐺 𝐷 = 𝐷 4 + 𝐷 3 + 𝐷 2 , 𝐻 𝐷 =1. 𝐺 may be represented by the Bezout pair 𝑏𝑝 𝐺 =(1,0), and may also be represented by the Bezout pair 𝑏𝑝 𝐺 =(0, 𝐺(𝑥)). The first representation is a minimal degree representation. Under certain conditions minimal degree Bezout pairs are unique, (e.g. if 𝐺,𝐻 are relatively prime and deg(𝐴,𝐵) < deg(𝐺,𝐻) ). ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
14
Backward Polynomial Division – Stopping Condition
Let 𝐺,𝐻 be polynomials with 𝑔𝑒𝑑 𝐺 ≥𝑔𝑒𝑑(𝐻). Perform Backward Polynomial Division on 𝐺,𝐻 and in parallel on their Bezout pairs, and stop when deg(𝑏𝑝(𝑅))>deg(𝑏𝑝(𝐺)). Backward Polynomial Division Bezout Pairs 𝑅↔ 1, 0 , 𝐺↔ 1,0 , 𝐻↔(0,1) 𝑅= 𝐷 3 + 𝐷 2 𝑄=𝐷 2 𝐺=𝐷 4 + 𝐷 3 + 𝐷 2 +0𝐷+0 𝐷+1=𝐻 𝑅=𝐷 4 𝑅↔ 1, 𝐷 2 , 𝐺↔ 1,0 , 𝐻↔(0,1) 𝑑𝑒𝑔 𝑏𝑝 𝑅 >𝑑𝑒𝑔(𝑏𝑝 𝐺 ) 𝑅=𝐷 4 𝑄= 𝐷 2 𝑅=𝐺− 𝐷 2 𝐻 ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
15
Polynomial Division - Summary
Ordinary Polynomial Division Backward Polynomial Division 𝐺 and 𝐻 with 𝑑𝑒𝑔 𝐺 ≥𝑑𝑒𝑔(𝐻) 𝐺 and 𝐻 with 𝑔𝑒𝑑 𝐺 ≥𝑔𝑒𝑑(𝐻). 𝑅=𝐺, 𝑄=0 𝐿𝑜𝑜𝑝 𝑢𝑛𝑡𝑖𝑙 𝑑𝑒𝑔 𝑅 < 𝑑𝑒𝑔 𝐻 𝐿𝑜𝑜𝑝 𝑢𝑛𝑡𝑖𝑙 𝑑𝑒𝑔 𝑏𝑝(𝑅) > 𝑑𝑒𝑔 𝑏𝑝(𝐺) 𝑞= 𝑢 𝑅 𝑢 𝐻 𝐷 𝑑𝑒𝑔 𝑅 −𝑑𝑒𝑔(𝐻) 𝑞= 𝑙 𝑅 𝑙 𝐻 𝐷 𝑔𝑒𝑑 𝑅 −𝑔𝑒𝑑(𝐻) 𝑅=𝑅−𝑞𝐻 𝑄=𝑄+𝑞 𝑅≝𝐺 𝑚𝑜𝑑 𝐻 𝑅≝𝐺 𝑑𝑜𝑚 𝐻 ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
16
Euclid Algorithm and Backward Euclid Algorithm
Recall: For the Backward Polynomial Division (BPD) we have 𝑅=𝐺−𝑄𝐻, 𝑅≝𝐺 𝑑𝑜𝑚 𝐻 Define: 𝑄 2 ≝ Σ 𝑗=𝑔𝑒𝑑(𝑄 𝑑𝑒𝑔 𝑄 −1 𝑞 𝑗 𝐷 𝑗 We can now define a Backward Euclid Algorithm (BEA) which mirrors the well- known Ordinary Euclid Algorithm. Ordinary Euclid Backward Euclid 𝐺 0 =𝐺, 𝐻 0 =𝐻 𝐺 𝑖 = 𝐻 𝑖−1 𝐻 𝑖 = 𝐺 𝑖−1 − 𝑄 2 𝑖−1 𝐻 𝑖−1 𝐻 𝑖 = 𝐺 𝑖−1 𝑚𝑜𝑑 𝐻 𝑖−1 𝐺 𝑖 = 𝐺 𝑖−1 𝑑𝑜𝑚 𝐻 𝑖−1 ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
17
Berlekamp Massey as Backward Euclid
Let 𝑆 𝐷 = 𝑖=1 2𝑡 𝑠 𝑖 𝐷 𝑖−1 be the syndrome polynomial of a BCH code. Set 𝔊 𝐷 =𝐷𝑆 𝐷 , ℌ 𝐷 =1, 𝐺 𝐷 =𝔊, 𝐻 𝐷 =𝔊+ℌ. 𝑏𝑝 𝐺 = 1,0 , 𝑏𝑝 𝐻 =(1,1). The BM algorithm is actually a BEA applied to 𝐺 𝐷 , 𝐻 𝐷 with Bezout pairs computed relative to 𝔊, ℌ. Precisely, the BEA is applied until we reach a 𝐺 𝑖 satisfying 𝑔𝑒𝑑( 𝐺 𝑖 )>2𝑡. If also 𝑔𝑒𝑑( 𝐻 𝑖 )>2𝑡 set 𝑅=𝐻 𝑖 , else set 𝑅=𝐺 𝑖 . Compute the Bezout pair of 𝑅, 𝑏𝑝 𝑅 = 𝐶,𝑊 , then: 𝐶 is the ELP, and 𝛺≝−𝑊/𝐷 is the evaluator polynomial. ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
18
Sanity Check 𝑅=𝐶𝔊+𝑊ℌ=0 𝑚𝑜𝑑 ( 𝐷 2𝑡+1 ) 𝑅=𝐷𝐶 𝐷 𝑆 𝐷 +𝑊 𝐷 =0 𝑚𝑜𝑑 𝐷 2𝑡+1
𝑅=𝐷𝐶 𝐷 𝑆 𝐷 +𝑊 𝐷 =0 𝑚𝑜𝑑 𝐷 2𝑡+1 Dividing by 𝐷: 𝐶 𝐷 𝑆 𝐷 +𝑊 𝐷 /𝐷=0 𝑚𝑜𝑑 𝐷 2𝑡 Or: 𝐶 𝐷 𝑆 𝐷 =𝛺(𝐷) 𝑚𝑜𝑑 𝐷 2𝑡 , and 𝑔𝑒𝑑 𝐶 =0 If deg 𝐶,𝑊 ≤𝑡, then deg 𝐶 ≤𝑡, deg 𝛺 <𝑡 is the unique pair with these properties, so 𝐶 𝐷 is the ELP. ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
19
A Taste of the Proof Theorem 1: Let (𝐶,𝛺) be a polynomial pair with 𝑔𝑒𝑑(𝐶)=0, and 𝑔𝑒𝑑 𝐶∙𝑆−𝛺 =𝑁. Let (𝐶2,𝛺2) be another polynomial pair with 𝑔𝑒𝑑(𝐶2)=0 satisfying 𝑔𝑒𝑑 𝐶2∙𝑆−Ω2 >𝑁. Then: 𝑑𝑒𝑔 𝐶2,𝐷∙𝛺2 +𝑑𝑒𝑔 𝐶,𝐷∙𝛺 ≥𝑁+1. Proof: For 𝑑𝑒𝑔 𝐶,𝐷∙𝛺 ≥𝑁+1 the statement is trivial. So assume 𝑑𝑒𝑔 𝐶,𝐷∙𝛺 ≤𝑁, and assume 𝑑𝑒𝑔 𝐶,𝐷∙𝛺 +𝑑𝑒𝑔 𝐶2,𝐷∙𝛺2 ≤𝑁. It is straight forward to see that 𝑔𝑒𝑑 𝐶2 𝐶∙𝑆−Ω =𝑁, but 𝑔𝑒𝑑 𝐶 𝐶2∙𝑆−Ω2 >𝑁. Subtracting, we get: 𝑔𝑒𝑑 𝐶∙𝛺2−𝐶2∙𝛺 =𝑁. But according to the assumptions 𝑑𝑒𝑔 𝐶∙𝛺2−𝐶2∙𝛺 ≤𝑚𝑎𝑥 𝑑𝑒𝑔 𝐶∙𝛺2 ,deg 𝐶2∙Ω <𝑁. CONTRADICTION ! ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
20
Proof - II Assume 𝑔𝑒𝑑 𝐻 𝑖 =𝑑𝑒𝑔 𝑏𝑝( 𝐺 𝑖 ) +𝑑𝑒𝑔 𝑏𝑝( 𝐻 𝑖 ) 𝐿 𝑔𝑒𝑑 𝐻 𝑖 −1 𝑆 =𝑑𝑒𝑔 𝑏𝑝( 𝐻 𝑖 ) 𝐿 𝑔𝑒𝑑 𝐻 𝑖 𝑆 =𝐿 𝑔𝑒𝑑 𝐺 𝑖 −1 𝑆 =𝑑𝑒𝑔 𝑏𝑝( 𝐺 𝑖 ) ⋯ ∗ 𝐻 𝑖 𝐺 𝑖 𝑑𝑒𝑔 𝑏𝑝( 𝐻 𝑖 ) 𝑑𝑒𝑔 𝑏𝑝( 𝐺 𝑖 ) = 𝑑𝑒𝑔 𝑏𝑝( 𝐻 𝑖+1 ) ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
21
Proof Continued 𝐺 𝑖 𝐻 𝑖+1 𝐷 Δ 𝐻 𝑖 𝐺 𝑖+1 ⋯ ∗ ⋯ ∗ ⋯ ∗ ⋯ ∗ Δ Δ
∗ 𝐺 𝑖 ⋯ ∗ 𝐻 𝑖+1 Δ ⋯ ∗ 𝐷 Δ 𝐻 𝑖 Δ 𝑑𝑒𝑔 𝑏𝑝( 𝐻 𝑖 ) 𝑑𝑒𝑔 𝑏𝑝( 𝐻 𝑖+1 ) 𝑑𝑒𝑔 𝑏𝑝( 𝐺 𝑖+1 ) ⋯ ∗ 𝐺 𝑖+1 ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
22
References E.R. Berlekamp, Algebraic Coding Theory, McGraw-Hill, New York, chapter 7 (1968). J.L. Massey, “Shift register synthesis and BCH decoding”, IEEE Trans. Inform. Theory, vol. IT-15, pp. 122–127 (1969). D. V. Sarwate and N. R. Shanbhag, "High-speed architectures for Reed-Solomon decoders," in IEEE Transactions on Very Large Scale Integration (VLSI) Systems, vol. 9, no. 5, pp , Oct F.J. MacWilliams, N.J.A. Sloane, The Theory of Error-Correcting Codes, Volume 16, North-Holland Mathematical Library, K. Imamura and W. Yoshida, “A simple derivation of the Berlekamp- Massey algorithm and some applications”, in IEEE Transactions on Information Theory, vol. 33, no. 1, pp , Jan 1987. M. Bras-Amoros M. E. O’Sullivan, “The Berlekamp-Massey Algorithm and the Euclidean Algorithm: a Closer Link”, [Online.] Available: J.L. Dornstetter. “On the equivalence between Berlekamp’s and Euclid’s Algorithms”, IEEE Trans. Inform. Theory, 33(3):428–431, 1987. A. E. Heydtmann and J. M. Jensen. “On the equivalence of the Berlekamp-Massey and the Euclidean algorithms for decoding”, IEEE Trans. Inform. Theory, 46(7):2614–2624, 2000. T. D. Mateer, “On the equivalence of the Berlekamp-Massey and the euclidean algorithms for algebraic decoding”, 12th Canadian Workshop on Information Theory, Kelowna, BC, 2011, pp Y. Sugiyama, M. Kasahara, S. Hirasawa, and T. Namekawa. “A method for solving key equation for decoding Goppa codes”, Information and Control, 27:87–99, 1975. ©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
23
©2017 Western Digital Corporation or its affiliates
©2017 Western Digital Corporation or its affiliates. All rights reserved. 11/24/2018
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.