aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-09-13 04:23:28 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-09-13 04:23:28 +0800
commitbe54124ccf649ace15ef0f90dbf04f01fab8ac3c (patch)
tree2c483ec9d8e0c2d1b4ba00ffcf456d5dbb9d79b6 /src
parent33bee1b86a6b28ec543c96faecfbbc194552c0d6 (diff)
downloaddexon-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.cpp14
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);