0.0.0 • Published 4 years ago

opb v0.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

OpenBalkans

OpenBalkans is a document annotation protocol for web of documents.

Cryptography

  • Signatures: Ed25519
  • Key derivation function (KDF): WarpWallet
  • Content addressing: SHA-512/256

Libraries

Data structure

  • Container: BSON
  • Media Type: application/x.bson

Data types

Node.jsPython 3C
Bufferbytesuint8_t[]
numberintint32_t

EncodedPost

EncodedPost = concat(bson_encode(Post), bson_encode(Signature))

EncodedPostRef

EncodedPostRef = bson_encode(PostRef)

Post

FieldTypeRequiredŠto
PvnumberYesProtocol version
IdObjectIdYesObjectId
ConDocument[]YesContents
SznumberYesSize, octets (Content-Length)
TypstringYesRFC 6838 Media Type (Content-Type)
EncstringNoEncoding (Content-Encoding)
HasBufferYesSHA-512/256(Contents)
RePostRefNoReply to a post (In-Reply-To)
UpdPostRefNoUpdate a post

Post Encoding

EncodingŠto
BroRFC 7932 Brotli

Encoding has higher precedence than size and SHA-512/256.

That is, Sz = length(brotli_compress(Contents))

Signature

FieldTypeRequiredŠto
PkBufferYesPublic key
EdBufferYesEd25519 signature

Document

FieldTypeRequiredŠto
LdstringYesLoader

Document Ld=Buf

FieldTypeRequiredŠto
BufBufferYesContents

Document Ld=Web

FieldTypeRequiredŠto
WebstringYesWeb address (http¦https)

Don't use RFC 2397 Data URLs.

Document Ld=JSON

FieldTypeRequiredŠto
WebstringYesWeb address (http¦https)
Refstring[]YesReference tokens

Ref is a RFC 6901 JSON Pointer sequence with no ~encoding.

PostRef

FieldTypeRequiredŠto
PkBufferYesPublic key
HasBufferYesSHA-512/256(EncodedPost)