Change ecverify into verify_sig and then add an actual ecverify

This commit is contained in:
Hans Svensson
2019-08-21 09:29:40 +02:00
parent 73b9a54172
commit ebdd38c505
7 changed files with 58 additions and 48 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ contract BasicAuth =
put(state{ nonce = n + 1 })
switch(Auth.tx_hash)
None => abort("Not in Auth context")
Some(tx_hash) => Crypto.ecverify(to_sign(tx_hash, n), state.owner, s)
Some(tx_hash) => Crypto.verify_sig(to_sign(tx_hash, n), state.owner, s)
entrypoint to_sign(h : hash, n : int) =
Crypto.blake2b((h, n))