From 48358358ab61c53e9aa6a232a7f63f2cdcd605ab Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 19 Dec 2013 21:13:57 -0800 Subject: [PATCH] Add PGPPacket._symmetric_key_algorithms From RFC 4880 [1]: ID Algorithm -- --------- 0 - Plaintext or unencrypted data 1 - IDEA [IDEA] 2 - TripleDES (DES-EDE, [SCHNEIER] [HAC] - 168 bit key derived from 192) 3 - CAST5 (128 bit key, as per [RFC2144]) 4 - Blowfish (128 bit key, 16 rounds) [BLOWFISH] 5 - Reserved 6 - Reserved 7 - AES with 128-bit key [AES] 8 - AES with 192-bit key 9 - AES with 256-bit key 10 - Twofish with 256-bit key [TWOFISH] 100 to 110 - Private/Experimental algorithm [1]: http://tools.ietf.org/search/rfc4880#section-9.2 --- gpg-migrate.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gpg-migrate.py b/gpg-migrate.py index 9c8bca6..6f49ad7 100755 --- a/gpg-migrate.py +++ b/gpg-migrate.py @@ -74,6 +74,31 @@ class PGPPacket (dict): 110: 'private', } + _symmetric_key_algorithms = { + 0: 'plaintext or unencrypted data', + 1: 'idea', + 2: 'tripledes', + 3: 'cast5', + 4: 'blowfish', + 5: 'reserved', + 6: 'reserved', + 7: 'aes with 128-bit key', + 8: 'aes with 192-bit key', + 9: 'aes with 256-bit key', + 10: 'twofish', + 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): -- 2.26.2