noqtis-enc(1)
NAME
noqtis-enc —
encapsulate a shared secret to an ML-KEM or HQC public
key
SYNOPSIS
noqtis enc |
-p key.pub
-o ct
[-f | --force]
ss | --stdout |
DESCRIPTION
noqtis enc runs the encapsulation of the
KEM named in key.pub with fresh randomness. It writes
the ciphertext (raw bytes, the standard's encoding) to
ct and the 32-byte shared secret to
ss, created owner-only (mode 0600). Send
ct to the holder of the secret key; they recover the
same secret with
noqtis-dec(1).
-pkey.pub,--pub=key.pub- A public KEM key file (‘
noqtis-key-1 ML-KEM-768 pub, for example’). A signature key is refused. -oct,--out=ct- The ciphertext file.
--stdout- Print the shared secret in hex (64 digits and a newline) on standard output instead of writing ss.
-f,--force- Replace existing files.
The shared secret is key material: feed it to a key derivation function or an authenticated cipher; it is not a password.
EXIT STATUS
0 on success; 2 on a usage error, a key that is not a public KEM
key, an existing file without --force, or a file
that cannot be written.
EXAMPLES
$ noqtis keygen -a ML-KEM-768 -o box ML-KEM-768 key pair: box (secret), box.pub (public) $ noqtis enc -p box.pub -o msg.ct sender.ss $ noqtis dec -k box -o receiver.ss msg.ct $ cmp sender.ss receiver.ss && echo same same