-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
User Addresses are hashes of Public Keys #475
Conversation
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!
@@ -4,7 +4,6 @@ on: | |||
push: | |||
branches: [ main, extensions ] | |||
pull_request: | |||
branches: [ main, extensions ] |
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.
What's this change for?
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.
This filtered the target branches that would trigger a CI run on a PR.
8ced661
to
fc7a5b6
Compare
abb5e48
to
525dfbd
Compare
Opened #481 for leftovers |
This advances #318.
Main changes:
base_types
to a separatecrypto
file.AuthoritySignature
, which is just an alias of the formerSignature
type.SuiAddress
(hashes of userPublicKey
s) andPublicKey
, authorities only manipulate and concern themselves with the later.Signature
type is introduced:Signer
producing a certain type of signature into one that appends the bytes of the public key after the signature, for all reasonable signers,impl signer::Signer<AuthoritySignature>
for ourKeyPair
type with animpl signer::Signer<Signature>
,check
) of this new userSignature
type now takes aSuiAddress
argumentcheck
also checks thePublicKey
indeed hashes to the expectedSuiAddress
passed as an argument.SuiAddress
type is a 32-byte arrayPublicKey
using SHA3-256 into a 32-byte array,Possible Follow-ups
Signature
toUserSignature
get_key_pair
intorandom_user_keypair
which returns(SuiAddress, KeyPair)
, andrandom_authority_keypair
which returns(PublicKeyBytes, KeyPair)
,Ancillary changes
for <'a> TryFrom<&'a [u8]>
rather thanVec<u8>