-
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.
Changes the spec to ensure public keys are user data.
- Loading branch information
Wes Biggs
committed
Apr 11, 2024
1 parent
e1447f1
commit 5aab13a
Showing
5 changed files
with
55 additions
and
12 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
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 | | ||
| --- | --- | --- | | ||
| `publicKey_keyAgreement` | `x25519-pub` | A Curve25519 public key that can be used in key exchange protocols to generate a shared secret | | ||
| `publicKey_assertionMethod` | `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