Skip to content
Snippets Groups Projects
Commit 9dcaa5ee authored by Dmitriy A. Gerasimov's avatar Dmitriy A. Gerasimov
Browse files

[*] Changed ret code from unsigned int to signed it for BLISS algo

parent bf491dd3
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ void dap_enc_sig_bliss_key_new_generate(struct dap_enc_key * a_key, const void *
}
size_t dap_enc_sig_bliss_get_sign(struct dap_enc_key * key,const void * msg,
int dap_enc_sig_bliss_get_sign(struct dap_enc_key * key,const void * msg,
const size_t msg_size, void * signature, const size_t signature_size)
{
if(signature_size < sizeof (bliss_signature_t)) {
......@@ -125,12 +125,12 @@ size_t dap_enc_sig_bliss_get_sign(struct dap_enc_key * key,const void * msg,
&entropy);
}
size_t dap_enc_sig_bliss_verify_sign(struct dap_enc_key * key,const void * msg,
int dap_enc_sig_bliss_verify_sign(struct dap_enc_key * key,const void * msg,
const size_t msg_size, void * signature, const size_t signature_size)
{
if(signature_size < sizeof (bliss_signature_t)) {
log_it(L_ERROR, "bad signature size");
return 0;
return -1;
}
return bliss_b_verify(signature, key->pub_key_data, msg, msg_size);
}
......
......@@ -16,10 +16,10 @@ void dap_enc_sig_bliss_key_new_generate(struct dap_enc_key * key, const void *ke
size_t kex_size, const void * seed, size_t seed_size,
size_t key_size);
size_t dap_enc_sig_bliss_get_sign(struct dap_enc_key * key,const void * msg,
int dap_enc_sig_bliss_get_sign(struct dap_enc_key * key,const void * msg,
const size_t msg_size, void * signature, const size_t signature_size);
size_t dap_enc_sig_bliss_verify_sign(struct dap_enc_key * key,const void * msg,
int dap_enc_sig_bliss_verify_sign(struct dap_enc_key * key,const void * msg,
const size_t msg_size, void * signature, const size_t signature_size);
void dap_enc_sig_bliss_key_delete(struct dap_enc_key *key);
......
......@@ -220,6 +220,7 @@ dap_enc_key_t* dap_enc_key_deserealize(void *buf, size_t buf_size);
// allocate memory for key struct
dap_enc_key_t *dap_enc_key_new(dap_enc_key_type_t a_key_type);
// default gen key
dap_enc_key_t *dap_enc_key_new_generate(dap_enc_key_type_t key_type, const void *kex_buf,
size_t kex_size, const void* seed,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment