noqtis-dec(1)
NAME
noqtis-dec —
decapsulate an ML-KEM or HQC shared secret
SYNOPSIS
noqtis dec |
-k key
-o ss |
--stdout [-f |
--force] ct |
DESCRIPTION
noqtis dec recovers the shared secret from
the ciphertext ct with the secret KEM key in
key, and writes its 32 bytes to
ss (created owner-only, mode 0600) or prints them in
hex with --stdout. Exactly one of the two must be
given.
A ciphertext of the right length that was changed in transit is not an error: as FIPS 203 and HQC require (implicit rejection), it gives an unrelated pseudorandom secret and exit status 0. Whether the secrets agree shows only when they are used, for example when an authenticated cipher keyed from them fails. A ciphertext of the wrong length is refused (exit 2).
EXIT STATUS
0 on success (including implicit rejection); 2 on a usage error, a key that is not a secret KEM key, a ciphertext of the wrong length, or a file that cannot be read or written.
EXAMPLES
$ noqtis dec -k box -o receiver.ss msg.ct $ noqtis dec -k box --stdout msg.ct | wc -c 65