def METHOD_NAME(self, pk, msk, attributes):        
    t = group.random()
    K = msk['g2^alpha'] * (pk['g2^a'] ** t)
    L = pk['g2'] ** t
    k_x = [group.hash(s, G1) ** t for s in attributes]
    K_x = {}
    for i in range(0, len(k_x)):
        K_x[ attributes[i] ] = k_x[i]    
    key = { 'K':K, 'L':L, 'K_x':K_x, 'attributes':attributes }
    return key