From: Dmitry Belyavskiy Date: Fri, 18 Sep 2020 13:28:05 +0000 (+0300) Subject: Merge branch 'master' of https://github.com/gost-engine/engine X-Git-Tag: v3.0.0~65 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=ec0ca76a5958c943eef76f1be2da444ab67ae2f4;hp=d2810d23a9f30ae885f9bf0783f0847a12972ff3;p=openssl-gost%2Fengine.git Merge branch 'master' of https://github.com/gost-engine/engine --- diff --git a/gost_grasshopper_math.h b/gost_grasshopper_math.h index 43341a8..87d1265 100644 --- a/gost_grasshopper_math.h +++ b/gost_grasshopper_math.h @@ -77,9 +77,15 @@ static GRASSHOPPER_INLINE void grasshopper_copy128(grasshopper_w128_t* to, const static GRASSHOPPER_INLINE void grasshopper_append128(grasshopper_w128_t* x, const grasshopper_w128_t* y) { int i; +#ifdef STRICT_ALIGNMENT + for (i = 0; i < 16; i++) { + GRASSHOPPER_ACCESS_128_VALUE_8(*x, i) ^= GRASSHOPPER_ACCESS_128_VALUE_8(*y, i); + } +#else for (i = 0; i < GRASSHOPPER_BIT_PARTS; i++) { GRASSHOPPER_ACCESS_128_VALUE(*x, i) ^= GRASSHOPPER_ACCESS_128_VALUE(*y, i); } +#endif } static GRASSHOPPER_INLINE void grasshopper_plus128(grasshopper_w128_t* result, const grasshopper_w128_t* x,