ascon.h 494 Bytes
Newer Older
Martin Schläffer committed
1 2 3 4 5 6 7 8 9 10 11
#ifndef ASCON_H_
#define ASCON_H_

#include <stdint.h>

#include "word.h"

typedef struct {
  word_t x0, x1, x2, x3, x4;
} state_t;

Enrico Pozzobon committed
12 13
void ascon_aeadinit(state_t* s, const uint8_t* npub, const uint8_t* k);
void ascon_adata(state_t* s, const uint8_t* ad, uint64_t adlen);
Martin Schläffer committed
14 15 16 17
void ascon_encrypt(state_t* s, uint8_t* c, const uint8_t* m, uint64_t mlen);
void ascon_decrypt(state_t* s, uint8_t* m, const uint8_t* c, uint64_t clen);
void ascon_final(state_t* s, const uint8_t* k);

Martin Schläffer committed
18
#endif /* ASCON_H */