Optimize the implementation of ec_field_size()
authorK1 <dongbeiouba@gmail.com>
Tue, 16 Jan 2024 13:07:38 +0000 (21:07 +0800)
committerMatt Caswell <matt@openssl.org>
Wed, 31 Jan 2024 10:27:51 +0000 (10:27 +0000)
commit9170cc0398222778065e098e396b8eb8cd0de1d3
tree8318d142ec762ebc50d9898ebe810ad0adf056f9
parent20ddfe78e9ddc0aba8208616e1b0b33cb12f77f5
Optimize the implementation of ec_field_size()

No need to create and copy BIGNUM p, a and b, just call
EC_GROUP_get0_field() instead.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
(Merged from https://github.com/openssl/openssl/pull/23313)
crypto/sm2/sm2_crypt.c