Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Commit

Permalink
add identifier.proto
Browse files Browse the repository at this point in the history
  • Loading branch information
arvid220u committed Jun 24, 2022
1 parent 1b0185f commit b9ff920
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions schema/identifier.proto
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;
}

0 comments on commit b9ff920

Please sign in to comment.