-
Notifications
You must be signed in to change notification settings - Fork 29
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
contracts: implement HMAC SHA512-256, as it's used throughout the Oasis ecosystem #439
contracts: implement HMAC SHA512-256, as it's used throughout the Oasis ecosystem #439
Conversation
✅ Deploy Preview for oasisprotocol-sapphire-paratime canceled.
|
ccbed9c
to
2b220d3
Compare
2b220d3
to
92b3606
Compare
@matevz I forgot to run For clarity, which style do you prefer: diff --git a/contracts/contracts/HMAC_sha512_256.sol b/contracts/contracts/HMAC_sha512_256.sol
index 119f907..06becfc 100644
--- a/contracts/contracts/HMAC_sha512_256.sol
+++ b/contracts/contracts/HMAC_sha512_256.sol
@@ -51,12 +51,12 @@ function HMAC_sha512_256(bytes memory key, bytes memory message)
let size := mload(key)
// Call the identity precompile to copy memory
success := staticcall(
- gas(), // Forward all available gas
- PRECOMPILE_IDENTITY_ADDRESS, // Address of the identity precompile
- add(32, key), // Start of the key data (skip the length prefix)
- size, // Length of data to copy
- buf, // Destination to copy to
- size // Amount of memory to copy
+ gas(), // Forward all available gas
+ PRECOMPILE_IDENTITY_ADDRESS, // Address of the identity precompile
+ add(32, key), // Start of the key data (skip the length prefix)
+ size, // Length of data to copy
+ buf, // Destination to copy to
+ size // Amount of memory to copy
)
}
|
Don't think it's a good idea to merge if there have been changes since the last review
The auth tests are still causing intermittent failures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments are too verbose IMO. Otherwise looks good.
2d23aac
to
3433438
Compare
SIWE auth tests are still intermittently failing |
I think I found the issue #443. Will fix it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
3433438
to
60ec07d
Compare
…edarMist/1-of-many-PRs-for-matevz-HMAC-SHA512-256 contracts: implement HMAC SHA512-256, as it's used throughout the Oasis ecosystem 77c1abe
…darMist/1-of-many-PRs-for-matevz-HMAC-SHA512-256 contracts: implement HMAC SHA512-256, as it's used throughout the Oasis ecosystem 77c1abe
No description provided.