Botan is a BSD-licensed crypto library for C++ applications. It provides access to most major cryptographic algorithms.
Questions tagged [botan]
127 questions
51
votes
3 answers
Segmentation fault when using a shared_ptr for private_key
Updates
[X] I discovered this happen when TLS::credentials creds is declared on
global scope but if I declare it outside seg fault won't happen.
I need it to be global because it helps with caching certificates and
that multiple threads can use…

jeffbRTC
- 1,941
- 10
- 29
10
votes
3 answers
swprintf and vswprintf not declared?
I am trying to compile Botan on Windows with MinGW, and am receiving the following error during compilation:
c:\qt\2010.04\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:159: error:
'::swprintf' has not been…

Jake Petroules
- 23,472
- 35
- 144
- 225
9
votes
1 answer
Botan SSL/TLS example or starting point
I am experimenting with the Botan library to establish a SSL/TLS connection with a private certificate. Unfortunately I cannot found any actual sample code using the new TLS::Client class. The documentation is barely some more text to the doxygen…

Martin Schlott
- 4,369
- 3
- 25
- 49
6
votes
1 answer
What is an s2k algorithm?
What is the definition of an s2k algorithm? For example, "PBKDF2(SHA-1)" is an s2k algorithm.
Here is some Botan code that refers to s2k:
AutoSeeded_RNG rng;
std::auto_ptr s2k(get_s2k("PBKDF2(SHA-1)"));
s2k->set_iterations(8192);
…

WilliamKF
- 41,123
- 68
- 193
- 295
4
votes
1 answer
Botan compile error VS2015
I have a strange situation here. I am trying to use the Botan crypto library with VS2015 (because some other parts of the project use some heavy C++11 code which VS2013 is unable to compile) and I get a pretty long compilation error (see…

Ferenc Deak
- 34,348
- 17
- 99
- 167
4
votes
1 answer
What C++ templates issue is going on with this error?
Running gcc v3.4.6 on the Botan v1.8.8 I get the following compile time error building my application after successfully building Botan and running its self test:
../../src/Botan-1.8.8/build/include/botan/secmem.h: In member function…

WilliamKF
- 41,123
- 68
- 193
- 295
4
votes
1 answer
Building the Botan library for ios7 arm64
I'm trying to build the Botan lib for ios7 (both 32 and 64 bit ios devices)
i tried:
./configure.py --cpu=armv7 --cc=clang --cc-bin="clang++ -arch armv7 -arch armv7s --sysroot=$(IOS_SYSROOT)"
-bash: IOS_SYSROOT: command not found
INFO:…

user1028028
- 6,323
- 9
- 34
- 59
4
votes
1 answer
Why are these Botan public keys so similar?
I am using Botan to create public/private ECDSA keypairs. The public keys that are generated (even on different machines using this code) are very similar... too similar to consider safe I would think. Here is an example of two runs:
-----BEGIN…

sorrell
- 1,801
- 1
- 16
- 27
3
votes
3 answers
How to compile the Botan crypto library as a static lib in VC++?
I've been extremely unsuccessful in compiling Botan as a static library in Visual C++. The build.h file contains the following code:
#ifndef BOTAN_DLL
#define BOTAN_DLL __declspec(dllexport)
#endif
This macro then shows up pretty much everywhere…
user123003
3
votes
1 answer
Issue Compiling Botan Using MinGW in Windows7 64bit
I am trying to install the non-MSVC version of Botan to my environment. I downloaded the tarball, extracted the files, and ran configure.py
After running configure.py, I run make, make fails with a "sorry, unimplemented: 64-bit mode not compiled in"…

nukeforum
- 1,284
- 3
- 16
- 38
3
votes
0 answers
Is it possible to use the same file for DataSource_Stream and DataSink_Stream in C++ Botan
I am trying to implement an efficient solution for file encryption with Botan, however, all code examples I've seen use different input and output files for encryption. For example, this code taken directly from documentation:
DataSource_Stream…

EvilTrtl
- 31
- 3
3
votes
1 answer
Unable to build Botan for Android on Windows
I cannot understand how to build Botan for android, according on the instruction here:
$ export CXX=/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang++
$ ./configure.py --os=android --cc=clang --cpu=arm64
i…

AkimovIgor
- 33
- 6
3
votes
1 answer
How to encrypt data using Botan library and a specific cipher suite?
I had used Botan::TLS::Callbacks and also Botan::TLS::Client Botan::TLS::Server in order to get a secure channel between client and server. Also in order to encrypt-decrypt data I had used and other include…

AmirH.
- 63
- 6
3
votes
1 answer
SHA1+RSA - Help using Botan in C++
I'm developing a WebService client in C++ for "Electronic Invoice" in Argentina. The webservice client and the xml treatment is not a problem but the cryptographic part give some headache (I'm quite new in this topic).
I'm reading the Botan…

Trungus
- 165
- 8
3
votes
2 answers
How do I solve the issue "No module name Botan"
I am using windows 8 and python 3.6.1 I've done the following command in my cmd:
pip install cryptoshop
However, when I run the following python code:
from cryptoshop import encryptfile
from cryptoshop import decryptfile
result1 =…

tgrim90
- 339
- 1
- 2
- 13