aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bls.cpp11
-rw-r--r--src/bls_c.cpp10
2 files changed, 21 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;
diff --git a/src/bls_c.cpp b/src/bls_c.cpp
index d983ff2..5ea665c 100644
--- a/src/bls_c.cpp
+++ b/src/bls_c.cpp
@@ -240,6 +240,16 @@ int blsGetFieldOrder(char *buf, mclSize maxBufSize)
return (int)Fp::getModulo(buf, maxBufSize);
}
+int blsGetG1ByteSize()
+{
+ return mclBn_getG1ByteSize();
+}
+
+int blsGetFrByteSize()
+{
+ return mclBn_getFrByteSize();
+}
+
void blsGetGeneratorOfG2(blsPublicKey *pub)
{
*(G2*)pub = getQ();