Horible public key tricks (maurycyz.com)

219 points by Curiositry 16 hours ago

ryan-c 8 hours ago

Previously, Stupid Certificate Tricks (2014): https://news.ycombinator.com/item?id=9516824

This is almost certainly an independent discovery/implementation of the same idea, there's really only one sensible way to do it. There are, of course, several non-sensible ways to do it as well, but...

knotimpressed 13 hours ago

The linked pdf at https://tom7.org/httpv/httpv.pdf is extremely long but a great read if you enjoyed the article.

derf_ 4 hours ago

> I can tell you for certain that when I was connecting to my own website, there was no attacker trying to "steal my credit card."

Of course, no one can actually be certain of this, because any MITM could have injected anything they wanted into the website, including something asking for your credit card (which they would then steal). Plain http is commonly MITM'd to inject tracking and ads, even on an ISP you pay for with money, and has been for decades at this point.

Just because you own the website does not mean you get to choose the threat model your visitors have to operate under.

quibono 2 hours ago

Does this threat model include knowing where to put credit card numbers and when to refrain from doing so?

If you posted your credit card number to someone's blog over HTTPS, is that any more secure?

capitol_ an hour ago

stoltzmann 4 hours ago

why would tom 7 ask you for your credit card number?

cobbal 10 hours ago

Or if you prefer the paper in video form: https://www.youtube.com/watch?v=M1si1y5lvkk

cute_boi 12 hours ago

"the way, to sign a piece of software, you need to pay an extortive $100/year fee to Apple"

This is the main reason I hate these notarization. And the worst thing is if you want to work on some software that require network extension, you can't even do it without paying apple $99 a year. There are workaround like turning off SIP, but it isn't recommended.

frizlab 10 hours ago

Deactivating SIP is not that dangerous if you know what you’re doing. All it does it give back write access to root to some parts of the system.

Obviously, for the commoners, it is definitely not recommended, especially since they usually run random commands from stochastic engines w/o supervision… oh…… engineers do that too now? how in the hell???

I’m out.

traceroute66 9 hours ago

JimDabell 7 hours ago

necovek 7 hours ago

Community approach basically failed in building a "web of trust" with all the PGP/GPG signing parties: both tools were tricky to use, integrating PGP/GPG signing into common tools (like email, word processors, web, but also version control systems like CVS, SVN, bzr, git...) was always lackluster.

LetsEncrypt is a surprising success, but it's still a centralized system running as a non-profit — which means that it's always at risk of not being funded and/or to be under influence of big sponsors. It also came too late, app stores were already centralized.

Obviously, enterprises prefer to be the one to gate the access, so with a situation as it was, they jumped on the opportunity.

LoganDark 12 hours ago

Apple won't even let you pay the fee in some cases. I've been fighting with them trying to figure out why they won't accept my ID verification since March. They keep saying my devices are linked to another Apple Account, but I purchased them all directly from the Apple Store and none of them have ever touched another account, so what the fuck.

RobotToaster 6 hours ago

userbinator 11 hours ago

Not surprisingly "isn't recommended" by the ones who want you to pay them.

jrmg 12 hours ago

I came here to say the same thing! I’m not sure I have the author’s vehemence, but I enjoyed the read.

Longest ‘paper’ I’ve read in ages, I’m slightly ashamed to admit.

neogodless 21 minutes ago

Previously:

https://news.ycombinator.com/item?id=50425226 Horrible Public Key Tricks (maurycyz.com) 1 day ago

miki123211 5 hours ago

On that note: I was always wondering whether you could do stupid CT log tricks.

If I remember correctly, Let's Encrypt lets you go up to a hundred domains per certificate, with 256 characters per domain[1]. If you get a short domain like a.bc and start requesting certificates for its subdomains, you can easily get a few kB of user-controlled data embeddable per certificate. Given LE's rate limits, it should, within a few weeks of easily-automated work, be possible to embed child pornography into a CT log, making it illegal to host and destroying it completely.

You could do something more useful (and less destructive) with this idea; like embedding a separate public key, with the corresponding private key stored offline in an HSM, which could then be used to sign the location of your new domain in case the old one was seized. This would, in a weird and perverted way, add a lot more censorship resistance to DNS than what it natively provides.

You could even use a CT log as a blockchain, with the order of log entries being used for consensus.

nickf 5 hours ago

Was done some time ago: https://hosted-files.sched.co/bsidessf2019/88/Catlog_BSidesS...

Also, please don't do this.

tptacek 15 hours ago

All serious attackers are man-in-the-middle attackers (usually by tricking victims into diverting their own traffic, not literally by inserting themselves into the network path). Passive-only attackers went extinct along with the backbone-connected Sun servers that were used to launch those attacks.

I don't so much care about the rest of this analysis, but you can't call an unauthenticated TLS session "secure".

stingraycharles 14 hours ago

> usually by tricking victims into diverting their own traffic

What does this mean practically? Getting a VPN profile installed ?

tptacek 14 hours ago

No, the simplest (but far from the only) example is DNS injection.

juliusdavies 11 hours ago

embedding-shape 14 hours ago

Make the web unusable unless you're protected by your "DDOS" protection, offer a free service to solve the problem. Or provide a free service with as little friction to start replacing private/internal networking with, ideally with wide platform support. Or provide some sort of alternative "private" altnet, promising anonymity and access to clearnet via some sort of gateways, specifically for murky stuff.

alwa 14 hours ago

sam1r 13 hours ago

Tip: select the the ‘tty’ mode prior to digging in.

I’ve never felt a more relaxed feeling (easy on the eyes) while reading any blog in comparison.

icedchai 11 hours ago

Yes! It takes me back to the amber VT-220 terminals at school. I might have the model wrong.

nine_k 9 hours ago

Yes, VT-220. The amber color was so pleasant, and so easy on the eyes.

tomtomtom777 5 hours ago

The AI guestbook is an interesting addition. Does that actually work in weakening crawling LLMs? Which is presumably the idea?

arcfour 14 hours ago

>Nobody checks your private keys

You're implying that they should???

taspeotis 14 hours ago

I suspect private keys should receive a nominal check, that they can't be guessed by smashing the number 4 on a numpad.

arcfour 14 hours ago

So we either expose the key material for inspection (very obviously bad) or we try and brute force how many possible "weak" private keys from the public key to see if they check out?

Note that this is on the order of trillions of useless computations at least per year since almost everyone just uses a CSPRNG or HWRNG available in all modern computers to generate their keys sanely.

Now, for CAs, sure because that is a very small number of certificates. But that's a completely different discussion and also however eMudhra managed to lop off all of the entropy except for the final byte was wildly incompetent and not something a layman would even consider doing.

It's also not the job of the CA to detect you being an idiot. You can go post your private key online after getting your certificate if you so wish, the CA may revoke it if they find out but they're just in the business of helping you secure your communications with others. If you wish for them to actually be insecure... You are silly, but that was always allowed.

hxtk 13 hours ago

alwa 14 hours ago

taspeotis 14 hours ago

1vuio0pswjnm7 11 hours ago

"... and the whole system doesn't even work because certificates are issued over plaintext connections, and trusted certificate aurthorities[sic] use very secure keys like "4""

And the CA certificate is "self-signed"

Meanwhile under this "Web PKI" the www user is by default discouraged and/or blocked from using self-signed certificates she herself creates

Someone else decides who she must trust. It's not optional

For example, for a number of years someone else told her she must trust eMudhra

1vuio0pswjnm7 2 hours ago

Yes, one can remove certificates from a "trust store" in a folder (in practice, usually a "bundle" maintained by a browser vendor, or something derived therefrom)

But how does the www user remove a certificate that's compiled into a popular browser

The popular browsers, maintained by companies invested in internet surveillance advertising, is so large and complex that in practice few will edit and compile it themselves. Not only is certificate removal impractical but user-signed certificates outside the browser will usually trigger multiple warnings, even requiring users to type shibboleths to be detected by keyloggers

This "Web PKI" system presumes no www user can _ever_ trust themselves to make trust decisions. It's presumed that this is _never_ an option for _any_ user, in any situation

Spivak 8 hours ago

I mean some people can and do remove entries in their trust store. I imagine there's a very near future where someone inclined could have a perfectly serviceable internet experience with nearly all of them removed.

Xirdus 10 hours ago

Unfortunately, smart internet users are outnumbered by not so smart users thousands to one. And the not so smart users aren't smart enough to know every time when a website is or isn't trustworthy. So while far from ideal, the world is a much better place since we gave control of the entire internet to a few aristocrats.

Of course that argument got heavily undermined by the existence of Let's Encrypt.

Geezus_42 8 hours ago

Certificates don't tell you whether a site is trustworthy.

kaslai 13 hours ago

> So, I've always been somewhat annoyed at SSL/TLS. It requires everyone to go through a complex "ACME" dance just to put up a public website. Worse, certificates expire every few months, so it's not a one and done thing: even with automation, maintaining a certificate requires care to ensure the ACME client always has access to DNS records or the web server.

Not actually all that long ago, people faced down the prospect of $1000+/year E.V. Verisign certs that involved faxing legal documents, phone calls, and other probing. Many jumped for joy when LetsEncrypt was finally mature enough for the mainstream. Kids these days don't know how good they've got it...

jrmg 11 hours ago

Yes, but back then SSL/TLS wasn’t a requirement to publish anything on the web. You just needed a domain, and IP and a web server. The minimum bureaucracy you have to do now is much greater.

maeln 6 hours ago

It's still not a requirement. Most modern browser will pester you about it, but it can be circumvented. And it was already a bad idea to publish anything without encryption at the time, and it still is. The issue with SSL/TLS and in general with most encryption scheme (even e2e) is bootstrapping trust, and to my knowledge, there is no perfect way to deal with that. The CA system as its pros and cons and LE at least fixed the biggest flaw for the web (good luck if you need a certificate that can't use an ACME challenge, like most thing non-web tho').

nurumaik 5 hours ago

jrmg 2 hours ago

account42 5 hours ago

Browsers didn't defame websites for not using HTTPS before Let's Encrypt.

kaslai an hour ago

Browsers did devote a ton of chrome space to showing off E.V. certificates though, which had approximately the same effect.

lacoolj 13 hours ago

I cant get past the title spelling

jansenmac 12 hours ago

Yes. It’s horrible.

Curiositry 12 hours ago

I suspect there might be something intentional about this. There is a strangely high seeming-typo count in that post (yeild, pivate, relevent, etc). There are typos in the author's other work, but not quite at this density.

See also: https://maurycyz.com/misc/quality/indicators.html#:~:text=Th...

albert_e 12 hours ago

sojournerc 12 hours ago

undefined 12 hours ago

mplewis 14 hours ago

>the whole system doesn't even work

Yeah, I saw a fire hydrant leaking the other day. Time to tear out all the plumbing, the whole system doesn't even work!

YoshiRulz an hour ago

False equivalence. The leaking fire hydrant doesn't enable you to poison the water supply of a town on the other side of the planet.

undefined 12 hours ago

[deleted]

geekgod382 12 hours ago

I don't understand the math. What does plaintext^e mod n actually do?

pred_ 8 hours ago

Convert the plaintext to a number using some reversible encoding scheme. For instance, if the plaintext is an ASCII string, then take the ASCII index for each character to get fixed length binary strings, combine those strings.

Take that number, raise it to the power of e, and take the remainder after division of that number by n.

minfazhai 13 hours ago

[flagged]

fleroviumna 9 hours ago

[dead]

aronaxe 11 hours ago

[flagged]