pub fn request_authority_sk(
    _a: &String,
    _sk_a: &Mke08SecretAuthorityKey,
    _pk_u: &Mke08PublicUserKey,
) -> Option<Mke08SecretAttributeKey> {
    // if attribute a is from authority sk_a
    return if from_authority(_a, &_sk_a._a) && is_eligible(_a, &_pk_u._u) {
        let exponent = blake2b_hash_fr(_a) * blake2b_hash_fr(&_sk_a._a) * _sk_a._r;
        // return PK and mke
        Some(Mke08SecretAttributeKey {
            _str: _a.clone(),
            _g1: _pk_u._pk_g1 * exponent,
            _g2: _pk_u._pk_g2 * exponent,
        })
    } else {
        None
    }
}
/// Sets up and generates a secret Attribute Key for a given user by an authorized authority, if the attribute belongs to this auhtority and the user is eligible to own the attribute.
///
/// # Arguments
///
///	* `_pk_u` - A Public User Key (PKu), generated by the function keygen()
///	* `_a` - The name of the attribute given as String.
///	* `_ska` - A Secret Authority Key (SKauth), generated by the function authgen()
///
Sets up and generates a secret Attribute Key for a given user by an authorized authority, if the attribute belongs to this auhtority and the user is eligible to own the attribute.
Sets up and generates a secret Attribute Key for a given user by an authorized authority if the attribute belongs to this auhtority and the user is eligible to own the attribute .
pub fn request_authority_sk(
    _a: &String,
    _sk_a: &Mke08SecretAuthorityKey,
    _pk_u: &Mke08PublicUserKey,
) -> Option<Mke08SecretAttributeKey> {
    // if attribute a is from authority sk_a
    return if from_authority(_a, &_sk_a._a) && is_eligible(_a, &_pk_u._u) {
        let exponent = blake2b_hash_fr(_a) * blake2b_hash_fr(&_sk_a._a) * _sk_a._r;
        // return PK and mke
        Some(Mke08SecretAttributeKey {
            _str: _a.clone(),
            _g1: _pk_u._pk_g1 * exponent,
            _g2: _pk_u._pk_g2 * exponent,
        })
    } else {
        None
    }
}
pub fn request_authority_sk ( _a : & String , _sk_a : & Mke08SecretAuthorityKey , _pk_u : & Mke08PublicUserKey , ) -> Option < Mke08SecretAttributeKey > { // if attribute a is from authority sk_a return if from_authority ( _a , & _sk_a . _a ) && is_eligible ( _a , & _pk_u . _u ) { let exponent = blake2b_hash_fr ( _a ) * blake2b_hash_fr ( & _sk_a . _a ) * _sk_a . _r ; // return PK and mke Some ( Mke08SecretAttributeKey { _str : _a . clone ( ) , _g1 : _pk_u . _pk_g1 * exponent , _g2 : _pk_u . _pk_g2 * exponent , } ) } else { None } }
Sets up and generates a secret Attribute Key for a given user by an authorized authority, if the attribute belongs to this auhtority and the user is eligible to own the attribute.
Sets up and generates a secret Attribute Key for a given user by an authorized authority if the attribute belongs to this auhtority and the user is eligible to own the attribute .
_a
&String
_sk_a
&Mke08SecretAuthorityKey
_pk_u
&Mke08PublicUserKey
_a
&String
_sk_a
&Mke08SecretAuthorityKey
_pk_u
&Mke08PublicUserKey