Skip to content

Commit

Permalink
Merge pull request #1271 from ACStoneCL/1270_PublicKey_System_Update
Browse files Browse the repository at this point in the history
PublicKey Updates
  • Loading branch information
ACStone-MTS authored Sep 8, 2023
2 parents 6e4941e + c9d822c commit 227d56c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/docs/casper/concepts/hash-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For the sake of user convenience and compatibility, we expect the delivery of ha

## Hash and Key Explanations {#hash-and-key-explanations}

`PublicKey` is a 32 byte asymmetric public key, preceded by a one-byte prefix that tells whether the key is `ed25519` or `secp256k1`.
`PublicKey` is a 32 byte asymmetric public key, preceded by a one-byte prefix that tells whether the key is `ed25519` or `secp256k1`. There is a third type of `PublicKey` that refers to the system and it is a single `00`.

`AccountHash` is a 32 byte hash of the `PublicKey` serving to identify user accounts.

Expand Down
1 change: 1 addition & 0 deletions source/docs/casper/concepts/serialization-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ A `Map` serializes as a list of key-value tuples. There must be a well-defined o

`PublicKey` serializes as a single byte tag representing the algorithm followed by 32 bytes of the `PublicKey` itself:

- If the `PublicKey` is a `System` key, the single tag byte is `0`. With this variant, the single byte of `0` is the entire key.
- If the `PublicKey` is an `Ed25519` key, the single tag byte is `1` followed by the individual bytes of the serialized key.
- If the `PublicKey` is a `Secp256k1` key, the single tag byte is a `2` followed by the individual bytes of the serialized key.

Expand Down

0 comments on commit 227d56c

Please sign in to comment.