pub fn authgen(
    _pk: &BdabePublicKey,
    _mk: &BdabeMasterKey,
    _name: &String,
) -> BdabeSecretAuthorityKey {
    // random number generator
    let mut _rng = rand::thread_rng();
    let _alpha: Fr = _rng.gen();
    let _beta = _mk._y - _alpha;
    let _a1 = _pk._g1 * _alpha;
    let _a2 = _pk._g2 * _beta;
    let _a3:Fr = _rng.gen();
    // return secret authority key
    BdabeSecretAuthorityKey {_a1, _a2, _a3, _a: _name.clone()}
}
/// Sets up and generates a new Authority by creating a secret authority key (SKauth).
/// The key is created for an authority with a given "name".
///
/// # Arguments
///
///	* `_pk` - A BdabePublicKey (PK), generated by setup()
///	* `_mk` - A BdabeMasterKey (MK), generated by setup()
///	* `_name` - The name of the authority the key is associated with. Must be unique.
///
Sets up and generates a new Authority by creating a secret authority key (SKauth).
The key is created for an authority with a given "name".
Sets up and generates a new Authority by creating a secret authority key ( SKauth ) . The key is created for an authority with a given " name " .
pub fn authgen(
    _pk: &BdabePublicKey,
    _mk: &BdabeMasterKey,
    _name: &String,
) -> BdabeSecretAuthorityKey {
    // random number generator
    let mut _rng = rand::thread_rng();
    let _alpha: Fr = _rng.gen();
    let _beta = _mk._y - _alpha;
    let _a1 = _pk._g1 * _alpha;
    let _a2 = _pk._g2 * _beta;
    let _a3:Fr = _rng.gen();
    // return secret authority key
    BdabeSecretAuthorityKey {_a1, _a2, _a3, _a: _name.clone()}
}
pub fn authgen ( _pk : & BdabePublicKey , _mk : & BdabeMasterKey , _name : & String , ) -> BdabeSecretAuthorityKey { // random number generator let mut _rng = rand :: thread_rng ( ) ; let _alpha : Fr = _rng . gen ( ) ; let _beta = _mk . _y - _alpha ; let _a1 = _pk . _g1 * _alpha ; let _a2 = _pk . _g2 * _beta ; let _a3 : Fr = _rng . gen ( ) ; // return secret authority key BdabeSecretAuthorityKey { _a1 , _a2 , _a3 , _a : _name . clone ( ) } }
Sets up and generates a new Authority by creating a secret authority key (SKauth).
Sets up and generates a new Authority by creating a secret authority key ( SKauth ) .
_pk
&BdabePublicKey
_mk
&BdabeMasterKey
_name
&String
_pk
&BdabePublicKey
_mk
&BdabeMasterKey
_name
&String