Documentation

QedShareCli.Args

Command-line arguments #

Parsing is pure and total. There is deliberately no option that takes the secret itself: the secret comes from stdin or a file, never from argv, which would leak into shell history and the process list (README: Threat model).

How shares are written: qs3-… hex, or BIP-39 words.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[instance_reducible]
      Equations

      What the user asked for.

      • split (k n : Nat) (input outDir : Option String) (form : ShareForm) : Command

        Split a secret: threshold, share count, optional input file, optional output directory, and the form of the shares.

      • combine (files : List String) (out : Option String) : Command

        Combine shares from files (or from stdin when the list is empty), writing the secret to out (or to stdout when there is none).

      • convert (form : ShareForm) (files : List String) : Command

        Rewrite shares (from files, or stdin when the list is empty) in the given form.

      • verify (files : List String) : Command

        Check that shares rebuild a secret, without writing the secret anywhere.

      • info (files : List String) : Command

        Describe shares (format, set id, index, threshold, secret length) without combining them.

      • help : Command
      • version : Command
      Instances For
        Equations
        Instances For

          Read a count such as 3: decimal digits only. (String.toNat? alone also accepts 1_0, which is more likely a typo than a number when it sets a threshold.)

          Equations
          Instances For

            true for an argument that is an option rather than a file name: it starts with -. (A lone - is left alone, as a file name.)

            Equations
            Instances For

              Options collected while parsing split.

              Instances For

                Parse the options of split. A repeated option is an error: silently keeping the last --threshold could split a secret with a threshold the user did not mean.

                Equations
                Instances For

                  Options collected while parsing a command that reads share files.

                  Instances For
                    def QedShare.Cli.parseFileOpts (cmd : String) (allowOut allowForm : Bool) (o : FileOpts) :

                    Parse the arguments of a command that reads share files (cmd names it in errors). --out/-o is accepted when allowOut, --words/--hex when allowForm. Any other argument starting with - is an error rather than a file name, so a mistyped option is reported as one; after -- every argument is a file name.

                    Equations
                    Instances For

                      true if the arguments ask for help.

                      Equations
                      Instances For