Documentation
¶
Index ¶
- Variables
- func ComputeDA(tA, dA_ *big.Int, n *big.Int) *big.Int
- func ComputePA(WAx, WAy, PpubX, PpubY *big.Int, lInteger *big.Int) (*big.Int, *big.Int)
- func ComputePAPrime(dA *big.Int) (*big.Int, *big.Int)
- func GenerateRandomScalar() (*big.Int, error)
- func GenerateUserKeyPairSM2() error
- func ProcessUserEmail(id string)
- func SignMessageAndEncrypt(dA *big.Int) error
- func SignWithPrivateKey(dA *big.Int, messageHash []byte) (*big.Int, *big.Int, error)
- func VerifySignature(R, S, PAx, PAy *big.Int, messageHash [32]byte) bool
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GenerateRandomScalar ¶
Generate a random scalar k for signature calculation
func GenerateUserKeyPairSM2 ¶
func GenerateUserKeyPairSM2() error
GenerateUserKeyPairSM2,Generate user private key dA_ and public key UA based on SM2
func SignWithPrivateKey ¶
Signature logic: generate signature based on private key and message hash
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.