When you say,
88 byte ECDSA public key, I think what you are actually referring to is a 65-byte uncompressed public key, which has been base64-encoded. Base64 encoding requires 4 characters for every 3 bytes encoded, then the string's length is padded up to a multiple of 4. S0, base64-encoding 65 bytes would result in a base64-encoded string 88 characters long.
Assuming your are given a base64-encoded string 88 characters in length, like so:
You can convert it to hexadecimal using the following command:
echo -n 'BFCGOtZKh66KL+g8GvGoQDy1P1PkhthRHa2KBIh+WyNSLNRwJDRTopn6nncjdxYQOrwRod84hV7W8u4YfpxYK6Y=' | base64 -d | xxd -p
As you can see, this is 65 bytes (each pair of hexadecimal characters represents one byte). The first hexadecimal character is
04 (to signify a 65-byte uncompressed public key), followed by the 32-byte X value, followed by the 32-byte Y value.
Thank you for your comment. This is helpful.
The hex string that you provided is:
The first 23 bytes are just ASN.1 stuff. The remaining 65 bytes contain the uncompressed public key.
The first hexadecimal character is
04 (to signify a 65-byte uncompressed public key), followed by the 32-byte X value, followed by the 32-byte Y value. So, the X and Y values are:
To check if this is correct, we can verify that the point (X, Y) is on the secp256k1 curve, using the short python script below, based on the definition of the secp256k1 curve. The script prints
True if the point is on the curve, and
False if not:
ispoint=(y * y - x * x * x - a * x - b) % p == 0
Running the script prouduces:
*As always, when playing with Bitcoin addresses, be sure that you have the correct private key corresponding with your Bitcoin address before sending a large amount of Bitcoin to this address. You might want to send a small amount of Bitcoin to the address first, and check that you can then spend these coins (using the private key to sign the transaction), before sending a large amount of Bitcoin to this address.