tiny.reticulum.conformance
Defined in tiny.reticulum.
Generated by lib/reticulum/build/generate with rns==1.5.0.
API (9)
Namespaces
Public namespaces.
announce: Generated bylib/reticulum/build/generatewithrns==1.5.0.destination: Generated bylib/reticulum/build/generatewithrns==1.5.0.hash: Generated bylib/reticulum/build/generatewithrns==1.5.0.identity: Generated bylib/reticulum/build/generatewithrns==1.5.0.ifac: Generated bylib/reticulum/build/generatewithrns==1.5.0.link: Generated bylib/reticulum/build/generatewithrns==1.5.0.packet: Generated bylib/reticulum/build/generatewithrns==1.5.0.token: Generated bylib/reticulum/build/generatewithrns==1.5.0.transport: Generated bylib/reticulum/build/generatewithrns==1.5.0.
Source
Source: lib/reticulum/src/conformance/root.zig
zig
//! Generated by `lib/reticulum/build/generate` with `rns==1.5.0`.//! The upstream source is Reticulum commit `e32d4df754a7b87b1bf1bb0d08675d12ff505ae6`.//! Hand edits are lost.//!//! The files in this directory record what Reticulum 1.5.0, the Python//! reference implementation, did when it was given fixed inputs: the bytes it//! sent, the decisions it made about each input, and the second at which each//! step happened. The package's tests feed the same inputs through the Zig port//! and compare its output with the recorded output field by field. The//! directory holds nine files, one per area: hashing, destination names, tokens//! with key derivation and padding, identities, packets, announces, interface//! access codes, transport, and links, and this file imports all nine. Package//! builds read the checked-in files and never install or run the reference.//!//! A port of a network protocol has to talk to nodes that run other people's//! programs, so every byte it sends and every packet it accepts or refuses has//! to match the original program. The direct check of that match is the//! original's own output: both programs get the same inputs, and what comes out//! is compared byte for byte.//!//! The reference is Python and builds its byte layouts from slices of hashes//! and packets, so the port has to reproduce each slice exactly. For example,//! the ten random bytes of an announce are the first five bytes of a random//! hash followed by the clock as five big-endian bytes. The reference draws//! fresh random bytes for every key, initialization vector and announce, so two//! runs produce different bytes unless those random bytes are fixed in advance.//! The reference reads a wall clock with fractional seconds and writes it into//! announces, round-trip times and keepalive deadlines, and the port counts//! time in whole seconds. The reference also sleeps, runs work on threads, and//! waits a random fraction of a second before it rebroadcasts an announce, and//! none of that replays step by step.//!//! The package README and the header of every corpus file pin the reference to//! upstream commit `e32d4df754a7b87b1bf1bb0d08675d12ff505ae6`. The generator//! refuses any installed release other than 1.5.0, and it runs the reference//! with its own built-in cryptography by hiding the separate `cryptography`//! package from it. Each corpus file names the reference lines its records take//! from, in the form `Reticulum@1.5.0 RNS/<file>.py:<lines>`, and the tests//! that replay the records carry the same form in their names.//!//! The generator replaces the reference's source of random bytes with a stream//! derived from one fixed string (`tiny-reticulum-conformance-rns-1.5.0`), its//! *seed*: SHA-256 over that string and an eight-byte big-endian counter, one//! digest after another. Each named record (a *vector*) holds the random bytes//! the reference drew for it, so a test hands the port the same bytes. The//! generator runs the reference on a stand-in clock that starts at//! 1,700,000,000, reads whole seconds, and moves only when the generator sets//! it, and each vector records the second of each step, its *recorded clock*.//! The generator sets the reference's random rebroadcast delay to zero, runs//! its threads inline, stops it wherever it would sleep, turns any logged//! warning into an error, and moves its periodic housekeeping so far into the//! future that the housekeeping never runs, so every run takes the same path or//! stops. The generator's stand-in network interfaces set neither//! `AUTOCONFIGURE_MTU` nor `FIXED_MTU`, so every link request carries three//! bytes that ask for the 500-byte MTU, and a transport node cuts those bytes//! off before it passes the request on. The keepalive is recorded at the first//! whole second at or after the reference's keepalive deadline, and the//! generator also runs the reference one second earlier and confirms that//! nothing is sent there. The port derives a link's responder key and the//! initialization vector of its round-trip report from the random bytes the//! caller hands each step, using HKDF, and the generator derives the same bytes//! and hands them to the reference in place of the random bytes the reference//! would draw, so those bytes follow the port's convention. The generator's//! `--check` mode regenerates every file into a scratch directory and fails,//! naming the files, when any of them differs by a byte, so the checked-in//! corpus stays the generator's own output.//!//! - *verdict*: the outcome the reference reported for one input, either true//! or false or a short name such as `invalid-code` or `tagless`.pub const announce = @import("announce.zig");pub const destination = @import("destination.zig");pub const hash = @import("hash.zig");pub const ifac = @import("ifac.zig");pub const identity = @import("identity.zig");pub const link = @import("link.zig");pub const packet = @import("packet.zig");pub const token = @import("token.zig");pub const transport = @import("transport.zig");Source: lib/reticulum/src/root.zig:57
zig
pub const conformance = @import("conformance/root.zig");Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |