{"action":"created","issue":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/4701","repository_url":"https://api.github.com/repos/RIOT-OS/RIOT","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/4701/labels{/name}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/4701/comments","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/4701/events","html_url":"https://github.com/RIOT-OS/RIOT/pull/4701","id":129158952,"number":4701,"title":"hashes: Import of SHA-1 algorithm","user":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/new%20feature","name":"new feature","color":"e11d21"},{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Ready%20for%20CI%20build","name":"Ready for CI build","color":"bfdadc"}],"state":"open","locked":false,"assignee":{"login":"BytesGalore","id":3903215,"avatar_url":"https://avatars.githubusercontent.com/u/3903215?v=3","gravatar_id":"","url":"https://api.github.com/users/BytesGalore","html_url":"https://github.com/BytesGalore","followers_url":"https://api.github.com/users/BytesGalore/followers","following_url":"https://api.github.com/users/BytesGalore/following{/other_user}","gists_url":"https://api.github.com/users/BytesGalore/gists{/gist_id}","starred_url":"https://api.github.com/users/BytesGalore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BytesGalore/subscriptions","organizations_url":"https://api.github.com/users/BytesGalore/orgs","repos_url":"https://api.github.com/users/BytesGalore/repos","events_url":"https://api.github.com/users/BytesGalore/events{/privacy}","received_events_url":"https://api.github.com/users/BytesGalore/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/13","html_url":"https://github.com/RIOT-OS/RIOT/milestones/Release%202016.03","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/13/labels","id":1447832,"number":13,"title":"Release 2016.03","description":"The next major release.","creator":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"open_issues":228,"closed_issues":138,"state":"open","created_at":"2015-12-07T14:56:18Z","updated_at":"2016-02-22T21:21:54Z","due_on":"2016-03-17T23:00:00Z","closed_at":null},"comments":38,"created_at":"2016-01-27T14:26:24Z","updated_at":"2016-02-23T11:23:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/4701","html_url":"https://github.com/RIOT-OS/RIOT/pull/4701","diff_url":"https://github.com/RIOT-OS/RIOT/pull/4701.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/4701.patch"},"body":"I compared five different implementations:\r\n* [OAUTH](http://oauth.googlecode.com/svn/code/c/liboauth/src/sha1.c) - public domain\r\n* [ORYX](http://www.oryx-embedded.com/doc/sha1_8h.html#ab734cb0e0b67798f5cce1f34419982a3) - commercial, GPLv2\r\n* [PD](http://www.ghostscript.com/doc/jbig2dec/sha1.c) - public domain\r\n* [RFC](https://tools.ietf.org/html/rfc3174#section-7) - [IETF rights in contribution](http://tools.ietf.org/html/rfc3978)\r\n* [LIBSHA1](https://github.com/dottedmag/libsha1) - BSD license\r\n\r\nThe size results for my [example application](https://github.com/OlegHahm/miniature-dangerzone/tree/master/sha1-test) revealed that the OAUTH implementation has the smallest memory footprint of all compared implementations for all tested boards:\r\n```\r\n   text     bss    data   dec      hex\r\n\r\nOAUTH\r\n   9072     184    2760   12016    2ef0 samr21-xpro/sha1.elf\r\nORYX\r\n   9168     184    2760   12112    2f50 samr21-xpro/sha1.elf\r\nPD\r\n  12944     184    2760   15888    3e10 samr21-xpro/sha1.elf\r\nRFC\r\n   9344     184    2760   12288    3000 samr21-xpro/sha1.elf\r\nLIBSHA1\r\n  12896     184    2760   15840    3de0 samr21-xpro/sha1.elf\r\n\r\n\r\nOAUTH\r\n   9000     184    2752   11936    2ea0 iotlab-m3/sha1.elf\r\nORYX\r\n   9072     184    2752   12008    2ee8 iotlab-m3/sha1.elf\r\nPD\r\n  12496     184    2752   15432    3c48 iotlab-m3/sha1.elf\r\nRFC\r\n   9240     184    2752   12176    2f90 iotlab-m3/sha1.elf\r\nLIBSHA1\r\n  12364     184    2752   15300    3bc4 iotlab-m3/sha1.elf\r\n\r\nOAUTH\r\n   7936      68    1058    9062    2366 z1/sha1.elf\r\nORYX\r\n   8054      68    1058    9180    23dc z1/sha1.elf\r\nPD\r\n  25806      68    1058   26932    6934 z1/sha1.elf\r\nRFC\r\n   8152      68    1058    9278    243e z1/sha1.elf\r\nLIBSHA1\r\n  24810      68    1058   25936    6550 z1/sha1.elf\r\n\r\nOAUTH\r\n   8896     420     720   10036    2734 arduino-mega2560/sha1.elf\r\nORYX\r\n   8912     484     720   10116    2784 arduino-mega2560/sha1.elf\r\nPD\r\n  28692     424     720   29836    748c arduino-mega2560/sha1.elf\r\nRFC\r\n   9906     420     720   11046    2b26 arduino-mega2560/sha1.elf\r\nLIBSHA1\r\n  29040     420     720   30180    75e4 arduino-mega2560/sha1.elf\r\n```"},"comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments/187659674","html_url":"https://github.com/RIOT-OS/RIOT/pull/4701#issuecomment-187659674","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/4701","id":187659674,"user":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"created_at":"2016-02-23T11:23:18Z","updated_at":"2016-02-23T11:23:18Z","body":"Yes, I'm a bit concerned, too."}}