Browse Source

Minor doc changes

Signed-off-by: Magic_RB <magic_rb@redalder.org>
master
Magic_RB 11 months ago
parent
commit
3525df77f9
  1. 8
      README.org
  2. 81
      spec/netstar.org

8
README.org

@ -44,6 +44,7 @@
cp -> wo [label=" f1"]
ng -> www_icon [dir="both"]
lg -> cs [label=" f5"]
lg -> cp [label=" f7"]
lg -> lo_icon
cp -> cs
cp -> ng [dir="both", label=" f4"]
@ -151,3 +152,10 @@
idhash: IdHash
} -> EResult<PublicKey>
#+END_SRC
*** f7
Attempts to perform a handshake with the given peer.
#+BEGIN_SRC rustic
struct AttemptHandshake {
public_key: PublicKey
} -> EResult<()>
#+END_SRC

81
spec/netstar.org

@ -2,8 +2,7 @@
#+LATEX_HEADER: \usepackage[a4paper, left=1.5cm, right=1.5cm, top=2cm, bottom=2cm]{geometry}
#+LATEX_HEADER: \usepackage{bytefield}
#+LATEX_HEADER: \usepackage{fancyvrb}
#+LATEX_HEADER: \usepackage{rest-api}
#+OPTIONS: tex:dvipng
#+OPTIONS: tex:dvisvgm
#+TITLE: Netstar
#+AUTHOR: Richard Brežák
#+DATE: 2019-12-01 - 2021-01-28
@ -38,57 +37,10 @@ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. \\
| symmetric key | [u8; 32] | key used in ChaCha20, derived from a /x25519 shared key/, 2 /ephemeral blobs/ and a /shared secret/. |
| x25519 ID Hash | [u8; 32] | A ID hash built by sha256 hashing the sender's public key and the shared secret |
*** REST Protocol
This protocol is used to configure an implementation of netstar. It can add and delete peers, edit peers, list
peers, set public key <-> IP address mappings.
\begin{table}
#+BEGIN_SRC fundamental
GET http://localhost:8080/add_peer
Content-Type: application/json
{
"public_key": ""
}
#+END_SRC
\caption{x0000 Interrupt Status Register}
\end{table}
#+BEGIN_SRC fundamental
POST http://localhost:8080/peer
Content-Type: application/json
{
"public_key": ""
}
#+END_SRC
#+BEGIN_SRC fundamental
PUT http://localhost:8080/peer
Content-Type: application/json
{
"public_key": ""
}
#+END_SRC
#+BEGIN_SRC fundamental
DELETE http://localhost:8080/peer
Content-Type: application/json
{
"public_key": ""
}
#+END_SRC
#+BEGIN_SRC fundamental
GET http://localhost:8080/peers
Content-Type: application/json
#+END_SRC
*** Remote Protocol
**** Packet
T = 0
#+BEGIN_SRC latex :results replace drawer :exports results
\begin{bytefield}[bitwidth=0.85em]{33}
@ -122,6 +74,7 @@ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. \\
| Payload | [u8] | The data being sent |
**** Handshake
T = 1
#+BEGIN_SRC latex :results replace drawer :exports results
\begin{center}
@ -153,6 +106,8 @@ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. \\
:end:
**** Data
T = 2
#+BEGIN_SRC latex :results replace drawer :exports results
\begin{center}
\begin{bytefield}[bitwidth=0.85em]{33}
@ -187,6 +142,30 @@ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. \\
:end:
*** Encrypted Protocol
This protocol is utilized after a secure connection has been established and serves to send secured messages through
the tunnel.
**** L2 Tunnel
T = 0
#+BEGIN_SRC latex :results replace drawer :exports results
\begin{bytefield}[bitwidth=0.85em]{32}
\bitheader{0,7,8,15,16,23,24,31} \\
\bitbox{1}{T} & \bitbox[tlr]{31}{Full IP Packet} \\
\wordbox[blr]{1}{$\cdots$}
\end{bytefield}
#+END_SRC
#+RESULTS:
:results:
\begin{bytefield}[bitwidth=0.85em]{32}
\bitheader{0,7,8,15,16,23,24,31} \\
\bitbox{1}{T} & \bitbox[tlr]{31}{Full IP Packet} \\
\wordbox[blr]{1}{$\cdots$}
\end{bytefield}
:end:
*** Operational Description
All packets begin with a /x25519 ID Hash/, which is a sha256 hash of the following data structure.
@ -263,9 +242,11 @@ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. \\
#+END_SRC
#+RESULTS:
:results:
\begin{footnotesize}
Note: The \textit{ephemeral blob}s are ordered according to the function below; the example is written in rust. \\
\end{footnotesize}
:end:
#+BEGIN_SRC rust
fn order_blobs(ephemeral_blob_a: [u8; 32], ephemeral_blob_b: [u8; 32])

Loading…
Cancel
Save