{"action":"created","issue":{"url":"https://api.github.com/repos/kmackay/micro-ecc/issues/72","repository_url":"https://api.github.com/repos/kmackay/micro-ecc","labels_url":"https://api.github.com/repos/kmackay/micro-ecc/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/kmackay/micro-ecc/issues/72/comments","events_url":"https://api.github.com/repos/kmackay/micro-ecc/issues/72/events","html_url":"https://github.com/kmackay/micro-ecc/pull/72","id":137693140,"number":72,"title":"Add a new compile-time macro to use the local native format for VLI","user":{"login":"carlescufi","id":12450381,"avatar_url":"https://avatars.githubusercontent.com/u/12450381?v=3","gravatar_id":"","url":"https://api.github.com/users/carlescufi","html_url":"https://github.com/carlescufi","followers_url":"https://api.github.com/users/carlescufi/followers","following_url":"https://api.github.com/users/carlescufi/following{/other_user}","gists_url":"https://api.github.com/users/carlescufi/gists{/gist_id}","starred_url":"https://api.github.com/users/carlescufi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlescufi/subscriptions","organizations_url":"https://api.github.com/users/carlescufi/orgs","repos_url":"https://api.github.com/users/carlescufi/repos","events_url":"https://api.github.com/users/carlescufi/events{/privacy}","received_events_url":"https://api.github.com/users/carlescufi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-01T21:33:12Z","updated_at":"2016-03-04T09:29:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kmackay/micro-ecc/pulls/72","html_url":"https://github.com/kmackay/micro-ecc/pull/72","diff_url":"https://github.com/kmackay/micro-ecc/pull/72.diff","patch_url":"https://github.com/kmackay/micro-ecc/pull/72.patch"},"body":"Add a new compile-time macro to use the local native format for VLI handling. This is useful for little-endian machines that have to interface with protocol stacks using little-endian byte ordering. It saves certain implementations from having to wrap all calls to the uECC API in uECC_vli_nativeToBytes() and uECC_vli_bytesToNative() "},"comment":{"url":"https://api.github.com/repos/kmackay/micro-ecc/issues/comments/192204521","html_url":"https://github.com/kmackay/micro-ecc/pull/72#issuecomment-192204521","issue_url":"https://api.github.com/repos/kmackay/micro-ecc/issues/72","id":192204521,"user":{"login":"carlescufi","id":12450381,"avatar_url":"https://avatars.githubusercontent.com/u/12450381?v=3","gravatar_id":"","url":"https://api.github.com/users/carlescufi","html_url":"https://github.com/carlescufi","followers_url":"https://api.github.com/users/carlescufi/followers","following_url":"https://api.github.com/users/carlescufi/following{/other_user}","gists_url":"https://api.github.com/users/carlescufi/gists{/gist_id}","starred_url":"https://api.github.com/users/carlescufi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlescufi/subscriptions","organizations_url":"https://api.github.com/users/carlescufi/orgs","repos_url":"https://api.github.com/users/carlescufi/repos","events_url":"https://api.github.com/users/carlescufi/events{/privacy}","received_events_url":"https://api.github.com/users/carlescufi/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T09:29:25Z","updated_at":"2016-03-04T09:29:25Z","body":"Thanks for the feedback. The whole point of the effort is actually to provide a way for users of the library running on little-endian platforms and interfacing with little-endian byte streams to avoid 2 things:\r\n\r\n1) To have to convert (using a swapBytes() function of some sort) the data before and after invoking any of the uECC_ API functions\r\n2) To save the uECC_MAX_WORDS * 3 bytes of stack used in some of the functions to convert from and to bytes and native.\r\n\r\nSo the idea would be to provide the data directly in a format that is usable by the EccPoint_ functions, so no nativte2Bytes or bytes2Native functions would be called at all. This can be done without changing the current public API or by #ifdefing it to take uint32_t* instead of uint8_t* for the keys.\r\n\r\nThis of course would mean that only users that run on little-endian processors and need their keys in little-endian format would benefit from the new compile-time macro. But this might be a significant portion of the audience (Cortex-M processors and Bluetooth Low Energy are popular) and so I thought it may make sense to include this upstream."}}