Versions in this module Expand all Collapse all v1 v1.0.0 Mar 3, 2023 Changes in this version + const SM3 + func MarshalECDSASignature(r, s *big.Int) ([]byte, error) + func New(securityLevel int, hashFamily string, keyStore bccsp.KeyStore) (bccsp.BCCSP, error) + func NewDefaultSecurityLevel(keyStorePath string) (bccsp.BCCSP, error) + func NewDefaultSecurityLevelWithKeystore(keyStore bccsp.KeyStore) (bccsp.BCCSP, error) + func NewDummyKeyStore() bccsp.KeyStore + func NewFileBasedKeyStore(pwd []byte, path string, readOnly bool) (bccsp.KeyStore, error) + func VerifySM2(k *ecdsa.PublicKey, signature, digest []byte, opts bccsp.SignerOpts) (valid bool, err error) + type Decryptor interface + Decrypt func(k bccsp.Key, ciphertext []byte, opts bccsp.DecrypterOpts) (plaintext []byte, err error) + type ECDSASignature struct + R *big.Int + S *big.Int + type Encryptor interface + Encrypt func(k bccsp.Key, plaintext []byte, opts bccsp.EncrypterOpts) (ciphertext []byte, err error) + type Hasher interface + GetHash func(opts bccsp.HashOpts) (h hash.Hash, err error) + Hash func(msg []byte, opts bccsp.HashOpts) (hash []byte, err error) + type KeyDeriver interface + KeyDeriv func(k bccsp.Key, opts bccsp.KeyDerivOpts) (dk bccsp.Key, err error) + type KeyGenerator interface + KeyGen func(opts bccsp.KeyGenOpts) (k bccsp.Key, err error) + type KeyImporter interface + KeyImport func(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error) + type SM2GoPublicKeyImportOpts struct + Temporary bool + func (opts *SM2GoPublicKeyImportOpts) Algorithm() string + func (opts *SM2GoPublicKeyImportOpts) Ephemeral() bool + type SM2KeyGenOpts struct + Temporary bool + func (opts *SM2KeyGenOpts) Algorithm() string + func (opts *SM2KeyGenOpts) Ephemeral() bool + type SM2PKIXPublicKeyImportOpts struct + Temporary bool + func (opts *SM2PKIXPublicKeyImportOpts) Algorithm() string + func (opts *SM2PKIXPublicKeyImportOpts) Ephemeral() bool + type SM2PrivateKeyImportOpts struct + Temporary bool + func (opts *SM2PrivateKeyImportOpts) Algorithm() string + func (opts *SM2PrivateKeyImportOpts) Ephemeral() bool + type SM2ReRandKeyOpts struct + Expansion []byte + Temporary bool + func (opts *SM2ReRandKeyOpts) Algorithm() string + func (opts *SM2ReRandKeyOpts) Ephemeral() bool + func (opts *SM2ReRandKeyOpts) ExpansionValue() []byte + type SM3Opts struct + func (opts *SM3Opts) Algorithm() string + type Signer interface + Sign func(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) (signature []byte, err error) + type Verifier interface + Verify func(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (valid bool, err error)