Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-01-13 04:19:51 +0300
committerAdam Langley <agl@google.com>2015-01-15 02:38:25 +0300
commitb1116a4a3b63aaea97608f1f42fb7a00e653af5c (patch)
tree3f1f12142046706e5571f2201743b494e40fa410 /include/openssl/poly1305.h
parent3e6526575ac2349a44a04a0bbc7acb917fab5a0b (diff)
Always write the Poly1305 tag to an aligned buffer.
With GCC 4.9 and -O2 (and only -O2, -O1 and -O3 didn't trigger it), the Poly1305 code can end up writing to an unaligned address otherwise and that triggers a bus error on ARM. Change-Id: Ifbeb7e2066a893d91d6f63c6565bac7d5542ef81 Reviewed-on: https://boringssl-review.googlesource.com/2850 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include/openssl/poly1305.h')
-rw-r--r--include/openssl/poly1305.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/openssl/poly1305.h b/include/openssl/poly1305.h
index a15bf1a8..aa904869 100644
--- a/include/openssl/poly1305.h
+++ b/include/openssl/poly1305.h
@@ -36,7 +36,7 @@ extern void CRYPTO_poly1305_update(poly1305_state* state, const uint8_t* in,
size_t in_len);
/* poly1305_finish completes the poly1305 calculation and writes a 16 byte
- * authentication tag to |mac|. */
+ * authentication tag to |mac|. The |mac| address must be 16-byte aligned. */
extern void CRYPTO_poly1305_finish(poly1305_state* state, uint8_t mac[16]);