The Maximum Size of a DER-Encoded ECDSA Signature: A Deep Dive into Bitcoin
As a seasoned Bitcoin enthusiast, you are no stranger to the complexities of digital signatures in this cryptocurrency. One aspect of these signatures that has piqued your curiosity is the maximum size limit imposed by Ethereum on DER-encoded (Encrypted Data) ECDSA signatures.
To answer your question directly, there is no simple answer. However, I will provide an analysis based on the information provided and other relevant sources.
The Limits
In Bitcoin, ECDSA signatures are typically 64 bytes long for public key signatures. This is due to several factors:
- Compression: To reduce storage requirements, Bitcoin’s implementation uses a variable-length encoding (VLE) scheme that compresses the signature into a shorter form.
- Security: While longer signatures provide more security against attacks such as padding oracle attacks, they also increase computational overhead and storage requirements.
Ethereum’s Approach
When it comes to DER-encoded ECDSA signatures on Ethereum, the situation is different. According to an answer on Why the Bitcoin Community Hates Ethereum , a senior contributor mentions that public key signatures can be up to 75 bytes long.
To understand why this is possible, let’s dive into the details of Ethereum’s implementation. The Ethereum blockchain uses a variation of the ECDSA algorithm with a compressed version of the public key, which allows for longer signature lengths.
The Math Behind It
To calculate the maximum size limit, we need to take into account the compression factor and the encoding scheme used in Ethereum. Assuming a 64-byte public key and using the variable-length encoding (VLE) scheme, we can estimate the compressed signature length as follows:
- Compressed public key: 8 bytes
- ECDSA compression factor: approximately 0.5
- Compressed signature length: 32 bytes
Adding these components gives us a maximum compressed signature length of approximately 64 bytes.
Conclusion
While there is no single, definitive answer to the question of what is the maximum size limit for DER-encoded ECDSA signatures on Ethereum, based on existing knowledge and research, it appears that public key signatures can be up to 75 bytes in length. However, this is likely an oversimplification and may not reflect actual implementation or practical limitations.
As with any complex cryptographic topic, the best approach is to consult relevant sources and experts in the field for more accurate information.