29#define ZPC_EC_KEY_TYPE_CCA 0x1f
30#define ZPC_EC_KEY_TYPE_EP11 7
31#define ZPC_EC_KEY_TYPE_PVSECRET 9
34#define ZPC_EC_KEY_REENCIPHER_OLD_TO_CURRENT 1
35#define ZPC_EC_KEY_REENCIPHER_CURRENT_TO_NEW 2
38 ZPC_EC_CURVE_NOT_SET = -2,
39 ZPC_EC_CURVE_INVALID = -1,
40 ZPC_EC_CURVE_P256 = 0,
48 ZPC_EC_SECRET_TYPE_NOT_SET = -2,
49 ZPC_EC_SECRET_TYPE_INVALID = -1,
50 ZPC_EC_SECRET_ECDSA_P256 = 0x0011,
51 ZPC_EC_SECRET_ECDSA_P384 = 0x0012,
52 ZPC_EC_SECRET_ECDSA_P521 = 0x0013,
53 ZPC_EC_SECRET_EDDSA_ED25519 = 0x0014,
54 ZPC_EC_SECRET_EDDSA_ED448 = 0x0015,
64__attribute__((visibility(
"default")))
73__attribute__((visibility(
"default")))
82__attribute__((visibility(
"default")))
91__attribute__((visibility(
"default")))
102__attribute__((visibility(
"default")))
112__attribute__((visibility(
"default")))
126__attribute__((visibility(
"default")))
128 unsigned int seckeylen);
151__attribute__((visibility(
"default")))
153 const
unsigned char *pubkey,
unsigned int publen,
154 const
unsigned char *privkey,
unsigned int privlen);
167__attribute__((visibility(
"default")))
169 unsigned int *seckeylen);
181__attribute__((visibility(
"default")))
183 unsigned int *pubkeylen);
190__attribute__((visibility(
"default")))
202__attribute__((visibility(
"default")))
210__attribute__((visibility(
"default")))
int zpc_ec_key_generate(struct zpc_ec_key *key)
int zpc_ec_key_alloc(struct zpc_ec_key **key)
void zpc_ec_key_free(struct zpc_ec_key **key)
int zpc_ec_key_export(struct zpc_ec_key *key, unsigned char *seckey, unsigned int *seckeylen)
int zpc_ec_key_set_mkvp(struct zpc_ec_key *key, const char *mkvp)
int zpc_ec_key_import_clear(struct zpc_ec_key *key, const unsigned char *pubkey, unsigned int publen, const unsigned char *privkey, unsigned int privlen)
int zpc_ec_key_set_type(struct zpc_ec_key *key, int type)
int zpc_ec_key_set_apqns(struct zpc_ec_key *key, const char *apqns[])
int zpc_ec_key_set_flags(struct zpc_ec_key *key, unsigned int flags)
int zpc_ec_key_set_curve(struct zpc_ec_key *key, zpc_ec_curve_t curve)
int zpc_ec_key_export_public(struct zpc_ec_key *key, unsigned char *pubkey, unsigned int *pubkeylen)
int zpc_ec_key_import(struct zpc_ec_key *key, const unsigned char *seckey, unsigned int seckeylen)
int zpc_ec_key_reencipher(struct zpc_ec_key *key, unsigned int reenc)