Crypto Keys: Understanding Public Key Cryptography
A public key in crypto is derived mathematically from a private key using elliptic curve multiplication, a one-way function that's fast to compute forward but impossible to reverse.
Bitcoin and Ethereum use the secp256k1 elliptic curve, which produces 256-bit private keys and 512-bit uncompressed public keys (or 257-bit compressed public keys).
The wallet address is not the same as a public key; it's a hashed version of the public key designed to be easier to share and more resistant to certain theoretical attacks.
Losing the private key means permanent loss of access, while sharing the public key or address carries no risk to fund security.