{"action":"opened","issue":{"url":"https://api.github.com/repos/jpadilla/pyjwt/issues/181","labels_url":"https://api.github.com/repos/jpadilla/pyjwt/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/jpadilla/pyjwt/issues/181/comments","events_url":"https://api.github.com/repos/jpadilla/pyjwt/issues/181/events","html_url":"https://github.com/jpadilla/pyjwt/issues/181","id":110643215,"number":181,"title":"RSA256 not supported despite having PyCrypto installed","user":{"login":"wsw70","id":1345886,"avatar_url":"https://avatars.githubusercontent.com/u/1345886?v=3","gravatar_id":"","url":"https://api.github.com/users/wsw70","html_url":"https://github.com/wsw70","followers_url":"https://api.github.com/users/wsw70/followers","following_url":"https://api.github.com/users/wsw70/following{/other_user}","gists_url":"https://api.github.com/users/wsw70/gists{/gist_id}","starred_url":"https://api.github.com/users/wsw70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsw70/subscriptions","organizations_url":"https://api.github.com/users/wsw70/orgs","repos_url":"https://api.github.com/users/wsw70/repos","events_url":"https://api.github.com/users/wsw70/events{/privacy}","received_events_url":"https://api.github.com/users/wsw70/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-09T11:58:15Z","updated_at":"2015-10-09T11:58:15Z","closed_at":null,"body":"Python 3.2.3 on a RPi (`Linux raspberrypi 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18 BST 2015 armv6l GNU/Linux`). \r\n\r\nPyCrypto is installed:\r\n```\r\npycrypto                  - Cryptographic modules for Python.\r\n  INSTALLED: 2.6.1 (latest)\r\n```\r\n\r\nThe following call crashes with an unsupported algorithm:\r\n\r\n`myjwt = jwt.encode(claim, private_key, algorithm='RS256', headers={\"alg\": \"RS256\", \"typ\": \"JWT\"}).decode('utf-8')`\r\n\r\n```\r\nException in thread Thread-1:\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.2/dist-packages/jwt/api_jws.py\", line 96, in encode\r\n    alg_obj = self._algorithms[algorithm]\r\nKeyError: 'RS256'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.2/threading.py\", line 740, in _bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python3.2/threading.py\", line 693, in run\r\n    self._target(*self._args, **self._kwargs)\r\n  File \"galarmclock.py\", line 241, in getcalendar\r\n    gauth.gettoken()\r\n  File \"/root/galarmclock/googleauth.py\", line 32, in gettoken\r\n    myjwt = jwt.encode(claim, private_key, algorithm='RS256', headers={\"alg\": \"RS256\", \"typ\": \"JWT\"}).decode('utf-8')\r\n  File \"/usr/local/lib/python3.2/dist-packages/jwt/api_jwt.py\", line 56, in encode\r\n    json_payload, key, algorithm, headers, json_encoder\r\n  File \"/usr/local/lib/python3.2/dist-packages/jwt/api_jws.py\", line 101, in encode\r\n    raise NotImplementedError('Algorithm not supported')\r\nNotImplementedError: Algorithm not supported\r\n```"}}