diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2016-09-06 17:00:38 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2016-09-06 17:00:38 +0800 |
commit | afc01080302fb3348536782e0af39cfb3943867f (patch) | |
tree | 29eb1f57d9e483a15fd2e3626629191d3805b3de /include/bls.hpp | |
parent | 00c3253835763f5f7da16981719c5e751bf7b3e7 (diff) | |
download | dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar.gz dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar.bz2 dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar.lz dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar.xz dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar.zst dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.zip |
add Secret::set for c api
Diffstat (limited to 'include/bls.hpp')
-rw-r--r-- | include/bls.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/bls.hpp b/include/bls.hpp index 955702a..cf251d5 100644 --- a/include/bls.hpp +++ b/include/bls.hpp @@ -88,6 +88,8 @@ class SecretKey { friend void LagrangeInterpolation(G& r, const T& vec, const IdVec& idVec); template<class T, class G> friend struct Wrap; + template<class T, class G> + friend struct WrapPointer; public: SecretKey(); ~SecretKey(); @@ -129,6 +131,13 @@ public: add secret key */ void add(const SecretKey& rhs); + + // the following methods are for C api + /* + the size of msk must be k + */ + void set(const SecretKey *const *msk, size_t k, const Id& id); + void recover(const SecretKey *const *secVec, const Id *const *idVec, size_t n); }; /* @@ -142,6 +151,8 @@ class PublicKey { friend void LagrangeInterpolation(G& r, const T& vec, const IdVec& idVec); template<class T, class G> friend struct Wrap; + template<class T, class G> + friend struct WrapPointer; public: PublicKey(); ~PublicKey(); |