-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DIP-263 Use User Data for Public Keys (#276)
Problem ======= See #263 Solution ======== - Moved old Public Key Announcement to "Migrated Announcements". - Added Avro type PublicKey. - Updated User Data section to define key agreement and assertion method key types. --------- Co-authored-by: Wes Biggs <wes.biggs@amplica.io>
- Loading branch information
Showing
10 changed files
with
79 additions
and
37 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Public Key | ||
|
||
Represents an encoding of a public key, one half of a cryptographic key pair. | ||
|
||
## Serialization | ||
|
||
PublicKey object serialization MUST conform to the following [Avro](https://avro.apache.org) schema: | ||
|
||
``` | ||
{ | ||
"namespace": "org.dsnp", | ||
"name": "PublicKey", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "publicKey", | ||
"type": "bytes", | ||
"doc": "Multicodec public key" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Generation | ||
|
||
### publicKey | ||
|
||
- MUST be a public key of an allowed key type for the associated User Data type, encoded in `multicodec` format | ||
|
||
The byte encoding consists of a [multicodec](https://github.com/multiformats/multicodec/blob/master/table.csv) key identifier (as a varint) followed by the public key's binary data in the codec's described format. | ||
|
||
#### Allowed Key Types | ||
|
||
| User Data Type | Allowed Algorithms ([multicodec](https://github.com/multiformats/multicodec/blob/master/table.csv)) | Purpose | | ||
| --- | --- | --- | | ||
| `keyAgreementPublicKeys` | `x25519-pub` | A Curve25519 public key that can be used in key exchange protocols to generate a shared secret | | ||
| `assertionMethodPublicKeys` | `ed25519-pub` | A public key for the EdDSA signature scheme using SHA-512 and Curve25519 that can be used to verify cryptographic signatures | |
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
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
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
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
Oops, something went wrong.