Botan is a BSD-licensed crypto library for C++ applications. It provides access to most major cryptographic algorithms.
Questions tagged [botan]
127 questions
1
vote
1 answer
How do I link botan in cmake?
I am trying to write a program in c++ using botan but I don't know how to properly use it. Take for example the following code:
Botan::AutoSeeded_RNG rng;
Botan::UUID uuid = Botan::UUID(rng);
std::cout << uuid.to_string() << std::endl;
If I try to…

Lenny
- 27
- 8
1
vote
1 answer
Seg fault when using Botan
I'm just getting started with Botan. I have included the botan_all.h in my code file and am linking to the libbotan-2.a library when building.
Here is the relevant part of main.cpp:
#include "botan_all.h"
int main(int argc, char *argv[])
{
…

Michael220
- 193
- 12
1
vote
1 answer
'nmake' is not recognized as an internal or external command
i want to build c ++ library "botan" according to this instruction:
https://botan.randombit.net/handbook/building.html (for Windows)
the second command is this: nmake.
in the result I get 'nmake' is not recognized as an internal or external…

qwe
- 15
- 1
- 4
1
vote
1 answer
Botan/C++ - Encrypting with AES using a key size larger than 32 bytes
I need to encrypt with AES-256, but I ALSO need a key size LARGER than 32 bytes. I have a function that takes text, a key, and an IV, and returns the encrypted text. It works with everything smaller than 32 bytes, but anything larger gives me an…

roach
- 84
- 1
- 8
1
vote
1 answer
Where are the passhash9 algorithm from?
I am using the Botan library which contains an algorithm named Passhash9.
It is a Password Hashing. Now, I want to know where it is from.
who can give me some papers or links about it?
Passhash9:…

Land
- 171
- 11
1
vote
2 answers
Botan MC-Eliece implementation fails because of deprecated implementation example
I have problems with my c++ mc-eliece implementation from Botan crypto library. There seems to be virtually only one example of it in the whole internet, with a link to it.
https://www.cryptosource.de/docs/mceliece_in_botan.pdf
But this example is 6…

Leopolis
- 35
- 6
1
vote
1 answer
How to separate botan encryption and decryption operation via command line argument?
i try to explore c++ cryptography using botan. From the provided example,the method of encrypt and decrypt a plaint text is shown below
include
#include
#include
#include
#include…

KJ L
- 115
- 2
- 14
1
vote
1 answer
Botan AutoSeeded_RNG can not be initialized, unknown reference, although libs are correctly linked
I simply try to initialize the Botan AutoSeeded_RNG but it fails because of a bad reference. I just wanted to test if i can initialize any kind of botan RNG, corse i have trouble with it in another project.
I have the correct header included and am…

Leopolis
- 35
- 6
1
vote
1 answer
Two subprojects A and B, A depends on B and checks for features present in B
I'm trying to create a CMake project that integrates 2 sub-projects, specifically botan and rnpgp. The build system of rnpgp is CMake-based, botan uses a Python configure script to generate a Makefile.
The problem is that during the CMake run rnpgp…

jpo234
- 419
- 3
- 9
1
vote
0 answers
How to compose a PKCS#7 signature file correctly?
I'm trying to use the Botan library to generate a detached signature file. The resulting signature file is not validated by OpenSSL (no other checks). Prompt in what there can be an error of formation of the signature file.
A couple of keys for…

zarand
- 31
- 2
1
vote
1 answer
Extracting Public key from Private key using Botan
I'm trying to encrypt a message using asymmetric private-public keys.
In Botan, using Load_key() functions, I read the private key and want to extract it's public key from it. For constructing of an RSA public key in it's constructor, I'll need a…

AmirH.
- 63
- 6
1
vote
1 answer
Setting up botan in visual C++
For some reason I came up using botan to connect to PKCS11 hardware tokens. I'm new in C++ and want to write the code in with Visual Studio 2019.
I download botan source code and built the source with nmake. After the build completed, there create…

Hana Bzh
- 2,212
- 3
- 18
- 38
1
vote
1 answer
Java equivalent of C++ Botan function call
I have a C++ code similar to this:
Botan::AutoSeeded_RNG botan_rng;
Botan::RSA_PrivateKey private_key(botan_rng, 2048);
Botan::PK_Signer botan_pss_signer(private_key, botan_rng, "PSSR_Raw(SHA-256,MGF1,32)");
What I would like to do is to implement…

Vombat
- 1,156
- 1
- 15
- 27
1
vote
1 answer
Compile error Botan library on Windows with MSVC
I'm following the guide Building The Library, but I have errors. My steps.
1. Set enviroment for x64 with vcvars64.bat.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat
2. Run configure.py
python…

Joma
- 3,520
- 1
- 29
- 32
1
vote
1 answer
Crash when generating blake2b hash
I'm trying to write a hash function with Botan as my back end that is:
std::string hex_hash(std::string &in, const std::string &HASH)
{
std::unique_ptr hash(Botan::HashFunction::create(HASH));
return…

Matt
- 11
- 3