Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fix doc-html build error
Browse files Browse the repository at this point in the history
  • Loading branch information
pfasante committed Feb 25, 2018
1 parent abd73ad commit dd927aa
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/sage/crypto/sbox.py
Expand Up @@ -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[<alpha, x> = <beta, S(x)>]`, 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[<alpha, x> = <beta, S(x)>] = 1/2 + e(alpha, beta)`,
where `e(alpha, beta)` is called the bias,
- `2 * Pr[<alpha, x> = <beta, S(x)>] = 1 + c(alpha, beta)`,
where `c(alpha, beta) = 2*e(alpha, beta)` is the correlation, and
- `2^(n+1)*Pr[<alpha, x> = <beta, S(x)>] = 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::
Expand Down

0 comments on commit dd927aa

Please sign in to comment.