Comment by zie
What are you talking about?
public key cryptography is well understood and used everywhere: HTTPS, SSH, Signal, etc.
See: https://en.wikipedia.org/wiki/Public-key_cryptography
In postgres specifically: https://www.postgresql.org/docs/16/ssl-tcp.html and https://www.postgresql.org/docs/16/runtime-config-connection...
You can enforce TLSv1.3 on all network connections using `ssl_min_protocol_version`(postgres.conf) and `hostssl`(in pg_hba.conf)
This puts you ahead of most web servers which often still allow TLSv1.1.
You can make Postgres secure or not, your call. Just like with everything else.
I would note that, although obviously the confidentiality in TLS is based on public key cryptography, authentication by mTLS doesn’t reach the cryptography part.
The process starts with a client and server hello. Then the server sends its certificate to the client, and the client sends its certificate to the server. The server verifies that the client’s certificate is signed by a certificate authority in its trust store. That’s the authentication part. The client’s private key is not used.
The confidentiality comes next if authentication is successful.
I asked because X509 certificates are complex and difficult to securely parse. Also mTLS is rarely used.