##### SUMMARY
The `get_certificate` module should support a cryptography backend, so PyOpenSSL can be deprecated / removed eventually.

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
get_certificate

'''Computes f^e mod m in O(log e) multiplications modulo m.'''
    
    len_e = -1
    x = e
    while x > 0:
        x >>= 1
        len_e += 1
    
    result = 1
    for k in range(len_e, -1, -1):
        result = (result * result) % m
        if ((e >> k) & 1) != 0:
            result = (result * f) % m
    return result
def simple_gcd(a, b):