pub fn request_attribute_pk(
    _pk: &BdabePublicKey,
    _ska: &BdabeSecretAuthorityKey,
    _attribute: &String,
) -> Option<BdabePublicAttributeKey> {
    // if attribute a is from authority sk_a
    return if from_authority(_attribute, &_ska._a) {
        let exponent = blake2b_hash_fr(_attribute) * blake2b_hash_fr(&_ska._a) * _ska._a3;
        // return PK and mke
        Some(BdabePublicAttributeKey {
            _str: _attribute.clone(),
            _a1: _pk._g1 * exponent,
            _a2: _pk._g2 * exponent,
            _a3: _pk._e_gg_y.pow(exponent),
        })
    } else {
        None
    }
}
/// Generates a new BdabePublicAttributeKey for a requested attribute, if it is handled by the authority _ska.
///
/// # Arguments
///
///	* `_pk` - A BdabePublicKey (PK), generated by setup()
///	* `_ska` - A BdabeSecretAuthorityKey (SKauth), associated with an authority and generated by authgen()
///	* `_attribute` - The attribute value as String
///
Generates a new BdabePublicAttributeKey for a requested attribute, if it is handled by the authority _ska.
Generates a new BdabePublicAttributeKey for a requested attribute if it is handled by the authority _ska .
pub fn request_attribute_pk(
    _pk: &BdabePublicKey,
    _ska: &BdabeSecretAuthorityKey,
    _attribute: &String,
) -> Option<BdabePublicAttributeKey> {
    // if attribute a is from authority sk_a
    return if from_authority(_attribute, &_ska._a) {
        let exponent = blake2b_hash_fr(_attribute) * blake2b_hash_fr(&_ska._a) * _ska._a3;
        // return PK and mke
        Some(BdabePublicAttributeKey {
            _str: _attribute.clone(),
            _a1: _pk._g1 * exponent,
            _a2: _pk._g2 * exponent,
            _a3: _pk._e_gg_y.pow(exponent),
        })
    } else {
        None
    }
}
pub fn request_attribute_pk ( _pk : & BdabePublicKey , _ska : & BdabeSecretAuthorityKey , _attribute : & String , ) -> Option < BdabePublicAttributeKey > { // if attribute a is from authority sk_a return if from_authority ( _attribute , & _ska . _a ) { let exponent = blake2b_hash_fr ( _attribute ) * blake2b_hash_fr ( & _ska . _a ) * _ska . _a3 ; // return PK and mke Some ( BdabePublicAttributeKey { _str : _attribute . clone ( ) , _a1 : _pk . _g1 * exponent , _a2 : _pk . _g2 * exponent , _a3 : _pk . _e_gg_y . pow ( exponent ) , } ) } else { None } }
Generates a new BdabePublicAttributeKey for a requested attribute, if it is handled by the authority _ska.
Generates a new BdabePublicAttributeKey for a requested attribute if it is handled by the authority _ska .
_pk
&BdabePublicKey
_ska
&BdabeSecretAuthorityKey
_attribute
&String
_pk
&BdabePublicKey
_ska
&BdabeSecretAuthorityKey
_attribute
&String