)]}'
{"barbican/plugin/crypto/simple_crypto.py":[{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"079f244180ddd94e9de9735e03db70f559824438","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        - RSA, with passphrase (supported)"},{"line_number":124,"context_line":"        - RSA, without passphrase (supported)"},{"line_number":125,"context_line":"        - DSA, without passphrase (supported)"},{"line_number":126,"context_line":"        - DSA, with passphrase (supported)"},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if(generate_dto.algorithm is None or generate_dto"},{"line_number":129,"context_line":"                .algorithm.lower() \u003d\u003d \u0027rsa\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_1202c70a","line":126,"range":{"start_line":126,"start_character":10,"end_line":126,"end_character":42},"updated":"2017-04-29 20:22:28.000000000","message":"Can you please add a test for this?","commit_id":"874c7699418a68b25b350cfc1faca70d7c403e7d"},{"author":{"_account_id":23674,"name":"Rohan Arora","email":"ra271w@att.com","username":"rarora"},"change_message_id":"b65e74c0d020367b2b136d074b847e28e26e11b8","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        - RSA, with passphrase (supported)"},{"line_number":124,"context_line":"        - RSA, without passphrase (supported)"},{"line_number":125,"context_line":"        - DSA, without passphrase (supported)"},{"line_number":126,"context_line":"        - DSA, with passphrase (supported)"},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if(generate_dto.algorithm is None or generate_dto"},{"line_number":129,"context_line":"                .algorithm.lower() \u003d\u003d \u0027rsa\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_be0bd18b","line":126,"range":{"start_line":126,"start_character":10,"end_line":126,"end_character":42},"in_reply_to":"5ff73747_1202c70a","updated":"2017-05-01 15:04:38.000000000","message":"Done","commit_id":"874c7699418a68b25b350cfc1faca70d7c403e7d"},{"author":{"_account_id":8004,"name":"Paul Kehrer","email":"paul.l.kehrer@gmail.com","username":"reaperhulk"},"change_message_id":"beaf7a6f6b1d8a1cd7de6c163429bbb607f9fcaa","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if(generate_dto.algorithm is None or generate_dto"},{"line_number":129,"context_line":"                .algorithm.lower() \u003d\u003d \u0027rsa\u0027):"},{"line_number":130,"context_line":"            # enforce minimum required bit length from PyCrypto library"},{"line_number":131,"context_line":"            if generate_dto.bit_length \u003c 1024:"},{"line_number":132,"context_line":"                raise ValueError"},{"line_number":133,"context_line":"            private_key \u003d rsa.generate_private_key("}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_f631f4a3","line":130,"updated":"2017-04-26 15:30:42.000000000","message":"Looks like this should say cryptography","commit_id":"874c7699418a68b25b350cfc1faca70d7c403e7d"},{"author":{"_account_id":23674,"name":"Rohan Arora","email":"ra271w@att.com","username":"rarora"},"change_message_id":"33ed4b59d804f0a548dc00b4c46be9b26e910cc9","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if(generate_dto.algorithm is None or generate_dto"},{"line_number":129,"context_line":"                .algorithm.lower() \u003d\u003d \u0027rsa\u0027):"},{"line_number":130,"context_line":"            # enforce minimum required bit length from PyCrypto library"},{"line_number":131,"context_line":"            if generate_dto.bit_length \u003c 1024:"},{"line_number":132,"context_line":"                raise ValueError"},{"line_number":133,"context_line":"            private_key \u003d rsa.generate_private_key("}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_966d1034","line":130,"in_reply_to":"5ff73747_f631f4a3","updated":"2017-04-26 15:36:49.000000000","message":"Actually cryptography allows lower bit lengths, however PyCrypto did not and it was suggested to me to keep as much previous behavior as possible. Also, 1024 is the minimum recommended for security purposes so that was another reason I chose to maintain the previous requirement.","commit_id":"874c7699418a68b25b350cfc1faca70d7c403e7d"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"079f244180ddd94e9de9735e03db70f559824438","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if(generate_dto.algorithm is None or generate_dto"},{"line_number":129,"context_line":"                .algorithm.lower() \u003d\u003d \u0027rsa\u0027):"},{"line_number":130,"context_line":"            # enforce minimum required bit length from PyCrypto library"},{"line_number":131,"context_line":"            if generate_dto.bit_length \u003c 1024:"},{"line_number":132,"context_line":"                raise ValueError"},{"line_number":133,"context_line":"            private_key \u003d rsa.generate_private_key("},{"line_number":134,"context_line":"                public_exponent\u003d65537,"},{"line_number":135,"context_line":"                key_size\u003dgenerate_dto.bit_length,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_7f0b1429","line":132,"range":{"start_line":130,"start_character":12,"end_line":132,"end_character":32},"updated":"2017-04-29 20:22:28.000000000","message":"It should be safe to remove this part.  In places`generate_asymmetric` is called, `supports` is called before to check if the key spec is supported. 1024 is the lowest algorithm that is supported: https://github.com/openstack/barbican/blob/master/barbican/plugin/crypto/base.py#L68\n\nOut of context of this merge request, I think the comment to enforce a bit length minimum from a library that\u0027s not being used any more and the ValueError won\u0027t make much sense. I\u0027d recommend removing this part.","commit_id":"874c7699418a68b25b350cfc1faca70d7c403e7d"},{"author":{"_account_id":23674,"name":"Rohan Arora","email":"ra271w@att.com","username":"rarora"},"change_message_id":"b65e74c0d020367b2b136d074b847e28e26e11b8","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if(generate_dto.algorithm is None or generate_dto"},{"line_number":129,"context_line":"                .algorithm.lower() \u003d\u003d \u0027rsa\u0027):"},{"line_number":130,"context_line":"            # enforce minimum required bit length from PyCrypto library"},{"line_number":131,"context_line":"            if generate_dto.bit_length \u003c 1024:"},{"line_number":132,"context_line":"                raise ValueError"},{"line_number":133,"context_line":"            private_key \u003d rsa.generate_private_key("},{"line_number":134,"context_line":"                public_exponent\u003d65537,"},{"line_number":135,"context_line":"                key_size\u003dgenerate_dto.bit_length,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_9efed568","line":132,"range":{"start_line":130,"start_character":12,"end_line":132,"end_character":32},"in_reply_to":"5ff73747_7f0b1429","updated":"2017-05-01 15:04:38.000000000","message":"Done","commit_id":"874c7699418a68b25b350cfc1faca70d7c403e7d"},{"author":{"_account_id":8004,"name":"Paul Kehrer","email":"paul.l.kehrer@gmail.com","username":"reaperhulk"},"change_message_id":"beaf7a6f6b1d8a1cd7de6c163429bbb607f9fcaa","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        if generate_dto.algorithm.lower() \u003d\u003d \u0027dsa\u0027:"},{"line_number":162,"context_line":"            private_key \u003d private_key.private_bytes("},{"line_number":163,"context_line":"                encoding\u003dserialization.Encoding.DER,"},{"line_number":164,"context_line":"                format\u003dserialization.PrivateFormat.PKCS8,"},{"line_number":165,"context_line":"                encryption_algorithm\u003dself._get_encryption_algorithm("},{"line_number":166,"context_line":"                    generate_dto.passphrase)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_3673dc4f","line":163,"updated":"2017-04-26 15:30:42.000000000","message":"Why DER when the RSA path returns PEM? Looks like it\u0027s probably to match previous behavior from pycrypto?","commit_id":"874c7699418a68b25b350cfc1faca70d7c403e7d"},{"author":{"_account_id":23674,"name":"Rohan Arora","email":"ra271w@att.com","username":"rarora"},"change_message_id":"33ed4b59d804f0a548dc00b4c46be9b26e910cc9","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        if generate_dto.algorithm.lower() \u003d\u003d \u0027dsa\u0027:"},{"line_number":162,"context_line":"            private_key \u003d private_key.private_bytes("},{"line_number":163,"context_line":"                encoding\u003dserialization.Encoding.DER,"},{"line_number":164,"context_line":"                format\u003dserialization.PrivateFormat.PKCS8,"},{"line_number":165,"context_line":"                encryption_algorithm\u003dself._get_encryption_algorithm("},{"line_number":166,"context_line":"                    generate_dto.passphrase)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_36f99c4c","line":163,"in_reply_to":"5ff73747_3673dc4f","updated":"2017-04-26 15:36:49.000000000","message":"Yes, PyCrypto didn\u0027t support serialization of DSA keys, and the old code generated the DER sequence, so I also chose DER for compatibility.","commit_id":"874c7699418a68b25b350cfc1faca70d7c403e7d"}]}
