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

ascon API More...

Functions

int ascon128_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 ascon128_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.
 
int ascon128a_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-128a.
 
int ascon128a_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-128a.
 
int ascon80pq_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-80pq.
 
int ascon80pq_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-80pq.
 

Detailed Description

ascon API

Function Documentation

◆ ascon128_aead_decrypt()

int ascon128_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/ascon.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

◆ ascon128_aead_encrypt()

int ascon128_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/ascon.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

◆ ascon128a_aead_decrypt()

int ascon128a_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/ascon.h>

Decrypt ciphertext with ascon-128a.

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

◆ ascon128a_aead_encrypt()

int ascon128a_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/ascon.h>

Encrypt plaintext with ascon-128a.

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

◆ ascon80pq_aead_decrypt()

int ascon80pq_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/ascon.h>

Decrypt ciphertext with ascon-80pq.

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

◆ ascon80pq_aead_encrypt()

int ascon80pq_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/ascon.h>

Encrypt plaintext with ascon-80pq.

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