PQLR
Postquantum Crypto Library by QAPP
mceliece.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 mceliece_st * mceliece_t
 McEliece algorithm instance handle. More...
 

Enumerations

enum  mceliece_parameterset_t {
  mceliece348864 , mceliece460896 , mceliece6688128 , mceliece6960119 ,
  mceliece8192128 , mceliece348864f , mceliece460896f , mceliece6688128f ,
  mceliece6960119f , mceliece8192128f , mceliece_last
}
 Possible mceliece parameters sets. More...
 

Functions

PQLR_API mceliece_t mceliece_new (mceliece_parameterset_t parameterset)
 Creates mceliece instance initialized by parameterset. More...
 
PQLR_API void mceliece_free (mceliece_t mceliece)
 Frees mceliece instance and all corresponding resources. More...
 
PQLR_API uint32_t mceliece_get_initiator_public_length (mceliece_t mceliece)
 Obtains initiator's public key length for the current mceliece instance. More...
 
PQLR_API uint32_t mceliece_get_initiator_secret_length (mceliece_t mceliece)
 Obtains initiator's secret key length for the current mceliece instance. More...
 
PQLR_API uint32_t mceliece_get_ciphertext_length (mceliece_t mceliece)
 Obtains ciphertext length for the current mceliece instance. More...
 
PQLR_API uint32_t mceliece_get_shared_secret_length (mceliece_t mceliece)
 Obtains shared secret length for the current mceliece instance. More...
 
PQLR_API pqlr_t mceliece_to_pqlr (mceliece_t mceliece)
 Gets pqlr instance linked to this mceliece instance. More...
 
PQLR_API mceliece_t mceliece_duplicate (const mceliece_t mceliece)
 Duplicates context of mceliece instance. More...
 
PQLR_API void mceliece_keygen (const mceliece_t mceliece, 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 mceliece_key_encap (const mceliece_t mceliece, const uint8_t *public_key, uint8_t *ciphertext, uint8_t *session_key)
 Key encapsulation. More...
 
PQLR_API void mceliece_key_decap (const mceliece_t mceliece, const uint8_t *secret_key, const uint8_t *ciphertext, uint8_t *session_key)
 Key decapsulation. More...