{"action":"created","issue":{"url":"https://api.github.com/repos/ryan652/EasyCrypt/issues/6","repository_url":"https://api.github.com/repos/ryan652/EasyCrypt","labels_url":"https://api.github.com/repos/ryan652/EasyCrypt/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/ryan652/EasyCrypt/issues/6/comments","events_url":"https://api.github.com/repos/ryan652/EasyCrypt/issues/6/events","html_url":"https://github.com/ryan652/EasyCrypt/issues/6","id":299111818,"number":6,"title":"Android N is deprecating \"Crypto\" provider ","user":{"login":"mermazza","id":36647330,"avatar_url":"https://avatars2.githubusercontent.com/u/36647330?v=4","gravatar_id":"","url":"https://api.github.com/users/mermazza","html_url":"https://github.com/mermazza","followers_url":"https://api.github.com/users/mermazza/followers","following_url":"https://api.github.com/users/mermazza/following{/other_user}","gists_url":"https://api.github.com/users/mermazza/gists{/gist_id}","starred_url":"https://api.github.com/users/mermazza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mermazza/subscriptions","organizations_url":"https://api.github.com/users/mermazza/orgs","repos_url":"https://api.github.com/users/mermazza/repos","events_url":"https://api.github.com/users/mermazza/events{/privacy}","received_events_url":"https://api.github.com/users/mermazza/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-21T20:12:18Z","updated_at":"2018-02-22T01:59:55Z","closed_at":"2018-02-22T01:59:55Z","author_association":"NONE","body":""},"comment":{"url":"https://api.github.com/repos/ryan652/EasyCrypt/issues/comments/367542006","html_url":"https://github.com/ryan652/EasyCrypt/issues/6#issuecomment-367542006","issue_url":"https://api.github.com/repos/ryan652/EasyCrypt/issues/6","id":367542006,"user":{"login":"ryan652","id":5588001,"avatar_url":"https://avatars0.githubusercontent.com/u/5588001?v=4","gravatar_id":"","url":"https://api.github.com/users/ryan652","html_url":"https://github.com/ryan652","followers_url":"https://api.github.com/users/ryan652/followers","following_url":"https://api.github.com/users/ryan652/following{/other_user}","gists_url":"https://api.github.com/users/ryan652/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan652/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan652/subscriptions","organizations_url":"https://api.github.com/users/ryan652/orgs","repos_url":"https://api.github.com/users/ryan652/repos","events_url":"https://api.github.com/users/ryan652/events{/privacy}","received_events_url":"https://api.github.com/users/ryan652/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T01:59:55Z","updated_at":"2018-02-22T01:59:55Z","author_association":"OWNER","body":"Hi @mermazza the buggy part of the Crypto provider,\r\n\r\n> A common but incorrect usage of this provider was to derive keys for encryption by using a password as a seed. The implementation of SHA1PRNG had a bug that made it deterministic if setSeed() was called before obtaining output. This bug was used to derive a key by supplying a password as a seed, and then using the \"random\" output bytes for the key (where “random” in this sentence means “predictable and cryptographically weak”). Such a key could then be used to encrypt and decrypt data. \r\n\r\n already has a workaround built in the original API implementation as stated [in this article](https://android-developers.googleblog.com/2016/06/security-crypto-provider-deprecated-in.html), \r\n\r\n> Note 2: Because many parts of the system assume the existence of a SHA1PRNG algorithm, when an instance of SHA1PRNG is requested and the provider is not specified we return an instance of OpenSSLRandom, which is a strong source of random numbers derived from OpenSSL. \r\n\r\nand from sources here,\r\n> /*\r\n         * This call to our superclass constructor will result in a call\r\n         * to our own {@code setSeed} method, which will return\r\n         * immediately when it is passed zero.\r\n         */\r\n\r\nAlso, EasyCrypt only uses the recommended way of generating the keys securely, which you can find in the middle part of [this article](https://android-developers.googleblog.com/2016/06/security-crypto-provider-deprecated-in.html), by using `PBEKeySpec` and `SecretKeyFactory` classes provided with `salt` of same size as of the `key`.\r\n\r\nMoreover, another bug in the SecureRandom() implementation, of having low entropy, is dealt with by using `apply()` method from [PRNGFixes.java](https://github.com/ryan652/EasyCrypt/blob/master/easycrypt/src/main/java/com/pvryan/easycrypt/PRNGFixes.java) proposed by Alex Klyubin (Android Security Engineer) in [this article](https://android-developers.googleblog.com/2013/08/some-securerandom-thoughts.html).\r\n\r\nThus, I assure that EasyCrypt uses only secure implementations and there is nothing to worry about the known Crypto bugs as they are already dealt with."}}
{"actor":{"display_login":"ryan652"}}