Live data from Hacker News

WireGuard vanity keygen

github.com

11–20 of 32 posts

Re: WireGuard vanity keygen

#11

Reminds me of people where I worked having vanity GPG key ids. I'm wondering how much CPU time and on what machines it took to find them.

Key IDs are based on fingerprints and fingerprints are calculated by SHA-1 hashing the primary key's public key and the creation timestamp. A computationally easy way to influence the fingerprint is to tweak the creation timestamp which is a 32 bit Unix epoch value. Of course it needs to be in the past so the range is limited but it's faster to do it this way instead of recomputing the cryptographic key.

Re: WireGuard vanity keygen

#12

Reminds me of people where I worked having vanity GPG key ids. I'm wondering how much CPU time and on what machines it took to find them.

Key IDs are based on fingerprints and fingerprints are calculated by SHA-1 hashing the primary key's public key and the creation timestamp. A computationally easy way to influence the fingerprint is to tweak the creation timestamp which is a 32 bit Unix epoch value. Of course it needs to be in the past so the range is limited but it's faster to do it this way instead of recomputing the cryptographic key.

> the creation timestamp which is a 32 bit Unix epoch value.

GPG keys aren't 2038-safe?

Re: WireGuard vanity keygen

#13
post #10

I love that the app has ARM64 builds for Windows. I use a Windows ARM64 laptop daily, and every native ARM64 build I come across brings me joy. Take note, Discord.

It’s funny (and annoying) the disparity between Arm builds for macOS and Windows. I understand why it happens but even Microsoft has produced Arm native versions of apps for macOS before Windows.

Re: WireGuard vanity keygen

#16

Earlier quoted context omitted.

Key IDs are based on fingerprints and fingerprints are calculated by SHA-1 hashing the primary key's public key and the creation timestamp. A computationally easy way to influence the fingerprint is to tweak the creation timestamp which is a 32 bit Unix epoch value. Of course it needs to be in the past so the range is limited but it's faster to do it this way instead of recomputing the cryptographic key.

> the creation timestamp which is a 32 bit Unix epoch value. GPG keys aren't 2038-safe?

PGP is pretty old at this point, and kinda jank.

RFC 1991 only gives them 4 bytes (32bit); not sure if there have been any later additions to rectify this but I don’t think so since even the latest RFC (9580) has them listed as 4 bytes…

https://datatracker.ietf.org/doc/html/rfc1991

https://www.rfc-editor.org/rfc/rfc9580#section-3.5

Re: WireGuard vanity keygen

#18
post #10

I love that the app has ARM64 builds for Windows. I use a Windows ARM64 laptop daily, and every native ARM64 build I come across brings me joy. Take note, Discord.

Discord? Why use the native app instead of just the browser version? Use e.g. Ferdium (https://ferdium.org/) to have all your messaging apps in one place.

Re: WireGuard vanity keygen

#19
post #10

I love that the app has ARM64 builds for Windows. I use a Windows ARM64 laptop daily, and every native ARM64 build I come across brings me joy. Take note, Discord.

Discord? Why use the native app instead of just the browser version? Use e.g. Ferdium ( https://ferdium.org/ ) to have all your messaging apps in one place.

Because that way you have everything under one electron app that is maintained by one person.

Re: WireGuard vanity keygen

#20

Given a situation in which you have a decent way to guess user names, such as ‘first-initial-lastname’ how much entropy does this take away? It seems like I’ve seen several of these over the years when a patch to parse comments would probably be simpler and less of an anti-pattern. What am I missing here? Edit: or a config dir that allows multiple key files.

I’m not a crypto expert at all, but surely it takes away no entropy because the fixed prefix is on the public key not the private key?

My reasoning is that the full public key could be seen as a 256 bit fixed prefix, but knowing the public key is meant to give no information about the private key by design.

Post reply on HN