Live data from Hacker News

Why does the all 0 public key have a known private key in SR25519 and ED25519?

substrate.stackexchange.com

31–40 of 64 posts

Re: Why does the all 0 public key have a known private key in SR25519 and ED25519?

#31
post #25
post #17

Earlier quoted context omitted.

1. I have negligible chance of understanding your abstract algebra and 2. I'll never, ever, get to use it in the real world.

Might as well take an Introduction to Semiconductor Devices engineering course while you're at it. Just as relevant when it comes to software development.

Abstract algebra is more relevant to the general practice of cryptography engineering than semiconductor engineering is to the general practice of writing software.

Re: Why does the all 0 public key have a known private key in SR25519 and ED25519?

#32

I’m a coauthor of Ristretto. There is a much more concise explanation than in the linked post: in Ristretto, the encoding of group elements was constructed so that the encoding of the identity (zero) element of the group is the all-zero byte string. So it’s not surprising that the all-zero byte string has a known private key: it’s the all-zero secret key. This aspect of the encoding makes it very easy to check whethe…

Thanks for the layman’s explanation, I didn’t realise something like that was even possible! What are some use cases for using it? Are they all crypto-currency related?

Re: Why does the all 0 public key have a known private key in SR25519 and ED25519?

#33

I’m a coauthor of Ristretto. There is a much more concise explanation than in the linked post: in Ristretto, the encoding of group elements was constructed so that the encoding of the identity (zero) element of the group is the all-zero byte string. So it’s not surprising that the all-zero byte string has a known private key: it’s the all-zero secret key. This aspect of the encoding makes it very easy to check whethe…

Just out of curiosity: is a similar problem (generate a valid public key that surely nobody including myself can know the private key of) solvable for RSA?

That problem can't be solvable in any context. There's no way to rule out the possibility that someone else in the world knows your mathematical secret.

Re: Why does the all 0 public key have a known private key in SR25519 and ED25519?

#34
I wasn't aware of this issue and it's kind of interesting because two of my blockchain projects use address 0 as the token burn address (which would basically appear to mean that a hacker could steal all the tokens ever burned). I'm now thinking that this may have scared away some potential investors. But luckily, only one of my projects is based on elliptic curves and address 0 is locked explicitly in the code (no funds can ever be moved from that address, even if the private key is known) - I guess years of coding experience taught me to always be extra careful with such edge cases. My other project is based on Lamport OTS and Merkle Signature Trees so is not affected either. Still, the PR implications are a concern.

Re: Why does the all 0 public key have a known private key in SR25519 and ED25519?

#35

Earlier quoted context omitted.

Just out of curiosity: is a similar problem (generate a valid public key that surely nobody including myself can know the private key of) solvable for RSA?

That problem can't be solvable in any context. There's no way to rule out the possibility that someone else in the world knows your mathematical secret.

This reasoning doesn't hold if we're still operating within the base assumptions of RSA (and if we're not, no private key is secure)

Re: Why does the all 0 public key have a known private key in SR25519 and ED25519?

#36

I’m a coauthor of Ristretto. There is a much more concise explanation than in the linked post: in Ristretto, the encoding of group elements was constructed so that the encoding of the identity (zero) element of the group is the all-zero byte string. So it’s not surprising that the all-zero byte string has a known private key: it’s the all-zero secret key. This aspect of the encoding makes it very easy to check whethe…

Thanks for the layman’s explanation, I didn’t realise something like that was even possible! What are some use cases for using it? Are they all crypto-currency related?

One use case for generating group elements with verifiably unknown discrete logs is for a commitment scheme, like a Pedersen commitment.

In a Pedersen commitment, you have two generators, let’s call them G_value and G_blinding. To commit to a value v, you choose a random blinding factor v_blinding and form the commitment C_v as

C_v = v * G_value + v_blinding * G_blinding

Later, you can publish (v, v_blinding) to open the commitment.

Pedersen commitments are really useful because they’re homomorphic: adding commitments produces a commitment to the sum of the values. So you can use them to do a limited form of computation on hidden data.

Where does the verifiable generation come in? Since G_value and G_blinding are both in the same prime-order group, there exists _some_ value r so that G_value = r * G_blinding. If someone knew this relation r, they could forge commitments, for instance

C_v = (v+1) * G_value + (v_blinding - r) * G_blinding

and claim that C_v is a commitment to the value v+1 instead, because knowledge of the relation r lets them “slide value” between the “basis vectors”.

So Pedersen commitments are only _computationally_ binding: finding r requires solving the discrete logarithm problem, which we assume is hard, as long as the generators G_value and G_blinding were generated through some verifiable procedure.

On the other hand, though, they’re perfectly hiding, since knowing r lets you find a valid blinding factor for _any_ value, so even an infinitely computationally powerful adversary can’t determine which value was used after the fact.

Re: Why does the all 0 public key have a known private key in SR25519 and ED25519?

#37
post #35

Earlier quoted context omitted.

That problem can't be solvable in any context. There's no way to rule out the possibility that someone else in the world knows your mathematical secret.

This reasoning doesn't hold if we're still operating within the base assumptions of RSA (and if we're not, no private key is secure)

Let’s try it this way: what if two people, unlikely as it may be, generate the same key pair? Two people know the private key, and factoring is still hard.

Re: Why does the all 0 public key have a known private key in SR25519 and ED25519?

#38
post #31
post #25

Earlier quoted context omitted.

Might as well take an Introduction to Semiconductor Devices engineering course while you're at it. Just as relevant when it comes to software development.

Abstract algebra is more relevant to the general practice of cryptography engineering than semiconductor engineering is to the general practice of writing software.

I'm sure it is but it also has negligible application to quotidian grunt-programming which is regrettably what 99.9% of people on HN do. Learning a skill that seems never to get used seems completely pointless to me. That's a critique of industry, not of linear algebra by the way.

Re: Why does the all 0 public key have a known private key in SR25519 and ED25519?

#39
post #38
post #31

Earlier quoted context omitted.

Abstract algebra is more relevant to the general practice of cryptography engineering than semiconductor engineering is to the general practice of writing software.

I'm sure it is but it also has negligible application to quotidian grunt-programming which is regrettably what 99.9% of people on HN do. Learning a skill that seems never to get used seems completely pointless to me. That's a critique of industry, not of linear algebra by the way.

I agree that abstract algebra has only marginal important to the general practice of programming. I only dispute that it's marginal for cryptography engineering.

Re: Why does the all 0 public key have a known private key in SR25519 and ED25519?

#40
post #39
post #38

Earlier quoted context omitted.

I'm sure it is but it also has negligible application to quotidian grunt-programming which is regrettably what 99.9% of people on HN do. Learning a skill that seems never to get used seems completely pointless to me. That's a critique of industry, not of linear algebra by the way.

I agree that abstract algebra has only marginal important to the general practice of programming. I only dispute that it's marginal for cryptography engineering.

I don't believe anyone said that it was marginal for crypto?
Post reply on HN