pub fn keygen(_pk: &Mke08PublicKey, _mk: &Mke08MasterKey, _u: &String) -> Mke08UserKey {
    // random number generator
    let mut _rng = rand::thread_rng();
    let _mk_u:Fr = _rng.gen();
    // return pk_u and sk_u
    return Mke08UserKey {
        _sk_u: Mke08SecretUserKey {
            _sk_g1: _mk._g1_y + (_pk._p1 * _mk_u),
            _sk_g2: _mk._g2_y + (_pk._p2 * _mk_u),
        },
        _pk_u: Mke08PublicUserKey {
            _u: _u.clone(),
            _pk_g1: _pk._g1 * _mk_u,
            _pk_g2: _pk._g2 * _mk_u,
        },
        _sk_a: Vec::new(),
    };
}
/// The key generation algorithm of MKE08 CP-ABE. Generates a Mke08UserKey using a Mke08PublicKey, a Mke08MasterKey and a username given as String.
///
/// # Arguments
///
///	* `_pk` - A Public Key (PK), generated by the function setup()
///	* `_mk` - A Master Key (MSK), generated by the function setup()
///	* `_u` - A username given as String. Must be unique.
///
The key generation algorithm of MKE08 CP-ABE. Generates a Mke08UserKey using a Mke08PublicKey, a Mke08MasterKey and a username given as String.
The key generation algorithm of MKE08 CP - ABE . Generates a Mke08UserKey using a Mke08PublicKey a Mke08MasterKey and a username given as String .
pub fn keygen(_pk: &Mke08PublicKey, _mk: &Mke08MasterKey, _u: &String) -> Mke08UserKey {
    // random number generator
    let mut _rng = rand::thread_rng();
    let _mk_u:Fr = _rng.gen();
    // return pk_u and sk_u
    return Mke08UserKey {
        _sk_u: Mke08SecretUserKey {
            _sk_g1: _mk._g1_y + (_pk._p1 * _mk_u),
            _sk_g2: _mk._g2_y + (_pk._p2 * _mk_u),
        },
        _pk_u: Mke08PublicUserKey {
            _u: _u.clone(),
            _pk_g1: _pk._g1 * _mk_u,
            _pk_g2: _pk._g2 * _mk_u,
        },
        _sk_a: Vec::new(),
    };
}
pub fn keygen ( _pk : & Mke08PublicKey , _mk : & Mke08MasterKey , _u : & String ) -> Mke08UserKey { // random number generator let mut _rng = rand :: thread_rng ( ) ; let _mk_u : Fr = _rng . gen ( ) ; // return pk_u and sk_u return Mke08UserKey { _sk_u : Mke08SecretUserKey { _sk_g1 : _mk . _g1_y + ( _pk . _p1 * _mk_u ) , _sk_g2 : _mk . _g2_y + ( _pk . _p2 * _mk_u ) , } , _pk_u : Mke08PublicUserKey { _u : _u . clone ( ) , _pk_g1 : _pk . _g1 * _mk_u , _pk_g2 : _pk . _g2 * _mk_u , } , _sk_a : Vec :: new ( ) , } ; }
The key generation algorithm of MKE08 CP-ABE.
The key generation algorithm of MKE08 CP - ABE .
_pk
&Mke08PublicKey
_mk
&Mke08MasterKey
_u
&String
_pk
&Mke08PublicKey
_mk
&Mke08MasterKey
_u
&String