Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lwc
/
candidates
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9f8820cc
authored
Oct 07, 2020
by
Martin Schläffer
Committed by
Sebastian Renner
Oct 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ascon update
parent
d43acb73
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
319 additions
and
81 deletions
+319
-81
ascon/Implementations/CMakeLists.txt
+1
-2
ascon/Implementations/crypto_aead/ascon128av12/bi32/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128av12/bi32_arm/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128av12/bi32_lowreg/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128av12/bi32_lowsize/ascon.c
+3
-0
ascon/Implementations/crypto_aead/ascon128av12/bi32_lowsize/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128av12/bi32_lowsize/process.c
+0
-2
ascon/Implementations/crypto_aead/ascon128av12/opt64/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128av12/opt64_lowsize/ascon.c
+3
-0
ascon/Implementations/crypto_aead/ascon128av12/opt64_lowsize/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128av12/opt64_lowsize/process.c
+0
-2
ascon/Implementations/crypto_aead/ascon128v12/bi32/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128v12/bi32_arm/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128v12/bi32_lowreg/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128v12/bi32_lowsize/ascon.c
+3
-0
ascon/Implementations/crypto_aead/ascon128v12/bi32_lowsize/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128v12/opt64/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon128v12/opt64_lowsize/ascon.c
+3
-0
ascon/Implementations/crypto_aead/ascon128v12/opt64_lowsize/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon80pqv12/bi32/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon80pqv12/bi32_lowsize/ascon.c
+3
-0
ascon/Implementations/crypto_aead/ascon80pqv12/bi32_lowsize/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon80pqv12/opt64/permutations.c
+12
-3
ascon/Implementations/crypto_aead/ascon80pqv12/opt64_lowsize/ascon.c
+3
-0
ascon/Implementations/crypto_aead/ascon80pqv12/opt64_lowsize/permutations.c
+12
-3
ascon/Implementations/crypto_hash/asconhashv12/bi32/permutations.c
+12
-3
ascon/Implementations/crypto_hash/asconhashv12/bi32_arm/permutations.c
+12
-3
ascon/Implementations/crypto_hash/asconhashv12/bi32_lowreg/permutations.c
+12
-3
ascon/Implementations/crypto_hash/asconhashv12/bi32_lowsize/permutations.c
+12
-3
ascon/Implementations/crypto_hash/asconhashv12/opt64/permutations.c
+12
-3
ascon/Implementations/crypto_hash/asconhashv12/opt64_lowsize/permutations.c
+12
-3
ascon/Implementations/crypto_hash/asconxofv12/bi32/permutations.c
+12
-3
ascon/Implementations/crypto_hash/asconxofv12/opt64/permutations.c
+12
-3
ascon/Implementations/crypto_hash/asconxofv12/opt64_lowsize/permutations.c
+12
-3
No files found.
ascon/Implementations/CMakeLists.txt
View file @
9f8820cc
...
...
@@ -5,8 +5,7 @@ enable_testing()
# set the default version, algorithms, implementations, tests, flags, defs
set
(
DEFAULT_VERSIONS v12
)
set
(
DEFAULT_ALGS ascon128 ascon128a ascon80pq asconhash asconxof
)
set
(
DEFAULT_IMPLS ref opt64 opt64_lowsize bi32 bi32_lowsize bi32_lowreg bi16 bi8
opt64_2shares opt64_3shares bi32_2shares bi32_3shares
)
set
(
DEFAULT_IMPLS ref opt64 opt64_lowsize bi32 bi32_lowsize bi32_lowreg bi16 bi8
)
set
(
DEFAULT_TESTS genkat getcycles
)
set
(
DEFAULT_REL_FLAGS -std=c99 -O2 -fomit-frame-pointer -march=native -mtune=native
)
set
(
DEFAULT_DBG_FLAGS -std=c99 -O2 -Wall -Wextra -Wshadow
)
...
...
ascon/Implementations/crypto_aead/ascon128av12/bi32/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128av12/bi32_arm/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128av12/bi32_lowreg/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128av12/bi32_lowsize/ascon.c
View file @
9f8820cc
...
...
@@ -40,8 +40,11 @@ void ascon_core(state_t* s, uint8_t* out, const uint8_t* in, uint64_t tlen,
PB
(
s
);
}
XOR
(
s
->
x4
,
WORD_T
(
1
));
printstate
(
"process associated data"
,
s
);
/* process plaintext/ciphertext */
process_data
(
s
,
out
,
in
,
tlen
,
mode
);
if
(
mode
==
ASCON_ENC
)
printstate
(
"process plaintext"
,
s
);
if
(
mode
==
ASCON_DEC
)
printstate
(
"process ciphertext"
,
s
);
/* finalization */
if
(
CRYPTO_KEYBYTES
==
16
&&
ASCON_RATE
==
8
)
{
XOR
(
s
->
x1
,
K1
);
...
...
ascon/Implementations/crypto_aead/ascon128av12/bi32_lowsize/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128av12/bi32_lowsize/process.c
View file @
9f8820cc
...
...
@@ -7,8 +7,6 @@
void
process_data
(
state_t
*
s
,
uint8_t
*
out
,
const
uint8_t
*
in
,
uint64_t
len
,
uint8_t
mode
)
{
word_t
tmp0
,
tmp1
;
uint64_t
t0
,
t1
;
uint64_t
i
;
while
(
len
>=
ASCON_RATE
)
{
tmp0
=
LOAD64
(
in
);
...
...
ascon/Implementations/crypto_aead/ascon128av12/opt64/permutations.c
View file @
9f8820cc
...
...
@@ -13,14 +13,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128av12/opt64_lowsize/ascon.c
View file @
9f8820cc
...
...
@@ -40,8 +40,11 @@ void ascon_core(state_t* s, uint8_t* out, const uint8_t* in, uint64_t tlen,
PB
(
s
);
}
XOR
(
s
->
x4
,
WORD_T
(
1
));
printstate
(
"process associated data"
,
s
);
/* process plaintext/ciphertext */
process_data
(
s
,
out
,
in
,
tlen
,
mode
);
if
(
mode
==
ASCON_ENC
)
printstate
(
"process plaintext"
,
s
);
if
(
mode
==
ASCON_DEC
)
printstate
(
"process ciphertext"
,
s
);
/* finalization */
if
(
CRYPTO_KEYBYTES
==
16
&&
ASCON_RATE
==
8
)
{
XOR
(
s
->
x1
,
K1
);
...
...
ascon/Implementations/crypto_aead/ascon128av12/opt64_lowsize/permutations.c
View file @
9f8820cc
...
...
@@ -13,14 +13,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128av12/opt64_lowsize/process.c
View file @
9f8820cc
...
...
@@ -7,8 +7,6 @@
void
process_data
(
state_t
*
s
,
uint8_t
*
out
,
const
uint8_t
*
in
,
uint64_t
len
,
uint8_t
mode
)
{
word_t
tmp0
,
tmp1
;
uint64_t
t0
,
t1
;
uint64_t
i
;
while
(
len
>=
ASCON_RATE
)
{
tmp0
=
LOAD64
(
in
);
...
...
ascon/Implementations/crypto_aead/ascon128v12/bi32/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128v12/bi32_arm/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128v12/bi32_lowreg/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128v12/bi32_lowsize/ascon.c
View file @
9f8820cc
...
...
@@ -40,8 +40,11 @@ void ascon_core(state_t* s, uint8_t* out, const uint8_t* in, uint64_t tlen,
PB
(
s
);
}
XOR
(
s
->
x4
,
WORD_T
(
1
));
printstate
(
"process associated data"
,
s
);
/* process plaintext/ciphertext */
process_data
(
s
,
out
,
in
,
tlen
,
mode
);
if
(
mode
==
ASCON_ENC
)
printstate
(
"process plaintext"
,
s
);
if
(
mode
==
ASCON_DEC
)
printstate
(
"process ciphertext"
,
s
);
/* finalization */
if
(
CRYPTO_KEYBYTES
==
16
&&
ASCON_RATE
==
8
)
{
XOR
(
s
->
x1
,
K1
);
...
...
ascon/Implementations/crypto_aead/ascon128v12/bi32_lowsize/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128v12/opt64/permutations.c
View file @
9f8820cc
...
...
@@ -13,14 +13,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon128v12/opt64_lowsize/ascon.c
View file @
9f8820cc
...
...
@@ -40,8 +40,11 @@ void ascon_core(state_t* s, uint8_t* out, const uint8_t* in, uint64_t tlen,
PB
(
s
);
}
XOR
(
s
->
x4
,
WORD_T
(
1
));
printstate
(
"process associated data"
,
s
);
/* process plaintext/ciphertext */
process_data
(
s
,
out
,
in
,
tlen
,
mode
);
if
(
mode
==
ASCON_ENC
)
printstate
(
"process plaintext"
,
s
);
if
(
mode
==
ASCON_DEC
)
printstate
(
"process ciphertext"
,
s
);
/* finalization */
if
(
CRYPTO_KEYBYTES
==
16
&&
ASCON_RATE
==
8
)
{
XOR
(
s
->
x1
,
K1
);
...
...
ascon/Implementations/crypto_aead/ascon128v12/opt64_lowsize/permutations.c
View file @
9f8820cc
...
...
@@ -13,14 +13,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon80pqv12/bi32/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon80pqv12/bi32_lowsize/ascon.c
View file @
9f8820cc
...
...
@@ -40,8 +40,11 @@ void ascon_core(state_t* s, uint8_t* out, const uint8_t* in, uint64_t tlen,
PB
(
s
);
}
XOR
(
s
->
x4
,
WORD_T
(
1
));
printstate
(
"process associated data"
,
s
);
/* process plaintext/ciphertext */
process_data
(
s
,
out
,
in
,
tlen
,
mode
);
if
(
mode
==
ASCON_ENC
)
printstate
(
"process plaintext"
,
s
);
if
(
mode
==
ASCON_DEC
)
printstate
(
"process ciphertext"
,
s
);
/* finalization */
if
(
CRYPTO_KEYBYTES
==
16
&&
ASCON_RATE
==
8
)
{
XOR
(
s
->
x1
,
K1
);
...
...
ascon/Implementations/crypto_aead/ascon80pqv12/bi32_lowsize/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon80pqv12/opt64/permutations.c
View file @
9f8820cc
...
...
@@ -13,14 +13,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_aead/ascon80pqv12/opt64_lowsize/ascon.c
View file @
9f8820cc
...
...
@@ -40,8 +40,11 @@ void ascon_core(state_t* s, uint8_t* out, const uint8_t* in, uint64_t tlen,
PB
(
s
);
}
XOR
(
s
->
x4
,
WORD_T
(
1
));
printstate
(
"process associated data"
,
s
);
/* process plaintext/ciphertext */
process_data
(
s
,
out
,
in
,
tlen
,
mode
);
if
(
mode
==
ASCON_ENC
)
printstate
(
"process plaintext"
,
s
);
if
(
mode
==
ASCON_DEC
)
printstate
(
"process ciphertext"
,
s
);
/* finalization */
if
(
CRYPTO_KEYBYTES
==
16
&&
ASCON_RATE
==
8
)
{
XOR
(
s
->
x1
,
K1
);
...
...
ascon/Implementations/crypto_aead/ascon80pqv12/opt64_lowsize/permutations.c
View file @
9f8820cc
...
...
@@ -13,14 +13,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_hash/asconhashv12/bi32/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_hash/asconhashv12/bi32_arm/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_hash/asconhashv12/bi32_lowreg/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_hash/asconhashv12/bi32_lowsize/permutations.c
View file @
9f8820cc
...
...
@@ -22,14 +22,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_hash/asconhashv12/opt64/permutations.c
View file @
9f8820cc
...
...
@@ -13,14 +13,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P6ROUNDS
(
s
);
}
#endif
#endif
ascon/Implementations/crypto_hash/asconhashv12/opt64_lowsize/permutations.c
View file @
9f8820cc
...
...
@@ -13,14 +13,23 @@ void P(state_t* s, uint8_t rounds) {
#else
/* !ASCON_INLINE_PERM && !ASCON_SINGLE_PERM */
void
P12
(
state_t
*
s
)
{
P12ROUNDS
(
s
);
}
void
P12
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P12ROUNDS
(
s
);
}
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 16
void
P8
(
state_t
*
s
)
{
P8ROUNDS
(
s
);
}
void
P8
(
state_t
*
s
)
{
printstate
(
" permutation input"
,
s
);
P8ROUNDS
(
s
);
}
#endif
#if defined(CRYPTO_ABYTES) && ASCON_RATE == 8
void
P6
(
state_t
*
s
)
{
P6ROUNDS
(
s
);
}
void
P6
(
state_t
*
s
)
{