aboutsummaryrefslogtreecommitdiffstats
path: root/include/bls_if.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/bls_if.h')
-rw-r--r--include/bls_if.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/bls_if.h b/include/bls_if.h
index d02d325..194d14f 100644
--- a/include/bls_if.h
+++ b/include/bls_if.h
@@ -6,6 +6,9 @@
@license modified new BSD license
http://opensource.org/licenses/BSD-3-Clause
*/
+#ifndef BLS_MAX_OP_UNIT_SIZE
+ #error "define BLS_MAX_OP_UNIT_SIZE 4(or 6)"
+#endif
#include <stdint.h> // for uint64_t, uint8_t
#include <stdlib.h> // for size_t
@@ -25,22 +28,22 @@ enum {
};
typedef struct {
- uint64_t buf[6];
+ uint64_t buf[BLS_MAX_OP_UNIT_SIZE];
} blsId;
typedef struct {
- uint64_t buf[6];
+ uint64_t buf[BLS_MAX_OP_UNIT_SIZE];
} blsSecretKey;
typedef struct {
- uint64_t buf[6 * 2 * 3];
+ uint64_t buf[BLS_MAX_OP_UNIT_SIZE * 2 * 3];
} blsPublicKey;
typedef struct {
- uint64_t buf[6 * 3];
+ uint64_t buf[BLS_MAX_OP_UNIT_SIZE * 3];
} blsSign;
-void blsInit(int curve);
+void blsInit(int curve, int maxUnitSize);
blsId *blsIdCreate(void);
void blsIdDestroy(blsId *id);