s-box decompositions and some applications

99
S-Box Decompositions and some Applications LΒ΄ eo Perrin January 28, 2019, Nancy

Upload: others

Post on 28-Apr-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: S-Box Decompositions and some Applications

S-Box Decompositions and some Applications

Leo Perrin

January 28, 2019, Nancy

Page 2: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Curriculum

Currently: post-doc at SECRET in Inria Paris

PhD: University of Luxembourg (symmetric cryptography)

Masters: double degree Centrale Lyon/KTH(discrete math/theoretical CS)

1 / 44

Page 3: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Outline

1 My Area of Research: Symmetric Cryptography

2 From Russia With Love

3 Cryptanalysis of a Theorem

4 Conclusion

1 / 44

Page 4: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Outline

1 My Area of Research: Symmetric Cryptography

2 From Russia With Love

3 Cryptanalysis of a Theorem

4 Conclusion

1 / 44

Page 5: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Symmetric Cryptography

We assume that a secret key has already been shared!

Definition (Block Cipher)

Input: n-bit block x

Parameter: k-bit key πœ…

Output: n-bit block Eπœ…(x)

Symmetry: E and Eβˆ’1 use thesame πœ…

E

x

Eπœ…(x)

πœ…

No Key Recovery. Given many pairs (x ,Eπœ…(x)), it must be impossible torecover πœ….

Indistinguishability. Given an n permutation P, it must be impossible tofigure out if P = Eπœ… for some πœ….

2 / 44

Page 6: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Symmetric Cryptography

We assume that a secret key has already been shared!

Definition (Block Cipher)

Input: n-bit block x

Parameter: k-bit key πœ…

Output: n-bit block Eπœ…(x)

Symmetry: E and Eβˆ’1 use thesame πœ…

E

x

Eπœ…(x)

πœ…

No Key Recovery. Given many pairs (x ,Eπœ…(x)), it must be impossible torecover πœ….

Indistinguishability. Given an n permutation P, it must be impossible tofigure out if P = Eπœ… for some πœ….

2 / 44

Page 7: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Symmetric Cryptography

We assume that a secret key has already been shared!

Definition (Block Cipher)

Input: n-bit block x

Parameter: k-bit key πœ…

Output: n-bit block Eπœ…(x)

Symmetry: E and Eβˆ’1 use thesame πœ…

E

x

Eπœ…(x)

πœ…

No Key Recovery. Given many pairs (x ,Eπœ…(x)), it must be impossible torecover πœ….

Indistinguishability. Given an n permutation P, it must be impossible tofigure out if P = Eπœ… for some πœ….

2 / 44

Page 8: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Symmetric Cryptography

We assume that a secret key has already been shared!

Definition (Block Cipher)

Input: n-bit block x

Parameter: k-bit key πœ…

Output: n-bit block Eπœ…(x)

Symmetry: E and Eβˆ’1 use thesame πœ…

E

x

Eπœ…(x)

πœ…

No Key Recovery. Given many pairs (x ,Eπœ…(x)), it must be impossible torecover πœ….

Indistinguishability. Given an n permutation P, it must be impossible tofigure out if P = Eπœ… for some πœ….

2 / 44

Page 9: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Security Arguments

T he Specification

Contains a full design rationale, meaning we can trust the cipher because:

we trust the security arguments of the designer

we have a starting point for cryptanalysis

3 / 44

Page 10: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Security Arguments

T he Specification

Does not contain a full design rationale, meaning we cannot trust thecipher because:

we have to start cryptanalysis from scratch

what are they trying to hide?

3 / 44

Page 11: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

To Build a Cipher

Iterated Construction

Two different sub-components for f

Linear layer (diffusion)

S-box layer (non-linearity)

4 / 44

Page 12: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

To Build a Cipher

Iterated Construction

Two different sub-components for f

Linear layer (diffusion)

S-box layer (non-linearity)

4 / 44

Page 13: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

The S-box

Importance of the S-box

If S is such that the maximum number of x such that

S(x) βŠ• S(x βŠ• a) = b

is low for all a = 0 and b then the cipher may be proved secure againstdifferential attacks.

5 / 44

Page 14: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

The S-box

Importance of the S-box

If S is such that the maximum number of x such that

S(x) βŠ• S(x βŠ• a) = b

is low for all a = 0 and b then the cipher may be proved secure againstdifferential attacks.

5 / 44

Page 15: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

S-box Design

6 / 44

Page 16: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

S-box Design

6 / 44

Page 17: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

S-box Design

Khazad...

iScream...

GrΓΈstl...

6 / 44

Page 18: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

S-box Reverse-Engineering

S

7 / 44

Page 19: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

S-box Reverse-Engineering

S?

?

?

7 / 44

Page 20: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Why Reverse-Engineer S-boxes? (1/3)

A malicious designer can hide a structure in an S-box.

To keep an advantage in implementation (white-box crypto)...... or an advantage in cryptanalysis (backdoor).

eprint report 2015/767

8 / 44

Page 21: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Why Reverse-Engineer S-boxes? (1/3)

A malicious designer can hide a structure in an S-box.

To keep an advantage in implementation (white-box crypto)...

... or an advantage in cryptanalysis (backdoor).

eprint report 2015/767

8 / 44

Page 22: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Why Reverse-Engineer S-boxes? (1/3)

A malicious designer can hide a structure in an S-box.

To keep an advantage in implementation (white-box crypto)...... or an advantage in cryptanalysis (backdoor).

eprint report 2015/767

8 / 44

Page 23: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Why Reverse-Engineer S-boxes? (2/3)

S-box based backdoors in the literature

Rijmen, V., & Preneel, B. (1997). A family of trapdoor ciphers.FSE’97.

Paterson, K. (1999). Imprimitive Permutation Groups andTrapdoors in Iterated Block Ciphers. FSE’99.

Blondeau, C., Civino, R., & Sala, M. (2017). Differential Attacks:Using Alternative Operations. eprint report 2017/610.

Bannier, A., & Filiol, E. (2017). Partition-based trapdoor ciphers. InPartition-Based Trapdoor Ciphers. InTech’17.

9 / 44

Page 24: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Why Reverse-Engineer S-boxes? (3/3)

Even without malicious intent, an unexpected structurecan be a problem.

=β‡’ We need tools to reverse-engineer S-boxes!

10 / 44

Page 25: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

Design and Analysis

Analysis

GLUON-64 hash function (FSE’14)

PRINCE block cipher (FSE’15)

TWINE block cipher (FSE’15)

Design

SPARX block cipher (Asiacrypt’16)

SPARKLE permutation, ESCH hash function,SCHWAEMM authenticated cipher (NIST submission)

Purposefully hard functions (Asiacrypt’17)

MOE block cipher (submitted to EC)

11 / 44

Page 26: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

S-box Reverse-Engineering

When the S-box has a BC structure

Feistel network (SAC’15, FSE’16), SPN (ToSC’17)

When it doesn’t

Analysis of Skipjack (Crypto’15)

Structures in the Russian S-box(Eurocrypt’16, ToSC’17, ToSC’19)

Cryptanalysis of a Theorem(Crypto’16, IEEE Trans. Inf. Th.’17, FFA’19, CC’19)

12 / 44

Page 27: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Symmetric Cryptography 101My Contributions

S-box Reverse-Engineering

When the S-box has a BC structure

Feistel network (SAC’15, FSE’16), SPN (ToSC’17)

When it doesn’t

Analysis of Skipjack (Crypto’15)

Structures in the Russian S-box(Eurocrypt’16, ToSC’17, ToSC’19)

Cryptanalysis of a Theorem(Crypto’16, IEEE Trans. Inf. Th.’17, FFA’19, CC’19)

12 / 44

Page 28: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Outline

1 My Area of Research: Symmetric Cryptography

2 From Russia With Love

3 Cryptanalysis of a Theorem

4 Conclusion

12 / 44

Page 29: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Outline

We can recover an actual decomposition using patterns in the LAT.

1 TU-decomposition: what is it and how to apply it?

2 First results on the Russian S-box

3 Its intended decomposition (I think)

13 / 44

Page 30: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Kuznyechik/Streebog

Streebog

Type Hash function

Publication 2012

Kuznyechik

Type Block cipher

Publication 2015

Common ground

Both are standard symmetric primitives in Russia.

Both were designed by the FSB (TC26).

Both use the same 8 Γ— 8 S-box, πœ‹.

14 / 44

Page 31: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Kuznyechik/Streebog

Streebog

Type Hash function

Publication 2012

Kuznyechik

Type Block cipher

Publication 2015

Common ground

Both are standard symmetric primitives in Russia.

Both were designed by the FSB (TC26).

Both use the same 8 Γ— 8 S-box, πœ‹.

14 / 44

Page 32: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Basic Tools for Analysing S-boxes

Let S : Fn2 β†’ Fn

2 be an S-box.

Definition (DDT)

The Difference Distribution Table of S is a matrix of size 2n Γ— 2n suchthat

DDT[a, b] = #{x ∈ Fn2 | S (x βŠ• a) βŠ• S(x) = b}.

Definition (LAT)

The Linear Approximations Table of S is a matrix of size 2n Γ— 2n suchthat

LAT[a, b] =βˆ‘x∈Fn

2

(βˆ’1)xΒ·aβŠ•S(x)Β·b .

15 / 44

Page 33: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Basic Tools for Analysing S-boxes

Let S : Fn2 β†’ Fn

2 be an S-box.

Definition (DDT)

The Difference Distribution Table of S is a matrix of size 2n Γ— 2n suchthat

DDT[a, b] = #{x ∈ Fn2 | S (x βŠ• a) βŠ• S(x) = b}.

Definition (LAT)

The Linear Approximations Table of S is a matrix of size 2n Γ— 2n suchthat

LAT[a, b] =βˆ‘x∈Fn

2

(βˆ’1)xΒ·aβŠ•S(x)Β·b .

15 / 44

Page 34: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Basic Tools for Analysing S-boxes

Let S : Fn2 β†’ Fn

2 be an S-box.

Definition (DDT)

The Difference Distribution Table of S is a matrix of size 2n Γ— 2n suchthat

DDT[a, b] = #{x ∈ Fn2 | S (x βŠ• a) βŠ• S(x) = b}.

Definition (LAT)

The Linear Approximations Table of S is a matrix of size 2n Γ— 2n suchthat

LAT[a, b] =βˆ‘x∈Fn

2

(βˆ’1)xΒ·aβŠ•S(x)Β·b .

15 / 44

Page 35: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Example

S = [4, 2, 1, 6, 0, 5, 7, 3]

The DDT of S .

⎑⎒⎒⎒⎒⎒⎒⎣

8 0 0 0 0 0 0 00 0 0 0 2 2 2 20 0 0 0 2 2 2 20 0 4 4 0 0 0 00 0 0 0 2 2 2 20 4 4 0 0 0 0 00 4 0 4 0 0 0 00 0 0 0 2 2 2 2

⎀βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯⎦

#{x ∈ Fn2 | S (x βŠ• a)βŠ•S(x) = b}

The LAT of S .

⎑⎒⎒⎒⎒⎒⎒⎣

8 0 0 0 0 0 0 00 0 4 4 0 0 4 βˆ’40 4 4 0 0 4 βˆ’4 00 4 0 4 0 βˆ’4 0 40 4 0 βˆ’4 0 βˆ’4 0 βˆ’40 βˆ’4 4 0 0 βˆ’4 βˆ’4 00 0 βˆ’4 4 0 0 βˆ’4 βˆ’40 0 0 0 βˆ’8 0 0 0

⎀βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ¦βˆ‘x∈Fn

2

(βˆ’1)xΒ·aβŠ•S(x)Β·b .

16 / 44

Page 36: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

The LAT of πœ‹

17 / 44

Page 37: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

The LAT of πœ‹ (reordered columns)

18 / 44

Page 38: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

The LAT of πœ‚ ∘ πœ‹ ∘ πœ‡

19 / 44

Page 39: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

The TU-Decomposition

Definition

The TU-decomposition is a decomposition algorithm working againstS-boxes with vector spaces of zeroes in their LAT.

Theorem

β€œSquare of zeroes”in the LAT.

⇔

T

U

T and U are mini-block ciphers

πœ‡ and πœ‚ are linear permutations.

20 / 44

Page 40: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

First Complete Decomposition of πœ‹ [BPU16]

πœ”

𝛼

𝜎

πœ‘ βŠ™

𝜈1𝜈0

β„βŠ™βŠ™ Multiplication in F24

ℐ Inversion in F24

𝜈0, 𝜈1, 𝜎 4 Γ— 4 permutations

πœ‘ 4 Γ— 4 function

𝛼, πœ” Linear permutations

Ugly, but it would not be there if πœ‹ were random.

21 / 44

Page 41: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

First Complete Decomposition of πœ‹ [BPU16]

πœ”

𝛼

𝜎

πœ‘ βŠ™

𝜈1𝜈0

β„βŠ™βŠ™ Multiplication in F24

ℐ Inversion in F24

𝜈0, 𝜈1, 𝜎 4 Γ— 4 permutations

πœ‘ 4 Γ— 4 function

𝛼, πœ” Linear permutations

Ugly, but it would not be there if πœ‹ were random.

21 / 44

Page 42: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Hardware Performance

Structure Area (πœ‡m2) Delay (ns)

Naive implementation 3889.6 362.52

With TU-decomposition 1530.1 46.11

Knowledge of this decomposition divides:

the area by 2.5, and

the delay by 8

22 / 44

Page 43: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Conclusion for Kuznyechik/Streebog?

The Russian S-box was built witha TU-decomposition...

... or was it?

23 / 44

Page 44: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Conclusion for Kuznyechik/Streebog?

The Russian S-box was built witha TU-decomposition...

... or was it?

23 / 44

Page 45: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Reopening a Cold Case (Twice)

Detour through Belarus [PU16]

We identified some similar properties between πœ‹ and the S-box of thestandard of Belarus... Which turned out to be based on a discretelogarithm.

New Patterns [Per18]

πœ‹ (0βŠ• ⟨01, 0a, 44, 92⟩) = c8βŠ• ⟨02, 04, 10, 20βŸ©πœ‹ (0βŠ• ⟨05, 22, 49, 8b⟩) = 20βŠ• ⟨01, 0a, 44, 92⟩ .

⟨01, 0a, 44, 92⟩ βŠ• ⟨05, 22, 49, 8b⟩ = F82

(c8βŠ• ⟨05, 22, 49, 8b⟩) βŠ• (20βŠ• ⟨01, 0a, 44, 92⟩) = F82

(c8βŠ• ⟨05, 22, 49, 8b⟩) ∩ (20βŠ• ⟨01, 0a, 44, 92⟩) = πœ‹(0) = fc

24 / 44

Page 46: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Reopening a Cold Case (Twice)

Detour through Belarus [PU16]

We identified some similar properties between πœ‹ and the S-box of thestandard of Belarus... Which turned out to be based on a discretelogarithm.

New Patterns [Per18]

πœ‹ (0βŠ• ⟨01, 0a, 44, 92⟩) = c8βŠ• ⟨02, 04, 10, 20βŸ©πœ‹ (0βŠ• ⟨05, 22, 49, 8b⟩) = 20βŠ• ⟨01, 0a, 44, 92⟩ .

⟨01, 0a, 44, 92⟩ βŠ• ⟨05, 22, 49, 8b⟩ = F82

(c8βŠ• ⟨05, 22, 49, 8b⟩) βŠ• (20βŠ• ⟨01, 0a, 44, 92⟩) = F82

(c8βŠ• ⟨05, 22, 49, 8b⟩) ∩ (20βŠ• ⟨01, 0a, 44, 92⟩) = πœ‹(0) = fc

24 / 44

Page 47: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Reopening a Cold Case (Twice)

Detour through Belarus [PU16]

We identified some similar properties between πœ‹ and the S-box of thestandard of Belarus... Which turned out to be based on a discretelogarithm.

New Patterns [Per18]

πœ‹ (0βŠ• ⟨01, 0a, 44, 92⟩) = c8βŠ• ⟨02, 04, 10, 20βŸ©πœ‹ (0βŠ• ⟨05, 22, 49, 8b⟩) = 20βŠ• ⟨01, 0a, 44, 92⟩ .

⟨01, 0a, 44, 92⟩ βŠ• ⟨05, 22, 49, 8b⟩ = F82

(c8βŠ• ⟨05, 22, 49, 8b⟩) βŠ• (20βŠ• ⟨01, 0a, 44, 92⟩) = F82

(c8βŠ• ⟨05, 22, 49, 8b⟩) ∩ (20βŠ• ⟨01, 0a, 44, 92⟩) = πœ‹(0) = fc

24 / 44

Page 48: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Cosets to Cosets

GF(28) πœ‹(GF(28)) = GF(28)

{0}

{fc}

GF(24)*

πœ…(0) βŠ• GF(24)*

𝛼16βŠ™

GF

(24)*

πœ…((F4 2

)*)

...

𝛼2βŠ™

GF

(24)*

𝛼1βŠ™

GF

(24)*

πœ…(15) βŠ• GF(24)*

πœ…(14) βŠ• GF(24)*

......

25 / 44

Page 49: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Cosets to Cosets

GF(28) πœ‹(GF(28)) = GF(28)

{0}

{fc}

GF(24)*

πœ…(0) βŠ• GF(24)*

𝛼16βŠ™

GF

(24)*

πœ…((F4 2

)*)

...

𝛼2βŠ™

GF

(24)*

𝛼1βŠ™

GF

(24)*

πœ…(15) βŠ• GF(24)*

πœ…(14) βŠ• GF(24)*

......

25 / 44

Page 50: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Cosets to Cosets

GF(28) πœ‹(GF(28)) = GF(28)

{0}

{fc}

GF(24)*

πœ…(0) βŠ• GF(24)*

𝛼16βŠ™

GF

(24)*

πœ…((F4 2

)*)

...

𝛼2βŠ™

GF

(24)*

𝛼1βŠ™

GF

(24)*

πœ…(15) βŠ• GF(24)*

πœ…(14) βŠ• GF(24)*

......

25 / 44

Page 51: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Cosets to Cosets

GF(28) πœ‹(GF(28)) = GF(28)

{0}

{fc}

GF(24)*

πœ…(0) βŠ• GF(24)*

𝛼16βŠ™

GF

(24)*

πœ…((F4 2

)*)

...

𝛼2βŠ™

GF

(24)*

𝛼1βŠ™

GF

(24)*

πœ…(15) βŠ• GF(24)*

πœ…(14) βŠ• GF(24)*

...

...

25 / 44

Page 52: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Cosets to Cosets

GF(28) πœ‹(GF(28)) = GF(28)

{0}

{fc}

GF(24)*

πœ…(0) βŠ• GF(24)*

𝛼16βŠ™

GF

(24)*

πœ…((F4 2

)*)

...

𝛼2βŠ™

GF

(24)*

𝛼1βŠ™

GF

(24)*

πœ…(15) βŠ• GF(24)*

πœ…(14) βŠ• GF(24)*

......

25 / 44

Page 53: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

The TKlog [Per18]

A TKlog operates on GF(22m) and uses:

𝛼: a generator of GF(22m),

πœ…: an affine function Fm2 β†’ GF(22m) with

πœ…(Fm2 ) βŠ• GF(2m) = GF(22m),

s: a permutation of Z/(2m βˆ’ 1)Z.

The corresponding TKlog is denoted Tπœ…,s and it works as follows:⎧βŽͺ⎨βŽͺ⎩Tπœ…,s(0) = πœ…(0) ,

Tπœ…,s

((𝛼2m+1)j

)= πœ…(2m βˆ’ j), for 1 ≀ j ≀ 2m βˆ’ 1 ,

Tπœ…,s

(𝛼i+(2m+1)j

)= πœ…(2m βˆ’ i) βŠ•

(𝛼2m+1

)s(j), for 0 < i , 0 ≀ j < 2m βˆ’ 1 .

26 / 44

Page 54: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Case of πœ‹

p = X 8 + X 4 + X 3 + X 2 + 1,

s = [0, 12, 9, 8, 7, 4, 14, 6, 5, 10, 2, 11, 1, 3, 13],

πœ…(x) = Ξ›(x) βŠ• 0xfc,

Ξ›(1) = 0x12, Ξ›(2) = 0x26, Ξ›(4) = 0x24, Ξ›(8) = 0x30

#TKlogs = 16⏟ ⏞ p

Γ— 15!⏟ ⏞ s

Γ—7∏

i=4

(28 βˆ’ 2i )⏟ ⏞ Ξ›

Γ— 28⏟ ⏞ πœ…(0)

β‰ˆ 282.6

#8-bit perm. = 21684 ; #Affine perm. = 28⏟ ⏞ cstte

Γ—7∏

i=0

(28 βˆ’ 2i )⏟ ⏞ linear part

β‰ˆ 270.2 .

27 / 44

Page 55: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

Case of πœ‹

p = X 8 + X 4 + X 3 + X 2 + 1,

s = [0, 12, 9, 8, 7, 4, 14, 6, 5, 10, 2, 11, 1, 3, 13],

πœ…(x) = Ξ›(x) βŠ• 0xfc,

Ξ›(1) = 0x12, Ξ›(2) = 0x26, Ξ›(4) = 0x24, Ξ›(8) = 0x30

#TKlogs = 16⏟ ⏞ p

Γ— 15!⏟ ⏞ s

Γ—7∏

i=4

(28 βˆ’ 2i )⏟ ⏞ Ξ›

Γ— 28⏟ ⏞ πœ…(0)

β‰ˆ 282.6

#8-bit perm. = 21684 ; #Affine perm. = 28⏟ ⏞ cstte

Γ—7∏

i=0

(28 βˆ’ 2i )⏟ ⏞ linear part

β‰ˆ 270.2 .

27 / 44

Page 56: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

The Linear Layer of Streebog (1/2)

28 / 44

Page 57: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

The Linear Layer of Streebog (2/2)

It is actually a matrix multiplication in GF(28):⎑⎒⎒⎒⎒⎒⎒⎒⎒⎒⎒⎣

83 47 8b 07 b2 46 87 6446 b6 0f 01 1a 83 98 8eac cc 9c a9 32 8a 89 5003 21 65 8c ba 93 c1 385b 06 8c 65 18 10 a8 9ef 9 7d 86 d9 8a 32 77 28a4 8b 47 4f 9e f 5 dc 1864 1c 31 4b 2b 8e e0 83

⎀βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯⎦.

The polynomial used is the same as in πœ‹.

A new security analysis is badly needed!

Reverse-engineering works!

29 / 44

Page 58: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

The Linear Layer of Streebog (2/2)

It is actually a matrix multiplication in GF(28):⎑⎒⎒⎒⎒⎒⎒⎒⎒⎒⎒⎣

83 47 8b 07 b2 46 87 6446 b6 0f 01 1a 83 98 8eac cc 9c a9 32 8a 89 5003 21 65 8c ba 93 c1 385b 06 8c 65 18 10 a8 9ef 9 7d 86 d9 8a 32 77 28a4 8b 47 4f 9e f 5 dc 1864 1c 31 4b 2b 8e e0 83

⎀βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯⎦.

The polynomial used is the same as in πœ‹.

A new security analysis is badly needed!

Reverse-engineering works!

29 / 44

Page 59: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

The Linear Layer of Streebog (2/2)

It is actually a matrix multiplication in GF(28):⎑⎒⎒⎒⎒⎒⎒⎒⎒⎒⎒⎣

83 47 8b 07 b2 46 87 6446 b6 0f 01 1a 83 98 8eac cc 9c a9 32 8a 89 5003 21 65 8c ba 93 c1 385b 06 8c 65 18 10 a8 9ef 9 7d 86 d9 8a 32 77 28a4 8b 47 4f 9e f 5 dc 1864 1c 31 4b 2b 8e e0 83

⎀βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯⎦.

The polynomial used is the same as in πœ‹.

A new security analysis is badly needed!

Reverse-engineering works!

29 / 44

Page 60: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

TU-DecompositionDecomposing a Mysterious S-boxThe Plot Thickens

The Linear Layer of Streebog (2/2)

It is actually a matrix multiplication in GF(28):⎑⎒⎒⎒⎒⎒⎒⎒⎒⎒⎒⎣

83 47 8b 07 b2 46 87 6446 b6 0f 01 1a 83 98 8eac cc 9c a9 32 8a 89 5003 21 65 8c ba 93 c1 385b 06 8c 65 18 10 a8 9ef 9 7d 86 d9 8a 32 77 28a4 8b 47 4f 9e f 5 dc 1864 1c 31 4b 2b 8e e0 83

⎀βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯⎦.

The polynomial used is the same as in πœ‹.

A new security analysis is badly needed!

Reverse-engineering works!

29 / 44

Page 61: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Outline

1 My Area of Research: Symmetric Cryptography

2 From Russia With Love

3 Cryptanalysis of a Theorem

4 Conclusion

29 / 44

Page 62: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Outline

We can obtain new mathematical results using decompositions.

1 The big APN problem and its only known solutions

2 Decomposing and generalizing this solution as butterflies

3 Generalizing a property of butterflies

30 / 44

Page 63: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

The Big APN Problem

Definition (APN function)

A function S : Fn2 β†’ Fn

2 is Almost Perfect Non-linear (APN) if

S(x βŠ• a) βŠ• S(x) = b

has 0 or 2 solutions for all a = 0 and for all b.

Big APN Problem

Are there APN permutations operating on Fn2 where n is even? [NK95]

31 / 44

Page 64: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

The Big APN Problem

Definition (APN function)

A function S : Fn2 β†’ Fn

2 is Almost Perfect Non-linear (APN) if

S(x βŠ• a) βŠ• S(x) = b

has 0 or 2 solutions for all a = 0 and for all b.

Big APN Problem

Are there APN permutations operating on Fn2 where n is even? [NK95]

31 / 44

Page 65: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Dillon et al.’s Permutation

Only One Known Solution!

For n = 6, Dillon et al. [BDKM09] found an APN permutation.

It is possible to make a TU-decomposition! [PUB16]

32 / 44

Page 66: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Dillon et al.’s Permutation

Only One Known Solution!

For n = 6, Dillon et al. [BDKM09] found an APN permutation.

It is possible to make a TU-decomposition! [PUB16]

32 / 44

Page 67: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Dillon et al.’s Permutation

Only One Known Solution!

For n = 6, Dillon et al. [BDKM09] found an APN permutation.

It is possible to make a TU-decomposition! [PUB16]

32 / 44

Page 68: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Dillon et al.’s Permutation

Only One Known Solution!

For n = 6, Dillon et al. [BDKM09] found an APN permutation.

It is possible to make a TU-decomposition! [PUB16]

32 / 44

Page 69: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

On the Butterfly Structure

𝛽x3

x1/3

βŠ™π›Ό

βŠ•

βŠ•

𝛽x3

x3

βŠ™π›Ό

βŠ•

βŠ•

Uβˆ’1

U

Definition (Open Butterfly H3𝛼,𝛽)

This permutation is an open butterfly[PUB16].

Lemma

Dillon’s permutation is affine-equivalentto H3

w ,1, where Tr (w) = 0.

33 / 44

Page 70: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

On the Butterfly Structure

𝛽x3

x1/3

βŠ™π›Ό

βŠ•

βŠ•

𝛽x3

x3

βŠ™π›Ό

βŠ•

βŠ•

Uβˆ’1

U

Definition (Open Butterfly H3𝛼,𝛽)

This permutation is an open butterfly[PUB16].

Lemma

Dillon’s permutation is affine-equivalentto H3

w ,1, where Tr (w) = 0.

33 / 44

Page 71: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Closed Butterflies

βŠ™π›Ό

βŠ•

x3

𝛽x3 βŠ•

βŠ™π›Ό

βŠ•

x3

𝛽x3 βŠ•

U U

Definition (Closed butterfly V3𝛼,𝛽)

This quadratic function is a closedbutterfly.

Lemma (Equivalence)

Open and closed butterflies with thesame parameters are CCZ-equivalent.

34 / 44

Page 72: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Closed Butterflies

βŠ™π›Ό

βŠ•

x3

𝛽x3 βŠ•

βŠ™π›Ό

βŠ•

x3

𝛽x3 βŠ•

U U

Definition (Closed butterfly V3𝛼,𝛽)

This quadratic function is a closedbutterfly.

Lemma (Equivalence)

Open and closed butterflies with thesame parameters are CCZ-equivalent.

34 / 44

Page 73: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Properties of Butterflies

Let n ≀ 3 be odd. Butterflies...... are APN but only for n = 3 [CDP17, CPT18]

... are differentially-4 (the best) for n > 3

... have the best non-linearity

... are rather cheap to implement

Open Butterfly

Uβˆ’1

U

2n-bit permutation.Algebraic degree n (or n + 1).

Closed Butterfly

U U

2n-bit function for n ≀ 3 odd.Algebraic degree 2.

35 / 44

Page 74: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Equivalence Relations (1/2)

Definition (Affine-Equivalence)

F and G are affine equivalent if G (x) = (B ∘ F ∘ A)(x), where A,B areaffine permutations.

Equivalently, we need to have{(x ,G (x)),βˆ€x ∈ Fn

2

}=

[Aβˆ’1 0

0 B

]({(x ,F (x)),βˆ€x ∈ Fn

2

}).

36 / 44

Page 75: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Equivalence Relations (1/2)

Definition (Affine-Equivalence)

F and G are affine equivalent if G (x) = (B ∘ F ∘ A)(x), where A,B areaffine permutations.

Equivalently, we need to have{(x ,G (x)),βˆ€x ∈ Fn

2

}=

[Aβˆ’1 0

0 B

]({(x ,F (x)),βˆ€x ∈ Fn

2

}).

36 / 44

Page 76: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Equivalence Relations (2/2)

Definition (CCZ-Equivalence [CCZ98])

F : Fn2 β†’ Fm

2 and G : Fn2 β†’ Fm

2 are C(arlet)-C(harpin)-Z(inoviev)equivalent if

Ξ“G ={

(x ,G (x)),βˆ€x ∈ Fn2

}= β„’

({(x ,F (x)),βˆ€x ∈ Fn

2

})= β„’(Ξ“F ) ,

where β„’ : Fn+m2 β†’ Fn+m

2 is an affine permutation.For example, F and Fβˆ’1 are CCZ-equivalent.

CCZ-equivalence preserves some properties (differential and linear) butnot others (algebraic degree).

The TU-decomposition plays a crucial role in CCZ-equivalence.

37 / 44

Page 77: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Equivalence Relations (2/2)

Definition (CCZ-Equivalence [CCZ98])

F : Fn2 β†’ Fm

2 and G : Fn2 β†’ Fm

2 are C(arlet)-C(harpin)-Z(inoviev)equivalent if

Ξ“G ={

(x ,G (x)),βˆ€x ∈ Fn2

}= β„’

({(x ,F (x)),βˆ€x ∈ Fn

2

})= β„’(Ξ“F ) ,

where β„’ : Fn+m2 β†’ Fn+m

2 is an affine permutation.For example, F and Fβˆ’1 are CCZ-equivalent.

CCZ-equivalence preserves some properties (differential and linear) butnot others (algebraic degree).

The TU-decomposition plays a crucial role in CCZ-equivalence.

37 / 44

Page 78: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Equivalence Relations (2/2)

Definition (CCZ-Equivalence [CCZ98])

F : Fn2 β†’ Fm

2 and G : Fn2 β†’ Fm

2 are C(arlet)-C(harpin)-Z(inoviev)equivalent if

Ξ“G ={

(x ,G (x)),βˆ€x ∈ Fn2

}= β„’

({(x ,F (x)),βˆ€x ∈ Fn

2

})= β„’(Ξ“F ) ,

where β„’ : Fn+m2 β†’ Fn+m

2 is an affine permutation.For example, F and Fβˆ’1 are CCZ-equivalent.

CCZ-equivalence preserves some properties (differential and linear) butnot others (algebraic degree).

The TU-decomposition plays a crucial role in CCZ-equivalence.

37 / 44

Page 79: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Twist

Any function F : Fn2 β†’ Fm

2 can be projected on Ft2 Γ— Fmβˆ’t

2 .

T U

x y

u v

t n βˆ’ t

t m βˆ’ t

F

Tβˆ’1

U

u y

x v

t n βˆ’ t

t m βˆ’ t

G

If T is a permutation for all secondary inputs, then we define thet-twist equivalent of F as G , where

G (x , y) =(Tβˆ’1

y (x),UTβˆ’1y (x)(y)

)for all (x , y) ∈ Ft

2 Γ— Fnβˆ’t2 .

38 / 44

Page 80: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

Twist

Any function F : Fn2 β†’ Fm

2 can be projected on Ft2 Γ— Fmβˆ’t

2 .

T U

x y

u v

t n βˆ’ t

t m βˆ’ t

F

Tβˆ’1

U

u y

x v

t n βˆ’ t

t m βˆ’ t

G

If T is a permutation for all secondary inputs, then we define thet-twist equivalent of F as G , where

G (x , y) =(Tβˆ’1

y (x),UTβˆ’1y (x)(y)

)for all (x , y) ∈ Ft

2 Γ— Fnβˆ’t2 .

38 / 44

Page 81: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

TU-Decomposition and CCZ-Equivalence

Theorem ([CP19])

If F and G are CCZ-equivalent then either their equivalence is trivial or itinvolves a t-twist.

In other words, if F is non-trivially CCZ-equivalent to something elsethen it must have a TU-decomposition!

39 / 44

Page 82: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Big APN Problem and its Only Known SolutionOn ButterfliesCCZ-Equivalence

TU-Decomposition and CCZ-Equivalence

Theorem ([CP19])

If F and G are CCZ-equivalent then either their equivalence is trivial or itinvolves a t-twist.

In other words, if F is non-trivially CCZ-equivalent to something elsethen it must have a TU-decomposition!

39 / 44

Page 83: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Outline

1 My Area of Research: Symmetric Cryptography

2 From Russia With Love

3 Cryptanalysis of a Theorem

4 Conclusion

39 / 44

Page 84: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Conclusion

Decompositions play a crucial role in cryptography!

When designing

When implementing

When attacking

They allow us to bring cryptographic techniques to other fields ofmathematics.

40 / 44

Page 85: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Conclusion

Decompositions play a crucial role in cryptography!

When designing

When implementing

When attacking

They allow us to bring cryptographic techniques to other fields ofmathematics.

40 / 44

Page 86: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Open Problems (Symmetric Cryptography)

Russian Shenanigans

Is it possible to use the latest decomposition of the Russian S-box toattack the corresponding algorithms?

DES

What are the decompositions in the S-boxes of the DES (that we don’tknow of)? Could we use them in attacks?

41 / 44

Page 87: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Open Problems (Symmetric Cryptography)

Russian Shenanigans

Is it possible to use the latest decomposition of the Russian S-box toattack the corresponding algorithms?

DES

What are the decompositions in the S-boxes of the DES (that we don’tknow of)? Could we use them in attacks?

41 / 44

Page 88: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Open Problems (Discrete Mathematics)

TU-decomposition in GF

The TU-decomposition and the twist are defined over Fn2. Can we find a

nice representation over GF(2n)?

Big APN Problem

Is there an APN permutation of an even number of bits (n β‰₯ 8)?

Other Decomposition

Are there other decompositions as general as the TU-decomposition? Areother mathematical structures explained by an underlying decomposition?

42 / 44

Page 89: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Open Problems (Discrete Mathematics)

TU-decomposition in GF

The TU-decomposition and the twist are defined over Fn2. Can we find a

nice representation over GF(2n)?

Big APN Problem

Is there an APN permutation of an even number of bits (n β‰₯ 8)?

Other Decomposition

Are there other decompositions as general as the TU-decomposition? Areother mathematical structures explained by an underlying decomposition?

42 / 44

Page 90: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

Open Problems (Discrete Mathematics)

TU-decomposition in GF

The TU-decomposition and the twist are defined over Fn2. Can we find a

nice representation over GF(2n)?

Big APN Problem

Is there an APN permutation of an even number of bits (n β‰₯ 8)?

Other Decomposition

Are there other decompositions as general as the TU-decomposition? Areother mathematical structures explained by an underlying decomposition?

42 / 44

Page 91: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

The Last S-Box

14 11 60 6d e9 10 e3 2 b 90 d 17 c5 b0 9f c5

d8 da be 22 8 f3 4 a9 fe f3 f5 fc bc 30 be 26

bb 88 85 46 f4 2e e fd 76 fe b0 11 4e de 35 bb

30 4b 30 d6 dd df df d4 90 7a d8 8c 6a 89 30 39

e9 1 da d2 85 87 d3 d4 ba 2b d4 9f 9c 38 8c 55

d3 86 bb db ec e0 46 48 bf 46 1b 1c d7 d9 1b e0

23 d4 d7 7f 16 3f 3 3 44 c3 59 10 2a da ed e9

8e d8 d1 db cb cb c3 c7 38 22 34 3d db 85 23 7c

24 d1 d8 2e fc 44 8 38 c8 c7 39 4c 5f 56 2a cf

d0 e9 d2 68 e4 e3 e9 13 e2 c 97 e4 60 29 d7 9b

d9 16 24 94 b3 e3 4c 4c 4f 39 e0 4b bc 2c d3 94

81 96 93 84 91 d0 2e d6 d2 2b 78 ef d6 9e 7b 72

ad c4 68 92 7a d2 5 2b 1e d0 dc b1 22 3f c3 c3

88 b1 8d b5 e3 4e d7 81 3 15 17 25 4e 65 88 4e

e4 3b 81 81 fa 1 1d 4 22 0 6 1 27 68 27 2e

3b 83 c7 cc 25 9b d8 d5 1c 1f e5 59 7f 3f 3f ef

43 / 44

Page 92: S-Box Decompositions and some Applications

My Area of Research: Symmetric CryptographyFrom Russia With Love

Cryptanalysis of a TheoremConclusion

44 / 44

Page 93: S-Box Decompositions and some Applications

Appendix Details on CCZ-Equivalence

Swap Matrices

The swap matrix permuting Fn+m2 is defined for t ≀ min(n,m) as

Mt =

⎑⎒⎒⎣0 0 It 00 Inβˆ’t 0 0It 0 0 00 0 0 Imβˆ’t

⎀βŽ₯βŽ₯⎦ .

It has a simple interpretation:

t n βˆ’ t t m βˆ’ t

For all t ≀ min(n,m), Mt is an orthogonal and symmetric involution.

1 / 4

Page 94: S-Box Decompositions and some Applications

Appendix Details on CCZ-Equivalence

Swap Matrices and Twisting

F : Fn2 β†’ Fm

2

T U

t n βˆ’ t

t m βˆ’ t

t-twist

G : Fn2 β†’ Fm

2

Tβˆ’1

U

t n βˆ’ t

t m βˆ’ t

Ξ“F ={

(x ,F (x)) ,βˆ€x ∈ Fn2

} MtΞ“G =

{(x ,G (x)) ,βˆ€x ∈ Fn

2

}𝒲F (u) = 𝒲G (Mt(u))

2 / 4

Page 95: S-Box Decompositions and some Applications

Appendix Details on CCZ-Equivalence

Twisting and CCZ-Class

Lemma

Twisting preserves the CCZ-equivalence class.

3 / 4

Page 96: S-Box Decompositions and some Applications

Appendix Details on CCZ-Equivalence

Main Result

Theorem

If F : Fn2 β†’ Fm

2 and G : Fn2 β†’ Fm

2 are CCZ-equivalent, then

Ξ“G = (B Γ—Mt Γ— A)(Ξ“F ) ,

where A and B are EA-mappings and where

t = dim(proj𝒱βŠ₯

((AT Γ—Mt Γ— BT )(𝒱)

)).

Corollary

If a function is CCZ-equivalent but not EA-equivalent to anotherfunction, then they have to be EA-equivalent to functions for which at-twist is possible.

4 / 4

Page 97: S-Box Decompositions and some Applications

Appendix Details on CCZ-Equivalence

K. A. Browning, J.F. Dillon, R.E. Kibler, and M. T. McQuistan.APN Polynomials and Related Codes.J. of Combinatorics, Information and System Sciences,34(1-4):135–159, 2009.

Alex Biryukov, Leo Perrin, and Aleksei Udovenko.Reverse-engineering the S-box of streebog, kuznyechik andSTRIBOBr1.In Marc Fischlin and Jean-Sebastien Coron, editors,EUROCRYPT 2016, Part I, volume 9665 of LNCS, pages 372–402.Springer, Heidelberg, May 2016.

Claude Carlet, Pascale Charpin, and Victor Zinoviev.Codes, bent functions and permutations suitable for DES-likecryptosystems.Designs, Codes and Cryptography, 15(2):125–156, 1998.

Anne Canteaut, Sebastien Duval, and Leo Perrin.A generalisation of Dillon’s APN permutation with the best knowndifferential and nonlinear properties for all fields of size 24k+2.

4 / 4

Page 98: S-Box Decompositions and some Applications

Appendix Details on CCZ-Equivalence

IEEE Transactions on Information Theory, 63(11):7575–7591, Nov2017.

Anne Canteaut and Leo Perrin.On CCZ-equivalence, extended-affine equivalence, and functiontwisting.Finite Fields and Their Applications, 56:209–246, 2019.

Anne Canteaut, Leo Perrin, and Shizhu Tian.If a generalised butterfly is APN then it operates on 6 bits.Cryptology ePrint Archive, Report 2018/1036, 2018.https://eprint.iacr.org/2018/1036.

Kaisa Nyberg and Lars R. Knudsen.Provable security against a differential attack.Journal of Cryptology, 8(1):27–37, 1995.

Leo Perrin.Partitions in the S-box of Streebog and Kuznyechik.To appear (IACR ToSC), 2018.

Leo Perrin and Aleksei Udovenko.

4 / 4

Page 99: S-Box Decompositions and some Applications

Appendix Details on CCZ-Equivalence

Exponential s-boxes: a link between the s-boxes of BelT andKuznyechik/Streebog.IACR Trans. Symm. Cryptol., 2016(2):99–124, 2016.http://tosc.iacr.org/index.php/ToSC/article/view/567.

Leo Perrin, Aleksei Udovenko, and Alex Biryukov.Cryptanalysis of a theorem: Decomposing the only known solution tothe big APN problem.In Matthew Robshaw and Jonathan Katz, editors, CRYPTO 2016,Part II, volume 9815 of LNCS, pages 93–122. Springer, Heidelberg,August 2016.

4 / 4