From RFC 4880 [1]:
ID Algorithm
-- ---------
1 - RSA (Encrypt or Sign) [HAC]
2 - RSA Encrypt-Only [HAC]
3 - RSA Sign-Only [HAC]
16 - Elgamal (Encrypt-Only) [ELGAMAL] [HAC]
17 - DSA (Digital Signature Algorithm) [FIPS186] [HAC]
18 - Reserved for Elliptic Curve
19 - Reserved for ECDSA
20 - Reserved (formerly Elgamal Encrypt or Sign)
21 - Reserved for Diffie-Hellman (X9.42,
as defined for IETF-S/MIME)
100 to 110 - Private/Experimental algorithm
[1]: http://tools.ietf.org/search/rfc4880#section-9.1
63: 'private',
}
+ _public_key_algorithms = {
+ 1: 'rsa (encrypt or sign)',
+ 2: 'rsa encrypt-only',
+ 3: 'rsa sign-only',
+ 16: 'elgamal (encrypt-only)',
+ 17: 'dsa (digital signature algorithm)',
+ 18: 'reserved for elliptic curve',
+ 19: 'reserved for ecdsa',
+ 20: 'reserved (formerly elgamal encrypt or sign)',
+ 21: 'reserved for diffie-hellman',
+ 100: 'private',
+ 101: 'private',
+ 102: 'private',
+ 103: 'private',
+ 104: 'private',
+ 105: 'private',
+ 106: 'private',
+ 107: 'private',
+ 108: 'private',
+ 109: 'private',
+ 110: 'private',
+ }
+
_clean_type_regex = _re.compile('\W+')
def _clean_type(self):