aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--go/bls/bls.go2
-rw-r--r--include/bls.hpp1
-rw-r--r--include/bls_if.h5
3 files changed, 8 insertions, 0 deletions
diff --git a/go/bls/bls.go b/go/bls/bls.go
index 6aba00b..f4faf92 100644
--- a/go/bls/bls.go
+++ b/go/bls/bls.go
@@ -21,6 +21,8 @@ const CurveFp382_1 = 1
const CurveFp382_2 = 2
// Init --
+// call this function before calling all the other operations
+// this function is not thread safe
func Init(curve int) {
C.blsInit(C.int(curve), C.BLS_MAX_OP_UNIT_SIZE)
}
diff --git a/include/bls.hpp b/include/bls.hpp
index 689d1c9..5cb4471 100644
--- a/include/bls.hpp
+++ b/include/bls.hpp
@@ -52,6 +52,7 @@ struct Id;
call this once before using the other method
@param curve [in] type of curve
@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);
size_t getOpUnitSize();
diff --git a/include/bls_if.h b/include/bls_if.h
index 37b755f..2eb8f1b 100644
--- a/include/bls_if.h
+++ b/include/bls_if.h
@@ -43,6 +43,11 @@ typedef struct {
uint64_t buf[BLS_MAX_OP_UNIT_SIZE * 3];
} blsSign;
+/*
+ initialize this library
+ call this once before using the other method
+ @note init() is not thread safe
+*/
void blsInit(int curve, int maxUnitSize);
size_t blsGetOpUnitSize(void);
// return strlen(buf) if success else 0