This repository has been archived by the owner on Sep 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// Copyright 2022 Anysphere, Inc. | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
// | ||
|
||
/* | ||
identifier.proto contains the protobuf for the public identifier. | ||
this schema should be kept backwards-compatible at all costs. | ||
*/ | ||
|
||
syntax = "proto3"; | ||
|
||
package asphrclient; | ||
|
||
// We want the identifier to contain as little information as possible, but still | ||
// enough such that it can be used both for the one-way asynchronous friend adding method (which requires | ||
// a public-key crypto public key) as well as the two-way friend adding method (which requires | ||
// a key-exchange public key). We also include the index allocation. | ||
// | ||
// The string-based public ID takes the following format: | ||
// | ||
// [public-id] = base58(bytes(PublicID) || checksum(bytes(PublicID))) | ||
// | ||
// In public, it is always displayed in link format: | ||
// | ||
// [public-id-link] = anysphere.id/#[public-id] | ||
// | ||
message PublicID { | ||
// index is the database index of the person. | ||
// if, in the future, a person has access to several indices, this is the index that is used | ||
// in the friend-adding process. two people who can already communicate may tell each other about | ||
// other indices. this is just for bootstrapping. | ||
uint32 index = 1; | ||
// the public-key crypto public key, used for handling friend requests. | ||
bytes friend_request_public_key = 2; | ||
// the key-exchange public key, used for adding a friend in the two-way situation. | ||
bytes kx_public_key = 3; | ||
} |