{"action":"opened","number":5916,"pull_request":{"url":"https://api.github.com/repos/Theano/Theano/pulls/5916","id":119011254,"html_url":"https://github.com/Theano/Theano/pull/5916","diff_url":"https://github.com/Theano/Theano/pull/5916.diff","patch_url":"https://github.com/Theano/Theano/pull/5916.patch","issue_url":"https://api.github.com/repos/Theano/Theano/issues/5916","number":5916,"state":"open","locked":false,"title":"Change hashlib.md5() to hashlib.sha256 for FIPS enabled systems","user":{"login":"dareneiri","id":8257700,"avatar_url":"https://avatars0.githubusercontent.com/u/8257700?v=3","gravatar_id":"","url":"https://api.github.com/users/dareneiri","html_url":"https://github.com/dareneiri","followers_url":"https://api.github.com/users/dareneiri/followers","following_url":"https://api.github.com/users/dareneiri/following{/other_user}","gists_url":"https://api.github.com/users/dareneiri/gists{/gist_id}","starred_url":"https://api.github.com/users/dareneiri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dareneiri/subscriptions","organizations_url":"https://api.github.com/users/dareneiri/orgs","repos_url":"https://api.github.com/users/dareneiri/repos","events_url":"https://api.github.com/users/dareneiri/events{/privacy}","received_events_url":"https://api.github.com/users/dareneiri/received_events","type":"User","site_admin":false},"body":"Some enterprise systems are required to be FIPS 140-2 compliant, which blocks MD5 hashing. MD5 is hardcoded in some parts of the code, which I change to sha256 so it is FIPS compliant. \r\n\r\nI came across this issue on RHEL 7 with Python 2.7 and FIPS enabled. \r\n```\r\n$ python\r\nPython 2.7.5 (default, Aug 2 2016, 04:20:16)\r\n[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import lasagne\r\nERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips\r\n```\r\n\r\nAfter the modification I can use the GPU and [run an MNIST example](https://github.com/Lasagne/Lasagne/blob/master/examples/mnist.py) on a FIPS enabled system: \r\n\r\n```\r\n$ : cat /proc/sys/crypto/fips_enabled\r\n1\r\n```\r\n\r\n```\r\n(theano-fips) : python\r\nPython 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:09:15)\r\n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\nAnaconda is brought to you by Continuum Analytics.\r\nPlease check out: http://continuum.io/thanks and https://anaconda.org\r\n>>> import lasagne\r\n/home/spark/anaconda2/envs/theano-fips/lib/python2.7/site-packages/theano/gpuarray/dnn.py:135: UserWarning: Your cuDNN version is more recent than Theano. If you encounter problems, try updating Theano or downgrading cuDNN to version 5.1.\r\n  warnings.warn(\"Your cuDNN version is more recent than \"\r\nUsing cuDNN version 6020 on context None\r\nMapped name None to device cuda: Tesla P100-PCIE-16GB (0000:82:00.0)\r\n```\r\nThe MNIST example runs without issue.\r\n\r\nI have also tested this with python 3.6\r\n```\r\n$ : python\r\nPython 3.6.1 |Continuum Analytics, Inc.| (default, Mar 22 2017, 19:54:23)\r\n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import lasagne\r\n/home/spark/anaconda3/envs/theano-fips/lib/python3.6/site-packages/theano/gpuarray/dnn.py:135: UserWarning: Your cuDNN version is more recent than Theano. If you encounter problems, try updating Theano or downgrading cuDNN to version 5.1.\r\n  warnings.warn(\"Your cuDNN version is more recent than \"\r\nUsing cuDNN version 6020 on context None\r\nMapped name None to device cuda: Tesla P100-PCIE-16GB (0000:82:00.0)\r\n\r\n```\r\nI would appreciate discussion on this modification and whether it is suitable for merging. Thanks!\r\n","created_at":"2017-05-04T16:12:03Z","updated_at":"2017-05-04T16:12:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Theano/Theano/pulls/5916/commits","review_comments_url":"https://api.github.com/repos/Theano/Theano/pulls/5916/comments","review_comment_url":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/5916/comments","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/29847ba985d1258e4e5ff9303179e28b853f912a","head":{"label":"dareneiri:master","ref":"master","sha":"29847ba985d1258e4e5ff9303179e28b853f912a","user":{"login":"dareneiri","id":8257700,"avatar_url":"https://avatars0.githubusercontent.com/u/8257700?v=3","gravatar_id":"","url":"https://api.github.com/users/dareneiri","html_url":"https://github.com/dareneiri","followers_url":"https://api.github.com/users/dareneiri/followers","following_url":"https://api.github.com/users/dareneiri/following{/other_user}","gists_url":"https://api.github.com/users/dareneiri/gists{/gist_id}","starred_url":"https://api.github.com/users/dareneiri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dareneiri/subscriptions","organizations_url":"https://api.github.com/users/dareneiri/orgs","repos_url":"https://api.github.com/users/dareneiri/repos","events_url":"https://api.github.com/users/dareneiri/events{/privacy}","received_events_url":"https://api.github.com/users/dareneiri/received_events","type":"User","site_admin":false},"repo":{"id":89975483,"name":"Theano","full_name":"dareneiri/Theano","owner":{"login":"dareneiri","id":8257700,"avatar_url":"https://avatars0.githubusercontent.com/u/8257700?v=3","gravatar_id":"","url":"https://api.github.com/users/dareneiri","html_url":"https://github.com/dareneiri","followers_url":"https://api.github.com/users/dareneiri/followers","following_url":"https://api.github.com/users/dareneiri/following{/other_user}","gists_url":"https://api.github.com/users/dareneiri/gists{/gist_id}","starred_url":"https://api.github.com/users/dareneiri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dareneiri/subscriptions","organizations_url":"https://api.github.com/users/dareneiri/orgs","repos_url":"https://api.github.com/users/dareneiri/repos","events_url":"https://api.github.com/users/dareneiri/events{/privacy}","received_events_url":"https://api.github.com/users/dareneiri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dareneiri/Theano","description":"Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.","fork":true,"url":"https://api.github.com/repos/dareneiri/Theano","forks_url":"https://api.github.com/repos/dareneiri/Theano/forks","keys_url":"https://api.github.com/repos/dareneiri/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dareneiri/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dareneiri/Theano/teams","hooks_url":"https://api.github.com/repos/dareneiri/Theano/hooks","issue_events_url":"https://api.github.com/repos/dareneiri/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/dareneiri/Theano/events","assignees_url":"https://api.github.com/repos/dareneiri/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/dareneiri/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/dareneiri/Theano/tags","blobs_url":"https://api.github.com/repos/dareneiri/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dareneiri/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dareneiri/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/dareneiri/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dareneiri/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/dareneiri/Theano/languages","stargazers_url":"https://api.github.com/repos/dareneiri/Theano/stargazers","contributors_url":"https://api.github.com/repos/dareneiri/Theano/contributors","subscribers_url":"https://api.github.com/repos/dareneiri/Theano/subscribers","subscription_url":"https://api.github.com/repos/dareneiri/Theano/subscription","commits_url":"https://api.github.com/repos/dareneiri/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/dareneiri/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/dareneiri/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/dareneiri/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/dareneiri/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/dareneiri/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dareneiri/Theano/merges","archive_url":"https://api.github.com/repos/dareneiri/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dareneiri/Theano/downloads","issues_url":"https://api.github.com/repos/dareneiri/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/dareneiri/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/dareneiri/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/dareneiri/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dareneiri/Theano/labels{/name}","releases_url":"https://api.github.com/repos/dareneiri/Theano/releases{/id}","deployments_url":"https://api.github.com/repos/dareneiri/Theano/deployments","created_at":"2017-05-02T00:42:28Z","updated_at":"2017-05-02T00:42:32Z","pushed_at":"2017-05-03T23:52:49Z","git_url":"git://github.com/dareneiri/Theano.git","ssh_url":"git@github.com:dareneiri/Theano.git","clone_url":"https://github.com/dareneiri/Theano.git","svn_url":"https://github.com/dareneiri/Theano","homepage":"http://www.deeplearning.net/software/theano","size":61531,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Theano:master","ref":"master","sha":"fbb066c48145837c1dacf8621fa906f0e8a619ee","user":{"login":"Theano","id":970517,"avatar_url":"https://avatars1.githubusercontent.com/u/970517?v=3","gravatar_id":"","url":"https://api.github.com/users/Theano","html_url":"https://github.com/Theano","followers_url":"https://api.github.com/users/Theano/followers","following_url":"https://api.github.com/users/Theano/following{/other_user}","gists_url":"https://api.github.com/users/Theano/gists{/gist_id}","starred_url":"https://api.github.com/users/Theano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Theano/subscriptions","organizations_url":"https://api.github.com/users/Theano/orgs","repos_url":"https://api.github.com/users/Theano/repos","events_url":"https://api.github.com/users/Theano/events{/privacy}","received_events_url":"https://api.github.com/users/Theano/received_events","type":"Organization","site_admin":false},"repo":{"id":2183193,"name":"Theano","full_name":"Theano/Theano","owner":{"login":"Theano","id":970517,"avatar_url":"https://avatars1.githubusercontent.com/u/970517?v=3","gravatar_id":"","url":"https://api.github.com/users/Theano","html_url":"https://github.com/Theano","followers_url":"https://api.github.com/users/Theano/followers","following_url":"https://api.github.com/users/Theano/following{/other_user}","gists_url":"https://api.github.com/users/Theano/gists{/gist_id}","starred_url":"https://api.github.com/users/Theano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Theano/subscriptions","organizations_url":"https://api.github.com/users/Theano/orgs","repos_url":"https://api.github.com/users/Theano/repos","events_url":"https://api.github.com/users/Theano/events{/privacy}","received_events_url":"https://api.github.com/users/Theano/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Theano/Theano","description":"Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.","fork":false,"url":"https://api.github.com/repos/Theano/Theano","forks_url":"https://api.github.com/repos/Theano/Theano/forks","keys_url":"https://api.github.com/repos/Theano/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Theano/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Theano/Theano/teams","hooks_url":"https://api.github.com/repos/Theano/Theano/hooks","issue_events_url":"https://api.github.com/repos/Theano/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/Theano/Theano/events","assignees_url":"https://api.github.com/repos/Theano/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/Theano/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/Theano/Theano/tags","blobs_url":"https://api.github.com/repos/Theano/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Theano/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Theano/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/Theano/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/Theano/Theano/languages","stargazers_url":"https://api.github.com/repos/Theano/Theano/stargazers","contributors_url":"https://api.github.com/repos/Theano/Theano/contributors","subscribers_url":"https://api.github.com/repos/Theano/Theano/subscribers","subscription_url":"https://api.github.com/repos/Theano/Theano/subscription","commits_url":"https://api.github.com/repos/Theano/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/Theano/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/Theano/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/Theano/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/Theano/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/Theano/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Theano/Theano/merges","archive_url":"https://api.github.com/repos/Theano/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Theano/Theano/downloads","issues_url":"https://api.github.com/repos/Theano/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/Theano/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/Theano/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/Theano/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Theano/Theano/labels{/name}","releases_url":"https://api.github.com/repos/Theano/Theano/releases{/id}","deployments_url":"https://api.github.com/repos/Theano/Theano/deployments","created_at":"2011-08-10T03:48:06Z","updated_at":"2017-05-04T14:10:55Z","pushed_at":"2017-05-04T15:08:24Z","git_url":"git://github.com/Theano/Theano.git","ssh_url":"git@github.com:Theano/Theano.git","clone_url":"https://github.com/Theano/Theano.git","svn_url":"https://github.com/Theano/Theano","homepage":"http://www.deeplearning.net/software/theano","size":61559,"stargazers_count":6217,"watchers_count":6217,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2122,"mirror_url":null,"open_issues_count":731,"forks":2122,"open_issues":731,"watchers":6217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/5916"},"html":{"href":"https://github.com/Theano/Theano/pull/5916"},"issue":{"href":"https://api.github.com/repos/Theano/Theano/issues/5916"},"comments":{"href":"https://api.github.com/repos/Theano/Theano/issues/5916/comments"},"review_comments":{"href":"https://api.github.com/repos/Theano/Theano/pulls/5916/comments"},"review_comment":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Theano/Theano/pulls/5916/commits"},"statuses":{"href":"https://api.github.com/repos/Theano/Theano/statuses/29847ba985d1258e4e5ff9303179e28b853f912a"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":8,"deletions":8,"changed_files":3}}
{"actor":{"display_login":"dareneiri"}}