Live data from Hacker News

Login with a Public Ed25519 Key

github.com

31–40 of 85 posts

Re: Login with a Public Ed25519 Key

#31

This is very likely insecure. A malicious web site could replay your Auth flow to another website where you have an account that uses the same keypair.

Why would you use the same keypair for multiple sites?

What's stopping an idiot from doing so?

Re: Login with a Public Ed25519 Key

#32
post #31

Earlier quoted context omitted.

Why would you use the same keypair for multiple sites?

What's stopping an idiot from doing so?

The fact that it's a bare-bones technical demonstration and an idiot would have no wherewithal or purpose to implement it.

Re: Login with a Public Ed25519 Key

#33

This is very likely insecure. A malicious web site could replay your Auth flow to another website where you have an account that uses the same keypair.

right, would be better for the site to encrypt a one-time-use password with the public key you've, then all you have to do is decrypt it and log in, proving you possess the private key does this have a name? always seemed like the obvious way to do it but I've never implemented auth edit: I guess this is similar to a challenge/sign/verify signature scheme like webauthen, but is it inferior in some way?

This is exactly what I use for an emailless password reset. Instead of sending a reset token via email, it's just encrypted with public key and user can decrypt token for reset password. There for I don't require to collect email address for account. Of course this could also be used as login method. On the downside, for UX purposes decryption can run in browser by passing private key. I have mixed feelings about pasting PKs into browser.

Re: Login with a Public Ed25519 Key

#34
post #13

This feels very broken: - The suggestion of signing the timestamp means that any web site you log into with this can log in as you to any other web site you log in to - Given that there's no namespacing of the signed messages, users can be easily phished into providing a response to a challenge posed by a different web site - It's not obvious what advantages this has over using client cert authentication with TLS, an…

> Given that there's no namespacing of the signed messages, users can be easily phished into providing a response to a challenge posed by a different web site This is key. The whole benefit of hardware token-based authentication is that it is resistant against phishing (because SMS 2-factor and TOTP, e.g. Google Authenticator, are NOT phishing resistant). So this approach is more complicated than those other 2 2FA ap…

As the other commenter said, this has nothing to do with hardware tokens. This has to do with the user agent (the browser) passing the (browser-verified) origin to the authenticator (which can be hardware or software). But, critically, the signatures are also origin-scoped—the message that your user-agent correctly passes to google.com cannot be used by google to sign into microsoft.com.

What’s broken here is not that user agents are or aren’t validating the origin (or relying party)—it’s that the same key+challenge is used for every origin. (As a result, there’s nothing for the user agent to validate, because the same signature is used for all origins!)

It’s like using the same password for every website you log into. As severe understatement, this is a very, very bad protocol design, and nobody should use it.

Re: Login with a Public Ed25519 Key

#35
post #2

> Much simpler than webauthn. Having recently had to upgrade from u2f to webauthn, the complexity involved in getting webauthn right cannot be understated, especially when comparing it to something like OTP. This flow seems simpler but more annoying for the end-user, right? They would have to generate the signed message themselves and then paste it into the browser. Whereas with webauthn you just touch your security…

This flow is also insecure.

Ideally, we make WebAuthn easier to use (via libraries, identity providers, etc), rather than, you know, replacing it with something less secure than passwords.

Just sayin’. ;)

Re: Login with a Public Ed25519 Key

#36

As far as I can tell, there's no nonce (for replays) or counter (for stolen keys) in this scheme, both of which are fundamental to the security model that WebAuthn provides. There's also no formal sliding window for server times or key timeliness constraints. In many regards, this scheme is no better than a strong password in terms of guarantees provided. In terms of UX, it's strictly worse than a password (and those…

It’s worse. It encourages the use of the same strong “password” on every website?

Re: Login with a Public Ed25519 Key

#38

It's an okay-ish alternative to a password, but if we're going to use cryptographic secrets for auth, I'd hope to see more of a handshake and challenge-response involved. As it stands, anyone who has access to a private key momentarily can generate any number of tokens for use, practically indefinitely (just sign a timestamp for every second for the next N years). This system is open to replay attacks as well. It als…

The web service stores used signatures. They cannot be re-used and are only good for about 30 seconds. Try to register on the demo site and see if you can actually replay a signature.

Re: Login with a Public Ed25519 Key

#39
post #13

This feels very broken: - The suggestion of signing the timestamp means that any web site you log into with this can log in as you to any other web site you log in to - Given that there's no namespacing of the signed messages, users can be easily phished into providing a response to a challenge posed by a different web site - It's not obvious what advantages this has over using client cert authentication with TLS, an…

This is not meant for SSO.

Signatures are only valid for about 30 - 60 seconds (depending on the server config) and may not be re-used after a successful login. Try to create a key pair and log into the test website. Then try to use the same signature to do so again.

Re: Login with a Public Ed25519 Key

#40
post #4

"Much simpler than webauthn" Is it? Trying out https://webauthn.io/ , I can log in using a security key without hitting the command line and copy & pasting some base64 string. "Private keys never leave end users' devices" How does it guarantee that, considering it saves the private key in the file system? It can be trivially copied off device from there. The examples also appear to encourage key reuse, and since the…

Users can have a different key pair for each website. Also, signatures may not be re-used and are only valid for a few seconds. Try to create a key pair and login to the test website.
Post reply on HN