aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-06-14 05:55:51 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-06-14 05:55:51 +0800
commitf84c000e102ed889a607a63819e305798359418a (patch)
tree1e62d4f6cf93399d03bca29bc5dfd4de6324617a /src
parent4bd6d96b71964c06fa710e591ee96e8c0282c1a9 (diff)
downloaddexon-bls-f84c000e102ed889a607a63819e305798359418a.tar
dexon-bls-f84c000e102ed889a607a63819e305798359418a.tar.gz
dexon-bls-f84c000e102ed889a607a63819e305798359418a.tar.bz2
dexon-bls-f84c000e102ed889a607a63819e305798359418a.tar.lz
dexon-bls-f84c000e102ed889a607a63819e305798359418a.tar.xz
dexon-bls-f84c000e102ed889a607a63819e305798359418a.tar.zst
dexon-bls-f84c000e102ed889a607a63819e305798359418a.zip
add blsDHKeyExchange
Diffstat (limited to 'src')
-rw-r--r--src/bls_c.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bls_c.cpp b/src/bls_c.cpp
index 27cf226..64ff5bc 100644
--- a/src/bls_c.cpp
+++ b/src/bls_c.cpp
@@ -391,3 +391,8 @@ size_t blsSignatureGetHexStr(char *buf, size_t maxBufSize, const blsSignature *s
{
return mclBnG1_getStr(buf, maxBufSize, &sig->v, 16);
}
+void blsDHKeyExchange(blsPublicKey *out, const blsSecretKey *sec, const blsPublicKey *pub)
+{
+ mclBnG2_mul(&out->v, &pub->v, &sec->v);
+}
+