Ouroboros Protocols: Difference between revisions

From Ouroboros
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 37: Line 37:


<syntaxhighlight>
<syntaxhighlight>
  0                  1                  2                  3
    0                  1                  2                  3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Flags             |           Window            |
    |            flags            |             hcs             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Sequence Number                        |
    |                            window                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                   Acknowledgment Number                      |
    |                           seqno                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           ackno                              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                    payload (variable) ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
  flags  - feature/type bitmap (see 1.2).
  hcs    - CRC-16-CCITT-FALSE Header Check Sequence (HCS) over
            flags + window + seqno + ackno (+ stream extension when
            present); the two octets of the hcs field itself are
            omitted from the CRC input.  Verified on receive before
            any flag-driven dispatch.
  window  - receiver-advertised right window edge (valid iff FC).
  seqno  - per-flow sequence number.
  ackno  - cumulative Acknowledgement (ACK) (valid iff ACK).
</syntaxhighlight>
</syntaxhighlight>


Line 51: Line 65:
Main page: [[Ouroboros Flow Allocation Protocol]]
Main page: [[Ouroboros Flow Allocation Protocol]]


/*
*  0                  1                  2                  3
*  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---+
* |                                                              |    |
* +                                                              +    |
* |                                                              |    |
* +                      id (128 bits)                            +    |
* |                  Unique flow allocation ID                    |    |
* +                                                              +    |
* |                                                              |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
* |                                                              |    |
* +                    timestamp (64 bits)                      +    |
* |                UTC nanoseconds since epoch                    |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
* |        crt_len (16 bits)    |                              |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                              +    |
* |                                                              |    |
* +                  certificate (variable)                      +    |
* |              X.509 certificate, DER encoded                  |    |
* +                                                              +    |
* |                                                              |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
* |F|R|    kex_len (14 bits)    |                              |    | Signed
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                              +    |
* |                                                              |    | Region
* +                kex_data (variable)                          +    |
* |      public key (DER/raw) or ciphertext (KEM)                |    |
* +                                                              +    |
* |                                                              |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
* |      cipher_len (16 bits)    |                              |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                              +    |
* |                                                              |    |
* +                    cipher (variable)                          +    |
* |              symmetric cipher name (UTF-8)                  |    |
* +                                                              +    |
* |                                                              |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
* |        data_len (16 bits)    |                              |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                              +    |
* |                                                              |    |
* +                    data (variable)                            +    |
* |              Piggybacked application data                    |    |
* +                                                              +    |
* |                                                              |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---+
* |        sig_len (16 bits)      |                              |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                              +
* |                                                              |
* +                    signature (variable)                      +
* |                  DSA signature over signed region            |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* kex_len field bit layout:
*  F (bit 15): Format - 0 = X.509 DER, 1 = Raw/Hybrid
*  R (bit 14): Role  - 0 = Server encaps, 1 = Client encaps
*              (R is ignored for non-KEM algorithms)
*  Bits 0-13:  Length (0-16383 bytes)
*/
The Flow Allocation Protocol resides in the [[Ouroboros Functional Layering|network end-to-end layer]].
The Flow Allocation Protocol resides in the [[Ouroboros Functional Layering|network end-to-end layer]].
A comparison with TLS 1.3 (generated by Claude Opus 4.5 based on the O7s codebase): [[Flow Allocation vs TLS]]


== Connection Establishment Protocol ==
== Connection Establishment Protocol ==

Latest revision as of 13:52, 17 May 2026

Under contruction This page is under construction  

The protocols in Ouroboros are designed with strong adherence to the principles of separation of concerns and separation of mechanism and policy in mind to prevent network ossification and protocol ossification from occuring.

There are 5 core protocols in Ouroboros.

Data Transfer Protocol

Main page: Ouroboros Data Transfer Protocol

The Data Transfer Protocol resides in the network forwarding layer.


  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 +                      Destination Address                      +
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Time-to-Live |      QoS      |      ECN      |    PADDING    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 +                              EID                              +
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 +                           N + 1 Data                          +
 .                                                               .
 .                                                               .

Flow and Retransmission Control Protocol

Main page: Flow and Retransmission Control Protocol

The Flow and Retransmission Control Protocol resides in the application end-to-end layer.

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             flags             |              hcs              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                            window                             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                            seqno                              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                            ackno                              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     payload (variable) ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  flags   - feature/type bitmap (see 1.2).
  hcs     - CRC-16-CCITT-FALSE Header Check Sequence (HCS) over
            flags + window + seqno + ackno (+ stream extension when
            present); the two octets of the hcs field itself are
            omitted from the CRC input.  Verified on receive before
            any flag-driven dispatch.
  window  - receiver-advertised right window edge (valid iff FC).
  seqno   - per-flow sequence number.
  ackno   - cumulative Acknowledgement (ACK) (valid iff ACK).

Flow Allocation Protocol

Main page: Ouroboros Flow Allocation Protocol

/*

*  0                   1                   2                   3
*  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---+
* |                                                               |    |
* +                                                               +    |
* |                                                               |    |
* +                      id (128 bits)                            +    |
* |                  Unique flow allocation ID                    |    |
* +                                                               +    |
* |                                                               |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
* |                                                               |    |
* +                     timestamp (64 bits)                       +    |
* |                UTC nanoseconds since epoch                    |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
* |         crt_len (16 bits)     |                               |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +    |
* |                                                               |    |
* +                  certificate (variable)                       +    |
* |               X.509 certificate, DER encoded                  |    |
* +                                                               +    |
* |                                                               |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
* |F|R|     kex_len (14 bits)     |                               |    | Signed
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +    |
* |                                                               |    | Region
* +                 kex_data (variable)                           +    |
* |      public key (DER/raw) or ciphertext (KEM)                 |    |
* +                                                               +    |
* |                                                               |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
* |       cipher_len (16 bits)    |                               |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +    |
* |                                                               |    |
* +                    cipher (variable)                          +    |
* |               symmetric cipher name (UTF-8)                   |    |
* +                                                               +    |
* |                                                               |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
* |        data_len (16 bits)     |                               |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +    |
* |                                                               |    |
* +                    data (variable)                            +    |
* |              Piggybacked application data                     |    |
* +                                                               +    |
* |                                                               |    |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---+
* |        sig_len (16 bits)      |                               |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
* |                                                               |
* +                     signature (variable)                      +
* |                  DSA signature over signed region             |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* kex_len field bit layout:
*   F (bit 15): Format - 0 = X.509 DER, 1 = Raw/Hybrid
*   R (bit 14): Role   - 0 = Server encaps, 1 = Client encaps
*               (R is ignored for non-KEM algorithms)
*   Bits 0-13:  Length (0-16383 bytes)
*/

The Flow Allocation Protocol resides in the network end-to-end layer.

Connection Establishment Protocol

Main page: Ouroboros Connection Establishment Protocol

Enrollment Protocol

Main page: Ouroboros Enrolment Protocol

The Enrollment protocol is best seen as one of the application protocols for IPCPs.