16 lines
361 B
Go
16 lines
361 B
Go
package sm2
|
|
|
|
import (
|
|
"crypto/cipher"
|
|
"crypto/elliptic"
|
|
"math/big"
|
|
)
|
|
|
|
func sign(priv *PrivateKey, csprng *cipher.StreamReader, c elliptic.Curve, hash []byte) (r, s *big.Int, err error) {
|
|
return signGeneric(priv, csprng, c, hash)
|
|
}
|
|
|
|
func verify(pub *PublicKey, c elliptic.Curve, hash []byte, r, s *big.Int) bool {
|
|
return verifyGeneric(pub, c, hash, r, s)
|
|
}
|