This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
change behavior of recover_key to better support variable length keys #7853
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arhag
reviewed
Sep 5, 2019
…patible with webauthn signatures and keys. This is a WIP as we can now do some better testing for webauthn semantics but it needs cleaned up. This also fixes a compilation bug introduced by accident into the test contracts
…ry support to fix integration issues caused by wrappers
I ended up re-enabling and fixing the rest of the api tests for the crypto api. Mostly this reverted it back to a pre eosiolib-wrapper form which I think is more appropriate for testing the intrinsic ABI as it removes obfuscating elements. |
arhag
suggested changes
Sep 12, 2019
payload_ds.write(sigs.data(), sigs.size()); | ||
payload.resize(payload_ds.tellp()); | ||
|
||
//No Error Here |
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.
There doesn't seem to be a need for this comment. (Same goes for the other two similar comments above. In fact, the one called "Error Here" is misleading because it is directly above a call to an action that is supposed to, and does in fact, succeed.)
arhag
approved these changes
Sep 13, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Description
#7421 introduced support for WebAuthN keys in the
recover_keys
intrinsic. As both keys and signatures for WebAuthN are not fixed length actually using this intrinsic was difficult owing to the semantics where:This change attempts to modify the semantics in a way that is most backwards compatible with the existing semantics.
For the K1 and R1 suites the semantics are the same.
For WebAuthN, the semantics are:
This allows contract developers to have a reasonable buffer size for a single-call use case and fall back to allocating a larger, correctly sized, buffer if and only if that fails.
Outstanding work
Unit tests for the behavior which depends on EOSIO.CDT integration of the variable length key/signature types.turns out this was implementable without requiring CDT changes.Consensus Changes
API Changes
Documentation Additions