Skip to content

Releases

qedshare v0.18.1

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 04 Dec 22:17

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 qs3 vectors (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 to combine_perm, has its own line (propext, Classical.choice, Quot.sound and bv_decide certificate 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/qedshare

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 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

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 04 Dec 21:54

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"):

  1. Every later version of qedshare reads qs3 shares, hex and words (version 3), written by any release since v0.7.0, the first one that wrote qs3.
  2. A qs3 share 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.
  3. A change to what split writes gets a new format tag (qs4, word version 4). qs3 shares 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/qedshare

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 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

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 04 Dec 20:53

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: take k + 2 or 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 makes combine accept exactly when that share is the bad one.
  • Cli.oddOneOut_names_bad: so for shares written by qedshare split, with one of them replaced by a changed copy (the index of a share of the split, another payload), the share that qedshare combine names 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/qedshare

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 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

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 04 Dec 20:35

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 what looksHex returns on the trimmed text. It replaces looksHexBytes, 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

  • convert of 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 for combine. 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 convert and 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

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 04 Dec 20:12

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

  • convert no 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

  • convert of 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 convert and 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

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 04 Dec 19:43

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. split never 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 reader decodeShare returns. In hex text each such character is replaced by ~; Cli.decodeChars_map proves the reader gives the same result for both texts.
  • Cli.decodeAscii_eq now 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

  • convert holds 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

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 04 Dec 14:53

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.
  • convert keeps 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 reader decodeShare returns (the record, or the same error). It follows decodeShare step 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, is decodePackedForm on 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). split never writes either.
  • convert holds 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

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 04 Dec 14:07

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.
  • info and convert no longer build lists as long as the secret.
  • combine, verify and info read 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 qs1 and qs2 formats 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: extends Cli.decodePacked_eq with whether the share is in the hex form.
  • Cli.describeSharesBytes_eq, Cli.convertSharesBytes_eq: info and convert on byte arrays return exactly what describeShares and convertShares return.
  • Cli.verifyPacked_decodeAll: verify on shares read file by file is verifyShares.
  • Cli.untagBytes_eq now 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). convert holds 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

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 04 Dec 13:18

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 reader decodeShare returns. 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 theorem decodeShare_encodeRecord does the rest. Anything else goes to decodeShare itself.
  • Cli.combineBytes_eq: interpolation into a byte array, and the comparison of byte arrays without stopping at the first difference, return what combine returns.
  • Cli.untagBytes_eq: the qs3 AMD tag and token check, computed block by block from the byte array, returns what untagSecret returns.
  • Cli.oddOneOutPacked_eq: naming the odd share out on byte arrays names what oddOneOut names. The fallback to the list-based path is gone.
  • Cli.recoverSecretBytes_eq now covers a path with no list as long as the secret: its result is recoverSecret's, as a byte array, or the same error. Cli.verifySharesBytes_eq says the same for verify.
  • 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, convert and the old qs1 / qs2 tag 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

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 04 Dec 12:30

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-light combine path the executable now runs returns exactly what the proven recoverSecret returns, for every input: the same secret, or the same error.
  • Cli.verifySharesBytes_eq: the same for verify.

Both are in the axiom audit (proofs/QedShareProofs/Axioms.lean): only propext, Classical.choice and Quot.sound.

Changed

  • combine and verify need 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 with makeSharesBytes_eq from 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