Class GenSigningKeyCommand

java.lang.Object
org.egothor.methodatlas.evidence.GenSigningKeyCommand

public final class GenSigningKeyCommand extends Object
CLI command handler for the -gen-signing-key mode, which creates a ZeroEcho keyring containing a fresh signing key pair for evidence-pack signing.

The mode is recognised and dispatched by MethodAtlasApp before the normal scan-argument parsing, mirroring how -diff is handled. It is self-contained: it parses its own small set of options and never participates in the scan pipeline.

Usage


 methodatlas -gen-signing-key <keyring-file> [-key-alias <alias>] \
             [-key-algo <algorithm>] [-overwrite]
 

The produced keyring is a plaintext file holding the private key in clear text; protect it with file-system permissions and keep it out of version control and out of any distributed evidence pack. See SigningKeyGenerator.

Since:
4.0.0
See Also:
  • SigningKeyGenerator
  • ZeroEchoSigner
  • Field Details

    • FLAG_GEN_SIGNING_KEY

      public static final String FLAG_GEN_SIGNING_KEY
      Mode flag that selects this command.
      See Also:
  • Method Details

    • run

      public static int run(String[] args, PrintWriter out) throws IOException
      Parses -gen-signing-key arguments and runs the command.
      Parameters:
      args - full command-line arguments, including the -gen-signing-key flag and its value
      out - writer that receives the success summary
      Returns:
      0 on success, 2 when the arguments are invalid
      Throws:
      IOException - if the keyring cannot be written, an alias collides without -overwrite, or key generation fails