Unix
Mac OS X
Windows
Options
Unix
Windows

# Convert Plaintext to Ciphertext and Back From the Command-line

The Wizard's Toolkit includes a number of command-line utilities for encrypting, identifying, or decrypting files.

The The Wizard's Toolkit command-line tools exit with a status of 0 if the command line arguments have a proper syntax and no problems are encountered. Expect a descriptive message and an exit status of 1 if any exception occurs such as improper syntax, a problem reading or writing an file, or any other problem that prevents the command from completing successfully.

In the paragraphs below, find a short description for each command-line tool. Click on the program name to get details about the program usage and a list of command-line options that alters how the program behaves. If you are just getting acquainted with The Wizard's Toolkit, start with the encipher program.

encipher
  convert plaintext to ciphertext.
decipher
  convert ciphertext to plaintext.
cipher-info
  describe the format and characteristics of one or more encrypted files.
keyring
  Import, export, or list properties of keys on your keyring.
digest
  return a message digest for one or more files or read message digests from a file and authenticate them.

To get you started, here is a brief example of how you might use these utilities:

      -> encipher -keyring keyring.xdm secret-message.txt secret-message.cip
      Enter the passphrase (maximum of 4096 characters)
      Enter passphrase:
      Enter same passphrase again:

      -> cipher-info secret-message.cip
      Filename: secret-message.cip
        Cipher:
          type: AES
          mode: CTR
          nonce: 61ae70a6a47793b40000000000000000
        Authenticate:
          method: Secret
        Key:
          hash: SHA256
          length: 512
          id: d596e432a92b2e60c76c104958d16dbe8a67519001249b69b46bfade54e6ac8c
        Entropy Generator:
          type: BZip
          level: 6
        Keyed-Hashed Message Authentication Code:
          hash: SHA256
        Random Generator:
          hash: SHA256
        Chunksize: 256kb
        Dates:
          modify: 2009-02-29T10:39:18-05:00
          create: 2009-02-29T10:39:18-05:00
          timestamp: 2009-02-29T10:41:48-05:00
        Protocol: 1.0
        Version: WizardsToolkit 1.0.5 02/29/08 http://www.wizards-toolkit.org

      -> keyring keyring.xdm -
      <?xml version="1.0"?>
      <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
               xmlns:keyring="http://www.wizards-toolkit.org/keyring/1.0/">
        <keyring:Keyring rdf:about="keyring.xdm">
          <keyring:modify-date>2009-02-29T10:41:48-05:00</keyring:modify-date>
          <keyring:create-date>2009-02-29T10:41:48-05:00</keyring:create-date>
          <keyring:timestamp>2009-02-29T10:41:48-05:00</keyring:timestamp>
        </keyring:Keyring>
        <keyring:Key rdf:about="d596e432a92b2e60c76c104958d16dbe8a67519001249b69b46bfade54e6ac8c">
          <keyring:memberOf rdf:resource="keyring.xdm"/>
          <keyring:nonce>1d443b7e02ae82040000000000000000</keyring:nonce>
          <keyring:timestamp>2009-02-29T10:41:48-05:00</keyring:timestamp>
          <keyring:protocol>1.1</keyring:protocol>
        </keyring:Key>
      </rdf:RDF>

      -> decipher -keyring keyring.xdm secret-message.cip public-message.txt
      Enter the passphrase (maximum of 4096 characters)
      Enter passphrase:
      Enter same passphrase again:

      -> digest secret-message.txt public-message.txt -
      <?xml version="1.0"?>
      <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
               xmlns:digest="http://www.wizards-toolkit.org/digest/1.0/">
        <digest:Content rdf:about="secret-message.txt">
          <digest:timestamp>2009-02-29T10:42:03-05:00</digest:timestamp>
          <digest:modify-date>2009-02-29T10:39:18-05:00</digest:modify-date>
          <digest:create-date>2009-02-29T10:39:18-05:00</digest:create-date>
          <digest:extent>9113</digest:extent>
          <digest:sha256>90ca62d8a67e43f86b67162e6a5804612e2c45d44a014760c49e1999b9fb344e</digest:sha256>
        </digest:Content>
        <digest:Content rdf:about="public-message.txt">
          <digest:timestamp>2009-02-29T10:42:03-05:00</digest:timestamp>
          <digest:modify-date>2009-02-29T10:39:18-05:00</digest:modify-date>
          <digest:create-date>2009-02-29T10:39:18-05:00</digest:create-date>
          <digest:extent>8196</digest:extent>
          <digest:sha256>90ca62d8a67e43f86b67162e6a5804612e2c45d44a014760c49e1999b9fb344e</digest:sha256>
        </digest:Content>
      </rdf:RDF>

Discourse Server