summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/curve25519/curve25519.c
diff options
context:
space:
mode:
authorbeck <>2023-07-08 15:12:49 +0000
committerbeck <>2023-07-08 15:12:49 +0000
commit46b46c2fb9731b7443e79217c78fb5ae2b1bd80e (patch)
tree6698a66c8f70f12ca8313de5dc1384cf76e5a94c /src/lib/libcrypto/curve25519/curve25519.c
parent92f05086c3ac20f5ecd50bf024faf42cd8d87ce2 (diff)
downloadopenbsd-46b46c2fb9731b7443e79217c78fb5ae2b1bd80e.tar.gz
openbsd-46b46c2fb9731b7443e79217c78fb5ae2b1bd80e.tar.bz2
openbsd-46b46c2fb9731b7443e79217c78fb5ae2b1bd80e.zip
Hide symbols in curve22519
ok tb@
Diffstat (limited to 'src/lib/libcrypto/curve25519/curve25519.c')
-rw-r--r--src/lib/libcrypto/curve25519/curve25519.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libcrypto/curve25519/curve25519.c b/src/lib/libcrypto/curve25519/curve25519.c
index 4f85a81f47..4e644c4280 100644
--- a/src/lib/libcrypto/curve25519/curve25519.c
+++ b/src/lib/libcrypto/curve25519/curve25519.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: curve25519.c,v 1.15 2023/04/02 15:36:53 tb Exp $ */ 1/* $OpenBSD: curve25519.c,v 1.16 2023/07/08 15:12:49 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2015, Google Inc. 3 * Copyright (c) 2015, Google Inc.
4 * 4 *
@@ -4636,6 +4636,7 @@ void ED25519_keypair(uint8_t out_public_key[ED25519_PUBLIC_KEY_LENGTH],
4636 4636
4637 ED25519_public_from_private(out_public_key, out_private_key); 4637 ED25519_public_from_private(out_public_key, out_private_key);
4638} 4638}
4639LCRYPTO_ALIAS(ED25519_keypair);
4639 4640
4640int ED25519_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len, 4641int ED25519_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len,
4641 const uint8_t public_key[ED25519_PUBLIC_KEY_LENGTH], 4642 const uint8_t public_key[ED25519_PUBLIC_KEY_LENGTH],
@@ -4671,6 +4672,7 @@ int ED25519_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len,
4671 4672
4672 return 1; 4673 return 1;
4673} 4674}
4675LCRYPTO_ALIAS(ED25519_sign);
4674 4676
4675/* 4677/*
4676 * Little endian representation of the order of edwards25519, 4678 * Little endian representation of the order of edwards25519,
@@ -4735,6 +4737,7 @@ int ED25519_verify(const uint8_t *message, size_t message_len,
4735 4737
4736 return timingsafe_memcmp(rcheck, rcopy, sizeof(rcheck)) == 0; 4738 return timingsafe_memcmp(rcheck, rcopy, sizeof(rcheck)) == 0;
4737} 4739}
4740LCRYPTO_ALIAS(ED25519_verify);
4738 4741
4739/* Replace (f,g) with (g,f) if b == 1; 4742/* Replace (f,g) with (g,f) if b == 1;
4740 * replace (f,g) with (f,g) if b == 0. 4743 * replace (f,g) with (f,g) if b == 0.
@@ -4926,6 +4929,7 @@ X25519_keypair(uint8_t out_public_key[X25519_KEY_LENGTH],
4926 4929
4927 X25519_public_from_private(out_public_key, out_private_key); 4930 X25519_public_from_private(out_public_key, out_private_key);
4928} 4931}
4932LCRYPTO_ALIAS(X25519_keypair);
4929 4933
4930int 4934int
4931X25519(uint8_t out_shared_key[X25519_KEY_LENGTH], 4935X25519(uint8_t out_shared_key[X25519_KEY_LENGTH],
@@ -4939,3 +4943,4 @@ X25519(uint8_t out_shared_key[X25519_KEY_LENGTH],
4939 /* The all-zero output results when the input is a point of small order. */ 4943 /* The all-zero output results when the input is a point of small order. */
4940 return timingsafe_memcmp(kZeros, out_shared_key, 32) != 0; 4944 return timingsafe_memcmp(kZeros, out_shared_key, 32) != 0;
4941} 4945}
4946LCRYPTO_ALIAS(X25519);