[riot-notifications] [RIOT] add sha256 implementation (#96)

René Kijewski notifications at github.com
Fri Aug 9 00:45:09 CEST 2013


> +}
> +
> +#endif /* __BYTE_ORDER__ != __ORDER_BIG_ENDIAN__ */
> +
> +/* Elementary functions used by SHA256 */
> +#define Ch(x, y, z) ((x & (y ^ z)) ^ z)
> +#define Maj(x, y, z)    ((x & (y | z)) | (y & z))
> +#define SHR(x, n)   (x >> n)
> +#define ROTR(x, n)  ((x >> n) | (x << (32 - n)))
> +#define S0(x)       (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22))
> +#define S1(x)       (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25))
> +#define s0(x)       (ROTR(x, 7) ^ ROTR(x, 18) ^ SHR(x, 3))
> +#define s1(x)       (ROTR(x, 17) ^ ROTR(x, 19) ^ SHR(x, 10))
> +
> +/* SHA256 round function */
> +#define RND(a, b, c, d, e, f, g, h, k)          \

A made a commit that removes these macros: https://github.com/Kijewski/RIOT/commit/f59225267c08ee4eac84479a4c5da4dd156e3dac

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/96/files#r5672282
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130808/35b60481/attachment.html>


More information about the notifications mailing list