)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4a6d539a1ab74175c3fff05bcb8158e682c5e6d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"dbb15266_9f36b7c5","updated":"2022-04-07 19:21:40.000000000","message":"I\u0027d want to get some actual benchmarks before merging this, but it seems to work in practice. Idea is to reduce some of the overhead when doing listings.","commit_id":"8567a819524e8bf8e3fbd23519cc1f2f3d5ccd0e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5b30d2b00bd101c33ff845af2b949f1e1d1cbe2e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"63145716_4341852a","updated":"2022-04-08 17:54:32.000000000","message":"cool! I had to convince myself that mutation of the engine\u0027s mode had effect:\n\n      def test_crypto_engine_reuse(self):\n        plaintext \u003d b\u0027plain as can be\u0027 * 10\n        key \u003d os.urandom(32)\n        iv1 \u003d os.urandom(16)\n        engine1 \u003d Cipher(algorithms.AES(key), modes.CTR(iv1),\n                         backend\u003dself.crypto.backend)\n        ciphertext1 \u003d engine1.encryptor().update(plaintext)\n\n        iv2 \u003d os.urandom(16)\n        engine2 \u003d Cipher(algorithms.AES(key), modes.CTR(iv2),\n                         backend\u003dself.crypto.backend)\n        ciphertext2 \u003d engine2.encryptor().update(plaintext)\n        self.assertNotEqual(ciphertext1, ciphertext2)\n\n        # now decrypt both ciphertexts using the same engine...\n        engine \u003d Cipher(algorithms.AES(key), modes.CTR(iv1),\n                        backend\u003dself.crypto.backend)\n        decryptor1 \u003d engine.decryptor()\n        plaintext1 \u003d decryptor1.update(ciphertext1)\n\n        engine.mode \u003d modes.CTR(iv2)\n        decryptor2 \u003d engine.decryptor()\n        plaintext2 \u003d decryptor2.update(ciphertext2)\n        self.assertEqual(plaintext, plaintext1)\n        self.assertEqual(plaintext, plaintext2)\n","commit_id":"8567a819524e8bf8e3fbd23519cc1f2f3d5ccd0e"}],"swift/common/middleware/crypto/crypto_utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4a6d539a1ab74175c3fff05bcb8158e682c5e6d6","unresolved":true,"context_lines":[{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        self.check_key(key)"},{"line_number":65,"context_line":"        self.check_iv(iv)"},{"line_number":66,"context_line":"        engine \u003d get_engine(key)"},{"line_number":67,"context_line":"        engine.mode \u003d modes.CTR(iv)"},{"line_number":68,"context_line":"        return engine.encryptor()"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"597fab50_75bb75c2","line":66,"updated":"2022-04-07 19:21:40.000000000","message":"Maybe I\u0027m going too far here? Don\u0027t want PUTs (which will basically *never* have a cache hit) pushing out useful data for listings...","commit_id":"8567a819524e8bf8e3fbd23519cc1f2f3d5ccd0e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5ff8f0d7ba96b55f07551bfdba761fd8ab72b423","unresolved":true,"context_lines":[{"line_number":96,"context_line":"        engine.mode \u003d modes.CTR(iv)"},{"line_number":97,"context_line":"        dec \u003d engine.decryptor()"},{"line_number":98,"context_line":"        # Adjust decryption boundary within current AES block"},{"line_number":99,"context_line":"        dec.update(b\u0027*\u0027 * offset_in_block)"},{"line_number":100,"context_line":"        return dec"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def create_iv(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3b114ec4_af1de967","line":99,"updated":"2022-04-08 16:30:17.000000000","message":"Also, this could use a\n\n if offset_in_block:\n\nguard.","commit_id":"8567a819524e8bf8e3fbd23519cc1f2f3d5ccd0e"}]}
