aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorNaoki MATSUMOTO <33079554+naoki9911@users.noreply.github.com>2022-10-26 20:18:06 +0900
committerGitHub <noreply@github.com>2022-10-26 13:18:06 +0200
commitcd4865d88c368095e131d2d95d3cce637db0ff5a (patch)
treebacfeebb1515a9454818786b180c5e188009012a /src/codegen
parent22b71b1376eaa75aa141022404d6ddf40495c886 (diff)
downloadzig-cd4865d88c368095e131d2d95d3cce637db0ff5a.tar.gz
zig-cd4865d88c368095e131d2d95d3cce637db0ff5a.zip
std.crypto.sign.ecdsa: accepts unusual parameters like EcdsaP384Sha256 (#13302)
This commit accepts unusual parameters like EcdsaP384Sha256. Some certifictes(below certs are in /etc/ssl/certs/ca-certificates.crt on Ubuntu 22.04) use EcdsaP384Sha256 to sign itself. - Subject: C=GR, L=Athens, O=Hellenic Academic and Research Institutions Cert. Authority, CN=Hellenic Academic and Research Institutions ECC RootCA 2015 - Subject: C=US, ST=Texas, L=Houston, O=SSL Corporation, CN=SSL.com EV Root Certification Authority ECC - Subject: C=US, ST=Texas, L=Houston, O=SSL Corporation, CN=SSL.com Root Certification Authority ECC In verify(), hash array `h` is allocated to be larger than the scalar.encoded_length. The array is regarded as big-endian. Hash values are filled in the back of the array and the rest bytes in front are filled with zero. In sign(), the hash array is allocated and filled as same as verify(). In deterministicScalar(), hash bytes are insufficient to generate `k` To generate `k` without narrowing its value range, this commit uses algorithm stage h. in "Section 3.2 Generation of k" in RFC6979.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions