Repository navigation
Releases
qedshare v0.18.1
Documentation and audit only: no change to the tool, the share format or the proofs since v0.18.0.
Changed
- README: the format stability promise starts with v0.18.0, the first release with the frozen
qs3vectors (it said v0.17.0). "Highlights" names the frozen format and the release binaries; "Building" describes the release workflow. The API docs home page links to the promise. - Axiom audit:
Poly.interpolateAt_of_degree_lt, named in the README next tocombine_perm, has its own line (propext,Classical.choice,Quot.soundandbv_decidecertificate checks).
Binaries
qedshare for Linux (x86_64, aarch64) and macOS (Apple Silicon) is attached, each archive with a SHA-256 file and a build provenance attestation:
gh release download v0.18.1 --repo KhaledSaeed18/qedshare --pattern '*x86_64-linux*'
shasum -a 256 -c qedshare-*.tar.gz.sha256
gh attestation verify qedshare-*.tar.gz --repo KhaledSaeed18/qedshareNot proven
The IO part of the CLI: argument parsing, reading files and stdin (the loop that reads the chunks, and the code that chooses between one share per file and one share per line), writing stdout and files, the OS random bytes, and naming the odd share out when more than one share is bad. These are covered by 501 tests and an end-to-end run in CI on Linux and macOS. Timing side channels, the Lean compiler and the OS RNG remain in the trusted base (README: "What you have to trust").
No format change: split writes qs3, which is frozen (README: "Format stability"); combine reads qs1, qs2 and qs3.
Not audited. Please don't use it for real secrets yet.
Full changelog: https://github.com/KhaledSaeed18/qedshare/blob/v0.18.1/CHANGELOG.md
qedshare v0.18.0
The qs3 share format is now frozen, with a written promise and tests that hold the project to it. No format change, no change to the proven core.
Format stability
From this release on, the project promises (README, "Format stability"):
- Every later version of qedshare reads
qs3shares, hex and words (version 3), written by any release since v0.7.0, the first one that wroteqs3. - A
qs3share keeps its meaning. The fields, the checksum, the arithmetic and the BIP-39 word list stay as described in the README, so the same shares always rebuild the same secret. - A change to what
splitwrites gets a new format tag (qs4, word version 4).qs3shares are still read after that.
What it does not cover: it is a promise by the project, not a theorem; qs1 and qs2 shares are read today but are weaker against forged shares (combine them and split the secret again); the command line and the Lean API can still change before 1.0.
Frozen vectors
17 new tests (501 in total) hold three fixed qs3 shares, in hex and in words: split must write exactly those strings from fixed inputs, and combine must rebuild the secret from them, in CI on every push. v0.7.0 was also built and checked both ways against this version.
Binaries
qedshare for Linux (x86_64, aarch64) and macOS (Apple Silicon) is attached, each archive with a SHA-256 file and a build provenance attestation:
gh release download v0.18.0 --repo KhaledSaeed18/qedshare --pattern '*x86_64-linux*'
shasum -a 256 -c qedshare-*.tar.gz.sha256
gh attestation verify qedshare-*.tar.gz --repo KhaledSaeed18/qedshareNot proven
The IO part of the CLI: argument parsing, reading files and stdin (the loop that reads the chunks, and the code that chooses between one share per file and one share per line), writing stdout and files, the OS random bytes, and naming the odd share out when more than one share is bad. These are covered by 501 tests and an end-to-end run in CI on Linux and macOS. Timing side channels, the Lean compiler and the OS RNG remain in the trusted base (README: "What you have to trust").
Not audited. Please don't use it for real secrets yet.
Full changelog: https://github.com/KhaledSaeed18/qedshare/blob/v0.18.0/CHANGELOG.md
qedshare v0.17.0
One more proof, and the first release with binaries. No format change, no change to the proven core.
New theorems
Shamir.combine_eraseIdx_ok_iff: takek + 2or more shares of one split with distinct indices, exactly one of which is not the split's share at its own index. Leaving out one share makescombineaccept exactly when that share is the bad one.Cli.oddOneOut_names_bad: so for shares written byqedshare split, with one of them replaced by a changed copy (the index of a share of the split, another payload), the share thatqedshare combinenames as the odd one out is the changed one.
Until now this was only tested. With two or more bad shares nothing is proven, and the name stays a hint.
Both are in the axiom audit (proofs/QedShareProofs/Axioms.lean): propext, Classical.choice, Quot.sound and bv_decide certificate checks.
Binaries
Each release now comes with the qedshare executable for Linux (x86_64, aarch64) and macOS (Apple Silicon), built by CI from the release tag after the same build and tests as every push. Each archive has a SHA-256 file and a build provenance attestation:
gh release download v0.17.0 --repo KhaledSaeed18/qedshare --pattern '*x86_64-linux*'
shasum -a 256 -c qedshare-*.tar.gz.sha256
gh attestation verify qedshare-*.tar.gz --repo KhaledSaeed18/qedshareNot proven
The IO part of the CLI: argument parsing, reading files and stdin (the loop that reads the chunks, and the code that chooses between one share per file and one share per line), writing stdout and files, the OS random bytes, and naming the odd share out when more than one share is bad. These are covered by 484 tests and an end-to-end run in CI on Linux and macOS. Timing side channels, the Lean compiler and the OS RNG remain in the trusted base (README: "What you have to trust").
No format change: split writes qs3; combine reads qs1, qs2 and qs3.
Not audited. Please don't use it for real secrets yet.
Full changelog: https://github.com/KhaledSaeed18/qedshare/blob/v0.17.0/CHANGELOG.md
qedshare v0.16.0
A small release: one more piece of the input handling is proven, and convert on stdin keeps less. No format change, no change to the proven core.
New theorem
Cli.looksHexFast_eq: the function that says from the bytes of a line whether it looks like a hex share returns whatlooksHexreturns on the trimmed text. It replaceslooksHexBytes, which was only tested. The tool uses it to decide whether a file holds one share or one share per line.
It is in the axiom audit (proofs/QedShareProofs/Axioms.lean): propext, Classical.choice, Quot.sound and one bv_decide certificate check.
Changed
convertof shares on stdin, or in something that can be read only once, keeps the shares it read as packed records and prints them one by one at the end, not the text to print: 41 MB for 20 shares of a 1 MiB secret, down from 56 MB.
Known limits
These come with the design and are not planned to change:
- Input that can be read only once has to be kept until every share is checked. For shares on stdin that is about 1.4 MB per share of a 1 MiB secret for
convert, as forcombine. A pipe given as a file name is held as a whole, because whether it is one share or one share per line is only known at its end: 103 MB for 20 such shares, against 41 MB on stdin. - If a file changes between the two passes of
convertand a share in it no longer converts, the shares before it have already been printed when the error is reported.
Not proven
The IO part of the CLI: argument parsing, reading files and stdin (the loop that reads the chunks, and the code that chooses between one share per file and one share per line), writing stdout and files, the OS random bytes, and naming the odd share out. These are covered by 484 tests and an end-to-end run in CI on Linux and macOS. Timing side channels, the Lean compiler and the OS RNG remain in the trusted base (README: "What you have to trust").
No format change: split writes qs3; combine reads qs1, qs2 and qs3.
Not audited. Please don't use it for real secrets yet.
Full changelog: https://github.com/KhaledSaeed18/qedshare/blob/v0.16.0/CHANGELOG.md
qedshare v0.15.0
convert no longer holds its output for shares in files, and every file is read line by line. Only the IO part of the CLI changed: no format change, no change to the proven core, no new theorems.
Memory, for a 1 MiB secret
| Case | v0.14.0 | v0.15.0 |
|---|---|---|
convert, 20 shares in files |
56 MB | 14 MB |
combine, 20 shares in one file or on stdin |
51 MB | 41 MB |
combine, 20 shares, one file each |
40 MB | 41 MB |
combine, 30 shares, one file each |
51 MB | 52 MB |
| a large file with a line that is no share among the shares | 94 MB | 18 MB |
| a file of a million blank lines | 82 MB | 10 MB |
combine and verify take about 12 MB plus 1.4 MB per share, however the shares are given.
Changed
convertno longer holds its output for shares in files. It reads the files twice: once to check that every share converts, once to print each converted share as it is made. Nothing is printed if a share is refused, as before. It takes twice as long.- Every regular file is read line by line, whatever is in it. A first pass counts the lines that are not blank and decides whether the file is one share or one share per line; a second pass reads it that way.
- The bytes kept for a long line get room for a whole share at once.
How this was checked
This code is IO, so no theorem covers it. The new binary was run against the v0.14.0 binary on 38 input files, with five commands, as files, on stdin and through pipes: 418 runs, with the same output and exit code every time. CI has three new end-to-end cases (a large file with a line that is no share, blank lines around a share, convert refusals).
Known limits
convertof shares on stdin, or in something that can be read only once, holds its output until every share is read: about 2.3 MB per share of a 1 MiB secret.- If a file changes between the two passes of
convertand a share in it no longer converts, the shares before it have already been printed when the error is reported. - A word share wrapped over several lines, and a file that is not a regular file, are read as a whole. That costs memory only for a file with a very large number of lines.
Not proven
The IO part of the CLI: argument parsing, reading files and stdin (the loop that reads the chunks, and the choice between one share per file and one share per line), writing stdout and files, the OS random bytes, and naming the odd share out. These are covered by 484 tests and an end-to-end run in CI on Linux and macOS. Timing side channels, the Lean compiler and the OS RNG remain in the trusted base (README: "What you have to trust").
No format change: split writes qs3; combine reads qs1, qs2 and qs3.
Not audited. Please don't use it for real secrets yet.
Full changelog: https://github.com/KhaledSaeed18/qedshare/blob/v0.15.0/CHANGELOG.md
qedshare v0.14.0
Every share text is now read from its bytes, good or bad, and the cutting of the input into lines is proven. No format change, no change to the proven core.
Memory, for a 1 MiB secret
| Case | v0.13.0 | v0.14.0 |
|---|---|---|
combine, 2 shares |
24 MB | 23 MB |
combine, 20 shares, one file each |
54 MB | 40 MB |
combine, 20 shares in one file or on stdin |
53 MB | 51 MB |
combine, 30 shares, one file each |
55 MB | 51 MB |
info, 30 shares |
24 MB | 15 MB |
convert, 1 share |
19 MB | 12 MB |
convert, 20 shares |
71 MB | 56 MB |
| text with several long fields | 97 to 172 MB | 18 to 30 MB |
| text with characters outside ASCII | 85 to 173 MB | 10 to 28 MB |
combine and verify take about 20 MB plus 1 MB per share.
Changed
- Every share text is read from its bytes. Text with several long fields, or with a character outside ASCII, went to the list-based reader.
splitnever writes either, but megabytes of such text given as a share cost up to 170 MB. - The text of a hex share is made once, at its final size.
New theorems
Cli.decodeUtf8_eq: a reader for share text with characters outside ASCII that works on the bytes returns exactly what the proven readerdecodeSharereturns. In hex text each such character is replaced by~;Cli.decodeChars_mapproves the reader gives the same result for both texts.Cli.decodeAscii_eqnow covers any number of long fields.Cli.cutLines_eq: the cutter that turns a stream of chunks into lines returns the numbered non-blank lines of the whole text, wherever the chunks end.Cli.lineRanges_eq: the ranges used on a file held as a whole are cut at the same line feeds.
All are in the axiom audit (proofs/QedShareProofs/Axioms.lean): only propext, Classical.choice and Quot.sound.
Known limits
convertholds its output until every share is read, so that nothing is printed if one of them is refused: about 2.3 MB per share of a 1 MiB secret.- A large file that is not one share per line (lines that are not hex shares among them, or a million blank lines) is held as a whole and cut with a list of its lines: 94 MB for a 38 MB file.
Not proven
The IO part of the CLI: argument parsing, reading files and stdin (the loop that reads the chunks, and the choice between one share per file and one share per line), writing stdout and files, the OS random bytes, and naming the odd share out. These are covered by 484 tests and an end-to-end run in CI on Linux and macOS. Timing side channels, the Lean compiler and the OS RNG remain in the trusted base (README: "What you have to trust").
No format change: split writes qs3; combine reads qs1, qs2 and qs3.
Not audited. Please don't use it for real secrets yet.
Full changelog: https://github.com/KhaledSaeed18/qedshare/blob/v0.14.0/CHANGELOG.md
v0.13.0: malformed shares from bytes, streamed input
Malformed shares are now read from their bytes too, with a proof, and the input is streamed: stdin and large share files are never held as a whole. No format change, no change to the proven core.
Memory, for a 1 MiB secret
| Case | v0.12.0 | v0.13.0 |
|---|---|---|
combine, 2 shares |
33 MB | 24 MB |
combine, 20 shares, one file each |
49 MB | 54 MB |
combine, 20 shares in one file |
88 MB | 53 MB |
combine, 20 shares on stdin |
101 MB | 53 MB |
combine, 30 shares, one file each |
65 MB | 55 MB |
info, 30 shares |
33 MB | 24 MB |
| a share that is cut short | 101 MB | 9 MB |
| a share in upper case | 108 MB | 19 MB |
| a large file mixing hex shares with another line | 1.1 GB | 115 MB |
combine and verify take about 22 MB plus 1 to 1.5 MB per share, however the shares are given.
Changed
- A share that is cut short, has a character that is not a hex digit, or is written in upper case is read from its bytes, like a well-formed one. So is megabytes of text that is no share at all.
- Stdin and large files with one share per line are read line by line.
- Shares are decoded from their UTF-8 bytes without building a string.
convertkeeps only its output per share, not the share it read.
New theorems
Cli.decodeAscii_eq: a reader for any ASCII share text that works on the bytes returns exactly what the proven readerdecodeSharereturns (the record, or the same error). It followsdecodeSharestep by step; only the one long field is handled as bytes, and the short fields around it go through the list functions of the specification themselves.Cli.decodeBytes_eq: the reader the executable calls, on UTF-8 bytes, isdecodePackedFormon the text with those bytes.
Both are in the axiom audit (proofs/QedShareProofs/Axioms.lean): only propext, Classical.choice, Quot.sound and bv_decide certificate checks.
Known limits
- Share text with a character outside ASCII, or with two fields longer than 16 kB, is read by the list-based reader (about 100 MB for 2 MB of such text).
splitnever writes either. convertholds its output until every share is read, so that nothing is printed if one of them is refused: about 3.5 MB per share of a 1 MiB secret.
Not proven
The IO part of the CLI: argument parsing, reading files and stdin, cutting the input into shares (tested against the plain split-at-line-feeds version for many ways of chunking the input, not proven), writing stdout and files, the OS random bytes, and naming the odd share out. These are covered by 482 tests and an end-to-end run in CI on Linux and macOS. Timing side channels, the Lean compiler and the OS RNG remain in the trusted base (README: "What you have to trust").
No format change: split writes qs3; combine reads qs1, qs2 and qs3.
Not audited. Please don't use it for real secrets yet.
Full changelog: https://github.com/KhaledSaeed18/qedshare/blob/v0.13.0/CHANGELOG.md
v0.12.0: info, convert and damaged shares on byte arrays
The rest of the CLI now runs on byte arrays: info, convert, damaged shares and the old formats, each proven equal to the list-based function the theorems are about. The executable also reads one file at a time. No format change, no change to the proven core.
Memory, for a 1 MiB secret
| Case | v0.11.0 | v0.12.0 |
|---|---|---|
combine, 2 shares |
21 MB | 33 MB |
combine, 20 shares, one file each |
86 MB | 49 MB |
combine, 30 shares, one file each |
107 MB | 65 MB |
combine, 20 shares in one file |
101 MB | 88 MB |
combine, 20 shares on stdin |
157 MB | 101 MB |
info, 30 shares |
887 MB | 33 MB |
convert, one share |
106 MB | 23 MB |
| a share with a wrong checksum | 168 MB | 20 MB |
combine and verify take about 30 MB plus 1.2 MB per share given as its own file. The 2-share case costs 12 MB more than before: the new reader makes a few more short-lived copies of each share.
Changed
- A share with a wrong checksum is reported from its bytes. The fast reader takes a candidate record and a checksum from the text, writes them back as bytes, and uses them only if the input is exactly those bytes with whitespace around them. Whitespace before a hex share is handled the same way.
infoandconvertno longer build lists as long as the secret.combine,verifyandinforead one file at a time and keep only the share read from it, not its text.- Several shares in one file, or on stdin, are cut into lines by byte positions instead of being copied out line by line, and the input is checked as UTF-8 in place.
- The tag checks of the old
qs1andqs2formats run on the byte array.
New theorems
Cli.decodeShare_encodeCharsCrc: share text with any checksum field is read by the proven reader as its record if the checksum is the record's, and refused with the checksum error otherwise.Cli.decodePackedForm_eq: extendsCli.decodePacked_eqwith whether the share is in the hex form.Cli.describeSharesBytes_eq,Cli.convertSharesBytes_eq:infoandconverton byte arrays return exactly whatdescribeSharesandconvertSharesreturn.Cli.verifyPacked_decodeAll:verifyon shares read file by file isverifyShares.Cli.untagBytes_eqnow covers all three formats without a list-based branch.
All are in the axiom audit (proofs/QedShareProofs/Axioms.lean): only propext, Classical.choice, Quot.sound and bv_decide certificate checks.
Known limits
- A hex share that is cut short, contains a character that is not a hex digit, or is written in upper case is still read by the list-based reader: about 100 MB for a share of a 1 MiB secret.
- Shares in one file or on stdin: the whole input is held while it is read (about 4.5 MB per share of a 1 MiB secret).
convertholds the input and the output of every share.
Not proven
The IO part of the CLI: argument parsing, reading files and stdin, cutting a file or stdin into shares (tested against the plain split-at-line-feeds version, not proven), writing stdout and files, the OS random bytes, and naming the odd share out. These are covered by 479 tests and an end-to-end run in CI on Linux and macOS. Timing side channels, the Lean compiler and the OS RNG remain in the trusted base (README: "What you have to trust").
No format change: split writes qs3; combine reads qs1, qs2 and qs3.
Not audited. Please don't use it for real secrets yet.
Full changelog: https://github.com/KhaledSaeed18/qedshare/blob/v0.12.0/CHANGELOG.md
v0.11.0: combine on byte arrays, proven equal to the spec
combine and verify now run on byte arrays from the share text to the secret, with every step proven equal to the list-based function the theorems are about. No format change, no change to the proven core.
Memory and speed, for a 1 MiB secret
| Shares given | v0.9.0 | v0.10.0 | v0.11.0 |
|---|---|---|---|
| 2 | 21 MB | ||
| 20 | 714 MB | 217 MB | 86 MB |
| 30 | 1047 MB | 267 MB | 107 MB |
About 15 MB plus 3.5 MB per share given. With exactly k shares it is also about twice as fast.
New theorems
Cli.decodePacked_eq: a hex share read straight from its UTF-8 bytes is the record the proven readerdecodeSharereturns. The fast reader parses a candidate record, writes it back as bytes, and accepts it only if the input is exactly those bytes (plus trailing whitespace); the existing round-trip theoremdecodeShare_encodeRecorddoes the rest. Anything else goes todecodeShareitself.Cli.combineBytes_eq: interpolation into a byte array, and the comparison of byte arrays without stopping at the first difference, return whatcombinereturns.Cli.untagBytes_eq: theqs3AMD tag and token check, computed block by block from the byte array, returns whatuntagSecretreturns.Cli.oddOneOutPacked_eq: naming the odd share out on byte arrays names whatoddOneOutnames. The fallback to the list-based path is gone.Cli.recoverSecretBytes_eqnow covers a path with no list as long as the secret: its result isrecoverSecret's, as a byte array, or the same error.Cli.verifySharesBytes_eqsays the same forverify.Cli.isBlank_eq: the blank-line test used when a share file is cut into lines says what the list-based one said.
All are in the axiom audit (proofs/QedShareProofs/Axioms.lean): only propext, Classical.choice, Quot.sound and bv_decide certificate checks.
Known limits
- A damaged or unusual hex share (checksum mismatch, upper-case hex, leading whitespace) and word shares are still read by the list-based reader. For a damaged share of a 1 MiB secret that takes about 170 MB before the error is reported.
info,convertand the oldqs1/qs2tag checks are list-based as before.
Not proven
The IO part of the CLI: argument parsing, reading files and stdin, deciding which lines of a file are shares (looksHexLine is tested against the list version, not proven), writing stdout and files, the OS random bytes, and naming the odd share out. These are covered by 475 tests and an end-to-end run in CI on Linux and macOS. Timing side channels, the Lean compiler and the OS RNG remain in the trusted base (README: "What you have to trust").
No format change: split writes qs3; combine reads qs1, qs2 and qs3.
Not audited. Please don't use it for real secrets yet.
Full changelog: https://github.com/KhaledSaeed18/qedshare/blob/v0.11.0/CHANGELOG.md
v0.10.0: memory-light combine, proven equal to the spec
combine and verify need far less memory, and the path that makes it so is proven equal to the specification. No format change, no change to the proven core.
New theorems
Cli.recoverSecretBytes_eq: the memory-lightcombinepath the executable now runs returns exactly what the provenrecoverSecretreturns, for every input: the same secret, or the same error.Cli.verifySharesBytes_eq: the same forverify.
Both are in the axiom audit (proofs/QedShareProofs/Axioms.lean): only propext, Classical.choice and Quot.sound.
Changed
-
combineandverifyneed far less memory. Each share's payload is packed into a byte array as soon as the share is read, instead of staying a list, and the interpolation reads the bytes from the arrays. For a 1 MiB secret, at the same speed:Shares given v0.9.0 v0.10.0 20 714 MB 217 MB 30 1047 MB 267 MB The core still holds payloads as
List GF256, so every core theorem is untouched. Together withmakeSharesBytes_eqfrom v0.9.0, both directions of the CLI now run a memory-light path that is proven equal to the function the theorems are about.
Not proven
The IO part of the CLI: argument parsing, reading files and stdin, deciding which lines of a file are shares, writing stdout and files, the OS random bytes, and naming the odd share out. These are covered by 472 tests and an end-to-end run in CI on Linux and macOS. Timing side channels, the Lean compiler and the OS RNG remain in the trusted base (README: "What you have to trust").
No format change: split writes qs3; combine reads qs1, qs2 and qs3.
Not audited. Please don't use it for real secrets yet.
Full changelog: https://github.com/KhaledSaeed18/qedshare/blob/v0.10.0/CHANGELOG.md