| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Add static methods for very common (eg zero, one) or very uncommon (eg
ECSDA truncated integers) construction methods, instead of using C++
constructors for all of these.
Also adds from_s32 which allows creating a negative BigInt easily,
instead of -BigInt(-x) -> BigInt::from_s32(x)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also update the documentation a bit, this area is really out of date
|
| |
|
|
|
|
|
|
|
|
|
| |
Now modules default to internal headers instead of defaulting to public; making
a new public API should be a visible and intentional choice.
Brings the public header count from over 300 to around 150.
Also removes the deprecated tls_blocking interface
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly things that shouldn't be used (like almost Montgomery inverse,
which isn't even constant time) or are very much just for internals
(like the word-wise Montgomery inverse computation used for reduction).
Make variable time division explicit; leaves plain divide as a call
but it forwards to ct_divide now. All callers within the library are
now explicitly consttime or vartime.
Add a shortcut for modulus by one word - this hits quite often
especially in the ECC code
|
| |
|
| |
|
|
|
|
| |
GH #2356
|
|
|
|
|
|
|
| |
Replaces RDRAND_RNG, RDRAND entropy source, and DARN entropy source.
Provides also DARN-based RNG interface.
This also gives an easy path for supporting the ARMv8 RNG instructions.
|
| |
|
|
|
|
| |
Also fix warning about "insecure" getenv
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Nuno Goncalves <[email protected]>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This shouldn't even happen if the header is still intact, but seemingly
it can: #1983 so be robust as possible.
|
|
|
|
| |
Fixes #1984
|
| |
|
|
|
|
| |
Deprecate various redundant FFI functions
|
| |
|
| |
|
|
|
|
| |
Remove unimplemented declaration botan_x509_cert_gen_selfsigned
|
|
|
|
|
| |
Also remove the TLS declarations from ffi.h for now since that
isn't supported at all.
|
|
|
|
|
|
|
|
|
| |
This makes the meaning and usage more clear.
Add a specific error type so invalid tags can be distinguished without
having to catch that specific type.
See also #1813
|
|
|
|
| |
Here the caller is assumed to have provided a buffer of sufficient size.
|
|
|
|
| |
Combines the priv check and the getenv call on one.
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid throwing base Botan::Exception type, as it is difficult to
determine what the error is in that case.
Add Exception::error_code and Exception::error_type which allows
(for error code) more information about the error and (for error type)
allows knowing the error type without requiring a sequence of catches.
See GH #1742
|
| |
|
|
|
|
| |
Closes GH #1557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several problems in CBC found by adding tests
- If you set a key, then set a nonce, then set a new key,
you could encrypt without setting a new nonce.
- It was possible to call CBC finish without setting a nonce,
which would crash.
- If you had an CBC decryption object, set a key, set a nonce, then
reset message state, it should throw because no nonce is set.
Instead it would carry on using an all-zero nonce.
Disable CommonCrypto with PKCS7 padding as it seems to have some
problem that I cannot figure out from the build logs.
This work sponsored by Ribose Inc
|
|
|
|
|
|
|
|
| |
If a function returning variable length output was called with a
null output buffer but a non-zero output buffer length, FFI layer
would call memset(nullptr, 0, buffer_len) and crash.
Caught by Coverity.
|
|
|
|
|
|
|
|
| |
Avoid any getenv toggles or reading /proc if we are setuid/setgid.
It is possible there is or will someday be some file in /proc that
is world-readable, but if read by a privileged user causes some side
effect.
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
This is a contribution of Ribose Inc (@riboseinc)
|