{"action":"closed","issue":{"url":"https://api.github.com/repos/jedisct1/libsodium/issues/732","repository_url":"https://api.github.com/repos/jedisct1/libsodium","labels_url":"https://api.github.com/repos/jedisct1/libsodium/issues/732/labels{/name}","comments_url":"https://api.github.com/repos/jedisct1/libsodium/issues/732/comments","events_url":"https://api.github.com/repos/jedisct1/libsodium/issues/732/events","html_url":"https://github.com/jedisct1/libsodium/issues/732","id":340324714,"node_id":"MDU6SXNzdWUzNDAzMjQ3MTQ=","number":732,"title":"crypto_secretbox_easy & crypto_secretbox_open_easy failing to encode/decode encripted text","user":{"login":"ebalo55","id":12586380,"node_id":"MDQ6VXNlcjEyNTg2Mzgw","avatar_url":"https://avatars1.githubusercontent.com/u/12586380?v=4","gravatar_id":"","url":"https://api.github.com/users/ebalo55","html_url":"https://github.com/ebalo55","followers_url":"https://api.github.com/users/ebalo55/followers","following_url":"https://api.github.com/users/ebalo55/following{/other_user}","gists_url":"https://api.github.com/users/ebalo55/gists{/gist_id}","starred_url":"https://api.github.com/users/ebalo55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebalo55/subscriptions","organizations_url":"https://api.github.com/users/ebalo55/orgs","repos_url":"https://api.github.com/users/ebalo55/repos","events_url":"https://api.github.com/users/ebalo55/events{/privacy}","received_events_url":"https://api.github.com/users/ebalo55/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-11T16:51:40Z","updated_at":"2018-07-11T19:05:40Z","closed_at":"2018-07-11T19:05:40Z","author_association":"NONE","body":"Hi,\r\nI've tried using libsodium in a c++(14) environment and i have found a big issue, while calling the _crypto\\_secretbox\\_open\\_easy_ and _crypto\\_secretbox\\_easy_ functions.\r\nIn the doc there's written that every time i encode a string of any lenght i will have another string of the same lenght but after some tests i have found that:\r\n- The 2 lenght are always different but not by the amount of _crypto\\_secretbox\\_MACBYTES_\r\n- The decoding function fail to decode **every** string with a lenght >= 8\r\n- After the failure of the decoding function the encoded text is always pasted (probably a fallback?)\r\n- The encoded size is always the same as the nonce size (= 24)\r\n- The bin2hex function always return segmentation-fault\r\n\r\nfollowing the used code and the results:\r\n\r\n[main.txt](https://github.com/jedisct1/libsodium/files/2185447/main.txt)\r\n[executions.txt](https://github.com/jedisct1/libsodium/files/2185448/executions.txt)\r\n\r\n"}}
{"actor":{"display_login":"jedisct1"}}