Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.radio
selfhosted·SelfhostedbyK3CAN

Don't Trust, Verify (or: Validating Origin and Integrity without Public CAs)

Wanted to share a quick blog post (see link) playing around with a couple methods of validating data origin and integrity without blindly relying on public CAs.

It's sort of a follow-up-to-a-follow-up on an earlier post about using Cloudlfare proxies to selfhost personal sites or services, but it really applies more to TLS and public CAs in general.

https://blog.k3can.us/posts/2026/aug/donttrustjustverify/Open linkView original on lemmy.radio
34

6 replies

min
lemmy.sdf.org

Could mTLS be used instead to force the browser to validate the correct cert?

6
K3CANreply
lemmy.radio

Not directly, but I believe mTLS would break if the traffic was intercepted/altered, so it sort of works to test the connection.

mTLS requires installing a certificate on the client device, though. If you're able to do that, then you're also able to pin the correct cert or install a custom CA. This would be the "enterprise" solution, as far as I know, but doesn't work well for public sites, since you can't always configure your end-users devices.

Edit: mTLS is still very useful, though. I use it to secure some of my services. It just doesn't solve this specific problem.

5

I'll add: mTLS would only break because the client certs are typically signed by a private CA and the host is configured to only trust that specific CA (similar to the enterprise solution I referenced in the post).

If, for some reason, the host was configured to trust all of the typical public CAs, then mTLS would theoretically share the same problem.

4

If there's a concern that an adversary can rewrite hashes then why is there not a concern the public key could also be rewritten and the hashes signed with the fake key?

3

Sorry, I think I misread the comment when I made my initial reply.

Edit:

If you mean the key provided for the demonstration, you could ensure that you get the correct one by checking the signature (it's signed by my personal key) or by doing the initial download through i2p or tor. Once it's added to your keyring, you maintain that same key for all the subsequent checks. Or, if you don't want to do either, you could consider it as a Trust-on-first-use system.

The important point is that it's a layered system, rather than a single point of trust, and that once you trust it, it cannot be compromised.

1

You reached the end

Don't Trust, Verify (or: Validating Origin and Integrity without Public CAs) | Spyke