ASCON Suite
Macros
ascon-util-snp.h File Reference
#include <ascon/permutation.h>
#include "ascon-select-backend.h"
#include "ascon-util.h"
#include <string.h>
#include "ascon-sliced32.h"

Go to the source code of this file.

Macros

#define ascon_separator(state)   ((state)->W[8] ^= 0x01)
 
#define ascon_pad(state, offset)
 
#define ascon_absorb_8(state, data, offset)    ascon_absorb_sliced((state), (data), (offset) / 8)
 
#define ascon_absorb_16(state, data, offset)
 
#define ascon_absorb_partial(state, data, offset, count)    ascon_add_bytes((state), (data), (offset), (count))
 
#define ascon_squeeze_8(state, data, offset)    ascon_squeeze_sliced((state), (data), (offset) / 8)
 
#define ascon_squeeze_16(state, data, offset)
 
#define ascon_squeeze_partial(state, data, offset, count)    ascon_extract_bytes((state), (data), (offset), (count))
 
#define ascon_encrypt_8(state, dest, src, offset)    ascon_encrypt_sliced((state), (dest), (src), (offset) / 8)
 
#define ascon_encrypt_16(state, dest, src, offset)
 
#define ascon_encrypt_partial(state, dest, src, offset, count)
 
#define ascon_decrypt_8(state, dest, src, offset)    ascon_decrypt_sliced((state), (dest), (src), (offset) / 8)
 
#define ascon_decrypt_16(state, dest, src, offset)
 
#define ascon_decrypt_partial(state, dest, src, offset, count)    ascon_extract_and_overwrite_bytes((state), (src), (dest), (offset), (count))
 
#define ascon_backend_init(state)   do { ; } while (0)
 
#define ascon_backend_free(state)   do { ; } while (0)
 

Macro Definition Documentation

◆ ascon_absorb_16

#define ascon_absorb_16 (   state,
  data,
  offset 
)
Value:
do { \
ascon_absorb_sliced((state), (data), (offset) / 8); \
ascon_absorb_sliced((state), (data) + 8, (offset) / 8 + 1); \
} while (0)
ascon_state_t state
[snippet_key]
Definition: snippets.c:2
unsigned char data[8]
[snippet_key]
Definition: snippets.c:14

Definition at line 50 of file ascon-util-snp.h.

◆ ascon_absorb_8

#define ascon_absorb_8 (   state,
  data,
  offset 
)     ascon_absorb_sliced((state), (data), (offset) / 8)

Definition at line 48 of file ascon-util-snp.h.

◆ ascon_absorb_partial

#define ascon_absorb_partial (   state,
  data,
  offset,
  count 
)     ascon_add_bytes((state), (data), (offset), (count))

Definition at line 55 of file ascon-util-snp.h.

◆ ascon_backend_free

#define ascon_backend_free (   state)    do { ; } while (0)

Definition at line 260 of file ascon-util-snp.h.

◆ ascon_backend_init

#define ascon_backend_init (   state)    do { ; } while (0)

Definition at line 248 of file ascon-util-snp.h.

◆ ascon_decrypt_16

#define ascon_decrypt_16 (   state,
  dest,
  src,
  offset 
)
Value:
do { \
ascon_decrypt_sliced((state), (dest), (src), (offset) / 8); \
ascon_decrypt_sliced((state), (dest) + 8, (src) + 8, (offset) / 8 + 1); \
} while (0)

Definition at line 83 of file ascon-util-snp.h.

◆ ascon_decrypt_8

#define ascon_decrypt_8 (   state,
  dest,
  src,
  offset 
)     ascon_decrypt_sliced((state), (dest), (src), (offset) / 8)

Definition at line 81 of file ascon-util-snp.h.

◆ ascon_decrypt_partial

#define ascon_decrypt_partial (   state,
  dest,
  src,
  offset,
  count 
)     ascon_extract_and_overwrite_bytes((state), (src), (dest), (offset), (count))

Definition at line 88 of file ascon-util-snp.h.

◆ ascon_encrypt_16

#define ascon_encrypt_16 (   state,
  dest,
  src,
  offset 
)
Value:
do { \
ascon_encrypt_sliced((state), (dest), (src), (offset) / 8); \
ascon_encrypt_sliced((state), (dest) + 8, (src) + 8, (offset) / 8 + 1); \
} while (0)

Definition at line 70 of file ascon-util-snp.h.

◆ ascon_encrypt_8

#define ascon_encrypt_8 (   state,
  dest,
  src,
  offset 
)     ascon_encrypt_sliced((state), (dest), (src), (offset) / 8)

Definition at line 68 of file ascon-util-snp.h.

◆ ascon_encrypt_partial

#define ascon_encrypt_partial (   state,
  dest,
  src,
  offset,
  count 
)
Value:
do { \
ascon_add_bytes((state), (src), (offset), (count)); \
ascon_extract_bytes((state), (dest), (offset), (count)); \
} while (0)

Definition at line 75 of file ascon-util-snp.h.

◆ ascon_pad

#define ascon_pad (   state,
  offset 
)
Value:
((state)->W[((offset) / 8) * 2 + 1] ^= \
(0x80000000U >> (((offset) & 7) * 4)))

Definition at line 44 of file ascon-util-snp.h.

◆ ascon_separator

#define ascon_separator (   state)    ((state)->W[8] ^= 0x01)

Definition at line 43 of file ascon-util-snp.h.

◆ ascon_squeeze_16

#define ascon_squeeze_16 (   state,
  data,
  offset 
)
Value:
do { \
ascon_squeeze_sliced((state), (data), (offset) / 8); \
ascon_squeeze_sliced((state), (data) + 8, (offset) / 8 + 1); \
} while (0)

Definition at line 60 of file ascon-util-snp.h.

◆ ascon_squeeze_8

#define ascon_squeeze_8 (   state,
  data,
  offset 
)     ascon_squeeze_sliced((state), (data), (offset) / 8)

Definition at line 58 of file ascon-util-snp.h.

◆ ascon_squeeze_partial

#define ascon_squeeze_partial (   state,
  data,
  offset,
  count 
)     ascon_extract_bytes((state), (data), (offset), (count))

Definition at line 65 of file ascon-util-snp.h.