From 9e276a2fee29d54cc7d742b4ab26d4885a70cf6b Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Mon, 6 Jan 2020 23:01:20 +0100 Subject: [PATCH] rename encrypt to encap --- include/DIPE.h | 4 ++-- src/DIPE.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/DIPE.h b/include/DIPE.h index fa493a3..2e9c3a8 100644 --- a/include/DIPE.h +++ b/include/DIPE.h @@ -14,8 +14,8 @@ extern "C" { void dipe_master_keygen(dipe_param_t param, size_t dimension, dipe_master_publickey_t* pk, dipe_master_secretkey_t* sk); void dipe_keygen(dipe_param_t param, dipe_master_secretkey_t msk, char* cid, element_t* y, dipe_secretkey_t* sk); - void dipe_encrypt(dipe_param_t param, dipe_master_publickey_t mpk, element_t* x, element_t ptxt, dipe_ctxt_t* ctxt); - void dipe_decrypt(dipe_param_t param, dipe_secretkey_t sk, char* cid, element_t* y, dipe_ctxt_t ctxt, element_t ptxt); + void dipe_encap(dipe_param_t param, dipe_master_publickey_t mpk, element_t* x, element_t ptxt, dipe_ctxt_t* ctxt); + void dipe_decap(dipe_param_t param, dipe_secretkey_t sk, char* cid, element_t* y, dipe_ctxt_t ctxt, element_t ptxt); void dipe_free_param(dipe_param_t param); void dipe_free_master_secretkey(dipe_master_secretkey_t sk); diff --git a/src/DIPE.cxx b/src/DIPE.cxx index 5b39bb7..53e4b1a 100644 --- a/src/DIPE.cxx +++ b/src/DIPE.cxx @@ -128,7 +128,7 @@ void dipe_keygen(dipe_param_t param, dipe_master_secretkey_t msk, char* cid, ele element_clear(a2); } -void dipe_encrypt(dipe_param_t param, dipe_master_publickey_t mpk, element_t* x, element_t ptxt, dipe_ctxt_t* ctxt) { +void dipe_encap(dipe_param_t param, dipe_master_publickey_t mpk, element_t* x, element_t ptxt, dipe_ctxt_t* ctxt) { *ctxt = (dipe_ctxt_t)malloc(sizeof(dipe_ctxt)); (*ctxt)->dimension = mpk->dimension; @@ -173,7 +173,7 @@ void dipe_encrypt(dipe_param_t param, dipe_master_publickey_t mpk, element_t* x, } -void dipe_decrypt(dipe_param_t param, dipe_secretkey_t sk, char* cid, element_t* y, dipe_ctxt_t ctxt, element_t ptxt) { +void dipe_decap(dipe_param_t param, dipe_secretkey_t sk, char* cid, element_t* y, dipe_ctxt_t ctxt, element_t ptxt) { size_t hash_input_length = dipe_h_length(y[0], sk->dimension); unsigned char hash_input[hash_input_length]; element_t h; -- 2.39.5