Documentation
¶
Index ¶
- Constants
- Variables
- func Decrypt(C, uid2 []byte, uke *UserKey) (M []byte, err error)
- func Encrypt(M, uid2 []byte, mpk *MasterPubKey) (C []byte, err error)
- func Verify(sig *Sm9Sig, msg []byte, id []byte, hid byte, mpk *MasterPubKey) bool
- type EncMasterKey
- type EncMasterPubKey
- type EncUserKey
- type MasterKey
- type MasterPubKey
- type Sm9Sig
- type UserKey
Constants ¶
View Source
const ( // hashmode used in h1: 0x01 H1 hashMode = iota + 1 // hashmode used in h2: 0x02 H2 )
Variables ¶
View Source
var KDFSalt = []byte{137, 14, 177, 175, 197, 56, 31, 254, 10, 223, 157, 232, 91, 149, 124, 75, 34, 90, 160, 85, 193, 47, 144, 90, 253, 139, 90, 135, 101, 233, 182, 250}
Functions ¶
Types ¶
type EncMasterKey ¶
type EncMasterKey struct { Msk *big.Int EncMasterPubKey }
type EncMasterPubKey ¶
type EncUserKey ¶
type MasterKey ¶
type MasterKey struct { Msk *big.Int MasterPubKey }
MasterKey contains a master secret key and a master public key.
Directories
¶
Path | Synopsis |
---|---|
Package bn256 implements a particular bilinear group.
|
Package bn256 implements a particular bilinear group. |
Click to show internal directories.
Click to hide internal directories.