Skip to content

Commit

Permalink
Add docs noting requirements for SM2 signing
Browse files Browse the repository at this point in the history
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #23887)
  • Loading branch information
nhorman authored and t8m committed Apr 9, 2024
1 parent d6a8ade commit 4feb4a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/man7/EVP_PKEY-SM2.pod
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Getter that returns the default digest name.
B<SM2> signatures can be generated by using the 'DigestSign' series of APIs, for
instance, EVP_DigestSignInit(), EVP_DigestSignUpdate() and EVP_DigestSignFinal().
Ditto for the verification process by calling the 'DigestVerify' series of APIs.
Note that the SM2 algorithm requires the presence of the public key for signatures,
as such the B<OSSL_PKEY_PARAM_PUB_KEY> option must be set on any key used in signature
generation.

Before computing an B<SM2> signature, an B<EVP_PKEY_CTX> needs to be created,
and an B<SM2> ID must be set for it, like this:
Expand Down

0 comments on commit 4feb4a2

Please sign in to comment.