{"action":"created","issue":{"url":"https://api.github.com/repos/cryptomator/cryptomator/issues/178","repository_url":"https://api.github.com/repos/cryptomator/cryptomator","labels_url":"https://api.github.com/repos/cryptomator/cryptomator/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/cryptomator/cryptomator/issues/178/comments","events_url":"https://api.github.com/repos/cryptomator/cryptomator/issues/178/events","html_url":"https://github.com/cryptomator/cryptomator/issues/178","id":140163764,"number":178,"title":"Use just _one_ random IV per file write","user":{"login":"overheadhunter","id":1204330,"avatar_url":"https://avatars.githubusercontent.com/u/1204330?v=3","gravatar_id":"","url":"https://api.github.com/users/overheadhunter","html_url":"https://github.com/overheadhunter","followers_url":"https://api.github.com/users/overheadhunter/followers","following_url":"https://api.github.com/users/overheadhunter/following{/other_user}","gists_url":"https://api.github.com/users/overheadhunter/gists{/gist_id}","starred_url":"https://api.github.com/users/overheadhunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/overheadhunter/subscriptions","organizations_url":"https://api.github.com/users/overheadhunter/orgs","repos_url":"https://api.github.com/users/overheadhunter/repos","events_url":"https://api.github.com/users/overheadhunter/events{/privacy}","received_events_url":"https://api.github.com/users/overheadhunter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cryptomator/cryptomator/labels/type:enhancement","name":"type:enhancement","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cryptomator/cryptomator/milestones/13","html_url":"https://github.com/cryptomator/cryptomator/milestones/1.0.1","labels_url":"https://api.github.com/repos/cryptomator/cryptomator/milestones/13/labels","id":1638770,"number":13,"title":"1.0.1","description":"","creator":{"login":"markuskreusch","id":1536532,"avatar_url":"https://avatars.githubusercontent.com/u/1536532?v=3","gravatar_id":"","url":"https://api.github.com/users/markuskreusch","html_url":"https://github.com/markuskreusch","followers_url":"https://api.github.com/users/markuskreusch/followers","following_url":"https://api.github.com/users/markuskreusch/following{/other_user}","gists_url":"https://api.github.com/users/markuskreusch/gists{/gist_id}","starred_url":"https://api.github.com/users/markuskreusch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markuskreusch/subscriptions","organizations_url":"https://api.github.com/users/markuskreusch/orgs","repos_url":"https://api.github.com/users/markuskreusch/repos","events_url":"https://api.github.com/users/markuskreusch/events{/privacy}","received_events_url":"https://api.github.com/users/markuskreusch/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-03-11T11:31:09Z","updated_at":"2016-03-11T11:42:04Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-03-11T11:41:24Z","updated_at":"2016-03-22T19:33:09Z","closed_at":null,"body":"## Current situation\r\nFile contents are encrypted using CTR mode. Each file has a random key, that changes only when the _whole_ file is re-written. Each file consists of n 32 KiB chunks. Each chunk has a random IV.\r\n\r\nGenerating a new IV for each chunk causes some systems to run out of entropy (see #174).\r\n\r\nThe combination of IV and key must not be reused.\r\n\r\n## Suggested fix\r\nInstead we think it is sufficient to generate just one 128bit IV _per write access_ and adjust the last 64 for each chunk, so the counter will not repeat.\r\n\r\nExample:\r\n* Chunk 1 ends with a counter of 256\r\n* Chunk 2 starts with a counter of 257\r\n* All chunks of the same file write operation share the same MSBs in the IV.\r\n* Subsequent write operations will use a new random IV."},"comment":{"url":"https://api.github.com/repos/cryptomator/cryptomator/issues/comments/199978553","html_url":"https://github.com/cryptomator/cryptomator/issues/178#issuecomment-199978553","issue_url":"https://api.github.com/repos/cryptomator/cryptomator/issues/178","id":199978553,"user":{"login":"overheadhunter","id":1204330,"avatar_url":"https://avatars.githubusercontent.com/u/1204330?v=3","gravatar_id":"","url":"https://api.github.com/users/overheadhunter","html_url":"https://github.com/overheadhunter","followers_url":"https://api.github.com/users/overheadhunter/followers","following_url":"https://api.github.com/users/overheadhunter/following{/other_user}","gists_url":"https://api.github.com/users/overheadhunter/gists{/gist_id}","starred_url":"https://api.github.com/users/overheadhunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/overheadhunter/subscriptions","organizations_url":"https://api.github.com/users/overheadhunter/orgs","repos_url":"https://api.github.com/users/overheadhunter/repos","events_url":"https://api.github.com/users/overheadhunter/events{/privacy}","received_events_url":"https://api.github.com/users/overheadhunter/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T19:33:09Z","updated_at":"2016-03-22T19:33:09Z","body":"I don't know _if_ we're re-seeding too often. It is just an assumption, we haven't investigated yet.\r\nSettings 65th bit to zero, because (correct me if I'm wrong) the behaviour of counter overflows is not defined."}}