aboutsummaryrefslogtreecommitdiffstats
path: root/src/bls.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-08-13 14:11:14 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-08-13 14:11:14 +0800
commitf25b779d48f3682a03a001f8ce0386eebd43de68 (patch)
treea95fec80bd35fcbd927ccd14659b40b3a5db7b98 /src/bls.cpp
parent56dd66510ebc611f8befbd5b22cb061616756491 (diff)
downloaddexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar
dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar.gz
dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar.bz2
dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar.lz
dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar.xz
dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar.zst
dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.zip
add getG1/FrByteSize
Diffstat (limited to 'src/bls.cpp')
-rw-r--r--src/bls.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bls.cpp b/src/bls.cpp
index 5bfb744..d83b259 100644
--- a/src/bls.cpp
+++ b/src/bls.cpp
@@ -7,6 +7,7 @@
#include <cybozu/crypto.hpp>
#include <vector>
#include <string>
+#define MCLBN_NO_AUTOLINK
#include <bls/bls.hpp>
#if MCLBN_FP_UNIT_SIZE == 4
#include <mcl/bn256.hpp>
@@ -206,6 +207,16 @@ void getFieldOrder(std::string& str)
Fp::getModulo(str);
}
+int getG1ByteSize()
+{
+ return (int)Fp::getByteSize();
+}
+
+int getFrByteSize()
+{
+ return (int)Fr::getByteSize();
+}
+
Id::Id(unsigned int id)
{
getInner().v = id;