Skip to content

Commit

Permalink
third_party/fiat: replace memcpy with OPENSSL_memcpy
Browse files Browse the repository at this point in the history
Align with the other use of `OPENSSL_memcpy` in `curve25519_64_adx.h`.
`string.h` will no longer be needed.

Signed-off-by: Jiaqi Gao <[email protected]>
  • Loading branch information
gaojiaqi7 authored and briansmith committed Oct 31, 2023
1 parent 1432533 commit a9b8882
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions third_party/fiat/curve25519_64_adx.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <stdbool.h>
#include <stdint.h>
#include <immintrin.h>
#include <string.h>

typedef uint64_t fe4[4];
typedef uint8_t fiat_uint1;
Expand Down Expand Up @@ -469,7 +468,7 @@ __attribute__((target("adx,bmi2")))
void x25519_scalar_mult_adx(uint8_t out[32], const uint8_t scalar[32],
const uint8_t point[32]) {
uint8_t e[32];
memcpy(e, scalar, 32);
OPENSSL_memcpy(e, scalar, 32);
e[0] &= 248;
e[31] &= 127;
e[31] |= 64;
Expand Down

0 comments on commit a9b8882

Please sign in to comment.