XKCP internals
Gilles Van Assche1
1STMicroelectronics
SCA workshop Šibenik, Croatia, June 2019 Based on joint work with Ronny Van Keer
1 / 19
XKCP internals Gilles Van Assche 1 1 STMicroelectronics SCA workshop - - PowerPoint PPT Presentation
XKCP internals Gilles Van Assche 1 1 STMicroelectronics SCA workshop ibenik, Croatia, June 2019 Based on joint work with Ronny Van Keer 1 / 19 Outline 1 Introduction 2 Inside the XKCP 3 Below SnP and PlSnP 4 Build system 2 / 19
1STMicroelectronics
1 / 19
1
2
3
4
2 / 19
Introduction
1
2
3
4
3 / 19
Introduction
4 / 19
Introduction
4 / 19
Introduction
4 / 19
Introduction
4 / 19
Introduction
5 / 19
Inside the XKCP
1
2
3
4
6 / 19
Inside the XKCP
Keccak-p[200] Keccak-p[1600] Xoodoo
Sponge Duplex
Hashing MAC PRNG
easy to use e.g., message queue
pointers and arithmetic
limited scope to optimize unit tests
permutation bulk data processing
7 / 19
Inside the XKCP
Keccak-p[200] Keccak-p[1600] Xoodoo
Sponge Duplex
Hashing MAC PRNG
easy to use e.g., message queue
pointers and arithmetic
limited scope to optimize unit tests
permutation bulk data processing
7 / 19
Inside the XKCP
Keccak-p[200] Keccak-p[1600] Xoodoo
Sponge Duplex
Hashing MAC PRNG
easy to use e.g., message queue
pointers and arithmetic
limited scope to optimize unit tests
permutation bulk data processing
7 / 19
Inside the XKCP
Keccak-p[200] Keccak-p[1600] Xoodoo
Sponge Duplex
Hashing MAC PRNG
easy to use e.g., message queue
pointers and arithmetic
limited scope to optimize unit tests
permutation bulk data processing
7 / 19
Inside the XKCP
4×Keccak-p[1600] 8×Keccak-p[1600] 16×Xoodoo
Parallel Sponges Farfalle
KangarooTwelve Deck-SANE Deck-WBC
8 / 19
Inside the XKCP
4×Keccak-p[1600] 8×Keccak-p[1600] 16×Xoodoo
Parallel Sponges Farfalle
KangarooTwelve Deck-SANE Deck-WBC
8 / 19
Below SnP and PlSnP
1
2
3
4
9 / 19
Below SnP and PlSnP
Keccak-p[1600]
AVX2 AVX512 ARMv7M ARMv8A 2×Keccak-p[1600] fallback AVX2 AVX512 NEON Xoodoo
ARMv6M ARMv7M ARMv7A AVR8 4×Xoodoo fallback AVX2 AVX512 NEON
SnP or PlSnP
10 / 19
Below SnP and PlSnP
Keccak-p[1600]
AVX2 AVX512 ARMv7M ARMv8A 2×Keccak-p[1600] fallback AVX2 AVX512 NEON Xoodoo
ARMv6M ARMv7M ARMv7A AVR8 4×Xoodoo fallback AVX2 AVX512 NEON
SnP or PlSnP
10 / 19
Below SnP and PlSnP
and optionally XOR them
11 / 19
Below SnP and PlSnP
12 / 19
Below SnP and PlSnP
12 / 19
Below SnP and PlSnP
12 / 19
Below SnP and PlSnP
12 / 19
Below SnP and PlSnP
12 / 19
Below SnP and PlSnP
13 / 19
Below SnP and PlSnP
f f f
…
f f f
…
f f f
…
Parallel application of f XOR blocks into state
14 / 19
Below SnP and PlSnP
f f f
…
f f f
…
f f f
…
Parallel application of f XOR blocks into state
14 / 19
Below SnP and PlSnP
f f f
…
f f f
…
f f f
…
Parallel application of f XOR blocks into state
14 / 19
Build system
1
2
3
4
15 / 19
Build system
make generic64/libXKCP.a make generic32/libXKCP.a make Skylake/libXKCP.a make ARMv7A/libXKCP.a make compact/libXKCP.a
make generic64/libXKCP.a.pack
make generic64/UnitTests UnitTests --SnP --KangarooTwelve --Xoofff
16 / 19
Build system
make generic64/libXKCP.a make generic32/libXKCP.a make Skylake/libXKCP.a make ARMv7A/libXKCP.a make compact/libXKCP.a
make generic64/libXKCP.a.pack
make generic64/UnitTests UnitTests --SnP --KangarooTwelve --Xoofff
16 / 19
Build system
make generic64/libXKCP.a make generic32/libXKCP.a make Skylake/libXKCP.a make ARMv7A/libXKCP.a make compact/libXKCP.a
make generic64/libXKCP.a.pack
make generic64/UnitTests UnitTests --SnP --KangarooTwelve --Xoofff
16 / 19
Build system
make generic64/libXKCP.a make generic32/libXKCP.a make Skylake/libXKCP.a make ARMv7A/libXKCP.a make compact/libXKCP.a
make generic64/libXKCP.a.pack
make generic64/UnitTests UnitTests --SnP --KangarooTwelve --Xoofff
16 / 19
Build system
Makele.build
HighLevel.build LowLevel.build HOWTO-Customize.build
Target makele
a concrete service, mode, construction the implementation of a permutation
17 / 19
Build system
18 / 19
Build system
18 / 19
Build system
18 / 19
Build system
18 / 19
Build system
18 / 19
Build system
18 / 19
Build system
18 / 19
Build system
18 / 19
Conclusions
19 / 19