diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2019-02-03 21:37:43 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2019-02-03 21:37:43 +0800 |
commit | 72f34ed92d25f1690a0f4e636d22fecb4ff539b7 (patch) | |
tree | 22983ec4ff298ccc98d276e3903bd183a2f9d40a | |
parent | 694e856182ab11184a7c5a5577351d7d4dc6aded (diff) | |
download | dexon-mcl-72f34ed92d25f1690a0f4e636d22fecb4ff539b7.tar.gz dexon-mcl-72f34ed92d25f1690a0f4e636d22fecb4ff539b7.tar.zst dexon-mcl-72f34ed92d25f1690a0f4e636d22fecb4ff539b7.zip |
add mclBn_getFpByteSize
-rw-r--r-- | include/mcl/bn.h | 4 | ||||
-rw-r--r-- | include/mcl/impl/bn_c_impl.hpp | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/mcl/bn.h b/include/mcl/bn.h index 03756c5..c4797a5 100644 --- a/include/mcl/bn.h +++ b/include/mcl/bn.h @@ -156,6 +156,10 @@ MCLBN_DLL_API int mclBn_getG1ByteSize(void); return bytes for serialized Fr */ MCLBN_DLL_API int mclBn_getFrByteSize(void); +/* + return bytes for serialized Fp +*/ +MCLBN_DLL_API int mclBn_getFpByteSize(void); /* return decimal string of the order of the curve(=the characteristic of Fr) diff --git a/include/mcl/impl/bn_c_impl.hpp b/include/mcl/impl/bn_c_impl.hpp index acf096b..d043764 100644 --- a/include/mcl/impl/bn_c_impl.hpp +++ b/include/mcl/impl/bn_c_impl.hpp @@ -77,7 +77,7 @@ int mclBn_getOpUnitSize() int mclBn_getG1ByteSize() { - return (int)Fp::getByteSize(); + return mclBn_getFpByteSize(); } int mclBn_getFrByteSize() @@ -85,6 +85,11 @@ int mclBn_getFrByteSize() return (int)Fr::getByteSize(); } +int mclBn_getFpByteSize() +{ + return (int)Fp::getByteSize(); +} + mclSize mclBn_getCurveOrder(char *buf, mclSize maxBufSize) { return Fr::getModulo(buf, maxBufSize); |