Медиа Центр

Ethereum: Why is it impossible to derive a private key from a public key?

The Ethereum public key equation, “K = k * G,” may seem like a simple formula for deriving a private key from a public key. However, this assumption is fundamentally flawed in the context of cryptography and blockchain technology.

Cryptocurrency and smart contract platforms, including Ethereum, use public and private keys to store and communicate sensitive information such as balances, transactions, and cryptographic secrets. The idea behind a public key infrastructure (PKI) like Ethereum is that a shared secret key, known as the private key (“k”), can be used to encrypt messages and decrypt them with the corresponding public key.

However, there are several reasons why it is not possible to derive a private key from an Ethereum public key:

  • Key exchange protocol: The Ethereum public key equation “K = k * G” is used when exchanging keys between parties (e.g. when two users want to agree on a shared secret key). However, this equation assumes that both parties have access to the same generator point (“G”). This means that even if one party knows its private key (“k”), it cannot use it to encrypt and decrypt a message without access to the corresponding public key.
  • Computational complexity:

    The mathematical operations required to derive a private key from a public key are expensive, making them impractical for large-scale applications. First, the multiplication “k * G” is an elliptic curve point doubling (ECDPA) algorithm with a time complexity of O(sqrt(n)), where n is the order of the generator (G). For most practical purposes, this means that even if one party knows its private key, it cannot easily derive it from the public key.

  • Mathematical limitations: The mathematical representation of a point on an elliptic curve (ECC) can be viewed as a set of 2D coordinates, where each coordinate corresponds to the “x” and “y” components of the point. In the Ethereum implementation, points are represented using 4 bytes (32 bits), which is relatively small compared to other cryptographic protocols that use more advanced elliptic curve algorithms, such as NIST-validated curves (e.g., secp256k1 or ed25519). This limited representation size makes it difficult to accurately represent the complexity of a point in ECC.
  • Ensured security: The Ethereum private key is often collateralized by a “nonce” value, which can be used to prevent replay attacks and ensure the integrity of transactions. Even if one party knows its private key, it cannot easily use it without knowing the corresponding nonce value.

In summary, while the public key equation “K = k * G” may seem like a simple formula for deriving a private key from a public key, it is fundamentally flawed due to computational complexity, mathematical limitations, and security considerations. Ethereum uses other protocols and mechanisms to securely store and exchange cryptographic secrets, such as the Elliptic Curve Digital Signature Algorithm (ECDSA) with HMAC-SHA256.

Recommendations:

  • Use a more secure protocol for storing and exchanging keys, such as ECDSA with HMAC-SHA256.
  • Consider using a zero-knowledge verification system, such as zk-SNARK or zk-TREX, to provide more efficient and secure cryptographic services.
  • Always use secure practices such as password hashing and password rotation to protect user identities and sensitive information.

I hope this explanation helps!

ethereum corrupted database