PQLR
Postquantum Crypto Library by QAPP
kyber.h File Reference
#include <pqlr/common/pqlr.h>
#include <pqlr/common/api.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct kyber_st * kyber_t
 Kyber algorithm instance handle. More...
 

Enumerations

enum  kyber_parameterset_t { kyber512 , kyber768 , kyber1024 , kyber_last }
 Possible kyber parameters sets. More...
 

Functions

PQLR_API kyber_t kyber_new (kyber_parameterset_t parameterset)
 Creates kyber instance initialized by parameterset. More...
 
PQLR_API void kyber_free (kyber_t kyber)
 Frees kyber instance and all corresponding resources. More...
 
PQLR_API uint32_t kyber_get_initiator_public_length (kyber_t kyber)
 Obtains initiator's public key length for the current kyber instance. More...
 
PQLR_API uint32_t kyber_get_initiator_secret_length (kyber_t kyber)
 Obtains initiator's secret key length for the current kyber instance. More...
 
PQLR_API uint32_t kyber_get_ciphertext_length (kyber_t kyber)
 Obtains ciphertext length for the current kyber instance. More...
 
PQLR_API uint32_t kyber_get_shared_secret_length (kyber_t kyber)
 Obtains shared secret length for the current kyber instance. More...
 
PQLR_API pqlr_t kyber_to_pqlr (kyber_t kyber)
 Casts kyber instance to pqlr instance. More...
 
PQLR_API kyber_t kyber_duplicate (const kyber_t kyber)
 Duplicates context of kyber instance. More...
 
PQLR_API void kyber_keygen (const kyber_t kyber, uint8_t *public_key, uint8_t *secret_key)
 Initial step of key distribution. Generates a key pair for key distribution initiator. More...
 
PQLR_API void kyber_key_encap (const kyber_t kyber, const uint8_t *public_key, uint8_t *ciphertext, uint8_t *session_key)
 Key encapsulation. More...
 
PQLR_API void kyber_key_decap (const kyber_t kyber, const uint8_t *secret_key, const uint8_t *ciphertext, uint8_t *session_key)
 Key decapsulation. More...