diff options
Diffstat (limited to 'ffi/go/bls/mcl.go')
-rw-r--r-- | ffi/go/bls/mcl.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ffi/go/bls/mcl.go b/ffi/go/bls/mcl.go index 9771201..776536f 100644 --- a/ffi/go/bls/mcl.go +++ b/ffi/go/bls/mcl.go @@ -1,7 +1,9 @@ package bls /* -#cgo CFLAGS:-DMCLBN_FP_UNIT_SIZE=6 +#cgo bn256 CFLAGS:-DMCLBN_FP_UNIT_SIZE=4 +#cgo bn384 CFLAGS:-DMCLBN_FP_UNIT_SIZE=6 +#cgo bn384_256 CFLAGS:-DMCLBN_FP_UNIT_SIZE=6 -DMCLBN_FR_UNIT_SIZE=4 #include <mcl/bn.h> */ import "C" @@ -23,6 +25,17 @@ const BLS12_381 = C.MCL_BLS12_381 // IoSerializeHexStr const IoSerializeHexStr = C.MCLBN_IO_SERIALIZE_HEX_STR +// GetFrUnitSize() -- +func GetFrUnitSize() int { + return int(C.MCLBN_FR_UNIT_SIZE) +} + +// GetFpUnitSize() -- +// same as GetMaxOpUnitSize() +func GetFpUnitSize() int { + return int(C.MCLBN_FP_UNIT_SIZE) +} + // GetMaxOpUnitSize -- func GetMaxOpUnitSize() int { return int(C.MCLBN_FP_UNIT_SIZE) |