diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-06-04 05:55:43 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-06-04 05:55:43 +0800 |
commit | 5a38c2e8c9a27555229e9cd61455caf1aa3d8907 (patch) | |
tree | e9ab1cbf24a5f65601cea7e6681044b83b947d5d /include | |
parent | 1682083203424fee2670e8e1c57f4786ed8b3234 (diff) | |
download | dexon-bls-5a38c2e8c9a27555229e9cd61455caf1aa3d8907.tar dexon-bls-5a38c2e8c9a27555229e9cd61455caf1aa3d8907.tar.gz dexon-bls-5a38c2e8c9a27555229e9cd61455caf1aa3d8907.tar.bz2 dexon-bls-5a38c2e8c9a27555229e9cd61455caf1aa3d8907.tar.lz dexon-bls-5a38c2e8c9a27555229e9cd61455caf1aa3d8907.tar.xz dexon-bls-5a38c2e8c9a27555229e9cd61455caf1aa3d8907.tar.zst dexon-bls-5a38c2e8c9a27555229e9cd61455caf1aa3d8907.zip |
rename bls_if.h to bls.h
Diffstat (limited to 'include')
-rw-r--r-- | include/bls/bls.h | 16 | ||||
-rw-r--r-- | include/bls/bls.hpp | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/include/bls/bls.h b/include/bls/bls.h index 7a25b54..e762f2e 100644 --- a/include/bls/bls.h +++ b/include/bls/bls.h @@ -6,8 +6,8 @@ @license modified new BSD license http://opensource.org/licenses/BSD-3-Clause */ -#ifndef BLS_MAX_OP_UNIT_SIZE - #error "define BLS_MAX_OP_UNIT_SIZE 4(or 6)" +#ifndef BLS_FP_UNIT_SIZE + #error "define BLS_FP_UNIT_SIZE 4(or 6)" #endif #include <stdint.h> // for uint64_t, uint8_t @@ -19,8 +19,8 @@ #else #define BLS_DLL_API __declspec(dllimport) #ifndef BLS_NO_AUTOLINK - #if BLS_MAX_OP_UNIT_SIZE == 4 - #pragma comment(lib, "bls_if256.lib") + #if BLS_FP_UNIT_SIZE == 4 + #pragma comment(lib, "bls256.lib") #endif #endif #endif @@ -39,19 +39,19 @@ enum { }; typedef struct { - uint64_t buf[BLS_MAX_OP_UNIT_SIZE]; + uint64_t buf[BLS_FP_UNIT_SIZE]; } blsId; typedef struct { - uint64_t buf[BLS_MAX_OP_UNIT_SIZE]; + uint64_t buf[BLS_FP_UNIT_SIZE]; } blsSecretKey; typedef struct { - uint64_t buf[BLS_MAX_OP_UNIT_SIZE * 2 * 3]; + uint64_t buf[BLS_FP_UNIT_SIZE * 2 * 3]; } blsPublicKey; typedef struct { - uint64_t buf[BLS_MAX_OP_UNIT_SIZE * 3]; + uint64_t buf[BLS_FP_UNIT_SIZE * 3]; } blsSignature; /* diff --git a/include/bls/bls.hpp b/include/bls/bls.hpp index f3a29a0..382eba7 100644 --- a/include/bls/bls.hpp +++ b/include/bls/bls.hpp @@ -6,8 +6,8 @@ @license modified new BSD license http://opensource.org/licenses/BSD-3-Clause */ -#ifndef BLS_MAX_OP_UNIT_SIZE - #error "define BLS_MAX_OP_UNIT_SIZE 4(or 6)" +#ifndef BLS_FP_UNIT_SIZE + #error "define BLS_FP_UNIT_SIZE 4(or 6)" #endif #include <vector> #include <string> @@ -62,7 +62,7 @@ struct Id; @param maxUnitSize [in] 4 or 6 (specify same value used in compiling for validation) @note init() is not thread safe */ -void init(int curve = CurveFp254BNb, int maxUnitSize = BLS_MAX_OP_UNIT_SIZE); +void init(int curve = CurveFp254BNb, int maxUnitSize = BLS_FP_UNIT_SIZE); size_t getOpUnitSize(); void getCurveOrder(std::string& str); void getFieldOrder(std::string& str); @@ -77,7 +77,7 @@ class Id; r = 0x2523648240000001ba344d8000000007ff9f800000000010a10000000000000d sizeof(uint64_t) * keySize byte */ -const size_t keySize = BLS_MAX_OP_UNIT_SIZE; +const size_t keySize = BLS_FP_UNIT_SIZE; typedef std::vector<SecretKey> SecretKeyVec; typedef std::vector<PublicKey> PublicKeyVec; @@ -85,7 +85,7 @@ typedef std::vector<Signature> SignatureVec; typedef std::vector<Id> IdVec; class Id { - uint64_t self_[BLS_MAX_OP_UNIT_SIZE]; + uint64_t self_[BLS_FP_UNIT_SIZE]; friend class PublicKey; friend class SecretKey; template<class T, class G> friend struct WrapArray; @@ -113,7 +113,7 @@ public: s ; secret key */ class SecretKey { - uint64_t self_[BLS_MAX_OP_UNIT_SIZE]; + uint64_t self_[BLS_FP_UNIT_SIZE]; template<class T, class G> friend struct WrapArray; impl::SecretKey& getInner() { return *reinterpret_cast<impl::SecretKey*>(self_); } const impl::SecretKey& getInner() const { return *reinterpret_cast<const impl::SecretKey*>(self_); } @@ -178,7 +178,7 @@ public: sQ ; public key */ class PublicKey { - uint64_t self_[BLS_MAX_OP_UNIT_SIZE * 2 * 3]; + uint64_t self_[BLS_FP_UNIT_SIZE * 2 * 3]; friend class SecretKey; friend class Signature; template<class T, class G> friend struct WrapArray; @@ -217,7 +217,7 @@ public: s H(m) ; signature */ class Signature { - uint64_t self_[BLS_MAX_OP_UNIT_SIZE * 3]; + uint64_t self_[BLS_FP_UNIT_SIZE * 3]; friend class SecretKey; template<class T, class G> friend struct WrapArray; impl::Signature& getInner() { return *reinterpret_cast<impl::Signature*>(self_); } |