diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-09-13 04:23:28 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-09-13 04:23:28 +0800 |
commit | be54124ccf649ace15ef0f90dbf04f01fab8ac3c (patch) | |
tree | 2c483ec9d8e0c2d1b4ba00ffcf456d5dbb9d79b6 /src | |
parent | 33bee1b86a6b28ec543c96faecfbbc194552c0d6 (diff) | |
download | dexon-bls-be54124ccf649ace15ef0f90dbf04f01fab8ac3c.tar dexon-bls-be54124ccf649ace15ef0f90dbf04f01fab8ac3c.tar.gz dexon-bls-be54124ccf649ace15ef0f90dbf04f01fab8ac3c.tar.bz2 dexon-bls-be54124ccf649ace15ef0f90dbf04f01fab8ac3c.tar.lz dexon-bls-be54124ccf649ace15ef0f90dbf04f01fab8ac3c.tar.xz dexon-bls-be54124ccf649ace15ef0f90dbf04f01fab8ac3c.tar.zst dexon-bls-be54124ccf649ace15ef0f90dbf04f01fab8ac3c.zip |
add bls*Sub functions
Diffstat (limited to 'src')
-rw-r--r-- | src/bls_c.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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); |