xous-core/services/pddb
bunnie 356d95a266 yet another refactor of the word wrapping
Really clear up the roles and structures of word wrapping.

Significantly, we have now figured out that the word wrapper
should be the word wrapper, and that the text bounds should
be computed by a text bounds computation.

Conflating flexible text bounds with word wrapping makes
the math really hard.

So, the word wrapper always works with a bounding area starting
at 0,0, and will wrap until it hits a Point designated as its
absolute max bounds.

The returned typeset block is referenced to 0,0, and then it
is shifted to the correct location by the rendering function.

This externalizes the computation of the final location plus
the rendering bounds to the outer functions that need to care
about this, thus simplifying the word wrapper significantly.
2022-01-20 18:30:13 +08:00
..
locales add a submenu for PDDB operations 2022-01-17 01:59:38 +08:00
src yet another refactor of the word wrapping 2022-01-20 18:30:13 +08:00
Cargo.toml clarify the dependency policy 2022-01-10 16:50:10 +08:00
README.md update a comment in the readme. 2021-11-23 15:55:27 +08:00

PDDB

Documentation for the PDDB can be found in the headers of the source files:

  • main.rs contains a glossary, project overview, threat model, auditor's notes, and goals.
  • basis.rs gives details on how the data is organized in the Basis memory space, and contains most of the code for manipulating dictionary entries stored within the basis cache.
  • dictionary.rs will contain most of the code for manipulating the keys stored in a dictionary cache entry.
  • keys.rs documents the key cache format and on-disk metadataa and data formats.
  • pagetable.rs documents the page table format.
  • hw.rs contains all the glue to the SPINOR layer, TRNG, and system time, as well as low-level routines for formatting the disk.
  • fastspace.rs contains the Fast Free Space optimization, which is a partial record of known free space in the PDDB. The very nature of plausible deniability requires this quirky structure, as "free space" is the side channel for leaking information about the existence, or lack of existence, of certain data.

Why is your RustDoc so Shitty?

Unfortunately, rustdoc can't document binaries, and so the only documentation you'll see generated are for the "frontend" library portions, which are the API calls you would use to talk to the PDDB. These are deliberately uninteresting, as we've gone through great effort to make the bindings are "what you expect" (principle of least surprise).

Howeve, you're probably looking to fix a PDDB bug, audit the code, or generally figure out what the hell is going on. This means you want to look at the PDDB as a "binary" and not a "library" -- something RustDoc can't help you with. As the issue above notes, the fallback is for you to consult this README file, and literally, read the source (or rather, the paragraphs of plaintext documentation we've embedded in the source files, waiting for the day when the rustdoc issue is fixed and these can be turned into something more user-friendly).