psktool(1) — Linux manual page


psktool(1)                    User Commands                   psktool(1)

NAME         top

       psktool - GnuTLS PSK tool

SYNOPSIS         top

       psktool [-flags] [-flag [value]] [--option-name[[=| ]value]]

       All arguments must be options.

DESCRIPTION         top

       Program  that generates random keys for use with TLS-PSK. The
       keys are stored in hexadecimal format in a key file.

OPTIONS         top

       -d number, --debug=number
              Enable debugging.  This option takes an integer number as
              its argument.  The value of number is constrained to
                  in the range  0 through 9999

              Specifies the debug level.

       -s number, --keysize=number
              Specify the key size in bytes (default is 32-bytes or
              256-bits).  This option takes an integer number as its
              argument.  The value of number is constrained to being:
                  in the range  0 through 512

       -u string, --username=string
              Specify the username to use.

       -p string, --pskfile=string
              Specify a pre-shared key file.

              This option will specify the pre-shared key file to store
              the generated keys.

              This is an alias for the --pskfile option.


       -h, --help
              Display usage information and exit.

       -!, --more-help
              Pass the extended usage information through a pager.

       -v [{v|c|n --version [{v|c|n}]}]
              Output version of program and exit.  The default mode is
              `v', a simple version.  The `c' mode will print copyright
              information and `n' will print the full copyright notice.

EXAMPLES         top

       To add a user 'psk_identity' in keys.psk for use with GnuTLS run:
           $ ./psktool -u psk_identity -p keys.psk
           Generating a random key for user 'psk_identity'
           Key stored to keys.psk
           $ cat keys.psk

       This command will create keys.psk if it does not exist and will
       add user 'psk_identity'.

EXIT STATUS         top

       One of the following exit values will be returned:

       0  (EXIT_SUCCESS)
              Successful program execution.

       1  (EXIT_FAILURE)
              The operation failed or the command syntax was not valid.

       70  (EX_SOFTWARE)
              libopts had an internal operational error.  Please report
              it to  Thank you.

SEE ALSO         top

           gnutls-cli-debug (1), gnutls-serv (1), srptool (1), certtool

AUTHORS         top

       Nikos Mavrogiannopoulos, Simon Josefsson and others; see
       /usr/share/doc/gnutls/AUTHORS for a complete list.

COPYRIGHT         top

       Copyright (C) 2000-2020 Free Software Foundation, and others all
       rights reserved.  This program is released under the terms of the
       GNU General Public License, version 3 or later.

BUGS         top

       Please send bug reports to:

NOTES         top

       This manual page was AutoGen-erated from the psktool option

COLOPHON         top

       This page is part of the GnuTLS (GnuTLS Transport Layer Security
       Library) project.  Information about the project can be found at
       ⟨⟩.  If you have a bug report for this
       manual page, send it to  This page was obtained
       from the tarball gnutls-3.7.2.tar.xz fetched from
       ⟨⟩ on 2021-08-27.  If you
       discover any rendering problems in this HTML version of the page,
       or you believe there is a better or more up-to-date source for
       the page, or you have corrections or improvements to the
       information in this COLOPHON (which is not part of the original
       manual page), send a mail to

3.7.2                          29 May 2021                    psktool(1)