Sign and verify payload strings using secure ECDSA certificates.
For decades, RSA was the gold standard of public-key cryptography. However, RSA relies on the mathematical difficulty of factoring massively large prime numbers. As computers got faster, RSA keys had to get longer and longer to stay secure, bloating up to 2048 or 4096 bits.
Elliptic Curve Cryptography (ECC) uses completely different math: the algebraic structure of elliptic curves over finite fields. The math is so structurally strong that a tiny 256-bit ECC key (using the P-256 curve) offers the exact same level of cryptographic security as a massive 3072-bit RSA key.
When working with ECDSA in the browser via Web Crypto (crypto.subtle.sign), the signature output is returned as a Raw (IEEE P1363) format. This is simply the r and s values concatenated together (e.g., exactly 64 bytes for P-256).
However, Node.js and OpenSSL default to the DER (ASN.1) format, which includes extra length bytes and headers. A signature generated in the browser will fail verification in Node (and vice-versa) unless you explicitly convert between Raw and DER formatting.
When generating an ECDSA signature, the algorithm requires a completely random number k (a nonce) for that specific signature.
The fatal flaw: If an implementer accidentally uses the exact same random number k to sign two different messages with the same private key, an attacker can use simple high-school algebra to instantly calculate the Private Key! This exact failure was famously exploited in 2010 to completely compromise the Sony PlayStation 3's master signing key.
Why has modern cryptography largely shifted from RSA to ECDSA?