<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://veilid.com/xsl/atom.xsl" media="all"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://veilid.com/documentation/</id>
  <title>Veilid - Documentation</title>
  <subtitle><![CDATA[Veilid Framework provides private, secure networking and data storage to developers.]]></subtitle>
  <link href="https://veilid.com/documentation/atom.xml" rel="self" type="application/atom+xml" />
  <link href="https://veilid.com/documentation/" rel="alternate" type="text/html" />
  <updated>2026-09-28T12:21:27-04:00</updated>
  <author>
    <name>Veilid Foundation, Inc.</name>
    <uri>https://veilid.org</uri>
  </author>
  <entry xml:lang="en">
    <id>https://veilid.com/documentation/audits/</id>
    <title>Audits</title>
    <published>2026-09-28T12:21:15-04:00</published>
    <link href="https://veilid.com/documentation/audits/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<p>Audits are on our roadmap but we do not have any to share yet.</p>]]>
    </content>
  </entry>
  <entry xml:lang="en">
    <id>https://veilid.com/documentation/cryptography/</id>
    <title>Cryptography</title>
    <published>2026-09-28T12:21:15-04:00</published>
    <link href="https://veilid.com/documentation/cryptography/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<p>Strong, appropriate, cryptography choices are essential to the functioning of Veilid.</p>
<p>Veilid provides applications guarantees about how data is handled on the wire and at rest.</p>
<p>Cryptosystems were chosen that work well together and provide a balance of speed and cryptographic hardness.</p>
<h3 id="current-cryptography-systems">Current Cryptography Systems</h3>
<ul>
  <li>
    <h4>Authentication is Ed25519</h4>
    Elliptic curve25519 was chosen to provide public/private key authentication and signing capabilities
  </li>
  <li>
    <h4>Key Exchange is x25519</h4>
    Curve25519 has a DH function that allows nodes to generate a symmetric key to communicate privately.
  </li>
  <li>
    <h4>Encryption is XChaCha20-Poly1305</h4>
    ChaCha20 with a 192-bit extended nonce is a fast authenticated stream cipher with associated data (AEAD).
  </li>
  <li>
    <h4>Message Digest is BLAKE3</h4>
    BLAKE3 is a extremely fast cryptographic hash that is highly parallelizable and as strong as SHA3-256 and over 17 times faster.
  </li>
  <li>
    <h4>Key Derivation is Argon2</h4>
    Password hash generation should be slow and resistant to GPU attacks Argon2 was the winner of the 2015 Password Hashing Competition.
  </li>
</ul>
<h3 id="upgrading-cryptography-systems">Upgrading Cryptography Systems</h3>
<p>Nothing lasts forever and cryptography is no exception. As computing power improves and cryptographic attacks evolve, weaknesses in cryptosystems are inevitable.</p>
<p>Veilid has ensured that upgrading to newer cryptosystems is streamlined and minimally invasive to app developers, and handled transparently at the node level.</p>
<ul>
  <li>
    <h4>Multiple Routing Tables</h4>
    Because changing cryptosystems changes node ids, there will be different distance measurements between nodes, necessitating a separate routing table per cryptosystem. We support this today.  
  </li>
  <li>
    <h4>Typed Keys</h4>
    Cryptographic keys, signatures, and hashes are all tagged with their cryptosystem to ensure that we know exactly how they were generated and how they should be used and persisted.
  </li>
  <li>
    <h4>Migration Support</h4>
    Reading persisted data will automatically use the correct cryptosystem and will default to always writing it back using the newest/best cryptosystem. This allows for data to be easily migrated just by reading it and writing it back to storage. 
  </li>
  <li>
    <h4>Simultaneous Cryptosystems</h4>
    While transitioning cryptosystems, nodes can respond to other nodes using either the old system or the new one, or both.
  </li>
</ul>
<h3 id="secure-storage">Secure Storage</h3>
<ul>
<li>Device-level secret storage APIs are available for all platforms</li>
<li>Encrypted table store APIs are exposed to applications to make safe data storage easy</li>
<li>Device data keys can also be password protected</li>
<li>Apps never need to write anything to disk unencrypted</li>
</ul>
<div class="row g-3 mx-2 card-set">
  <div class="col-12 col-md-6">
    <div class="card">
      <div class="card-header text-bg-light">
        <h4>ProtectedStore</h4>
      </div>
      <div class="card-body">
        <p>Device-level Secret Storage</p>
        <ul>
          <li>MacOS / iOS Keychain</li>
          <li>Android Keystore</li>
          <li>Windows Protected Storage</li>
          <li>Linux Secret Service</li>
        </ul>
        Veilid Maintained Rust Crate: <code>keyring-manager</code>
      </div>
    </div>
  </div>
  <div class="col-12 col-md-6">
    <div class="card">
      <div class="card-header text-bg-light">
       <h4>TableStore</h4>
      </div>
      <div class="card-body">
        <p>Encrypted Key-Value Database</p>
        <ul>
          <li>SQLITE on Native</li>
          <li>IndexedDB in Browser</li>
          <li>Device Key can be protected from backup dumping attacks</li>
        </ul>
        Veilid Maintained Rust Crate: <code>keyvaluedb</code>
      </div>
    </div>
  </div>
  <div class="col-12 col-md-6">
    <div class="card">
      <div class="card-header text-bg-light">
       <h4>RecordStore</h4>
      </div>
      <div class="card-body">
        <p>Distributed Hash Table Storage</p>
        <ul>
          <li>Encrypted + Authenticated</li>
          <li>Subkey support</li>
          <li>LRU distributed cache</li>
          <li>Per-key multi-writer schemas</li>
        </ul>
      </div>
    </div>
  </div>
  <div class="col-12 col-md-6">
    <div class="card">
      <div class="card-header text-bg-light">
        <h4>BlockStore</h4>
      </div>
      <div class="card-body">
        <p>Content-addressable Data Distribution
        </p><ul>
          <li>Take What You Give model</li>
          <li>Connect and share cloud storage</li>
          <li>Bittorrent-like sharding</li>
        </ul>
        This feature is "coming soon."
      </div>
    </div>
  </div>
</div>
<h3 id="on-the-wire">On The Wire</h3>
<div class="focus-text">
  <p>Everything is end-to-end encrypted</p>
  <p>Data is encrypted at rest and on the wire</p>
  <p>Your data is protected even if you lose your device</p>
</div>
<ul>
  <li>
    <h4>All Protocols Same Encryption</h4>
    Each low-level protocol uses the same message and receipt encapsulation. No protocol is special and all protocols offer the same safety guarantees.
  </li>
  <li>
    <h4>Encrypted And Signed</h4>
    Messages between nodes are signed by the sender and encrypted for only the receiver. Messages can be relayed without decryption and authentication covers the entire contents including headers. 
  </li>
  <li>
    <h4>Everything Is Timestamped</h4>
    Envelopes include timestamps and unique nonces and reject old or replayed messages. 
  </li>
  <li>
    <h4>Node Information Is Signed</h4>
    When a node publishes routing table entries they are signed. No node can lie about another node's dial info, capabilities, availability, or replay old node info when newer info is available. 
  </li>
</ul>]]>
    </content>
  </entry>
  <entry xml:lang="en">
    <id>https://veilid.com/documentation/networking/</id>
    <title>Networking</title>
    <published>2026-09-28T12:21:15-04:00</published>
    <link href="https://veilid.com/documentation/networking/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<div class="focus-text">
  <p>All devices are welcome and treated equally</p>
  <p>You can use the public Veilid Network or build your own</p>
  <p>Nodes help each other like mutual aid for connectivity</p>
</div>
<p>All Veilid applications running <code translate="no">veilid-core</code> are 'nodes', and they are all equal in the eyes of the network. No nodes are 'special'.</p>
<p>Nodes are only limited by the resources they bring and the conﬁguration of the network they are on.</p>
<p>DNS is only used one time during ‘bootstrap'; it is not required though. </p>
<p>SSL is optional and only for HTTPS Websockets for Veilid Webapps.</p>
<h3 id="protocols">Protocols</h3>
<p>Veilid uses UDP, TCP, and Websockets.</p>
<p>Low level protocols supported by Veilid are kept simple, to minimize complications. Everything uses framed RPC operations up
to 64KB in size. Protocol support is extensible and may add WebRTC and other specialized protocols in the future.</p>
<h3 id="network-topology">Network Topology</h3>
<p><img src="/img/Network-Thumbnail.png" alt="A topology graph for Veilid networks" class="img-fluid"></p>
<p>To zoom in on the details, <a target="_blank" href="/img/Network.png">view the full size image directly</a>.</p>
<h3 id="bootstrapping">Bootstrapping</h3>
<p>Bootstrap nodes not 'special' nodes. Any node can bootstrap a Veilid network. Networks can be 'keyed' to keep nodes off that don't have the key.  You can join the ‘big Veilid network' or make your own isolated network.</p>
<ul>
  <li>
    <h4>Ask Bootstraps To ‘Find Self'</h4>
    A single initial DNS TXT record request returns some bootstrap nodes that are known to exist. Those are asked to return nodes that are ‘close' to your own node.
  </li>
  <li>
    <h4>Public Address Detection</h4>
    Nodes are often behind various forms of NAT. Validating one's own public ‘Dial Info' is essential for publishing one's Node Info and answering Find Node requests.
  </li>
  <li>
    <h4>Relay Conﬁguration</h4>
    Low-capability network classes may require the use of Inbound or Outbound relays in order to achieve reachability Nodes help each other out to the best of their ability and incur no penalty for not being able to assist other nodes.
  </li>
  <li>
    <h4>Peer Minimum Refresh </h4>
    Nodes in your routing table are asked to return nodes that are near you as well. Finding nodes close to your own is always harder than ﬁnding nodes far away, so we focus on that with our requests.
  </li>
  <li>
    <h4>Network Class Detection</h4>
    Determining NAT type and what mechanisms can be used to achieve connectivity. Direct connection techniques like reverse connections and UDP hole punching may be inappropriate for some network classes.
  </li>
  <li>
    <h4>Ping Validation</h4>
    Nodes come and go, change address, and are unreliable. Checking routing table nodes for proof-of-life is done with exponential backoff. Nodes are removed from the routing table on a LIFO basis.
  </li>
</ul>]]>
    </content>
  </entry>
  <entry xml:lang="en">
    <id>https://veilid.com/documentation/private-routing/</id>
    <title>Private Routing</title>
    <published>2026-09-28T12:21:15-04:00</published>
    <link href="https://veilid.com/documentation/private-routing/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<h3 id="private-and-safety-routes">Private and Safety Routes</h3>
<figure>
    <img src="/img/private-and-safety-routes.png" alt="a diagram of routes between points a and b" class="img-fluid">
    <figcaption>
      Veilid Routes are a combination of source and destination private routing. 
       Because no node can trust any other node to pick the whole route, both source and destination must participate.
    </figcaption>
</figure>
<h3 id="compiled-routes">Compiled Routes</h3>
<figure>
    <img src="/img/compiled-routes.png" alt="a diagram of routes between points a and b, shown with components" class="img-fluid">
    <figcaption>
      Private Routes are published as a ‘private destination’ and Safety Routes are allocated locally and combined 
      together with a Private Route to form a Compiled Route.
    </figcaption>
</figure>
<h3 id="secure-envelopes">Secure Envelopes</h3>
<figure>
    <img src="/img/secure-envelopes.png" alt="a diagram how a message is passed from B to A" class="img-fluid">
    <figcaption>
      <p>
        Each node hop only knows about the next one This is similar to onion routing, but assumes that 
        the source is fully in control of the Safety Route and the destination is fully in control of 
        the Private Route.
      </p>
      <p>To zoom in on the details, <a target="_blank" href="/img/secure-envelopes.png">view the image directly</a>.</p>
    </figcaption>
</figure>
<h3 id="toward-the-future">Toward The Future</h3>
<div class="focus-text">
  <p>Private routing is a balance of performance and security</p>
  <p>Applications can make use of higher node hop counts if they desire</p>
  <p>Future private routing advancements will be transparent to users</p>
</div>
<ul>
  <li>
    <h4>Per-Hop Payload Keying</h4>
    Ensuring that there is nothing common between packets at each hop will reduce the risk of mass data collection 
    being able to deanonymize routes.
  </li>
  <li>
    <h4>Simplify Directionality</h4>
    Routes are currently bidirectional, but are allocated directionally. 
    We may be able to simplify our allocation mechanism by enforcing bidirectionality. 
    Bidirectional routes are faster, but directional routes could provide more anonymity.
  </li>
  <li>
    <h4>Elimination of Hop Counting</h4>
    Currently the protocol keeps an internal hop count that is not necessary. 
    Efforts should be made to ensure that individual nodes don’t know how far along in a route they are.
  </li>
  <li>
    <h4>Hop Caching</h4>
    Route hop NodeInfo could be cached to save on-the-wire size as well as speed things up.
  </li>
  <li>
    <h4>Increasing Hop Count</h4>
    <p>Currently the default is one hop chosen by the Safety Route, and one hop chosen by the Private Route, which leads to three hops total once compiled.</p>
    <p>It may be important to increase hop count to 2 for users with critical safety needs and to protect from nation-state-level deanonymization where appropriate.</p>
    <p>Existing research (on Tor) suggests that our existing hop count should be sufﬁcient and provide comparable anonymity, but this should be revisited.</p>
  </li>
</ul>
<div class="focus-text">
  <p>IP Privacy means your location is safe too</p>
  <p>Users don’t have to do anything to use it</p>
  <p>No IP address means no tracking, collection, or correlation</p>
</div>]]>
    </content>
  </entry>
  <entry xml:lang="en">
    <id>https://veilid.com/documentation/rpc/</id>
    <title>RPC Protocol</title>
    <published>2026-09-28T12:21:15-04:00</published>
    <link href="https://veilid.com/documentation/rpc/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<h3 id="rpc-summary">RPC Summary</h3>
<ul>
  <li>
    <h4>Schema Language is Cap'n Proto</h4>
    <a target="_blank" href="https://capnproto.org/">Cap’n Proto</a> is designed for deserialization speed and schema evolution. Flexible and well supported in Rust.
  </li>
  <li>
    <h4>RPC is fully in-schema and documented</h4>
    Both ‘Question/Answer’ and ‘Statement’ RPC modes are supported. All schema ﬁelds are documented.
  </li>
  <li>
    <h4>RPC fully supports Private Routing</h4>
    All private routing structures are expressed in the RPC schema itself, no magic encrypted blobs.
  </li>
  <li>
    <h4>Schema Evolution is built-in</h4>
    Fields can be added and removed with full backward and forward compatibility. New features won’t break older Veilid nodes.
  </li>
  <li>
    <h4>RPC Schema is cryptography-independent</h4>
    As cryptosystems change, the language spoken by Veilid nodes remains the same.
  </li>
</ul>
<h3 id="distributed-hash-table">Distributed Hash Table</h3>
<p>Distributed Hash Tables are a way of storing data in records that have keys that are close to nodes in the network.</p>
<h4>DHT Is Just ‘Search’</h4>
<p>It may look complicated, but all the DHT algorithms out there are just ‘search’ algorithms. Finding data that is stored on some node somewhere out there.</p>
<h4>Improving Search</h4>
<p>We built a better DHT by making both search and data locality more relevant. Veilid synchronizes popular data when nodes come and go from the network.</p>
<img src="/img/dht-diagram.png" alt="a tree diagram for the search ability" class="img-fluid lightbox">
<p>Locating a node by its ID. Here the node with the prefix 0011 finds the node with the prefix 1110 by
successively learning of and querying closer and closer nodes. The line segment on top represents the 
space of 160-bit IDs, and shows how the lookups coverge to the target node. Below we illustrate RPC messages
made by 1110. The first RPC is to node 101, already known to 1110. Subsequent RPCs are to nodes returned by the
previous RPC. </p>
<h4>DHT Schema</h4>
<p>Veilid DHT is built using GetValue and SetValue RPC operations. Nodes can opt out of DHT storage if they do not want to participate.</p>
<p>Veilid DHT records have schemas that deﬁne subkeys that are individually addressable and can have multiple writers.</p>
<p>DHT record subkeys have sequence numbers and are eventually consistent across multiple writes and background synchronizations.</p>
<div class="row gx-5 gy-3 mb-3">
  <div class="col-12 col-lg-6">
    <figure class="h-100">
        <img src="/img/dht-dflt-framed.png" alt="a diagram showing key-value pairs" class="img-fluid lightbox">
        <figcaption>
          <p>Veilid Default DHT Schema - DFLT</p>
          <p>To zoom in on the details, <a target="_blank" href="/img/dht-dflt-framed.png">view the image directly</a>.</p>
        </figcaption>
    </figure>
  </div>
  <div class="col-12 col-lg-6">
    <figure class="h-100">
        <img src="/img/dht-smpl.png" alt="a diagram showing key-value pairs, but with more fields" class="img-fluid lightbox">
        <figcaption>
          <p>Veild Simple DHT Schema - SMPL</p>
          <p>To zoom in on the details, <a target="_blank" href="/img/dht-smpl.png">view the image directly</a>.</p>
        </figcaption>
    </figure>
  </div>
</div>
<div class="focus-text">
  <p>The DHT gives you full control over your data</p>
  <p>Our DHT is not based on a blockchain or a coin </p>
  <p>Popular data becomes more available automatically </p>
</div>]]>
    </content>
  </entry>
</feed>
