What is the point of a public key fingerprint?
johndcook.com
johndcook.com
$ echo -n retr0id_662d970782071aa7a038dce6 | sha256sum
307e0e71a409d2bf67e76c676d81bd0ff87ee228cd8f991714589d0564e6ea9a -
$ echo -n retr0id_430d19a6c51814d895666635 | sha256sum
307e0e71a4098e7fb7d72c86cd041a006181c6d8e29882b581d69d0564e6ea9a -Though for this specific case of only needing to check for identity, no human comparison should be involved, copy&search to see if the other is a match if you have no better tools
A "trivial, side-by-side comparison glance" would lead me to believe the two number strings are the same. If I'm just glancing I'm not going to take care to read each and every character out and compare them, that's not what glancing means.
In your particular example, I counted at least 96 bits that match on the ends (in total...from 48 bits on each end), and now I'm curious what kind of hardware you used and how long it took to find this match.
[1] https://www.cs.csi.cuny.edu/~zhangx/papers/P_2018_LISAT_Webe...
307e0e71a409d2bf67e76c676d81bd0ff87ee228cd8f991714589d0564e6ea9a = 0x7B
307e0e71a4098e7fb7d72c86cd041a006181c6d8e29882b581d69d0564e6ea9a = 0xFCYou are effectively increasing collision risk by an arbitrary amount by running hash output as input to a crc algorithm.
Kids, don't roll your own security.
After: four hashes that don't pass a manual check
The short ones are there so you can easily spot the collision in the long one, even if the start and the end are the same. If you read just the short ones your criticism applies, but that was not the idea. You read the long one first, then the short one. This is a logical AND not a logical OR, thus it gets harder to make both collide at once (because there are less similar looking values for the first one that produce the same values in the second one + your attacker might not know which one you are using).
Maybe if you read my comment, you will also realize I pointed out that CRC8 is the wrong choice for this, but I was on my phone and this was the hash calculator I found first.
This is if you compare two hashes and they look really similar but you want to be really sure.
Of course a real equality check is better but visual check of original hash + this is better than visual check alone.
9999 9999 9999
9999 9999 9999
9999 9999 9999
Now the users will not always pick the beginning or the end when they fail to compare the whole thing. That is because they can easily identity each group to the other person (combinations of top, middle, bottom, left, right, centre).If you meant bits, the two example hashes I gave already match 184 out of 256 total bits.
https://www.npr.org/2023/03/22/1165448073/voice-clones-ai-sc...
https://www.forbes.com/sites/thomasbrewster/2021/10/14/huge-...
My thinking is, you might as well get in the habit of defending yourself now. The alternative is to monitor how widespread the attack is and only adjust your policy once it becomes "sufficiently" widespread. But I don't think that's even a labor savings, since defending yourself isn't actually that hard.
With the demos we've seen feels absolutely doable, but for now requires quite some effort.
But even tampering seems pretty easy if the attacker has a more modest objective, of having you and your buddy each talking to one of the attacker's henchmen using voice changers. The emoji verification won't help here -- each henchman just gives the emoji for their respective conversation.
I feel it is implied that the latency is low enough (a few 100s of ms) to not impede the conversation, and that the parties have talked before and would notice if the tone of the conversation was completely different. Or maybe I'm misunderstanding.
To defend, could ask to verify emojis at a random point in the middle of the call to make the attacker's life more difficult. Especially right before discussing sensitive information ;-)
Or drip verify over the course of the call, e.g. "what's your 3rd emoji?", and listen for signs of an attacker cutting in and out.
Recently the French Government required its members to use it, but it's made by a French startup, AFAIK.
Do you have the projection of some binary string in the unicode emoji space? (then you'd need to chunk it and possibly use many emojis)
So is it the representation in emojis of a server controlled shared secret?
That'd make 2 clients talking to eachother through the server vulnerable to tampering at the server level (ex:MITM)
Shouldn't the 2 clients not involve the server for the secret? This would require each of them being able to access the other public key fingerprint without trusting what the server says. But if they see eachother fingerprint projected into the unicode emoji space, they would see different emojis.
I think I may be missing something obvious. I just don't understand this trick.
Emojis take up 32 bits each. So 4 emojis would be 128 bits.
Of course, this doesn't account for all the 4 byte unicode combos that don't result in an emoji, but still.
> The emphasis on the eyes in this style is reflected in the common usage of emoticons that use only the eyes, e.g. ^^
I always interpreted "^^" as equivalent to "this" or "ditto" -- arrows pointing at the immediately prior message. In hindsight, it could just as easily have been happy eyes!
That's... a good thing to be aware of as a heavy ^^ user myself! Thanks for sharing
sincerely,
the man in the middle
ps confirming this out of band will not add to your security
sleep 3 ; xdotool type --delay 5 "$(xclip -selection c -o)" ## Force-paste the secondary paste buffer (Ctrl+Shift+c)Another approach is to host the keys on a HTTPS endpoint on our official domain name and their servers can fetch it programmatically and rely on TLS to verify that it is indeed our endpoint.
Now I'm curious, are you willing to disclose what line of work you do?
For me, it's security consultancy (code reviews, penetration tests, network scanning... occasionally physical security tests or other related things, but those three are the bread-and-butter), so new employees get to verify everyone's fingerprint on chat. I've been trying to get people to use key signing for PGP (email) and about half the people get it, but now that Thunderbird dropped support for the Enigmail plugin, it also stopped supporting the web of trust and you just have to go through and verify everyone manually no matter how many signatures a key has from people that you've already verified. They managed to make the PGP experience even worse, which is honestly something that should grant an award
That's only as secure as the weakest CA in their trust store though, right? https://en.wikipedia.org/wiki/Certificate_authority#CA_compr...
IMO the best way is to put your key fingerprint on your business card and all your promotional materials. Then you just have to ensure that an adversary doesn't tamper with those :-)
(Of course, use of additional verification for the sake of redundancy is great too)
Spreading your Signal phone number is another approach. There was a recent HN thread discussing the merits of GPG vs Signal:
https://news.ycombinator.com/item?id=38557888
That's... like putting your username on your business card as though that's key material.
If you want to do fingerprint distribution, you should actually publish your Signal key's fingerprint (they call it 'safety number' to keep everyone on their toes). The phone number is your user identifier (like a unique username); the safety number is the key material you're meaning to publish as an alternative to the CA system.
"Each Signal one-to-one chat has a unique safety number that allows you to verify the security of your messages and calls with specific contacts."
https://support.signal.org/hc/en-us/articles/360007060632-Wh...
I don't see how I could publish my safety number if it's unique to each one-on-one chat?
I've been looking at the Signal website, and I don't actually see a way to distribute a fingerprint...
The key material shown in each chat is a concatenation of your fingerprint and their fingerprint, ordered alphabetically so that you are both shown the same thing. By checking two of your chats, you can find out which half is shared (that's yours) and which is unique (that's theirs).
The QR code contains more data, I think your phone number and perhaps a longer/stronger fingerprint (I looked into it once but forgot the details), so that's marginally more secure/foolproof to compare but also even harder to distribute since it'll only ever be valid for one contact
I vaguely remember critique towards PGP coming from Signal's corner of the internet (probably before it was called Signal) for having long-term stable keys and published fingerprints that make it so you want them to be long-term stable for verification purposes. Problem is, I looked for this critique a few months ago and can't find it anymore, so perhaps I'm putting words in their mouth that, instead, came from Signal supporters in a comment thread or so, though I also can't think of any other reason to hide your public key's fingerprint. Regularly swapping out keys protects from temporary key compromise situations, that's simply a fact, but it trades off being able to publish your key somewhere and people being able to use that to not have to trust "the server" (a central key distribution system) in an E2EE application. I have a different opinion than Signal seems to have on which variant is the lesser evil, but I can see why they've made the choice. (Imagine my surprise when finding out that Signal's public keys are long-term stable with indefinite validity.)
So, given that they seemingly don't want people to use their public key fingerprint the way that you can with PGP (printing it on a business card), I am not surprised if there is no user documentation on how to undo the concatenation. I'm not aware of such documentation myself, and it wouldn't be the first time that I have to dive into Signal's source code to find info on already-pushed-to-users functionality.
Let me know if you find any docs, though, because I seem to type out the explanation of how to use signal key fingerprints somewhat regularly (I should store it somewhere in reusable form, yeah) and sending a link with screenshots will be much nicer
You are absolutely right. Not only the weakest CA but now you needlessly involve a lot of third (or at least one third party).
It is not something I like but some of our partners demand it.
Yeah but how do you know if the key is correct if you're getting it for the first time?
>This is why (to my knowledge) package managers like apt still check http endpoints instead of https ones.
Your distro ships with a public key that lets you verify package signatures. TLS is redundant because you already have that trust anchor which came with the distro. (I would suggest using TLS anyway though, to force an attacker to break 2 layers of security.)
If you enable it, the first connection to a new host will say "matching host key fingerprint found in DNS" if DNSSec is operational AND the retrieved key matches.
Second, DNS lets you connect to someone else's host and get their public key without needing to find their (not your) CA.
Third, if you're not entering IP addresses by hand DNS forms some part of your systems trust no matter what you do. You're free to pin a domain's DNSSec KSK if you're very worried about someone in control of the whole Internet using that control to trick your first SSH connections.
The attack would be delicate to say the least .
Repeating, the purpose of DNS is for discovering sonething you don't administer. Like the SSH public key of a host, or the mailserver for a domain. CA certificates are for securing something you do administer.
(Of course, if it's free then you should strongly consider taking the obscurity, and privacy is a compelling argument all on its own. I just think blurring the line here is iffy.)
IMO the concept of "security by obscurity" is overused. Ultimately what matters is the cost for an attacker. If you're trying to design a secure system, your system will be stronger if you put it out there for people to criticize instead of keeping the details secret. This argument doesn't really apply to encrypting the packages you use. Security solely through obscurity isn't ideal, but what really matters is the cost/benefit ratio. It's way easier to encrypt your package downloads than it is to read all the source code changes on every package update. (Does anyone even do that?)
I agree with this article: https://danielmiessler.com/p/security-by-obscurity/
Nope: the article was a straight answer to the question in the title. Oh, well: it was short and to the point.
Until ProtonMail, which is what I use, using PGP was a great option. More people should try to encrypt communication.
Mail.app supports PGP? How?
When I used GPGMail, I didn't mind giving them a few dollars to support it. It's nice to not have to, though.
Pretty neat!
(Edit: not technically PGP, but PKI)
I'll take a guess.
There are large gaps between good RSA keys. 100 may be a valid key and 138, but not anything in between. Or, well, they're valid but they're trivially broken by having a divisor other than 1, itself, and the huge prime factors (the example of 100 and 138 are not good keys for exactly that reason; finding secure keys is left as an...). That's why we need RSA keys that are more than 256 bits in length: the key space is sparse and an attacker can, with some amount of efficiency, skip over the gaps. (This is all from years-old memories of how RSA works, don't take this for absolute certainty.)
What I'm guessing the answer to your question is, is this: it must be inefficient to reconstruct the key from an indexed form (e.g.: the first good key (100) has index 1, the second good key (138) index 2, etc.) without spending computational power disproportionate to the amount of extra resources that storing/transmitting the full key takes.
Now that I read the other answers again, maybe that's what Dylan meant, but to me that answer seems wrong because the public key is argued to not be uniformly random and that's precisely what compression algorithms are able/made to deal with. Perhaps not as efficiently as indexing can, but still. You wouldn't need to apply it to the prime factors or private key (doing that would, as they say, leak information), just the public part which people were saying is not fully random.
(I assume that it's harder to generate a public ECDSA key with a specific pattern, but elliptic curve stuff didn't become common until after hashes were used for key identifiers.)
How feasible it is to produce said pair is another story.
You can't control _all_ of the bytes, because it still needs to have the right structure and for you to have the corresponding private key, but 40 bytes of your choosing seems completely doable.
And if you can do that, you can impersonate someone else whose pubkey has the same 40 bytes. With a hash, any bit difference in any part of the key should result in a completely different fingerprint (hash collisions being extremely hard to find).
Since the person you're responding to didn't specify which public key type, and since it's not obvious that your mention of RSA is to the exclusion of other algorithms such as ECC, I felt like the comment is a bit misleading
I'm probably wrong on the details here , but there's probably some math tricks you could use to more easily find some private, public key pairs that end with the fingerprint.
But surely if I’m in a position where I’ve poisoned Mullvad’s executable, I’m also in a position where I’ve doctored the GPG sig to match? That sig just being something that I download from mullvad.net.
Unless it’s somehow independently verified, I’m not sure that I see the point?
(Or anything else similar. Not picking on Mullvad, it’s just the one that comes to mind.)
This seems overly specific to PGP. x509 (ie. "SSL") certificates have fingerprints as well, but they're almost always expressed in 128+bit formats, not truncated.
We could get on a phone call and I you could read the key back to me. The problem with this approach is that keys are long. A 4096-bit RSA key, for example, encoded in hexadecimal, is 1024 characters long."
If trust the "phone" and phone numbers but not the "internet" and IP numbers, then why not just use modems to transfer the public key.
Is the assumption that it would be impossible for both the person's website and his phone to be simultaneously compromised.
See https://dnscurve.org/integration.html
For example,
example.com. IN NS uz5bcx1nh80x1r17q653jf3guywz7cmyh5jv0qjz0unm56lq7rpj8l.example.com.
Why might someone trust a phone number more than trusting an IP address. Is the network qualititatvely different.
Is it easier to "steal/take over a domain name or a server" than to "steal/take over a phone number or a phone". What if someone can do both.
If you're going to transmit the hash via a secure side channel, just transmit the public key.
I think the author is confusing secrecy with authenticity. The only way to prove the public key you received is really the intended public key is with a third party certificate authority that authenticates it. Which is what TLS does.
But I will assume the author is smarter than me.
Am I missing something or is this article useless? Just use the same secure channel for the hash but for the public key.
And, by the way, signature in X.509 certificates ("TLS certificates") also hashes data to be signed - signed data input has to be smaller than sig size. Hence it also verifies pubkey indirectly.
> Maybe my site has been hacked and I don’t even know it.
How would the fingerprint help in this case? If the fingerprint is also hosted on the website.
https://en.wikipedia.org/wiki/DNS-based_Authentication_of_Na...
A public key thumb print is a hash of the public key. It useful because it is easy to manually validate.
Edit: when would I need to manually validate? I'm guessing it is used as an identifier when configuring a deployment for a system to a particular environment, for example?
But then I remembered post-quantum crypto. Yeah, gonna need those fingerprints.
It's visually easier to distinguish differences in randomart than with a hex encoded hash value, but there are very few situations where that's actually a useful property in practice. If you actually are able to share the whole value, you probably have a computerized way of sharing information that you trust and you might as well just programmatically compare it to what you expect and that can detect even a single bit difference regardless of the format.
A version of the idea that might be more useful would be something that translates hex values into something that's easy for humans to share in any number of out-of-band ways. Translating a hex value into English words would be great for verbal verification for example. Or if we're being very 2023, maybe use the binary input to feed an AI image generation algorithm and you describe the image to the receiver.
Length isn't the only problem. In theory, real-time voice MITM with an AI swap on the verification readback such that it matches the modified key is a real possibility these days (albeit remote).
This makes no sense, the article is not from the 80-s, copy-pasteable modes of immediate communication has reached even grannies!
> Manually verifying 40 characters is feasible; manually verifying 1024 characters is not.
It's not, no user should ever be exposed to this nonsense of manual verification of such long strings