Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
xoodyak APIs

xoodyak API More...

Functions

int xoodyak_aead_encrypt (unsigned char *c, unsigned long long *clen, const unsigned char *m, unsigned long long mlen, const unsigned char *ad, unsigned long long adlen, unsigned char *tag, const unsigned char *npub, const unsigned char *k)
 Encrypt plaintext with ascon-128.
 
int xoodyak_aead_decrypt (unsigned char *m, unsigned long long *mlen, const unsigned char *tag, const unsigned char *c, unsigned long long clen, const unsigned char *ad, unsigned long long adlen, const unsigned char *npub, const unsigned char *k)
 Decrypt ciphertext with ascon-128.
 

Detailed Description

xoodyak API

Function Documentation

◆ xoodyak_aead_decrypt()

int xoodyak_aead_decrypt ( unsigned char * m,
unsigned long long * mlen,
const unsigned char * tag,
const unsigned char * c,
unsigned long long clen,
const unsigned char * ad,
unsigned long long adlen,
const unsigned char * npub,
const unsigned char * k )

#include <infuse/crypto/xoodyak.h>

Decrypt ciphertext with ascon-128.

Parameters
mMessage (Decrypted output)
mlenLength of output message
tag16 byte ciphertext tag
cCiphertext (Encrypted input)
clenCiphertext length
adAssociated data
adlenAssociated data length
npub16 byte nonce (Initialisation vector)
k16 byte key
Return values
0on success
-1on error

◆ xoodyak_aead_encrypt()

int xoodyak_aead_encrypt ( unsigned char * c,
unsigned long long * clen,
const unsigned char * m,
unsigned long long mlen,
const unsigned char * ad,
unsigned long long adlen,
unsigned char * tag,
const unsigned char * npub,
const unsigned char * k )

#include <infuse/crypto/xoodyak.h>

Encrypt plaintext with ascon-128.

Parameters
cCiphertext (Encrypted output of m)
clenLength of output ciphertext
mMessage (Input payload to encrypt)
mlenMessage length
adAssociated data
adlenAssociated data length
tag16 byte ciphertext tag
npub16 byte nonce (Initialisation vector)
k16 byte key
Return values
0on success