tcpcryptd(8)
π tcpcryptd π
okay bestie, welcome to tcpcryptd, section 8 of the manuals β aka the daemon that does the tcpcrypt protocol by transparently modifying network I/O β¨ no cap, it really does just reach in and rewrite your packets. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
tcpcryptd β implement the tcpcrypt protocol by transparently modifying network I/O π¦
πΈ SYNOPSIS πΈ
tcpcryptd [options]
that's it. that's the whole vibe. she takes options and she goes π
π OPTIONS π
so you wanna see every option? iconic, love that for you:
tcpcryptd -h
that prints the whole list, periodt.
okay so here's the thing about packet-diversion rules: the system administrator gets to decide which TCP connections get protected by tcpcryptd. the daemon receives packets for transformation through a "divert port", and you configure that with -p port π
-pportβ sets the "divert port" that the daemon receives packets on for transformation.
the daemon also talks to user programs through a "control socket", and you configure that one with -u socket_address:
-usocket_addressβ sets the "control socket" the daemon uses to communicate with user programs. ifsocket_addressstarts with"/", it's read as a filesystem path pointing to a unix-domain socket π§. if it's shaped like":port", it's read as the internet addresslocalhost:portπ.
-vβ bumps up verbosity. and the way that you can just stack themβ¦ multiple-voptions = more verbose. obsessed π
and then there's the "phone-home" test π«Ά β it runs at daemon startup to confirm end-to-end functionality of the implementation (by default it calls up the authors' server), but you have options, bestie:
-shostnameβ redirects the "phone-home" test to another test-server athostname.-fβ disables the "phone-home" test completely. gone. not doing it. π
π DESCRIPTION π
the tcpcryptd daemon transforms TCP segments through a kernel "divert" port so it can implement "opportunistic encryption" according to the tcpcrypt protocol β¨
here's the tea: when a peer signals in the connection handshake that it supports the tcpcrypt protocol, ephemeral keys get exchanged and then used to protect the confidentiality and integrity of that connection's application data π (and yes, the protocol protects the integrity of parts of the TCP header too, she's thorough). but when a peer does not indicate support for the protocol, the daemon just passes the rest of the connection through unperturbed β and therefore unprotected π
the best part?? your application software does not need to be modified to take advantage of this. it gives you confidentiality against passive network attackers β that's the ones who can't modify network data in transit. but to protect communication from active attackers, the application has to intentionally authenticate the connection, as described below π
π₯ Authentication π₯
okay so real talk, this part is important and also a little scary, no cap.
the tcpcrypt protocol does not itself protect communications against "active attackers" β meaning the ones who are able to modify network packets in transit. an attacker like that can pull off a "man in the middle" attack that lets her behave as the endpoint of the encrypted connection and therefore compromise its security π scary!! we don't love that!!
but!! applications that are aware of tcpcrypt can authenticate the connection however they want, and tcpcryptd helps by handing them an identifier for the connection that's derived from the protocol:
- a session id is derived from the ephemeral keys used to encrypt each connection protected by tcpcrypt. this identifier is (probabalistically) unique across all connections, it is not secret, and applications can extract it via the user library
libtcpcryptπ. you can also just list the session ids for all active connections with the netstat-like utilitytcnetstat(8)β
so how do peers actually confirm they're talking securely to each other β enjoying confidentiality and integrity even with active network attackers around? by confirming that the tcpcrypt session ids derived at each end are identical π for example, they might:
- bind the session id together with a shared secret, like a password π
- sign it with public keys βοΈ
- use a voice connection to speak a fingerprint of it ποΈ
- or simply record it for later confirmation π
any of those works. pick your fighter π₯
π SEE ALSO π
tcnetstat(8), <http://tcpcrypt.org/> π¦
psa bestie: this page is tcpcryptd(8) β that's the manual name, right there in the title and down in the footer too, so you always know which page you're in π
and that's the whole page, mwah π written up for the tcpcryptd(8) manual, dated and stamped with the version info in its footer, and honestly? she ate. go forth and encrypt opportunistically, you absolute main character ππ
π¦ where this page comes from
- fedora 43: tcpcrypt 0.5-19.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: tcpcrypt 0.5-19.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: tcpcrypt 0.5-20.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: tcpcrypt 0.5-20.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: tcpcrypt 0.5
- nixpkgs unstable: tcpcrypt 0.5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms