Re:Elliptic Curve Cryptography: ECDH and ECDSA
by tptacek on Saturday May 30, 2015 @09:04PM
(#9632542)
Some things to be aware of if this article is inspiring to you:
1. You have to be especially careful with ECDH that the points you receive from your counterparty are valid for the specific domain parameters you're using, or else you can open yourself up to attacks. For this reason among others, cryptographers are converging on modern curves specifically designed to make it easier and safer to communicate points; Curve25519 is an "early" example of such a modern curve.
2. There's an emerging consensus that ECDSA is unsafe, due to its dependency on a random nonce. That nonce is surprisingly hard to get right: it needs to be a full-width number, with that width defined by the curve parameters, for which all the bits are unpredictable. This is an even stricter requirement than a CBC IV or a CTR nonce. Single-digit bit biases in ECDSA nonces have been exploited to recover keys!
Very few people write their own elliptic curve core code; most modern systems either use Nacl, or pilfer Curve25519 from it.
1. You have to be especially careful with ECDH that the points you receive from your counterparty are valid for the specific domain parameters you're using, or else you can open yourself up to attacks. For this reason among others, cryptographers are converging on modern curves specifically designed to make it easier and safer to communicate points; Curve25519 is an "early" example of such a modern curve.
2. There's an emerging consensus that ECDSA is unsafe, due to its dependency on a random nonce. That nonce is surprisingly hard to get right: it needs to be a full-width number, with that width defined by the curve parameters, for which all the bits are unpredictable. This is an even stricter requirement than a CBC IV or a CTR nonce. Single-digit bit biases in ECDSA nonces have been exploited to recover keys!
Very few people write their own elliptic curve core code; most modern systems either use Nacl, or pilfer Curve25519 from it.