From d94d41ca394a21d52995e3ee39cfeb61730d45a3 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Sat, 19 Nov 2022 00:58:48 -0500 Subject: [PATCH] Add a note in bn.h that this is not for general-purpose math. Sadly we do have to keep existing uses working, but let's make it clear in the documentation that they're not a priority. Also tweak the text about being limited by memory; we actually impose a tighter limit than memory alone. Change-Id: Ibaccd91cd0a1fe354f93f0123497115b649c0630 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/55265 Reviewed-by: Bob Beck Commit-Queue: David Benjamin --- include/openssl/bn.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/openssl/bn.h b/include/openssl/bn.h index 0f381af85..ff8eb5efa 100644 --- a/include/openssl/bn.h +++ b/include/openssl/bn.h @@ -136,7 +136,12 @@ extern "C" { // BN provides support for working with arbitrary sized integers. For example, // although the largest integer supported by the compiler might be 64 bits, BN -// will allow you to work with numbers until you run out of memory. +// will allow you to work with much larger numbers. +// +// This library is developed for use inside BoringSSL, and uses implementation +// strategies that may not be ideal for other applications. Non-cryptographic +// uses should use a more general-purpose integer library, especially if +// performance-sensitive. // BN_ULONG is the native word size when working with big integers.