summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/curve25519/curve25519.c
diff options
context:
space:
mode:
authorjsing <>2022-11-09 17:45:55 +0000
committerjsing <>2022-11-09 17:45:55 +0000
commitce63bfbe542f710d82181ab0975b822aaf517973 (patch)
treee76aa3722ce7f15e986778b12b086e55334ed4c5 /src/lib/libcrypto/curve25519/curve25519.c
parentff5faa687445f18e922b9b5263b369e9e7f5a57c (diff)
downloadopenbsd-ce63bfbe542f710d82181ab0975b822aaf517973.tar.gz
openbsd-ce63bfbe542f710d82181ab0975b822aaf517973.tar.bz2
openbsd-ce63bfbe542f710d82181ab0975b822aaf517973.zip
Make X25519_public_from_private() internally reachable.
Diffstat (limited to 'src/lib/libcrypto/curve25519/curve25519.c')
-rw-r--r--src/lib/libcrypto/curve25519/curve25519.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/curve25519/curve25519.c b/src/lib/libcrypto/curve25519/curve25519.c
index 2618e1a3e7..c35863ef87 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.12 2022/11/09 17:40:51 jsing Exp $ */ 1/* $OpenBSD: curve25519.c,v 1.13 2022/11/09 17:45:55 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2015, Google Inc. 3 * Copyright (c) 2015, Google Inc.
4 * 4 *
@@ -4866,8 +4866,8 @@ x25519_public_from_private_generic(uint8_t out_public_key[32],
4866#endif 4866#endif
4867 4867
4868void 4868void
4869x25519_public_from_private(uint8_t out_public_key[32], 4869X25519_public_from_private(uint8_t out_public_key[X25519_KEY_LENGTH],
4870 const uint8_t private_key[32]) 4870 const uint8_t private_key[X25519_KEY_LENGTH])
4871{ 4871{
4872 static const uint8_t kMongomeryBasePoint[32] = {9}; 4872 static const uint8_t kMongomeryBasePoint[32] = {9};
4873 4873
@@ -4897,7 +4897,7 @@ X25519_keypair(uint8_t out_public_key[X25519_KEY_LENGTH],
4897 out_private_key[31] &= 63; 4897 out_private_key[31] &= 63;
4898 out_private_key[31] |= 128; 4898 out_private_key[31] |= 128;
4899 4899
4900 x25519_public_from_private(out_public_key, out_private_key); 4900 X25519_public_from_private(out_public_key, out_private_key);
4901} 4901}
4902 4902
4903int 4903int