)]}'
{"swift/common/middleware/enc_proxy/crypto_base.py":[{"author":{"_account_id":7541,"name":"Wyllys Ingersoll","email":"wyllys.ingersoll@keepertech.com","username":"wyllys"},"change_message_id":"680d3a5081ac68a8ba8f934c143ab8ab5c0b5025","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        return self._gen_rand_str(bit_length)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _gen_rand_str(self, bit_length\u003d128):"},{"line_number":91,"context_line":"        byte_length \u003d int(bit_length)/8"},{"line_number":92,"context_line":"        return os.urandom(byte_length)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F2xs%3D","line":91,"updated":"2014-02-27 21:56:56.000000000","message":"should you check for powers of 2 here or limit the values allowed?","commit_id":"90b33d601028abe4a331d26157fbe385edb4a385"}],"swift/common/middleware/enc_proxy/crypto_py.py":[{"author":{"_account_id":7541,"name":"Wyllys Ingersoll","email":"wyllys.ingersoll@keepertech.com","username":"wyllys"},"change_message_id":"680d3a5081ac68a8ba8f934c143ab8ab5c0b5025","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        CryptoInterface.__init__(self, conf)"},{"line_number":33,"context_line":"        self.random \u003d Random.new()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def decrypt(self, key, ciphertext, context, auth_enc\u003dTrue):"},{"line_number":36,"context_line":"        if auth_enc:"},{"line_number":37,"context_line":"            enc_key, mac_key \u003d self._derive_keys(key, context[\"alg\"])"},{"line_number":38,"context_line":"            hmac_obj \u003d HMAC.new(mac_key)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F2Cs%3D","line":35,"updated":"2014-02-27 21:56:56.000000000","message":"When (and why) would this function be used with auth_enc\u003dTrue?  All of the calls to this function appear to use \u0027auth_enc\u003dFalse\u0027, which seems correct.\n\nauth_enc \u003d True appears to trigger the use of the HMAC but at the cost of ignoring the random IV in favor of a fixed IV and then also uses hardcoded keys for the mac and the encryption.  Is this another area that is yet to be fully implemented?","commit_id":"90b33d601028abe4a331d26157fbe385edb4a385"},{"author":{"_account_id":7541,"name":"Wyllys Ingersoll","email":"wyllys.ingersoll@keepertech.com","username":"wyllys"},"change_message_id":"680d3a5081ac68a8ba8f934c143ab8ab5c0b5025","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        mac_key \u003d cipher_obj.encrypt(\"1\"*16)"},{"line_number":82,"context_line":"        enc_key \u003d \"\""},{"line_number":83,"context_line":"        for c in range(2, 9):"},{"line_number":84,"context_line":"            enc_key +\u003d cipher_obj.encrypt(str(c)*16)"},{"line_number":85,"context_line":"            if len(enc_key) \u003e\u003d length:"},{"line_number":86,"context_line":"                break"},{"line_number":87,"context_line":"        return enc_key[:length], mac_key"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F2ko%3D","line":84,"updated":"2014-02-27 21:56:56.000000000","message":"What is the purpose of this loop? The IV, mac_key, and enc_key are all basically hardcoded to constant values and then encrypted by the master key.","commit_id":"90b33d601028abe4a331d26157fbe385edb4a385"}],"swift/common/middleware/enc_proxy/key_hierarchy_base.py":[{"author":{"_account_id":7541,"name":"Wyllys Ingersoll","email":"wyllys.ingersoll@keepertech.com","username":"wyllys"},"change_message_id":"680d3a5081ac68a8ba8f934c143ab8ab5c0b5025","unresolved":false,"context_lines":[{"line_number":22,"context_line":"is defined as well."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"As the ``enc-proxy`` middleware operates on the  container level,"},{"line_number":25,"context_line":"init_container will be invokved upon a creation of a cotnainer"},{"line_number":26,"context_line":"which has encryption enabled. At the moment, init_account"},{"line_number":27,"context_line":"is NOT called anywhere, hence any require initilizaiton"},{"line_number":28,"context_line":"for the account has to be executed manually."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F2s8%3D","line":25,"updated":"2014-02-27 21:56:56.000000000","message":"s/cotnainer/container/","commit_id":"90b33d601028abe4a331d26157fbe385edb4a385"},{"author":{"_account_id":2649,"name":"Zhang Hua","email":"zhuadl@cn.ibm.com","username":"zhang-hare"},"change_message_id":"ac2628b36b589b9403db848edd510cb456407ce5","unresolved":false,"context_lines":[{"line_number":22,"context_line":"is defined as well."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"As the ``enc-proxy`` middleware operates on the  container level,"},{"line_number":25,"context_line":"init_container will be invokved upon a creation of a cotnainer"},{"line_number":26,"context_line":"which has encryption enabled. At the moment, init_account"},{"line_number":27,"context_line":"is NOT called anywhere, hence any require initilizaiton"},{"line_number":28,"context_line":"for the account has to be executed manually."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2FHG0%3D","line":25,"updated":"2014-03-09 13:18:40.000000000","message":"s/invokved/invoked/","commit_id":"90b33d601028abe4a331d26157fbe385edb4a385"},{"author":{"_account_id":7541,"name":"Wyllys Ingersoll","email":"wyllys.ingersoll@keepertech.com","username":"wyllys"},"change_message_id":"680d3a5081ac68a8ba8f934c143ab8ab5c0b5025","unresolved":false,"context_lines":[{"line_number":24,"context_line":"As the ``enc-proxy`` middleware operates on the  container level,"},{"line_number":25,"context_line":"init_container will be invokved upon a creation of a cotnainer"},{"line_number":26,"context_line":"which has encryption enabled. At the moment, init_account"},{"line_number":27,"context_line":"is NOT called anywhere, hence any require initilizaiton"},{"line_number":28,"context_line":"for the account has to be executed manually."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Various system metadata and user metadata entries are used"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F2sc%3D","line":27,"updated":"2014-02-27 21:56:56.000000000","message":"s/initilizaition/initialization/","commit_id":"90b33d601028abe4a331d26157fbe385edb4a385"}],"swift/common/middleware/enc_proxy/key_hierarchy_direct.py":[{"author":{"_account_id":7541,"name":"Wyllys Ingersoll","email":"wyllys.ingersoll@keepertech.com","username":"wyllys"},"change_message_id":"680d3a5081ac68a8ba8f934c143ab8ab5c0b5025","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def get_obj_key(self, auth_token, app, path, headers\u003dNone):"},{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":"        Return the object key in the lcear together"},{"line_number":92,"context_line":"        with the object context."},{"line_number":93,"context_line":"        \"\"\""},{"line_number":94,"context_line":"        obj_key \u003d self._get_cache(path)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F2qc%3D","line":91,"updated":"2014-02-27 21:56:56.000000000","message":"s/lcear/clear/","commit_id":"90b33d601028abe4a331d26157fbe385edb4a385"}],"swift/common/middleware/encproxy.py":[{"author":{"_account_id":7541,"name":"Wyllys Ingersoll","email":"wyllys.ingersoll@keepertech.com","username":"wyllys"},"change_message_id":"680d3a5081ac68a8ba8f934c143ab8ab5c0b5025","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        Accepts a standard WSGI call and proceed according the request."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        For a container, if PUT and encryption is enabled,"},{"line_number":115,"context_line":"        we need to initiliaze the container key and set"},{"line_number":116,"context_line":"        the appropraite system metadata if a first PUT for"},{"line_number":117,"context_line":"        the given container (response w/ 201). Otherwise,"},{"line_number":118,"context_line":"        we set the header values inidicating  whether the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F2go%3D","line":115,"updated":"2014-02-27 21:56:56.000000000","message":"s/initiliaze/initialize/","commit_id":"90b33d601028abe4a331d26157fbe385edb4a385"},{"author":{"_account_id":7541,"name":"Wyllys Ingersoll","email":"wyllys.ingersoll@keepertech.com","username":"wyllys"},"change_message_id":"680d3a5081ac68a8ba8f934c143ab8ab5c0b5025","unresolved":false,"context_lines":[{"line_number":123,"context_line":"             create an object key and proceed accordingly;"},{"line_number":124,"context_line":"             the wrapped key and encryption context"},{"line_number":125,"context_line":"             are stored as object system metadata together"},{"line_number":126,"context_line":"             with the plaintext tag (de-etag) and size (de-etag)."},{"line_number":127,"context_line":"             The wrapped key header entry depends on the container name"},{"line_number":128,"context_line":"             as described on the wiki page."},{"line_number":129,"context_line":"        GET: if the object is encrypted, decrypt"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F2gM%3D","line":126,"updated":"2014-02-27 21:56:56.000000000","message":"\"and size (de-etag)\" \u003d\u003e \"and size (de-size)\"","commit_id":"90b33d601028abe4a331d26157fbe385edb4a385"},{"author":{"_account_id":7541,"name":"Wyllys Ingersoll","email":"wyllys.ingersoll@keepertech.com","username":"wyllys"},"change_message_id":"680d3a5081ac68a8ba8f934c143ab8ab5c0b5025","unresolved":false,"context_lines":[{"line_number":128,"context_line":"             as described on the wiki page."},{"line_number":129,"context_line":"        GET: if the object is encrypted, decrypt"},{"line_number":130,"context_line":"             and check the encryption tag(s)"},{"line_number":131,"context_line":"        POST: noting if obj-systmeta is implemented;"},{"line_number":132,"context_line":"              otherwise, preserve the enc_proxy object headers"},{"line_number":133,"context_line":"        HEAD: replace en-etag and en-size"},{"line_number":134,"context_line":"              with de-etag and de-size in the response headers"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F2gA%3D","line":131,"updated":"2014-02-27 21:56:56.000000000","message":"s/noting/nothing/","commit_id":"90b33d601028abe4a331d26157fbe385edb4a385"}]}
