Skip to content

Commit

Permalink
fix: Fix description of authorization of Hedera account (#974)
Browse files Browse the repository at this point in the history
Signed-off-by: David S Bakin <[email protected]>
Signed-off-by: Michael Garber <[email protected]>
Co-authored-by: Michael Garber <[email protected]>
  • Loading branch information
david-bakin-sl and mgarbs authored May 22, 2024
1 parent 675ace8 commit 0810485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HIP/hip-632.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ status: Accepted
last-call-date-time: 2023-01-10T07:00:00Z
created: 2022-11-28
discussions-to: https://github.com/hashgraph/hedera-improvement-proposal/discussions/638
updated: 2022-12-13, 2022-12-20, 2023-01-03, 2023-01-18
updated: 2024-05-22
requires: 631
---

Expand Down Expand Up @@ -63,7 +63,7 @@ This function is similar to using the ECRECOVER precompile function. Ethereum u
* If true, extract v, r and s and run ECRECOVER(messageHash, v, r, s) and determine if the result matches any of the virtual address on the account. Return true if any matching address is found if given a Hedera Account ID. If given an Ethereum address, the recovered address must match the given address.
3. If length of signatureBlob is 64 bytes in length
* Retrieve the Hedera address. Determine if there is a single key associated with the Hedera Accound ID. If not return false.
* If there is a single key, sign the messageHash and return true if the signature matches the signatureBlob.
* If there is a single key, verify that the signature (the signatureBlob) signs the message hash and is attested by the account.

### `isAuthorized(address, messageHash, signatureBlob)` Function Usage
This function is used for Hedera account (non Ethereum) signature validation. It handles the more complex signature types which are available with Hedera accounts. One or more signatures will be encoded in protobuf format into the signatureBlob. The precompile function will look up the keys for the account and determine if the signatures passed in via the signatureBlob satisfy the signing requirements for the account. For example, if the account has a threshhold key of needing 3 out of 4 signatures,the precompile function will sign the messageHash with each key on the account and determine if at least 3 signatures in the signatureBlob matches.
Expand Down

0 comments on commit 0810485

Please sign in to comment.