# Packages
No description provided by the author
# Functions
Decrypt.
No description provided by the author
Encrypt.
No description provided by the author
输出加密私钥明文.
输出加密主公钥明文.
输出明文.
No description provided by the author
generate matser's secret encrypt key.
generate user's secret encrypt key.
generate master key for KGC(Key Generate Center).
generate user's secret key.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
解析加密主私钥明文.
解析加密主公钥明文.
解析加密私钥明文.
No description provided by the author
No description provided by the author
NewKeyExchange creates one new KeyExchange object.
No description provided by the author
解析签名主私钥明文.
解析签名主公钥明文.
解析签名私钥明文.
No description provided by the author
No description provided by the author
No description provided by the author
sm9 sign algorithm: A1:compute g = e(P1,Ppub); A2:choose random num r in [1,n-1]; A3:compute w = g^r; A4:compute h = H2(M||w,n); A5:compute l = (r-h) mod n, if l = 0 goto A2; A6:compute S = l·sk.
No description provided by the author
输出签名主私钥明文.
输出签名主公钥明文.
输出签名私钥明文.
UnwrapKey unwraps key from cipher, user id and aligned key length.
sm9 verify algorithm(given h',S', message M' and user's id): B1:compute g = e(P1,Ppub); B2:compute t = g^h'; B3:compute h1 = H1(id||hid,n); B4:compute P = h1·P2+Ppub; B5:compute u = e(S',P); B6:compute w' = u·t; B7:compute h2 = H2(M'||w',n), check if h2 = h'.
No description provided by the author
No description provided by the author
# Constants
默认 HID.
默认 HID.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
hashmode used in h1: 0x01.
hashmode used in h2: 0x02.
# Variables
Default Encrypt.
Default Hash.
No description provided by the author
No description provided by the author
No description provided by the author
HmacSHA256.
HmacSM3.
SHA256Hash.
SM3Hash.
SM4CBCEncrypt option represents SM4 CBC mode.
SM4CFBEncrypt option represents SM4 CFB mode.
SM4ECBEncrypt option represents SM4 ECB mode.
SM4OFBEncrypt option represents SM4 OFB mode.
XorEncrypt default option represents XOR mode.
# Structs
No description provided by the author
CFBEncrypt represents CFB (Cipher Feedback) mode.
ECBEncrypt represents ECB (Electronic Code Book) mode.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
KeyExchange represents key exchange struct, include internal stat in whole key exchange flow.
OFBEncrypt represents OFB (Output Feedback) mode.
No description provided by the author
SignMasterPrivateKey contains a master secret key and a master public key.
G2Bytes = G2.Marshal().
SignPrivateKey contains a secret key.
XOREncrypt represents XOR mode.