From dd927aa1b135215abeed1e10eb51f8564d30c9fa Mon Sep 17 00:00:00 2001 From: Friedrich Wiemer Date: Sun, 25 Feb 2018 19:12:26 +0100 Subject: [PATCH] fix doc-html build error --- src/sage/crypto/sbox.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/sage/crypto/sbox.py b/src/sage/crypto/sbox.py index 3070c065a27..ffcecf9b360 100644 --- a/src/sage/crypto/sbox.py +++ b/src/sage/crypto/sbox.py @@ -503,25 +503,23 @@ def linear_approximation_matrix(self, scale="absolute_bias"): Return linear approximation matrix (LAT) `A` for this S-box. The entry A[alpha,beta] corresponds to the probability - `Pr[ = ]`, where `S` is this S-box. + `Pr[<\\alpha, x> = <\\beta, S(x)>]`, where `S` is this S-box. There are three typical notations for this probability used in the literature: - - `Pr[ = ] = 1/2 + e(alpha, beta)`, - where `e(alpha, beta)` is called the bias, - - `2 * Pr[ = ] = 1 + c(alpha, beta)`, - where `c(alpha, beta) = 2*e(alpha, beta)` is the correlation, and - - `2^(n+1)*Pr[ = ] = 1 + \hat{S}(alpha, beta)`, - where `\hat{S}(alpha, beta)` is the Fourier coefficient of S. + + - `Pr[<\\alpha, x> = <\\beta, S(x)>] = 1/2 + e(\\alpha, \\beta)`, where `e(\\alpha, \\beta)` is called the bias, + - `2\cdot Pr[<\\alpha, x> = <\\beta, S(x)>] = 1 + c(\\alpha, \\beta)`, where `c(\\alpha, \\beta) = 2\cdot e(\\alpha, \\beta)` is the correlation, and + - `2^{(n+1)}\cdot Pr[<\\alpha, x> = <\\beta, S(x)>] = 2^n + \hat{S}(\\alpha, \\beta)`, where `\hat{S}(\\alpha, \\beta)` is the Fourier coefficient of S. See [He2002]_ for an introduction to linear cryptanalysis. INPUT: - ``scale`` - string to choose the scaling for the LAT, one of - - "bias": elements are `e(alpha, beta)` - - "correlation": elements are `c(alpha, beta)` - - "absolute_bias": elements are `e(alpha, beta) * 2^m` - - "fourier_coefficient": elements are `\hat{S}(alpha, beta)` + - "bias": elements are `e(\\alpha, \\beta)` + - "correlation": elements are `c(\\alpha, \\beta)` + - "absolute_bias": elements are `2^m\cdot e(\\alpha, \\beta)` (default) + - "fourier_coefficient": elements are `\hat{S}(\\alpha, \\beta)` EXAMPLES::