aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--readme.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/readme.md b/readme.md
index a4b28de..e11f981 100644
--- a/readme.md
+++ b/readme.md
@@ -59,13 +59,13 @@ void SecretKey::getPublicKey(PublicKey& pub) const;
Get public key `sQ` for the secret key `s`.
```
-void SecretKey::sign(Sign& sign, const std::string& m) const
+void SecretKey::sign(Sign& sign, const std::string& m) const;
```
Make sign `s H(m)` from message m.
```
-bool Sign::verify(const PublicKey& pub, const std::string& m) const
+bool Sign::verify(const PublicKey& pub, const std::string& m) const;
```
Verify sign with pub and m and return true if it is valid.
@@ -77,14 +77,14 @@ e(sQ, H(m)) == e(Q, s H(m))
### Secret Sharing API
```
-void SecretKey::getMasterSecretKey(SecretKeyVec& msk, int k) const
+void SecretKey::getMasterSecretKey(SecretKeyVec& msk, size_t k) const;
```
Prepare k-out-of-n secret sharing for the secret key.
`msk[0]` is the original secret key `s` and `msk[i]` for i > 0 are random secret key.
```
-void SecretKey::set(const SecretKeyVec& msk, int id)
+void SecretKey::set(const SecretKeyVec& msk, const Id& id);
```
Make secret key f(id) from msk and id where f(x) = msk[0] + msk[1] x + ... + msk[k-1] x^{k-1}.
@@ -92,21 +92,21 @@ Make secret key f(id) from msk and id where f(x) = msk[0] + msk[1] x + ... + msk
You can make a public key `f(id)Q` from each secret key f(id) for id != 0 and sign a message.
```
-void Sign::recover(const SignVec& signVec);
+void Sign::recover(const SignVec& signVec, const IdVec& idVec);
```
-Collect k sign `f(id) H(m)` for a message m and recover the original signature `s H(m)` for the secret key `s`.
+Collect k pair of sign `f(id) H(m)` and `id` for a message m and recover the original signature `s H(m)` for the secret key `s`.
### PoP (Proof of Possesion)
```
-void SecretKey::getPop(Sign& pop, const PublicKey& pub) const
+void SecretKey::getPop(Sign& pop) const;
```
-Sign pub.getStr() and make a pop `s H(sQ)`
+Sign pub and make a pop `s H(sQ)`
```
-bool Sign::verify(const PublicKey& pub) const
+bool Sign::verify(const PublicKey& pub) const;
```
Verify a public key by pop.