pub fn request_attribute_sk(
    _pku: &BdabePublicUserKey,
    _ska: &BdabeSecretAuthorityKey,
    _attribute: &String,
) -> Option<BdabeSecretAttributeKey> {
    // if attribute a is from authority sk_a
    return if from_authority(_attribute, &_ska._a) && is_eligible(_attribute, &_pku._u) {
        let exponent = blake2b_hash_fr(_attribute) * blake2b_hash_fr(&_ska._a) * _ska._a3;
        // return PK and mke
        Some(BdabeSecretAttributeKey {
            _str: _attribute.to_string(),
            _au1: _pku._u1 * exponent,
            _au2: _pku._u2 * exponent,
        })
    } else {
        None
    }
}
/// Generates a new BdabeSecretAttributeKey for a requested attribute, if it is handled by the authority _ska and user _pk_u is eligible to recieve it.
///
/// # Arguments
///
///	* `_pku` - A BdabePublicUserKey (PK), generated by keygen()
///	* `_ska` - A BdabeSecretAuthorityKey (SKauth), associated with an authority and generated by authgen()
///	* `_attribute` - The attribute value as String
///
Generates a new BdabeSecretAttributeKey for a requested attribute, if it is handled by the authority _ska and user _pk_u is eligible to recieve it.
Generates a new BdabeSecretAttributeKey for a requested attribute if it is handled by the authority _ska and user _pk_u is eligible to recieve it .
pub fn request_attribute_sk(
    _pku: &BdabePublicUserKey,
    _ska: &BdabeSecretAuthorityKey,
    _attribute: &String,
) -> Option<BdabeSecretAttributeKey> {
    // if attribute a is from authority sk_a
    return if from_authority(_attribute, &_ska._a) && is_eligible(_attribute, &_pku._u) {
        let exponent = blake2b_hash_fr(_attribute) * blake2b_hash_fr(&_ska._a) * _ska._a3;
        // return PK and mke
        Some(BdabeSecretAttributeKey {
            _str: _attribute.to_string(),
            _au1: _pku._u1 * exponent,
            _au2: _pku._u2 * exponent,
        })
    } else {
        None
    }
}
pub fn request_attribute_sk ( _pku : & BdabePublicUserKey , _ska : & BdabeSecretAuthorityKey , _attribute : & String , ) -> Option < BdabeSecretAttributeKey > { // if attribute a is from authority sk_a return if from_authority ( _attribute , & _ska . _a ) && is_eligible ( _attribute , & _pku . _u ) { let exponent = blake2b_hash_fr ( _attribute ) * blake2b_hash_fr ( & _ska . _a ) * _ska . _a3 ; // return PK and mke Some ( BdabeSecretAttributeKey { _str : _attribute . to_string ( ) , _au1 : _pku . _u1 * exponent , _au2 : _pku . _u2 * exponent , } ) } else { None } }
Generates a new BdabeSecretAttributeKey for a requested attribute, if it is handled by the authority _ska and user _pk_u is eligible to recieve it.
Generates a new BdabeSecretAttributeKey for a requested attribute if it is handled by the authority _ska and user _pk_u is eligible to recieve it .
_pku
&BdabePublicUserKey
_ska
&BdabeSecretAuthorityKey
_attribute
&String
_pku
&BdabePublicUserKey
_ska
&BdabeSecretAuthorityKey
_attribute
&String