aboutsummaryrefslogtreecommitdiffstats
path: root/proposals/0002-hypercore.md
diff options
context:
space:
mode:
Diffstat (limited to 'proposals/0002-hypercore.md')
-rw-r--r--proposals/0002-hypercore.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/proposals/0002-hypercore.md b/proposals/0002-hypercore.md
index 5469cbb..e5b562c 100644
--- a/proposals/0002-hypercore.md
+++ b/proposals/0002-hypercore.md
@@ -283,6 +283,16 @@ function root_hash (roots) {
return blake2b(buffers)
}
+
+function sign (roots, secretKey) {
+ var hash = root_hash(roots)
+
+ return ed25519.detached.sign(hash, secretKey)
+}
+
+function verify (hash, signature, publicKey) {
+ return ed25519.detached.verify(hash, signature, publicKey)
+}
```
# Parameters