-
Notifications
You must be signed in to change notification settings - Fork 94
Home
All text fields are UTF-8 and padded with " "
if shorter than the max length. All protocol data is always versioned, timestamped and signed in its entirety by your private key. For version 1, all data after the version byte is compressed with zlib before being sent over the wire.
All data packets follow this format:
[[version=1][timestamp=8][sender_public_key=32][data=n]][signature=64]
signature = sign(version + timestamp + sender_public_key + data, sender_private_key)
-
version
: Spec version, 1 byte -
timestamp
: Current 64-bit Unix timestamp, 8 bytes -
signature
: 512-bit Ed25519 signature, 64 bytes -
sender_public_key
: Your 256-bit Ed25519 public key, 32 bytes -
sender_private_key
: Your 512-bit Ed25519 private key, 64 bytes
-
display_name
: desired nickname, 35 bytes
-
message
: UTF-8 message body, 140 bytes -
reply_signature
:signature
of message you're replying to, 64 bytes
Your identity is revealed on the first read to the identity characteristic. Subsequent reads give other people's identities signed by your own.
[[version=1][timestamp=8][sender_public_key=32][display_name=35]][signature=64]
[[version=1][timestamp=8][sender_public_key=32][others_identity=140]][signature=64]
If message is less than 140 characters, pad with " "
. Messages without a reply can pad reply_signature
with null bytes.
[[message=140][timestamp=8][reply_signature=64]][signature=64]
signature = sign(display_name + timestamp + reply_signature)
[[message=140][timestamp=8][original_signature=64]][signature=64][public_key=32]
TBD