22 #include "../typedefs.h"
23 #include "../constants.h"
38 virtual num* get_num() = 0;
39 virtual num* get_rnd_num(uint32_t bitlen = 0) = 0;
40 virtual fe* get_fe() = 0;
41 virtual fe* get_rnd_fe(uint32_t bitlen) = 0;
42 virtual fe* get_generator() = 0;
43 virtual fe* get_rnd_generator() = 0;
44 virtual uint32_t num_byte_size() = 0;
45 uint32_t fe_byte_size() {
49 virtual uint32_t get_field_size() =0;
53 virtual void init(
seclvl secparam, uint8_t* seed) = 0;
67 virtual void set(
num* src) = 0;
68 virtual void set_si(int32_t src) = 0;
69 virtual void set_add(
num* a,
num* b) = 0;
70 virtual void set_mul(
num* a,
num* b) = 0;
71 virtual void export_to_bytes(uint8_t* buf, uint32_t field_size) = 0;
72 virtual void import_from_bytes(uint8_t* buf, uint32_t field_size) = 0;
73 virtual void print() = 0;
85 virtual void set(
fe* src) = 0;
86 virtual void set_mul(
fe* a,
fe* b) = 0;
87 virtual void set_pow(
fe* b,
num* e) = 0;
88 virtual void set_div(
fe* a,
fe* b) = 0;
89 virtual void set_double_pow_mul(
fe* b1,
num* e1,
fe* b2,
num* e2) = 0;
90 virtual void export_to_bytes(uint8_t* buf) = 0;
91 virtual void import_from_bytes(uint8_t* buf) = 0;
92 virtual void sample_fe_from_bytes(uint8_t* buf, uint32_t bytelen) = 0;
93 virtual void print() = 0;
96 virtual void init() = 0;
108 virtual void pow(
fe* result,
num* e) = 0;
Definition: pk-crypto.h:77
Definition: pk-crypto.h:99
Definition: pk-crypto.h:59
Definition: pk-crypto.h:30
Definition: typedefs.h:79