├── CNAME ├── .gitignore ├── docs ├── icon96.png ├── protocol │ ├── img │ │ ├── impl.png │ │ ├── logo.png │ │ ├── arrow.png │ │ ├── impl16.png │ │ ├── columns.png │ │ ├── favicon.png │ │ ├── key_big_n.png │ │ ├── palette.png │ │ ├── sigchain.png │ │ ├── blobs_fetch.png │ │ ├── rpc_header.png │ │ ├── client_hello.png │ │ ├── follow_graph.png │ │ ├── format_blob_id.png │ │ ├── format_invite.png │ │ ├── message_flow.png │ │ ├── rpc_alignment.png │ │ ├── rpc_overview.png │ │ ├── server_accept.png │ │ ├── server_hello.png │ │ ├── starting_keys.png │ │ ├── blobs_get_slice.png │ │ ├── box_stream_send.png │ │ ├── identity_keypair.png │ │ ├── key_big_a_public.png │ │ ├── key_big_a_secret.png │ │ ├── key_big_b_public.png │ │ ├── key_big_b_secret.png │ │ ├── room_invite_uri.png │ │ ├── room_perspective.png │ │ ├── box_stream_goodbye.png │ │ ├── box_stream_overview.png │ │ ├── box_stream_params.png │ │ ├── box_stream_receive.png │ │ ├── client_authenticate.png │ │ ├── final_shared_secret.png │ │ ├── follow_perspective.png │ │ ├── format_message_id.png │ │ ├── format_public_key.png │ │ ├── key_big_a_little_b.png │ │ ├── key_little_a_big_b.png │ │ ├── key_little_a_public.png │ │ ├── key_little_b_public.png │ │ ├── metafeed-structure.png │ │ ├── format_udp_broadcast.png │ │ ├── key_little_a_little_b.png │ │ ├── private_message_decrypt.png │ │ ├── private_message_encrypt.png │ │ ├── shared_secret_derivation_1.png │ │ ├── shared_secret_derivation_2.png │ │ ├── metafeed-structure-with-feeds.png │ │ ├── private_message_starting_keys.png │ │ ├── private_message_secret_derivation.png │ │ ├── metafeed-structure-with-feeds-simplified.png │ │ ├── arrow.svg │ │ ├── room_invite_uri.svg │ │ ├── format_public_key.svg │ │ ├── format_message_id.svg │ │ ├── format_blob_id.svg │ │ ├── format_udp_broadcast.svg │ │ ├── impl.svg │ │ └── room_perspective.svg │ ├── metadata.yaml │ ├── introduction.html │ ├── discovery.html │ └── cryptography.html ├── simple.css ├── index.html └── message_types │ └── index.html ├── templates └── simple │ ├── icon96.png │ ├── simple.html │ └── simple.css ├── content ├── protocol │ ├── img │ │ ├── arrow.png │ │ ├── impl.png │ │ ├── impl16.png │ │ ├── logo.png │ │ ├── columns.png │ │ ├── favicon.png │ │ ├── palette.png │ │ ├── sigchain.png │ │ ├── blobs_fetch.png │ │ ├── key_big_n.png │ │ ├── rpc_header.png │ │ ├── client_hello.png │ │ ├── follow_graph.png │ │ ├── format_invite.png │ │ ├── message_flow.png │ │ ├── rpc_alignment.png │ │ ├── rpc_overview.png │ │ ├── server_accept.png │ │ ├── server_hello.png │ │ ├── starting_keys.png │ │ ├── blobs_get_slice.png │ │ ├── box_stream_send.png │ │ ├── format_blob_id.png │ │ ├── identity_keypair.png │ │ ├── key_big_a_public.png │ │ ├── key_big_a_secret.png │ │ ├── key_big_b_public.png │ │ ├── key_big_b_secret.png │ │ ├── room_invite_uri.png │ │ ├── room_perspective.png │ │ ├── box_stream_goodbye.png │ │ ├── box_stream_params.png │ │ ├── box_stream_receive.png │ │ ├── follow_perspective.png │ │ ├── format_message_id.png │ │ ├── format_public_key.png │ │ ├── key_big_a_little_b.png │ │ ├── key_little_a_big_b.png │ │ ├── metafeed-structure.png │ │ ├── box_stream_overview.png │ │ ├── client_authenticate.png │ │ ├── final_shared_secret.png │ │ ├── format_udp_broadcast.png │ │ ├── key_little_a_little_b.png │ │ ├── key_little_a_public.png │ │ ├── key_little_b_public.png │ │ ├── private_message_decrypt.png │ │ ├── private_message_encrypt.png │ │ ├── shared_secret_derivation_1.png │ │ ├── shared_secret_derivation_2.png │ │ ├── metafeed-structure-with-feeds.png │ │ ├── private_message_starting_keys.png │ │ ├── private_message_secret_derivation.png │ │ ├── metafeed-structure-with-feeds-simplified.png │ │ ├── arrow.svg │ │ ├── room_invite_uri.svg │ │ ├── format_public_key.svg │ │ ├── format_message_id.svg │ │ ├── format_blob_id.svg │ │ ├── format_udp_broadcast.svg │ │ └── impl.svg │ ├── configuration.toml │ ├── metadata.yaml │ ├── introduction.md │ ├── discovery.md │ └── cryptography.md ├── configuration.toml ├── specifications │ ├── configuration.toml │ └── README.md ├── message_types │ ├── configuration.toml │ ├── gathering.md │ ├── pub.md │ ├── bookclub.md │ ├── channel.md │ ├── vote.md │ ├── contact.md │ ├── post.md │ ├── private.md │ ├── more-info.md │ ├── README.md │ ├── bookclubUpdate.md │ ├── blog.md │ └── about.md └── README.md ├── scripts ├── lua │ ├── disable_floats.tex │ ├── install_dependencies.sh │ ├── README.md │ ├── execute_inline_lua.lua │ ├── fix_svg.lua │ └── fix_links.lua └── README.md ├── LICENSE ├── .gitmodules ├── README.md └── .github └── workflows └── build_documentation.yml /CNAME: -------------------------------------------------------------------------------- 1 | ssb-docs.soapdog.org -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | -------------------------------------------------------------------------------- /docs/icon96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/icon96.png -------------------------------------------------------------------------------- /docs/protocol/img/impl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/impl.png -------------------------------------------------------------------------------- /docs/protocol/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/logo.png -------------------------------------------------------------------------------- /docs/protocol/img/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/arrow.png -------------------------------------------------------------------------------- /docs/protocol/img/impl16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/impl16.png -------------------------------------------------------------------------------- /templates/simple/icon96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/templates/simple/icon96.png -------------------------------------------------------------------------------- /content/protocol/img/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/arrow.png -------------------------------------------------------------------------------- /content/protocol/img/impl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/impl.png -------------------------------------------------------------------------------- /content/protocol/img/impl16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/impl16.png -------------------------------------------------------------------------------- /content/protocol/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/logo.png -------------------------------------------------------------------------------- /docs/protocol/img/columns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/columns.png -------------------------------------------------------------------------------- /docs/protocol/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/favicon.png -------------------------------------------------------------------------------- /docs/protocol/img/key_big_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/key_big_n.png -------------------------------------------------------------------------------- /docs/protocol/img/palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/palette.png -------------------------------------------------------------------------------- /docs/protocol/img/sigchain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/sigchain.png -------------------------------------------------------------------------------- /content/protocol/img/columns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/columns.png -------------------------------------------------------------------------------- /content/protocol/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/favicon.png -------------------------------------------------------------------------------- /content/protocol/img/palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/palette.png -------------------------------------------------------------------------------- /content/protocol/img/sigchain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/sigchain.png -------------------------------------------------------------------------------- /docs/protocol/img/blobs_fetch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/blobs_fetch.png -------------------------------------------------------------------------------- /docs/protocol/img/rpc_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/rpc_header.png -------------------------------------------------------------------------------- /content/protocol/img/blobs_fetch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/blobs_fetch.png -------------------------------------------------------------------------------- /content/protocol/img/key_big_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/key_big_n.png -------------------------------------------------------------------------------- /content/protocol/img/rpc_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/rpc_header.png -------------------------------------------------------------------------------- /docs/protocol/img/client_hello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/client_hello.png -------------------------------------------------------------------------------- /docs/protocol/img/follow_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/follow_graph.png -------------------------------------------------------------------------------- /docs/protocol/img/format_blob_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/format_blob_id.png -------------------------------------------------------------------------------- /docs/protocol/img/format_invite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/format_invite.png -------------------------------------------------------------------------------- /docs/protocol/img/message_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/message_flow.png -------------------------------------------------------------------------------- /docs/protocol/img/rpc_alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/rpc_alignment.png -------------------------------------------------------------------------------- /docs/protocol/img/rpc_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/rpc_overview.png -------------------------------------------------------------------------------- /docs/protocol/img/server_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/server_accept.png -------------------------------------------------------------------------------- /docs/protocol/img/server_hello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/server_hello.png -------------------------------------------------------------------------------- /docs/protocol/img/starting_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/starting_keys.png -------------------------------------------------------------------------------- /content/protocol/img/client_hello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/client_hello.png -------------------------------------------------------------------------------- /content/protocol/img/follow_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/follow_graph.png -------------------------------------------------------------------------------- /content/protocol/img/format_invite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/format_invite.png -------------------------------------------------------------------------------- /content/protocol/img/message_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/message_flow.png -------------------------------------------------------------------------------- /content/protocol/img/rpc_alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/rpc_alignment.png -------------------------------------------------------------------------------- /content/protocol/img/rpc_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/rpc_overview.png -------------------------------------------------------------------------------- /content/protocol/img/server_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/server_accept.png -------------------------------------------------------------------------------- /content/protocol/img/server_hello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/server_hello.png -------------------------------------------------------------------------------- /content/protocol/img/starting_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/starting_keys.png -------------------------------------------------------------------------------- /docs/protocol/img/blobs_get_slice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/blobs_get_slice.png -------------------------------------------------------------------------------- /docs/protocol/img/box_stream_send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/box_stream_send.png -------------------------------------------------------------------------------- /docs/protocol/img/identity_keypair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/identity_keypair.png -------------------------------------------------------------------------------- /docs/protocol/img/key_big_a_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/key_big_a_public.png -------------------------------------------------------------------------------- /docs/protocol/img/key_big_a_secret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/key_big_a_secret.png -------------------------------------------------------------------------------- /docs/protocol/img/key_big_b_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/key_big_b_public.png -------------------------------------------------------------------------------- /docs/protocol/img/key_big_b_secret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/key_big_b_secret.png -------------------------------------------------------------------------------- /docs/protocol/img/room_invite_uri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/room_invite_uri.png -------------------------------------------------------------------------------- /docs/protocol/img/room_perspective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/room_perspective.png -------------------------------------------------------------------------------- /content/protocol/img/blobs_get_slice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/blobs_get_slice.png -------------------------------------------------------------------------------- /content/protocol/img/box_stream_send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/box_stream_send.png -------------------------------------------------------------------------------- /content/protocol/img/format_blob_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/format_blob_id.png -------------------------------------------------------------------------------- /content/protocol/img/identity_keypair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/identity_keypair.png -------------------------------------------------------------------------------- /content/protocol/img/key_big_a_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/key_big_a_public.png -------------------------------------------------------------------------------- /content/protocol/img/key_big_a_secret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/key_big_a_secret.png -------------------------------------------------------------------------------- /content/protocol/img/key_big_b_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/key_big_b_public.png -------------------------------------------------------------------------------- /content/protocol/img/key_big_b_secret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/key_big_b_secret.png -------------------------------------------------------------------------------- /content/protocol/img/room_invite_uri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/room_invite_uri.png -------------------------------------------------------------------------------- /content/protocol/img/room_perspective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/room_perspective.png -------------------------------------------------------------------------------- /docs/protocol/img/box_stream_goodbye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/box_stream_goodbye.png -------------------------------------------------------------------------------- /docs/protocol/img/box_stream_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/box_stream_overview.png -------------------------------------------------------------------------------- /docs/protocol/img/box_stream_params.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/box_stream_params.png -------------------------------------------------------------------------------- /docs/protocol/img/box_stream_receive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/box_stream_receive.png -------------------------------------------------------------------------------- /docs/protocol/img/client_authenticate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/client_authenticate.png -------------------------------------------------------------------------------- /docs/protocol/img/final_shared_secret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/final_shared_secret.png -------------------------------------------------------------------------------- /docs/protocol/img/follow_perspective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/follow_perspective.png -------------------------------------------------------------------------------- /docs/protocol/img/format_message_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/format_message_id.png -------------------------------------------------------------------------------- /docs/protocol/img/format_public_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/format_public_key.png -------------------------------------------------------------------------------- /docs/protocol/img/key_big_a_little_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/key_big_a_little_b.png -------------------------------------------------------------------------------- /docs/protocol/img/key_little_a_big_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/key_little_a_big_b.png -------------------------------------------------------------------------------- /docs/protocol/img/key_little_a_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/key_little_a_public.png -------------------------------------------------------------------------------- /docs/protocol/img/key_little_b_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/key_little_b_public.png -------------------------------------------------------------------------------- /docs/protocol/img/metafeed-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/metafeed-structure.png -------------------------------------------------------------------------------- /content/protocol/img/box_stream_goodbye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/box_stream_goodbye.png -------------------------------------------------------------------------------- /content/protocol/img/box_stream_params.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/box_stream_params.png -------------------------------------------------------------------------------- /content/protocol/img/box_stream_receive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/box_stream_receive.png -------------------------------------------------------------------------------- /content/protocol/img/follow_perspective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/follow_perspective.png -------------------------------------------------------------------------------- /content/protocol/img/format_message_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/format_message_id.png -------------------------------------------------------------------------------- /content/protocol/img/format_public_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/format_public_key.png -------------------------------------------------------------------------------- /content/protocol/img/key_big_a_little_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/key_big_a_little_b.png -------------------------------------------------------------------------------- /content/protocol/img/key_little_a_big_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/key_little_a_big_b.png -------------------------------------------------------------------------------- /content/protocol/img/metafeed-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/metafeed-structure.png -------------------------------------------------------------------------------- /docs/protocol/img/format_udp_broadcast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/format_udp_broadcast.png -------------------------------------------------------------------------------- /docs/protocol/img/key_little_a_little_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/key_little_a_little_b.png -------------------------------------------------------------------------------- /content/protocol/img/box_stream_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/box_stream_overview.png -------------------------------------------------------------------------------- /content/protocol/img/client_authenticate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/client_authenticate.png -------------------------------------------------------------------------------- /content/protocol/img/final_shared_secret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/final_shared_secret.png -------------------------------------------------------------------------------- /content/protocol/img/format_udp_broadcast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/format_udp_broadcast.png -------------------------------------------------------------------------------- /content/protocol/img/key_little_a_little_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/key_little_a_little_b.png -------------------------------------------------------------------------------- /content/protocol/img/key_little_a_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/key_little_a_public.png -------------------------------------------------------------------------------- /content/protocol/img/key_little_b_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/key_little_b_public.png -------------------------------------------------------------------------------- /docs/protocol/img/private_message_decrypt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/private_message_decrypt.png -------------------------------------------------------------------------------- /docs/protocol/img/private_message_encrypt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/private_message_encrypt.png -------------------------------------------------------------------------------- /content/protocol/img/private_message_decrypt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/private_message_decrypt.png -------------------------------------------------------------------------------- /content/protocol/img/private_message_encrypt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/private_message_encrypt.png -------------------------------------------------------------------------------- /docs/protocol/img/shared_secret_derivation_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/shared_secret_derivation_1.png -------------------------------------------------------------------------------- /docs/protocol/img/shared_secret_derivation_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/shared_secret_derivation_2.png -------------------------------------------------------------------------------- /content/protocol/img/shared_secret_derivation_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/shared_secret_derivation_1.png -------------------------------------------------------------------------------- /content/protocol/img/shared_secret_derivation_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/shared_secret_derivation_2.png -------------------------------------------------------------------------------- /docs/protocol/img/metafeed-structure-with-feeds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/metafeed-structure-with-feeds.png -------------------------------------------------------------------------------- /docs/protocol/img/private_message_starting_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/private_message_starting_keys.png -------------------------------------------------------------------------------- /content/protocol/img/metafeed-structure-with-feeds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/metafeed-structure-with-feeds.png -------------------------------------------------------------------------------- /content/protocol/img/private_message_starting_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/private_message_starting_keys.png -------------------------------------------------------------------------------- /docs/protocol/img/private_message_secret_derivation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/private_message_secret_derivation.png -------------------------------------------------------------------------------- /content/protocol/img/private_message_secret_derivation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/private_message_secret_derivation.png -------------------------------------------------------------------------------- /docs/protocol/img/metafeed-structure-with-feeds-simplified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/docs/protocol/img/metafeed-structure-with-feeds-simplified.png -------------------------------------------------------------------------------- /content/protocol/img/metafeed-structure-with-feeds-simplified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soapdog/ssb-documentation/HEAD/content/protocol/img/metafeed-structure-with-feeds-simplified.png -------------------------------------------------------------------------------- /content/protocol/configuration.toml: -------------------------------------------------------------------------------- 1 | title = "Protocol Guide" 2 | toc_depth = 2 3 | 4 | files = [ 5 | "introduction.md", 6 | "cryptography.md", 7 | "discovery.md", 8 | "peer_connections.md", 9 | ] -------------------------------------------------------------------------------- /content/protocol/metadata.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | title: Secure Scuttlebutt Protocol Guide 3 | license: Public Domain 4 | spine: 5 | - introduction.md 6 | - cryptography.md 7 | - discovery.md 8 | - peer_connections.md 9 | --- -------------------------------------------------------------------------------- /docs/protocol/metadata.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | title: Secure Scuttlebutt Protocol Guide 3 | license: Public Domain 4 | spine: 5 | - introduction.md 6 | - cryptography.md 7 | - discovery.md 8 | - peer_connections.md 9 | --- -------------------------------------------------------------------------------- /scripts/lua/disable_floats.tex: -------------------------------------------------------------------------------- 1 | \usepackage{float} 2 | \let\origfigure\figure 3 | \let\endorigfigure\endfigure 4 | \renewenvironment{figure}[1][2] { 5 | \expandafter\origfigure\expandafter[H] 6 | } { 7 | \endorigfigure 8 | } -------------------------------------------------------------------------------- /content/configuration.toml: -------------------------------------------------------------------------------- 1 | files = [ 2 | "README.md", 3 | "protocol", 4 | "specifications", 5 | "message_types", 6 | "development/js", 7 | "development/rust", 8 | "development/go", 9 | "software/patchwork", 10 | "software/manyverse", 11 | "software/planetary", 12 | "software/patchfoo", 13 | "software/patchfox", 14 | ] -------------------------------------------------------------------------------- /content/specifications/configuration.toml: -------------------------------------------------------------------------------- 1 | title = "Specifications" 2 | toc_depth = 1 3 | 4 | files = [ 5 | "README.md", 6 | "bendy-butt-spec", 7 | "envelope-spec", 8 | "private-group-spec", 9 | "ssb-bfe-spec", 10 | "ssb-buttwoo-spec", 11 | "ssb-meta-feed-group-spec", 12 | "ssb-meta-feeds-spec", 13 | "ssb-uri-spec" 14 | ] -------------------------------------------------------------------------------- /content/message_types/configuration.toml: -------------------------------------------------------------------------------- 1 | title = "Message Types" 2 | toc_depth = 1 3 | 4 | files = [ 5 | "README.md", 6 | "about.md", 7 | "blog.md", 8 | "bookclub.md", 9 | "bookclubUpdate.md", 10 | "channel.md", 11 | "contact.md", 12 | "gathering.md", 13 | "more-info.md", 14 | "post.md", 15 | "private.md", 16 | "pub.md", 17 | "vote.md", 18 | ] -------------------------------------------------------------------------------- /scripts/lua/install_dependencies.sh: -------------------------------------------------------------------------------- 1 | #!env bash 2 | 3 | if ! luarocks config --lua-ver | grep '5\.[3456789]' 4 | then 5 | echo 'please first install lua >=5.3 with luarocks' 6 | exit -1 7 | fi 8 | 9 | luarocks install --local lfs 10 | luarocks install --local penlight 11 | luarocks install --local lua-toml 12 | luarocks install --local f-strings 13 | 14 | -------------------------------------------------------------------------------- /content/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Welcome to SSB Documentation 3 | ... 4 | 5 | # Secure Scuttlebutt {#index} 6 | 7 | Welcome to the SSB documentation. At the moment this is closed for renovations. In the meanwhile check the work-in-progress sections: 8 | 9 | * [The Protocol Guide](protocol/introduction.md) 10 | * [Message Types](message_types/README.md) 11 | * [SSB Specifications](specifications/README.md) 12 | 13 | -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | # Scripts 2 | 3 | Instead of forcing everyone into my stack of choice, I'm providing different versions of the scripts used to build the documentation. They should all generate the same files — they'll invoke [pandoc](https://pandoc.org) with the same arguments in the end — but they'll run under different runtimes. 4 | 5 | I tend to favour Lua over JS mostly because Lua is simpler and packaged for most systems. On the other hand, most developers on the SSB ecosystem are familiar with JS. 6 | 7 | If you'd rather have a different set of scripts to build the docs, feel free to send a PR. -------------------------------------------------------------------------------- /scripts/lua/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | This folder contains the [Lua](https://lua.org) version of the scripts used to build the documentation. 4 | 5 | > **ATTENTION:** At the moment, the build script has a hardcoded call to `mkdir -p` which ties it to UNIX-like systems. This will be removed in favour of a cross-platform solution later. 6 | 7 | ## Requirements 8 | 9 | * [Lua >= 5.3](https://lua.org): The runtime for the Lua programming language. 10 | * [Luarocks](https://luarocks.org): The package manager for Lua. 11 | 12 | ## Installing the dependencies 13 | 14 | Run: 15 | 16 | ``` 17 | $ install_dependencies.sh 18 | ``` -------------------------------------------------------------------------------- /content/protocol/introduction.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | [Scuttlebutt](https://www.scuttlebutt.nz/) is a protocol for building decentralized applications that work well offline and that no one person can control. Because there is no central server, Scuttlebutt clients connect to their peers to exchange information. This guide describes the protocols used to communicate within the Scuttlebutt network. 4 | 5 | Scuttlebutt is a flexible protocol, capable of supporting many different types of applications. One of its first applications was as a social network. This guide has a slight focus on how to use Scuttlebutt for social networking, but many of the explanations will still be useful if want to use it for something completely different, or are just curious how it works. -------------------------------------------------------------------------------- /content/message_types/gathering.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Gathering messages 3 | ... 4 | 5 | # `gathering` message 6 | 7 | messages of type `gathering` are used to create _events_. They're analogous to _Facebook events_ if you're familiar with those. 8 | 9 | A gathering message looks like: 10 | 11 | ```{.json} 12 | { 13 | "author": "@GF214rVSdwf/nARy7oDh+AxJViVCGfKqw+aa162itZY=.ed25519", 14 | "content": { 15 | "type": "gathering" 16 | }, 17 | "hash": "sha256", 18 | "previous": "%CExarKlCQwiC2FHodXzJzYQyOFWperqRifMakqT5o/w=.sha256", 19 | "sequence": 14, 20 | "signature": "Q9I0YNyOKrFhQ8/crZqcC7mhIAtlgbgEXPpvG3GcIES7KCOfoZfS0MfpjTHb4rmIMMvzwaouA4oHxUTlyID9Dg==.sig.ed25519", 21 | "timestamp": 1513623739118 22 | } 23 | 24 | ``` 25 | 26 | It looks a bit empty right? That is because the clients use [about](/message_types/about) messages to fill in the details about the event. 27 | -------------------------------------------------------------------------------- /scripts/lua/execute_inline_lua.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | This is a Pandoc filter to execute inline Lua codeblocks in Markdown files. 3 | 4 | This only executes if the Markdown file has "dynamic" set to true in its metatada 5 | --]] 6 | 7 | local dynamic = false 8 | 9 | function Meta(m) 10 | dynamic = m["dynamic"] 11 | 12 | return m 13 | end 14 | 15 | function dump(o) 16 | if type(o) == 'table' then 17 | local s = '{ ' 18 | for k,v in pairs(o) do 19 | if type(k) ~= 'number' then k = '"'..k..'"' end 20 | s = s .. '['..k..'] = ' .. dump(v) .. ',' 21 | end 22 | return s .. '} ' 23 | else 24 | return tostring(o) 25 | end 26 | end 27 | 28 | 29 | 30 | function CodeBlock(el) 31 | if FORMAT:match "html5" then 32 | if el.classes[1] == "lua" and dynamic then 33 | f = load(el.text) 34 | return pandoc.RawBlock("html5", f()) 35 | end 36 | end 37 | 38 | return el 39 | end 40 | 41 | 42 | return { 43 | { Meta = Meta }, 44 | { CodeBlock = CodeBlock} 45 | } -------------------------------------------------------------------------------- /content/message_types/pub.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Pub messages 3 | ... 4 | 5 | # `pub` message 6 | 7 | `pub` messages are used for _pub announcements_. These are issued by [pub servers](https://github.com/ssbc/ssb-server/wiki/pub-servers) so that clients discover them. 8 | 9 | ## What they look like 10 | 11 | ```{.json} 12 | { 13 | "author": "@E5lOaTD+74yeVZhyGnPW9wSykpUGj6h8OjgVIoD4QdI=.ed25519", 14 | "content": { 15 | "address": { 16 | "host": "188.166.252.233", 17 | "key": "@uRECWB4KIeKoNMis2UYWyB2aQPvWmS3OePQvBj2zClg=.ed25519", 18 | "port": 8008 19 | }, 20 | "type": "pub" 21 | }, 22 | "hash": "sha256", 23 | "previous": "%c6bhBJfl1zWABSmV0sVWlTkklYTLxGHfSxt2LwA1ndM=.sha256", 24 | "sequence": 6, 25 | "signature": "4zTxKyyu8Gt24AGwTUrJO8FQ0Xit5OhgHTX+u6eB4FgNTK1ugKnEy7x91657+dQrCwjLHrYuE156/dy9cTpvCA==.sig.ed25519", 26 | "timestamp": 1459981972234 27 | } 28 | ``` 29 | 30 | They match a _pub key_ with an accessible _host_. You can learn more about [pub messages online](http://scuttlebot.io/docs/message-types/pub.html). 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Andre Alves Garzia 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /scripts/lua/fix_svg.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | This is a Pandoc filter to fix path references for runtime generated images. 3 | 4 | At the moment it is needed for the mermaid diagrams. 5 | --]] 6 | 7 | function string:endswith(ending) 8 | return ending == "" or self:sub(-#ending) == ending 9 | end 10 | 11 | function string:startswith(start) 12 | return self:sub(1, #start) == start 13 | end 14 | 15 | function loadContent(file) 16 | local f = assert(io.open(file, "rb")) 17 | local content = f:read("*all") 18 | f:close() 19 | return content 20 | end 21 | 22 | 23 | function Image(el) 24 | local old = el.src 25 | if FORMAT:match "html5" then 26 | -- remove references to the content folder 27 | if el.src:startswith "content/" then 28 | el.src = el.src:gsub("content/","") 29 | end 30 | -- if the image is an SVG, inline it because clickevents only work if it is an inline SVG. 31 | if el.src:endswith ".svg" then 32 | if io.open(old, "rb") ~= nil then 33 | local svg = loadContent(old) 34 | return pandoc.RawInline("html5", svg) 35 | end 36 | end 37 | end 38 | 39 | return el 40 | end 41 | -------------------------------------------------------------------------------- /scripts/lua/fix_links.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | This is a Pandoc filter to fix internal links in both the PDF and the HTML. 3 | 4 | To make this work, the link need to be pointing at a file and there must be an anchor 5 | at the top of the target file that matches the normalised name of the file sans the extension 6 | 7 | Ie: a file called "overview.md" there should be a "{#overview}" at the first H1 header in that 8 | file. 9 | --]] 10 | function string:endswith(ending) 11 | return ending == "" or self:sub(-#ending) == ending 12 | end 13 | 14 | function Link(el) 15 | local old = el.target 16 | 17 | if FORMAT:match "latex" then 18 | if el.target:endswith ".md" then 19 | -- local link 20 | local newLink = el.target:gsub(".md","") 21 | el.target = ("#" .. newLink) 22 | end 23 | end 24 | 25 | if FORMAT:match "html5" then 26 | if el.target:endswith ".md" then 27 | -- local link 28 | el.target = el.target:gsub("README.md","index.html") 29 | el.target = el.target:gsub("readme.md","index.html") 30 | el.target = el.target:gsub(".md",".html") 31 | end 32 | end 33 | 34 | -- print(old .. " ---> " .. el.target) 35 | 36 | return el 37 | end -------------------------------------------------------------------------------- /content/message_types/bookclub.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Book Club messages 3 | ... 4 | 5 | # `bookclub` message 6 | 7 | Book club messages are used to create new books. 8 | 9 | A book club message looks like: 10 | 11 | ```{.json} 12 | { 13 | "type": "bookclub", 14 | "title": "A Prehistory of the Cloud", 15 | "authors": "Tung Hui-Hu", 16 | "description": "A radical collage of internet history. Traces the origins of \"the cloud\" as an idea and as a force in the world today. Tung Hui-Hu is a network engineer and English professor, and so the history draws equally from computing and railroads and victorian sewers and 1970's countercultural performance artists. A powerful, pleasantly short read!", 17 | "image": { 18 | "link": "&Qf54gh2QQGhYjC+L1/asC9qEpYeBN76LCwauZmjgioM=.sha256", 19 | "name": "prehistory-of-the-cloud.jpg", 20 | "size": 26228, 21 | "type": "image/jpeg" 22 | } 23 | } 24 | 25 | ``` 26 | 27 | Book club features were built to provide SSB users a convenient way to organise and review books. In this way, it provides the groundwork for experiences similar to book review services such as _Goodreads_ and _BookWyrm_. 28 | 29 | You can read more about book club schemas in the [scuttle-book documentation](https://github.com/ssbc/ssb-book-schema/). 30 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "content/specifications/ssb-uri-spec"] 2 | path = content/specifications/ssb-uri-spec 3 | url = https://github.com/ssbc/ssb-uri-spec.git 4 | [submodule "content/specifications/ssb-bfe-spec"] 5 | path = content/specifications/ssb-bfe-spec 6 | url = https://github.com/ssbc/ssb-bfe-spec.git 7 | [submodule "content/specifications/envelope-spec"] 8 | path = content/specifications/envelope-spec 9 | url = https://github.com/ssbc/envelope-spec.git 10 | [submodule "content/specifications/private-group-spec"] 11 | path = content/specifications/private-group-spec 12 | url = https://github.com/ssbc/private-group-spec.git 13 | [submodule "content/specifications/ssb-meta-feed-group-spec"] 14 | path = content/specifications/ssb-meta-feed-group-spec 15 | url = https://github.com/ssbc/ssb-meta-feed-group-spec.git 16 | [submodule "content/specifications/ssb-meta-feeds-spec"] 17 | path = content/specifications/ssb-meta-feeds-spec 18 | url = https://github.com/ssbc/ssb-meta-feeds-spec.git 19 | [submodule "content/specifications/bendy-butt-spec"] 20 | path = content/specifications/bendy-butt-spec 21 | url = https://github.com/ssbc/bendy-butt-spec.git 22 | [submodule "content/specifications/ssb-buttwoo-spec"] 23 | path = content/specifications/ssb-buttwoo-spec 24 | url = https://github.com/ssbc/ssb-buttwoo-spec.git 25 | -------------------------------------------------------------------------------- /content/message_types/channel.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Channel messages 3 | ... 4 | 5 | # `channel` message 6 | 7 | This message is used to _subscribe and unsubscribe from channels_. Be aware that subscribing to a channel doesn't affect [gossiping](/concepts/gossip). Subscriptions are mostly hints used by applications when they need to figure out what to show to their user. A common practice for an application is to show a _public feed_ to the user containing the messages from their followers and the messages in the channels they subscribed to. 8 | 9 | ## What does it looks like? 10 | 11 | ```{.json} 12 | { 13 | "key": "%bh8KkBLWTK6iAUJ3u4g2bfkye40m4vNw3+D6UFi8=.sha256", 14 | "value": { 15 | "previous": "%y+XwGARQFqvlMRnwfberbwr5+93pskchI+h/A=.sha256", 16 | "sequence": 179, 17 | "author": "@zVgfPY/wrpkjebfbkjqlDderiZr7jCbOpR1k=.ed25519", 18 | "timestamp": 1560279944413, 19 | "hash": "sha256", 20 | "content": { 21 | "type": "channel", 22 | "channel": "p2p-berlin", 23 | "subscribed": true 24 | }, 25 | "signature": "958n47tZTbwmDLjCcunaR9F18zAHOJeMt01P02OrPzaS9y6cjXpeq5/uh9zDhzfVCt5I4hsukLXkdjOSVZNMAQ==.sig.ed25519" 26 | }, 27 | "timestamp": 1560279947258, 28 | "rts": 1560279944413 29 | } 30 | ``` 31 | 32 | On the message above you can see that the author `subscribed` to the channel called `p2p-berlin`. The `subscribed` field is a boolean that indicates if the author is subscribing or unsubscribing from the channel. 33 | -------------------------------------------------------------------------------- /content/message_types/vote.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Vote messages 3 | ... 4 | 5 | # `vote` message 6 | 7 | This message is akin to _likes_, _hearts_ and _stars_ in social networks. They represent an intention to support the message. Secure Scuttlebutt doesn't mandate a term to be used in this case and some clients will call it _like_ while others call it _dig_, it doesn't matter, the message structure is the same. 8 | 9 | ## What does it looks like? 10 | 11 | ```{.json} 12 | { 13 | "key": "%p3LT5yzsfb/bPizfsgsEruyCeCgtqBY=.sha256", 14 | "value": { 15 | "previous": "%isvGQ2h9qnRiilXNssbXbi9pI+lTa1V4rpXpbT0=.sha256", 16 | "sequence": 549, 17 | "author": "@MRiJ+CvDnD9ZjqunY1oy6sfbsbMDC4Q3tTC8riS3s=.ed25519", 18 | "timestamp": 1560279862309, 19 | "hash": "sha256", 20 | "content": { 21 | "type": "vote", 22 | "channel": "patchfox", 23 | "vote": { 24 | "link": "%gZIjLirxZKxCMmczsbfsUeB+Yuz+4re67TNk=.sha256", 25 | "value": 1, 26 | "expression": "Like" 27 | } 28 | }, 29 | "signature": "eIXFCiv3znd3p7/gtWfxUqTaV2ikHkmzKJiKFBJHPRWFsfbsbV4BnLIECva6waQhRgYTpWc9xD39B12a2DQ==.sig.ed25519" 30 | }, 31 | "timestamp": 1560279864098, 32 | "rts": 1560279862309 33 | } 34 | ``` 35 | 36 | On the message above you can see that the author is doing a _Like_ (as specified by the `expression` field) towards a message specified by the `link` field. The value `1` means a positive outcome, a value `-1` means withdrawing your positive vote from the message. 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ssb-documentation 2 | A repository to contain all of SSB documentation 3 | 4 | 5 | ## Current status 6 | 7 | > **ATTENTION:** There are a lot of hardcoded values in the script inside `scripts`. I'm still 8 | > getting all this to work. Once it is working, I'm going to remove them. 9 | 10 | There is a lot of work going on on the build scripts and the source. Currently, this is not stable at all and it is not working. I just pushed it to the repo so that I can work in the open. 11 | 12 | 13 | ## Folder organisation 14 | 15 | - `content/`: holds all the documentation content. 16 | - `docs/`: holds the generated static website. 17 | - `scripts/`: contains auxiliary scripts to work with this repository and build the static site. 18 | - `templates/`: contains the necessary assets for the static site generation (html templates, css, images, etc). 19 | 20 | # Working with this repository 21 | 22 | Some of the most common tasks someone might want to do are: 23 | 24 | ### Assembling the static site 25 | 26 | ``` 27 | $ ./scripts/lua/build.lua [--verbose] 28 | ``` 29 | 30 | ## Dependencies 31 | 32 | * [Pandoc](https://pandoc.org) 33 | * [Lua](https://lua.org) 34 | * [Luarocks](https://luarocks.org) 35 | * [Mermaid filter](https://github.com/raghur/mermaid-filter) 36 | 37 | Check out `scripts/install_dependencies.sh` to install Lua dependencies. **You need Lua 5.3 (or Lua 5.4).** This is not compatible with LuaJIT or Lua 5.1. 38 | 39 | Make sure you follow all the necessary steps to install and setup Luarocks. 40 | 41 | NodeJS is needed for the pandoc mermaid filters. 42 | -------------------------------------------------------------------------------- /content/message_types/contact.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contact messages 3 | ... 4 | 5 | # `contact` message 6 | 7 | Contact messages are used to follow or unfollow another user. This affects your [social graph](/concepts/social_graph) and [gossiping](/concepts/gossip). Once you follow a given user, you'll start replicating all of that user's feed and, depending on how your client is configured, your followers' friends. Most clients will do two levels of replication, so you end up with all your friends' data and friends-of-friends' data, much like the physical world in which you'll often hear gossip regarding your friends' friends. 8 | 9 | ## What does it look like? 10 | 11 | ```{.json} 12 | { 13 | "key": "%JJW6l3PphHHNxkbe6q+gzsgsgOIgIEjqtnKVq5fo=.sha256", 14 | "value": { 15 | "previous": "%4UrrxMHmjgkw/tDZ40ztxwwrg2TQSzPVMw9efqj9E=.sha256", 16 | "sequence": 1182, 17 | "author": "@GLH9VPzvvU2KcnnUwgwgTUtzw+Rk6fd/Kb9Si0=.ed25519", 18 | "timestamp": 1560279915710, 19 | "hash": "sha256", 20 | "content": { 21 | "type": "contact", 22 | "contact": "@S954DSMnCh8aBqwegwegVZSBtK9N49Wq5AHh3OwOjo=.ed25519", 23 | "following": true 24 | }, 25 | "signature": "laHTnqQkbem2rFxvfwegwegwI4B7l2BE8n60sWsW8UZ/H6B1xz1yhlFGJ/2NkIBGsxpIW7GJM4i8uTCDg==.sig.ed25519" 26 | }, 27 | "timestamp": 1560279930388, 28 | "rts": 1560279915710 29 | } 30 | ``` 31 | 32 | In the message above, the author is _following_ (specified by the `following` field) a user specified by the `contact` field. If the value of the `following` field was false, that would be an unfollow message. -------------------------------------------------------------------------------- /templates/simple/simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | $for(author-meta)$ 8 | 9 | $endfor$ 10 | $if(date-meta)$ 11 | 12 | $endif$ 13 | $if(keywords)$ 14 | 15 | $endif$ 16 | $if(description-meta)$ 17 | 18 | $endif$ 19 |Welcome to the SSB documentation. At the moment this is closed for 95 | renovations. In the meanwhile check the work-in-progress sections:
96 |Scuttlebutt is a protocol 95 | for building decentralized applications that work well offline and that 96 | no one person can control. Because there is no central server, 97 | Scuttlebutt clients connect to their peers to exchange information. This 98 | guide describes the protocols used to communicate within the Scuttlebutt 99 | network.
100 |Scuttlebutt is a flexible protocol, capable of supporting many 101 | different types of applications. One of its first applications was as a 102 | social network. This guide has a slight focus on how to use Scuttlebutt 103 | for social networking, but many of the explanations will still be useful 104 | if want to use it for something completely different, or are just 105 | curious how it works.
106 |A Scuttlebutt 96 | feed is a list of all the messages posted by a particular identity. 97 | When a user writes a message in a Scuttlebutt client and posts it, that 98 | message is put onto the end of their feed.
99 |Each message 101 | has its own type which identifies what kind of message it is. 102 | There are messages related to your social graph, private messages, chess 103 | playing messages, etc. People can define their own message types 104 | provided they follow the 106 | message format mentioned above.
107 |Message schemas are interpretted according to the type
109 | property, as demonstrated in the other pages of this section.
There is no restriction on which types applications use. A type 111 | simply must be a string between 3 and 52 characters long. You are free 112 | to create new types, with their own schemas, as you need them.
113 |Likewise, there is no restriction on message schemas, so long as the 114 | content is an object, and the total message size (including headers) is 115 | less than 8kb.
116 |Applications should interpret messages “defensively.” There’s nothing 118 | enforcing a schema, so (as with any input) applications must be prepared 119 | for malformed content objects in messages.
120 |Applications should endeavor to interpret messages the same way. 121 | Otherwise, they won’t be able to interoperate, and may introduce 122 | unexpected behaviors.
123 |There is no official mechanism for making sure message-types 124 | interoperate, except for the documentation which you’re reading here. As 125 | it becomes clear that new types are coming into common use, we’ll add 126 | them to this site.
127 | 141 |After a user has generated their identity they need to find some 95 | peers to connect to. To connect to a peer you need its public key and 96 | its address using any of the protocol it supports. Typically with 97 | TCP/IP, you would need its IP address and port, but the Scuttlebutt 98 | protocol is not restricted to TCP/IP as transport. The Scuttlebutt 99 | protocol currently has three methods for peers to discover each 100 | other.
101 |Peers constantly broadcast UDP packets on their local network
103 | advertising their presence. The body of each packet is a string
104 | containing the peer’s IP address, port and base64-encoded public key
105 | (without @ or .ed25519):
107 |122 |109 |
108 | Implementations
JS:
110 |111 |
116 |- broadcast-stream
113 |- ssb-local
115 |Java:
117 |118 |
121 |- LocalDiscoveryService
120 |
| Source IP | 126 |Source port | 127 |Destination IP | 128 |Destination port | 129 |
|---|---|---|---|
| 192.168.1.123 | 134 |8008 | 135 |255.255.255.255 | 136 |8008 | 137 |
143 |
145 | This message format can be any valid multiserver
148 | address. In local networks, this is usually a net
149 | address with an IPv4 or IPv6 address.
Current implementations broadcast one of these packets every second. 151 | When a peer sees another peer’s broadcast packet they can connect to 152 | exchange messages. Some clients show nearby peers in the user interface 153 | so that the user can see other people on the same network as them.
154 |UDP source and destination ports are set to the same port number that 155 | the peer is listening on TCP for peer connections (normally 8008).
156 |Invite codes help new users get connected to 158 | their first pub, which is a Scuttlebutt peer that is 159 | publicly accessible over the internet. An invite code contains a pub’s 160 | domain name, port and public key.
161 |They also contain a secret key that the user can redeem to make the pub follow them back. This lets the new user see 164 | messages posted by other members of the pub and share their own 165 | messages. Invite codes are the most common way for new users to get 166 | started on Scuttlebutt.
167 |Pub operators can distribute invite codes any way they see fit, for 168 | example by posting them on existing social networks. Some pubs have a 169 | web page that anybody can visit to generate an invite code.
170 |Users can post a message to their own feed 172 | advertising a pub:
173 |Here the user @FCX/ts… is advertising that they know of
174 | pub @VJM7w1… along with the pub’s domain name and port.
{
176 | "author": "@FCX/tsDLpubCPKKfIrw4gc+SQkHcaD17s7GI6i/ziWY=.ed25519",
177 | "content": {
178 | "type": "pub",
179 | "address": {
180 | "host": "one.butt.nz",
181 | "port": 8008,
182 | "key": "@VJM7w1W19ZsKmG2KnfaoKIM66BRoreEkzaVm/J//wl8=.ed25519"
183 | }
184 | },
185 | …
186 | }
187 | When others see this message they can make a note that this pub 188 | exists and connect to it in the future.
189 |Pub messages are a useful way to find additional peers if you already 190 | know a few. Obviously this doesn’t work for new users who don’t know 191 | anyone else yet and therefore can’t see any pub messages.
192 |The first thing a user needs to participate in Scuttlebutt is an 96 | identity. An identity is an Ed25519 key pair and typically represents a 97 | person, a device, a server or a bot. It’s normal for a person to have 98 | several Scuttlebutt identities.
99 |Upon starting for the first time, Scuttlebutt clients will
100 | automatically generate an Ed25519 key pair and save it in the user’s
101 | home folder under .ssb/secret.
105 |
107 | Because identities are long and random, no coordination or permission 109 | is required to create a new one, which is essential to the network’s 110 | design.
111 |Later, a user can choose to give themselves a nickname or avatar to 112 | make themselves easier to refer to. Over time nicknames may change but 113 | identities stay the same. If a user loses their secret key or has it 114 | stolen they will need to generate a new identity and tell people to use 115 | their new one instead.
116 |The public key of an identity is presented to users and transmitted 117 | in some parts of the network protocol using this format:
118 |
121 |
125 | Throughout the protocol all instances of base64 are the variant that
127 | uses + and /. The final padding =
128 | is also required.
The beginning @ sign signifies that this represents a
130 | public key rather than a message or blob, which start with
131 | % and &. Each identity has an associated
132 | feed, which is a list of all the messages posted by
133 | that identity. This is why the identity is also called a feed
134 | ID.
The Scuttlebutt protocol relies on NaCl/libsodium’s cryptobox 137 | primitives. This guide uses the following:
138 |nacl_scalarmult(n, p)
This is Libsodium’s
141 | scalar multiplication function, which takes two scalars (usually
142 | public and/or secret keys). It has the useful property that, given two
143 | key pairs (pk1, sk1) and (pk2, sk2),
144 | nacl_scalarmult(sk1, pk2) == nacl_scalarmult(sk2, pk1),
145 | which allows shared secret derivation between peers who know each
146 | other’s public key. More on this later.
nacl_auth(msg, key) and
148 | assert_nacl_auth_verify(authenticator, msg, key)
This functions are Libsodium’s 151 | message authentication function. The former takes a message and 152 | returns a 32-bytes authenticator, that acts as a detacted signature of 153 | the message. The latter verifies this authenticator is indeed valid for 154 | the given message and key; and errors if they don’t.
155 |nacl_secret_box(msg, nonce, key) and
156 | assert_nacl_secretbox_open(ciphertext, nonce, key)
These function are based on Libsodium’s 159 | crypto_secretbox_easy and crypto_secretbox_open_easy function, which 160 | use symmetric cryptography to, respectively, encrypt+authenticate, and 161 | verify+decrypt a message using a nonce and a shared secret.
162 |nacl_sign_detached(msg, key) and
163 | assert_nacl_sign_verify_detached(sig, msg, key)
The former is computed from Libsodium’s 166 | signature functions. Unlike the usual Libsodium/NaCl functions, they 167 | work with signatures in independent buffers, rather than concatenated 168 | with the msg.
169 |pk_to_curve25519(ed25519_pk) and
170 | sk_to_curve25519(ed25519_sk)
These functions convert Ed25519 keys (used for cryptobox) to
172 | Curve25519 (aka X25519) keys, used for signing. They are implemented
174 | by Libsodium as crypto_sign_ed25519_pk_to_curve25519 and
175 | crypto_sign_ed25519_sk_to_curve25519, respectively.