'Saves the public key in PKCS#1 DER or PEM format.
:param format: the format to save; \'PEM\' or \'DER\'
:returns: the DER- or PEM-encoded public key.'

def save_pkcs1(self, format='PEM'):

    methods = {'PEM': self._save_pkcs1_pem, 'DER': self._save_pkcs1_der}
    method = self._assert_format_exists(format, methods)
    return method()
