'returns the name of a elliptic curve with his id'

def get_curve_by_id(self, id):

    res = None
    for i in self.curves:
        if (self.curves[i] == id):
            res = i
            break
    if (res is None):
        raise Exception('Unknown    curve')
    return res
