/**
 * \file parsing.h
 * \brief Functions to parse secret key, public key and ciphertext of the piglet1 scheme
 */

#ifndef PARSING_H
#define PARSING_H

#include "ffi.h"


void piglet1_secret_key_to_string(unsigned char* sk, const unsigned char* seed1, const unsigned char* seed2, const unsigned char* pk);
void piglet1_secret_key_from_string(ffi_vec* x, ffi_vec* y, ffi_vec& g, const unsigned char* sk);

void piglet1_public_key_to_string(unsigned char* pk, const unsigned char* seed, const ffi_vec* s, const unsigned char* g_seed);
void piglet1_public_key_from_string(ffi_vec* H, ffi_vec* s, unsigned char* vec_seed, const unsigned char* pk);

void piglet1_kem_ciphertext_to_string(unsigned char* ct, const ffi_vec* u, const ffi_vec v, const unsigned char *d);
void piglet1_kem_ciphertext_from_string(const unsigned char* ct, ffi_vec* u, ffi_vec& v, unsigned char* d);

#endif

