Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix description of authorization of Hedera account #974

Merged
merged 2 commits into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading