<blockquote>
<p>Is there any way to create a valid transaction that modern nodes will accept using this non-standard public key format?</p>
</blockquote>
<p>No. The consensus rules for public keys require that they follow the specific format. If the pubkey does not follow that format, then it will not be recognized as a pubkey and therefore validation will fail. Since your pubkey does not follow that format, it is not possible to create a valid transaction that spends the outputs.</p>
<p>Those coins are unspendable, sorry for your loss.</p>

CC BY-SA 4.0
2024-10-30T05:13:58.777Z
2024-10-30T05:13:58.777Z
Ava Chow
<p>Title: Help recovering funds: Wallet created with non-standard public key format (no 02/03/04 prefix)</p>
<p>I have a Bitcoin address (19CLgD8MqfWzE3BzzUGjyXKM4EP72XgYJ8) containing ~0.064 BTC that was created using a non-standard public key format. I can cryptographically prove ownership but can't create a valid transaction due to the format issue.</p>
<p>Technical details:</p>
<ul>
<li>Public key (raw bytes, no prefix): 1f6483705a513b4d81fca6369b6bfca80c9c103eb57dbda575b94b8127727aba8c0019d4f08d49187ead5294d641f35a419e14c8783bb1436ae06f4969c93108</li>
<li>Address: 19CLgD8MqfWzE3BzzUGjyXKM4EP72XgYJ8</li>
</ul>
<p>The wallet was created using this Python script:</p>
<pre class="lang-python prettyprint-override"><code>from ecdsa import SigningKey, SECP256k1
public_key = SigningKey.from_string(bytes.fromhex(private_key_hex), curve=SECP256k1).get_verifying_key()
public_key_bytes = public_key.to_string()  # Used raw bytes without standard Bitcoin prefix
</code></pre>
<p>I can generate the correct address (verified on blockchain), but can't create valid transactions because:</p>
<p>The public key lacks the standard 02/03 (compressed) or 04 (uncompressed) prefix
Attempts to import to standard wallets fail
Raw transaction creation fails with &quot;mandatory-script-verify-flag-failed (Public key is neither compressed or uncompressed)&quot;</p>
<p>I've tried:</p>
<p>Converting to WIF format (doesn't maintain correct public key format)
Using older Bitcoin Core versions
Creating raw transactions maintaining original format
Various public key format conversions</p>
<p>Is there any way to create a valid transaction that modern nodes will accept using this non-standard public key format?</p>

<bitcoin-core><cryptography>
Help recovering funds: Wallet created with non-standard public key format (no 02/03/04 prefix)
Lucius
# Help recovering funds: Wallet created with non-standard public key format (no 02/03/04 prefix)

(Asked by: username_0 on 2024-10-30)

Title: Help recovering funds: Wallet created with non-standard public key format (no 02/03/04 prefix)

I have a Bitcoin address (19CLgD8MqfWzE3BzzUGjyXKM4EP72XgYJ8) containing ~0.064 BTC that was created using a non-standard public key format. I can cryptographically prove ownership but can't create a valid transaction due to the format issue.

Technical details:

* Public key (raw bytes, no prefix): 1f6483705a513b4d81fca6369b6bfca80c9c103eb57dbda575b94b8127727aba8c0019d4f08d49187ead5294d641f35a419e14c8783bb1436ae06f4969c93108
* Address: 19CLgD8MqfWzE3BzzUGjyXKM4EP72XgYJ8

The wallet was created using this Python script:

```python
from ecdsa import SigningKey, SECP256k1
public_key = SigningKey.from_string(bytes.fromhex(private_key_hex), curve=SECP256k1).get_verifying_key()
public_key_bytes = public_key.to_string()  # Used raw bytes without standard Bitcoin prefix

```

I can generate the correct address (verified on blockchain), but can't create valid transactions because:

The public key lacks the standard 02/03 (compressed) or 04 (uncompressed) prefix
Attempts to import to standard wallets fail
Raw transaction creation fails with "mandatory-script-verify-flag-failed (Public key is neither compressed or uncompressed)"

I've tried:

Converting to WIF format (doesn't maintain correct public key format)
Using older Bitcoin Core versions
Creating raw transactions maintaining original format
Various public key format conversions

Is there any way to create a valid transaction that modern nodes will accept using this non-standard public key format?

**Tags:** bitcoin-core, cryptography


---

## 1 answers

### Answer by username_1 on 2024-10-30. Score: 3 | Accepted answer

> Is there any way to create a valid transaction that modern nodes will accept using this non-standard public key format?

No. The consensus rules for public keys require that they follow the specific format. If the pubkey does not follow that format, then it will not be recognized as a pubkey and therefore validation will fail. Since your pubkey does not follow that format, it is not possible to create a valid transaction that spends the outputs.

Those coins are unspendable, sorry for your loss.


---

