Skip to main content
Make sentence more precise
Source Link
Ismael
  • 30.3k
  • 23
  • 54
  • 97

Both Ethereum and Bitcoin uses the same type of elliptic curve for private keys secp256k1. The difference is Ethereum formats addressaddresses as hexadecimal and bitcoin as base58.

It can be made such that ecrecover to work for both, it returns the raw 20 bytes without address formatting.

One possible issue is that Ethereum uses keccak256 for signing, and bitcoin libraries normally use sha256, so you have to use ethereum libraries for signing.

Both Ethereum and Bitcoin uses the same type of elliptic curve for private keys secp256k1. The difference is Ethereum formats address as hexadecimal and bitcoin as base58.

It can be made such that ecrecover to work for both, it returns the raw 20 bytes without address formatting.

One possible issue is that Ethereum uses keccak256 for signing, and bitcoin libraries normally use sha256, so you have to use ethereum libraries for signing.

Both Ethereum and Bitcoin uses the same elliptic curve for private keys secp256k1. The difference is Ethereum formats addresses as hexadecimal and bitcoin as base58.

It can be made such that ecrecover to work for both, it returns the raw 20 bytes without address formatting.

One possible issue is that Ethereum uses keccak256 for signing, and bitcoin libraries normally use sha256, so you have to use ethereum libraries for signing.

Source Link
Ismael
  • 30.3k
  • 23
  • 54
  • 97

Both Ethereum and Bitcoin uses the same type of elliptic curve for private keys secp256k1. The difference is Ethereum formats address as hexadecimal and bitcoin as base58.

It can be made such that ecrecover to work for both, it returns the raw 20 bytes without address formatting.

One possible issue is that Ethereum uses keccak256 for signing, and bitcoin libraries normally use sha256, so you have to use ethereum libraries for signing.