0.1.2 • Published 5 years ago

balkans v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

OpenBalkans

Internet Balkanization Appliance Creation Kit

Overview

Internet Balkanization Appliance (IBA) is an implementation of the OpenBalkans protocol, which can manifest as a website, a standalone application, or an actual physical appliance (although there are no known instances of this yet).

From the user's perspective, an IBA is a collection of weblogs. A weblog is a series of posts. Conceptually this is similar to Mastodon, but decentralized (as opposed to federated).

This document describes the OpenBalkans protocol (OpenBP) version 0.

API documentation

Posts

Container: JSON Web Token (JWT)

Signing: ECDSA using P-256 curve, and SHA-256 (ES256)

  • NIST P-256 ≡ ANSI prime256v1 ≡ SEC 2 secp256r1
    • This is not confusing at all
  • Requires RFC 6979
  • Upgrade path: see SafeCurves

Key derivation function (KDF): WarpWallet

ASCII Armor

  • Post key: Base58
  • Other binary data: RFC 4648 base64url with no padding

Post types

Post types are a strict superset of RFC 2046 Media Types.

Data structure

NameTypeRequiredComment
openbpintYesOpenBalkans protocol version, 0
pkstringYesPost key
docslistYesOne or more hyperlinks to contents
sizeintYesSize of contents, bytes
typestringYesContent-Type, Media Type(contents)
chkstringYesChecksum, SHA-256(contents), base64url encoded
relsetNoRelational tags
otherobjectNoReply to other post
other.pkstringYesOther post key (In-Reply-To)
other.chkstringYesChecksum, SHA-256(other post's JWT), base64url encoded

Post key

Post key is a concatenation of the following fields:

  • Base58(ObjectId)
  • U+002E FULL STOP
  • Base58(public key)

We use Satoshi's variant of Base58.

Post keys are considered to be globally unique. Any collisions should be treated as a flood attack.

Hyperlinks

Links in the docs field can be the following:

  • HTTP(S) URL
  • RFC 2397 Data URL
  • RFC 6901 JSON Pointer
    "": "jsonpointer",
    "url": "https://httpbin.org/headers",
    "pointer": "/headers/User-Agent"

Relational tags

RelTypeComment
collectionapplication/jsonCollection of posts
selfapplication/ld+jsonUser profile
self, userpicimage/jpeg, image/pngUser profile picture
upd_pkapplication/octet-streamUpdated public key

User Profiles

Posts with 'self' in the rel field are associated with the user account, and aren't a part of any content feed.

A user profile is a JSON-LD post of @type Person.