[Ceres]: Allow arbitrary sized message in Crypto.verify_sig (#481)

* Allow arbitrary sized msg in signature verification

* Move Address.to_bytes documentation to correct place
This commit is contained in:
Hans Svensson
2023-08-24 16:14:40 +02:00
parent 108cb1f948
commit 78b758c337
4 changed files with 15 additions and 12 deletions
+11 -10
View File
@@ -57,6 +57,12 @@ Address.to_str(a : address) : string
Base58 encoded string
#### to_bytes
```
Address.to_bytes(a : address) : bytes(32)
```
The binary representation of the address.
#### is_contract
```
@@ -564,14 +570,6 @@ Chain.block_height : int"
The height of the current block (i.e. the block in which the current call will be included).
#### to_bytes
```
Address.to_bytes(a : address) : bytes(32)
```
The binary representation of the address.
##### bytecode_hash
```
Chain.bytecode_hash : 'c => option(hash)
@@ -834,11 +832,14 @@ Hash any object to blake2b
#### verify_sig
```
Crypto.verify_sig(msg : hash, pubkey : address, sig : signature) : bool
Crypto.verify_sig(msg : bytes(), pubkey : address, sig : signature) : bool
```
Checks if the signature of `msg` was made using private key corresponding to
the `pubkey`
the `pubkey`.
Note: before v8 of the compiler, `msg` had type `hash` (i.e. `bytes(32)`).
#### ecverify_secp256k1
```