ascon.h 511 Bytes
Newer Older
Martin Schläffer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#ifndef ASCON_H_
#define ASCON_H_

#include <stdint.h>

#include "config.h"
#include "word.h"

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

void ascon_init(state_t* s, const uint8_t* npub, const uint8_t* k);
void ascon_absorb(state_t* s, const uint8_t* ad, uint64_t adlen);
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
19
#endif /* ASCON_H */