Fast Constant-Time GCD Computation and Modular Inversion
Daniel J. Bernstein1,2 Bo-Yin Yang3
1University of Illinois at Chicago 2Ruhr Universt¨
at Bochum
3Academia Sinica
Fast Constant-Time GCD Computation and Modular Inversion Daniel J. - - PowerPoint PPT Presentation
Fast Constant-Time GCD Computation and Modular Inversion Daniel J. Bernstein 1,2 Bo-Yin Yang 3 1 University of Illinois at Chicago 2 Ruhr Universt at Bochum 3 Academia Sinica Monday, August 26, 2019 Summary: Fast, Safe GCD and Inversions
1University of Illinois at Chicago 2Ruhr Universt¨
at Bochum
3Academia Sinica
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 2 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 2 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 2 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 2 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 3 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 3 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 3 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 3 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 4 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 4 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 5 / 15
Starting from a Dividend of higher degree than Divisor
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 6 / 15
Starting from a Dividend of higher degree than Divisor
◮ If “Dividend lead term” = 0, no problem!
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 6 / 15
◮ We can ensure that its lead term is non-zero!
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 7 / 15
Details of computation with R0, R1 ∈ k[x], d = deg R0 > deg R1
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 8 / 15
n δn fn gn x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 . . . x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 . . . 1 2 1 1 2 1 1 1 . . . 3 1 4 1 5 2 2 . . . 1 3 1 4 1 5 2 2 . . . 5 2 1 3 6 6 3 . . . 2 1 3 1 4 1 5 2 2 . . . 1 4 4 1 6 . . . 3 1 4 4 1 6 . . . 3 6 1 2 5 2 . . . 4 1 1 4 4 1 6 . . . 1 3 2 2 5 . . . 5 1 3 2 2 5 . . . 1 2 5 3 6 . . . 6 1 1 3 2 2 5 . . . 6 3 1 1 . . . 7 6 3 1 1 . . . 1 4 4 2 . . . 8 1 6 3 1 1 . . . 2 4 . . . 9 2 6 3 1 1 . . . 5 3 . . . 10 −1 5 3 . . . 4 5 5 . . . 11 5 3 . . . 6 4 . . . 12 1 5 3 . . . 2 . . . 13 2 . . . 6 . . . 14 1 2 . . . . . . 15 2 2 . . . . . . 16 3 2 . . . . . . 17 4 2 . . . . . . 18 5 2 . . . . . . 19 6 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 9 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 10 / 15
NTRU and NTRU Prime Rings
◮ Tracks two extra indices compared to ours ◮ Requires a scaling by variable xr at the end
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 11 / 15
2 × Z2 → Z × Z∗ 2 × Z2, (δ, f , g) →
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 12 / 15
Simpler Structure, no Middle Step
◮ A division is not naturally time-constant. ◮ The split is not necessarily even.
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 13 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 14 / 15
DJB + B.-Y. Yang (UIC/RUB + Sinica) Fast Safe GCD + Inversions 2019.08.26 15 / 15