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 <bbe@google.com> Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/include/openssl/bn.h b/include/openssl/bn.h index 0f381af..ff8eb5e 100644 --- a/include/openssl/bn.h +++ b/include/openssl/bn.h
@@ -136,7 +136,12 @@ // 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.