From c68b071e528566432d1fe619f99bb8353ebabfa4 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 5 May 2020 01:09:22 +0200 Subject: [PATCH 1/3] Indent --- .../poly1305/sse2/poly1305_sse2.c | 16 ++++++++-------- .../sysrandom/randombytes_sysrandom.c | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c b/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c index e80c961d..961c3be0 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +++ b/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c @@ -41,14 +41,14 @@ typedef struct poly1305_state_internal_t { union { uint64_t h[3]; uint32_t hh[10]; - } H; /* 40 bytes */ - uint32_t R[5]; /* 20 bytes */ - uint32_t R2[5]; /* 20 bytes */ - uint32_t R4[5]; /* 20 bytes */ - uint64_t pad[2]; /* 16 bytes */ - uint64_t flags; /* 8 bytes */ - unsigned long long leftover; /* 8 bytes */ - unsigned char buffer[poly1305_block_size]; /* 32 bytes */ + } H; /* 40 bytes */ + uint32_t R[5]; /* 20 bytes */ + uint32_t R2[5]; /* 20 bytes */ + uint32_t R4[5]; /* 20 bytes */ + uint64_t pad[2]; /* 16 bytes */ + uint64_t flags; /* 8 bytes */ + unsigned long long leftover; /* 8 bytes */ + unsigned char buffer[poly1305_block_size]; /* 32 bytes */ } poly1305_state_internal_t; /* 164 bytes total */ /* diff --git a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c index 6657e8e6..ffe35c7c 100644 --- a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +++ b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c @@ -1,4 +1,3 @@ - #include #include #include From ce19bc7a6953dd4004d15b7e1c4b5fea8b0a0167 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 5 May 2020 01:25:42 +0200 Subject: [PATCH 2/3] Remove unneeded casts Fixes #954 --- src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h b/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h index 72809549..dfa55a92 100644 --- a/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h +++ b/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h @@ -131,8 +131,7 @@ fe25519_cmov(fe25519 f, const fe25519 g, unsigned int b) "movq %[t0], 24(%[a])\n" "movq %[t1], 32(%[a])\n" : [ t0 ] "=&r"(t0), [ t1 ] "=&r"(t1), [ t2 ] "=&r"(t2) - : [ a ] "r"(*(unsigned char(*)[40]) f), - [ b ] "r"(*(const unsigned char(*)[40]) g), [ c ] "r"(b) + : [ a ] "r"(f), [ b ] "r"(g), [ c ] "r"(b) : "cc"); #else uint64_t mask = (uint64_t) (-(int64_t) b); From 839c2b89d3d6176583670f6cd2cd7d907004b251 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 5 May 2020 01:28:48 +0200 Subject: [PATCH 3/3] Nits --- README.markdown | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/README.markdown b/README.markdown index e7970101..2794fbc5 100644 --- a/README.markdown +++ b/README.markdown @@ -22,7 +22,8 @@ as well as Javascript and Webassembly. ## Documentation -The documentation is available on Gitbook and built from the [libsodium-doc](https://github.com/jedisct1/libsodium-doc) repository: +The documentation is available on Gitbook and built from the +[libsodium-doc](https://github.com/jedisct1/libsodium-doc) repository: * [libsodium documentation](https://doc.libsodium.org) - online, requires Javascript. @@ -51,9 +52,7 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/libsodium/contribute)] -#### Individuals - - +#### Individuals Href="https://opencollective.com/libsodium"> #### Organizations @@ -61,8 +60,6 @@ Support this project with your organization. Your logo will show up here with a - - ## License [ISC license](https://en.wikipedia.org/wiki/ISC_license).