summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-08-08 15:16:14 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-08-08 15:16:14 -0400
commit0183098f9cb37a5389b8ff19dee98a4293752ce6 (patch)
tree22b8fb52d009192427d48f8c8de1e5831b30521d /doc
downloadrandom-seed-0183098f9cb37a5389b8ff19dee98a4293752ce6.tar.xz
random-seed-0183098f9cb37a5389b8ff19dee98a4293752ce6.zip
Initial commit
Diffstat (limited to 'doc')
-rw-r--r--doc/file-format-and-process.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/file-format-and-process.md b/doc/file-format-and-process.md
new file mode 100644
index 0000000..6ffc067
--- /dev/null
+++ b/doc/file-format-and-process.md
@@ -0,0 +1,30 @@
+The random-seed format consists of:
+
+1. 512 bytes of random seed data for compatibility with other random seed
+ implementations
+2. The magic string "RANDOM SEED FILE VERSION 1".
+3. A series of line delimited commands with space delimited arguments.
+
+Comments are not supported.
+
+# Hashing
+In an attempt to improve privacy, device IDs are hashed with SHA256(random-data
+|| ID) where || denotes concatenation and random-data is the 512 bytes of
+random data at the start of the file.
+
+# Commands
+
+## salt
+Set the salt for the following commands to the argument. This must be the
+first command.
+
+## machine-id
+Check that the contents of `/etc/machine-id`, when hashed, matches the
+argument.
+
+## fs-id
+Check that calling statfs(2) on the random seed file returns a `f_fsid` that
+when hashed, matches the argument.
+
+## done
+End of mandatory commands.