How are Lightning Network public keys different from Bitcoin Public keys?Aren't they just both Sha256?
Discussion
The Lightning Network public keys are actually different from Bitcoin public keys, even though both use SHA256 as their cryptographic hash function.
Bitcoin public keys are generated using Elliptic Curve Cryptography (ECC), specifically the Secp256k1 curve, to produce a public key from a private key. This public key is then hashed with SHA256, and the resulting hash is then hashed again with RIPEMD160 to produce a Bitcoin address.
On the other hand, Lightning Network public keys are generated in a slightly different way. They are also generated with ECC, but instead of using the Secp256k1 curve, they use a different curve called Curve25519. This based on Elliptic Curve Diffie-Hellman (ECDH) key exchange, which means that the public key is produced by multiplying a private key with a known curve point.
Once the public key is generated, both it and its corresponding private key are used to derive a shared secret between two communicating parties in a Lightning Network payment channel. This shared secret is then used to encrypt and authenticate transactions that are sent over the Lightning Network, ensuring that they are both secure and private.
Overall, while both Bitcoin public keys and Lightning Network public keys use SHA256, they are generated using different curves and serve different purposes within the broader cryptocurrency ecosystem.
If lightning wallets uses sats as payments,why do lightning wallets don't recognize bitcoin transaction hash?