From be54124ccf649ace15ef0f90dbf04f01fab8ac3c Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Thu, 13 Sep 2018 05:23:28 +0900 Subject: add bls*Sub functions --- src/bls_c.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/bls_c.cpp b/src/bls_c.cpp index 06a5b0a..75e5a44 100644 --- a/src/bls_c.cpp +++ b/src/bls_c.cpp @@ -267,6 +267,20 @@ int blsPublicKeyIsValidOrder(const blsPublicKey *pub) } #ifndef BLS_MINIMUM_API +void blsSecretKeySub(blsSecretKey *sec, const blsSecretKey *rhs) +{ + mclBnFr_sub(&sec->v, &sec->v, &rhs->v); +} + +void blsPublicKeySub(blsPublicKey *pub, const blsPublicKey *rhs) +{ + mclBnG2_sub(&pub->v, &pub->v, &rhs->v); +} + +void blsSignatureSub(blsSignature *sig, const blsSignature *rhs) +{ + mclBnG1_sub(&sig->v, &sig->v, &rhs->v); +} mclSize blsGetOpUnitSize() // FpUint64Size { return Fp::getUnitSize() * sizeof(mcl::fp::Unit) / sizeof(uint64_t); -- cgit v1.2.3