Files
wolfssl/wolfcrypt/src
David Garske a9f29dbb61 Adds strict checking of the ECDSA signature DER encoding length. With this change the total signature size should be (sequence + r int + s int) as ASN.1 encoded. While I could not find any "must" rules for the signature length I do think this is a good change.
If the old length checking method is desired `NO_STRICT_ECDSA_LEN` can be used. This would allow extra signature byes at the end (unused and not altering verification result). This is kept for possible backwards compatibility.

Per RFC6979: `How a signature is to be encoded is not covered by the DSA and ECDSA standards themselves; a common way is to use a DER-encoded ASN.1 structure (a SEQUENCE of two INTEGERs, for r and s, in that order).`

ANSI X9.62: ASN.1 Encoding of ECDSA:

```
ECDSA-Sig-Value ::= SEQUENCE {
  r INTEGER,
  s INTEGER
}
```

Fixes #2088
2019-02-14 12:05:34 -08:00
..
2018-05-16 15:47:13 -04:00
2018-04-12 16:47:58 -07:00
2018-06-26 15:17:46 -07:00
2018-06-26 15:17:46 -07:00
2018-06-26 15:17:46 -07:00
2018-01-11 06:53:34 +09:00
2018-05-16 15:47:12 -04:00
2018-06-26 15:17:46 -07:00
2018-11-06 18:35:12 -08:00
2018-12-20 10:52:17 -07:00
2018-08-31 17:55:49 +10:00
2018-09-05 14:51:50 -06:00
2018-06-26 15:17:46 -07:00
2018-06-26 15:17:46 -07:00
2018-06-26 15:17:46 -07:00
2018-06-26 15:17:46 -07:00
2019-01-11 21:07:23 -08:00
2018-06-26 15:17:46 -07:00
2018-06-26 15:17:46 -07:00
2019-01-18 16:25:24 -07:00