psktool(1)

πŸ’– psktool β€” the GnuTLS PSK tool, bestie edition πŸ’–

okay so picture this: you need random keys for TLS-PSK and you want a little tool to do it for you. That's psktool, from the GnuTLS family, and she is iconic. Keys get stored in hexadecimal format in a key file, and honestly? clean. simple. slay. ✨


✨ SYNOPSIS ✨

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

All arguments must be options. No sneaky positional args, she doesn't play like that. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

psktool is the program that generates random keys for use with TLS-PSK. The keys get written out in hexadecimal format into a key file. That's the whole vibe, and she eats every time. πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

  • -d num, --debug=num β€” turn on debugging, bestie. This option takes an integer as its argument, and num is constrained to being:
    • in the range 0 through 9999
    • It specifies the debug level. Crank it up if you wanna see everything. πŸ”
  • -s num, --keysize=num β€” specify the key size in bytes. The default is 32-bytes, which is also 256-bits, iykyk. Takes an integer argument, and num is constrained to being:
    • in the range 0 through 512
  • -u str, --username=str β€” specify the username to use. 🫢
  • -p str, --pskfile=str β€” specify a pre-shared key file. This is the option that tells psktool which pre-shared key file to store the generated keys in. πŸ—‚οΈ
  • --passwd β€” this is an alias for the --pskfile option.
NOTE: THIS OPTION IS DEPRECATED πŸ’€ like, she still works but she's giving vintage, use --pskfile instead.
  • -v arg, --version=arg β€” output the version of the 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. ⭐
  • -h, --help β€” display usage information and exit. Your girl always comes through. πŸ™ˆ
  • -!, --more-help β€” pass the extended usage information through a pager. Fancy. πŸŽ€

πŸ“š EXAMPLES πŸ“š

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
psk_identity:88f3824b3e5659f52d00e959bacab954b6540344
$

This command will create keys.psk if it does not exist, and will add user psk_identity. Not her making files out of thin air, that's main character energy fr fr. πŸ”₯


🌈 EXIT STATUS 🌈

One of the following exit values will be returned:

  1. 0 (EXIT_SUCCESS) β€” successful program execution. We love a happy ending. πŸ’–
  2. 1 (EXIT_FAILURE) β€” the operation failed, or the command syntax was not valid. 😭

🌸 SEE ALSO 🌸

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

The whole friend group, go say hi. πŸ¦‹


πŸ’œ AUTHORS πŸ’œ

ngl the AUTHORS section is just… empty in the original. Nothing there. A mystery, a blank canvas, we simply don't know. πŸ™ˆ


Copyright (C) 2020-2023 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 πŸ“

Please send bug reports to: bugs@gnutls.org


and that's the whole page, bestie β€” written by the psktool(1) girlies of GnuTLS 3.8.13, dated 29 Apr 2026. periodt. πŸ’…βœ¨