Updated documentation

This commit is contained in:
Mark Qvist 2021-05-16 21:58:11 +02:00
parent e7f7d91276
commit 59f83ee1a5
7 changed files with 206 additions and 34 deletions

View File

@ -32,7 +32,7 @@ release = '0.2.0 β'
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosectionlabel',
#'sphinx.ext.autosectionlabel',
]
# Add any paths that contain templates here, relative to this directory.
@ -55,3 +55,11 @@ html_theme = 'classic'
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# def check_skip_member(app, what, name, obj, skip, options):
# print(what, " | ", name, " | ", obj, " | ", skip, " | ", options)
# return False
# def setup(app):
# app.connect('autodoc-skip-member', check_skip_member)

View File

@ -1,3 +1,57 @@
.. _examples-main:
********
Examples
********
A number of examples are included in the source distribution of Reticulum.
You can use these examples to learn how to write your own programs.
Minimal
=======
This example can be found at `<https://github.com/markqvist/Reticulum/blob/master/Examples/Minimal.py>`_.
The *Minimal* example demonstrates the bare-minimum setup required to connect to
a Reticulum network from your program. In about five lines of code, you will
have the Reticulum Network Stack initialised, and ready to pass traffic in your
program.
Announce
========
This example can be found at `<https://github.com/markqvist/Reticulum/blob/master/Examples/Announce.py>`_.
The *Announce* example builds upon the previous example by exploring how to
announce a destination on the network, and how to let your program receive
notifications about announces from relevant destinations.
Broadcast
=========
This example can be found at `<https://github.com/markqvist/Reticulum/blob/master/Examples/Broadcast.py>`_.
The *Broadcast* example explores how to transmit plaintext broadcast messages
over the network.
Echo
====
This example can be found at `<https://github.com/markqvist/Reticulum/blob/master/Examples/Echo.py>`_.
The *Echo* example demonstrates communication between two destinations using
the Packet interface.
.. _example-link:
Link
====
This example can be found at `<https://github.com/markqvist/Reticulum/blob/master/Examples/Link.py>`_.
The *Link* example explores establishing an encrypted link to a remote
destination, and passing traffic back and forth over the link.
Filetransfer
============
This example can be found at `<https://github.com/markqvist/Reticulum/blob/master/Examples/Filetransfer.py>`_.
The *Filetransfer* example implements a basic file-server program that
allow clients to connect and download files. The program uses the Resource
interface to efficiently pass files of any size over a Reticulum :ref:`Link<api-link>`.

View File

@ -24,9 +24,9 @@ started is to install Reticulum via pip:
The above command will install Reticulum and dependencies, and you will be
ready to import and use RNS in your own programs. The next step will most
likely be to look at some :ref:`Example Programs<Examples>`.
likely be to look at some :ref:`Example Programs<examples-main>`.
Further information can be found in the :ref:`API Reference<API Reference>`.
Further information can be found in the :ref:`API Reference<api-main>`.
Participate in Reticulum Development
@ -69,4 +69,4 @@ don't use pip, but try this recipe:
python3 Examples/Filetransfer.py -h
When you have experimented with the basic examples, it's time to go read the
:ref:`Understanding Reticulum<Understanding Reticulum>` chapter.
:ref:`Understanding Reticulum<understanding-main>` chapter.

View File

@ -1,21 +1,33 @@
*************************************
Reticulum Network Stack Documentation
*************************************
Reticulum is a cryptography-based networking stack for wide-area networks built on readily available hardware, and can operate even with very high latency and extremely low bandwidth. Reticulum allows you to build very wide-area networks with off-the-shelf tools, and offers end-to-end encryption, autoconfiguring cryptographically backed multi-hop transport, efficient addressing, unforgeable packet acknowledgements and more.
Reticulum is a complete networking stack, and does not use IP or higher layers, although it is easy to utilise IP (with TCP or UDP) as the underlying carrier for Reticulum. It is therefore trivial to tunnel Reticulum over the Internet or private IP networks.
Welcome to the documentation for Reticulum. This document aims to provide you
with all the information you need to understand Reticulum, develop programs
using it, or to participate in the development of Reticulum itself.
Table of Contents
=================
.. toctree::
:maxdepth: 3
:caption: Table of Contents:
whatis
gettingstartedfast
examples
reference
overview
understanding
Indices and tables
Current Status
==============
Reticulum should currently be considered beta software. All core protocol features are implemented and functioning, but additions will probably occur as real-world use is explored. The API and wire-format can be considered relatively stable at the moment, but could change if warranted.
Caveat Emptor
=============
Reticulum is experimental software, and should be considered as such. While it has been built with cryptography best-practices very foremost in mind, it has not been externally security audited, and there could very well be privacy-breaking bugs. To be considered secure, Reticulum needs a very thourough security review by independt cryptographers and security researchers. If you want to help out, or help sponsor an audit, please do get in touch.
Indices and Tables
==================
* :ref:`genindex`

View File

@ -1,56 +1,68 @@
.. _api-main:
*************
API Reference
*************
This reference guide lists and explains all classes exposed by the RNS API.
Classes
=======
Communication over a Reticulum network in a program is acheived using a set of classes exposed by RNS.
Primary Interface Classes
=========================
Communication over a Reticulum network in a program is acheived using a set of
classes exposed by RNS.
.. _api-reticulum:
Reticulum
---------
.. automodule:: RNS
:members: Reticulum
.. autoclass:: RNS.Reticulum
:members:
.. _api-identity:
Identity
--------
.. automodule:: RNS
:members: Identity
:noindex:
.. autoclass:: RNS.Identity
:members:
.. _api-destination:
Destination
-----------
.. automodule:: RNS
:members: Destination
:noindex:
.. autoclass:: RNS.Destination
:members:
.. _api-packet:
Packet
------
.. automodule:: RNS
:members: Packet
:noindex:
.. autoclass:: RNS.Packet
:members:
.. _api-link:
Link
----
.. automodule:: RNS
:members: Link
:noindex:
.. autoclass:: RNS.Link
:members:
.. _api-resource:
Resource
--------
.. automodule:: RNS
:members: Resource
:noindex:
.. autoclass:: RNS.Resource
:members:
.. _api-transport:
Transport
---------
.. automodule:: RNS
:members: Transport
:noindex:
.. autoclass:: RNS.Transport
:members:

View File

@ -1,7 +1,9 @@
.. _understanding-main:
***********************
Understanding Reticulum
***********************
This document will briefly describe the overall purpose and operating principles of Reticulum, a
This chapter will briefly describe the overall purpose and operating principles of Reticulum, a
networking stack designed for reliable and secure communication over high-latency, low-bandwidth
links. It should give you an overview of how the stack works, and an understanding of how to
develop networked applications using Reticulum.

84
docs/source/whatis.rst Normal file
View File

@ -0,0 +1,84 @@
******************
What is Reticulum?
******************
Reticulum is a cryptography-based networking stack for wide-area networks built on readily available hardware, and can operate even with very high latency and extremely low bandwidth. Reticulum allows you to build very wide-area networks with off-the-shelf tools, and offers end-to-end encryption, autoconfiguring cryptographically backed multi-hop transport, efficient addressing, unforgeable packet acknowledgements and more.
Reticulum is a complete networking stack, and does not use IP or higher layers, although it is easy to utilise IP (with TCP or UDP) as the underlying carrier for Reticulum. It is therefore trivial to tunnel Reticulum over the Internet or private IP networks. Reticulum is built directly on cryptographic principles, allowing resilience and stable functionality in open and trustless networks.
No kernel modules or drivers are required. Reticulum runs completely in userland, and can run on practically any system that runs Python 3.
What does Reticulum Offer?
==========================
* Coordination-less globally unique adressing and identification
* Fully self-configuring multi-hop routing
* Asymmetric RSA encryption and signatures as basis for all communication
* Perfect Forward Secrecy on links with ephemereal Elliptic Curve Diffie-Hellman keys (on the SECP256R1 curve)
* Reticulum uses the Fernet specification for encryption on links and to group destinations
* AES-128 in CBC mode with PKCS7 padding
* HMAC using SHA256 for authentication
* IVs are generated through os.urandom()
* Unforgeable packet delivery confirmations
* A variety of supported interface types
* An intuitive and easy-to-use API
* Reliable and efficient transfer of arbritrary amounts of data
* Reticulum can handle a few bytes of data or files of many gigabytes
* Sequencing, transfer coordination and checksumming is automatic
* The API is very easy to use, and provides transfer progress
Where can Reticulum be Used?
============================
On practically any hardware that can support at least a half-duplex channel
with 1.000 bits per second throughput, and an MTU of 500 bytes. Data radios,
modems, LoRa radios, serial lines, AX.25 TNCs, amateur radio digital modes,
ad-hoc WiFi, free-space optical links and similar systems are all examples
of the types of interfaces Reticulum was designed for.
An open-source LoRa-based interface called RNode has been designed
specifically for use with Reticulum. It is possible to build yourself, or it
can be purchased as a complete transceiver that just needs a USB connection
to the host.
Reticulum can also be encapsulated over existing IP networks, so there's
nothing stopping you from using it over wired ethernet or your local WiFi
network, where it'll work just as well. In fact, one of the strengths of
Reticulum is how easily it allows you to connect different mediums into a
self-configuring, resilient and encrypted mesh.
As an example, it's possible to set up a Raspberry Pi connected to both a
LoRa radio, a packet radio TNC and a WiFi network. Once the interfaces are
configured, Reticulum will take care of the rest, and any device on the WiFi
network can communicate with nodes on the LoRa and packet radio sides of the
network, and vice versa.
Supported Interface Types and Devices
=====================================
Reticulum implements a range of generalised interface types that covers most of the communications hardware that Reticulum can run over. If your hardware is not supported, it's relatively simple to implement an interface class. Currently, the following interfaces are supported:
* Any ethernet device
* LoRa using `RNode <https://unsigned.io/rnode>`_
* Packet Radio TNCs, such as `OpenModem <https://unsigned.io/openmodem>`_
* Any device with a serial port
* TCP over IP networks
* UDP over IP networks