Questions tagged [botan]

Botan is a BSD-licensed crypto library for C++ applications. It provides access to most major cryptographic algorithms.

127 questions
3
votes
0 answers

Botan static library linking error

When I compile a source file using option: -lbotan-2 which means using the shared library, nothing goes wrong. But after I switch to option: -l:libbotan-2.a which means using the static library, an error…
Arolia
  • 511
  • 2
  • 6
  • 12
3
votes
1 answer

Encryption and decryption corrupting binary files

I have two simple encryption decryption functions. The functions work fine for text files and I can retrieve the file successfully. But it corrupts binary files. If I encrypt an image and then decrypt, it gets corrupted. bool…
adnan kamili
  • 8,967
  • 7
  • 65
  • 125
3
votes
1 answer

How do I use Botan::MemoryRegion?

Does anyone know how to create an object of type Botan::MemoryRegion for use in this method? BigInt BOTAN_DLL fe1_encrypt(const BigInt& n, const BigInt& X, const SymmetricKey& key, const…
erotavlas
  • 4,274
  • 4
  • 45
  • 104
3
votes
1 answer

No such file when building Botan under Android Studio?

I was using Eclipse successfully to build Botan using the directions linked to from this question, however, Android Studio is supposed to replace Eclipse for Android development, so I'm trying to get it to build in Android Studio now, but it fails…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
3
votes
1 answer

Can't build Botan with Clang

I'm trying to build a library that links to Botan 1.11. I used configure.py to generate an amalgamation and included that on my project. The problem is that when I try to build the project I get the following…
ruipacheco
  • 15,025
  • 19
  • 82
  • 138
3
votes
1 answer

Botan tutorials or examples for creating the SHA-256 hash of a password

I'm porting a portion of a .NET application to Qt on Linux. I am trying to replicate the results of a .NET function to create the SHA-256 hash of a password + salt. The .NET code is return new SHA256Managed().ComputeHash(buffer); Where buffer is…
DarwinIcesurfer
  • 1,073
  • 4
  • 25
  • 42
3
votes
1 answer

Undefined reference to `vtable for...with RTTI support

I created an application that uses RTTI support for dynamic_cast. I added "APP_CPPFLAGS += -frtti" in Application.mk file but i get the error: "undefined reference to `vtable for...". If i don't use RTTI, i get the error: "error: 'dynamic_cast' not…
ChenHuang
  • 382
  • 2
  • 11
3
votes
1 answer

Botan PK_Signer

I am trying to just initialize a PK_Signer object, which seems to be giving me much more problems then Botan version 1.8.10. I am currently using Botan's latest stable release (1.10), and I am having trouble... In Botan 1.8.10, I see examples where…
hetelek
  • 3,776
  • 5
  • 35
  • 56
2
votes
1 answer

How to load RSA public key in PKCS #1, ASN.1 DER form

We have a Go app that generates an RSA key and sends the public key to the client in PKCS #1, ASN.1 DER form. https://golang.org/pkg/crypto/x509/#MarshalPKCS1PublicKey When I try to load the same public key in the c++ client using Botan…
adnan kamili
  • 8,967
  • 7
  • 65
  • 125
2
votes
1 answer

std::bad_alloc using Botan for PKCS#11

I'm new in C++ and I really stuck using Botan to connect to a hardware cryptography token. I don't know If I missed any setups for libs or dlls. I built Botan library based on Building Botan library in Windows 10. botan.lib and botan.dll is created…
Hana Bzh
  • 2,212
  • 3
  • 18
  • 38
2
votes
1 answer

vcpkg cmake does not find botan

I use vcpkg as my package manager, following the example it was quite easy to build the example with sqlite. Afterwards I successfully installed botan and tried to find the library using find_package(botan REQUIRED) as shown in the example…
c3664698
  • 21
  • 3
2
votes
1 answer

Using Botan C++ in QT to encrypt files

I'm using Qt Creator 4.6.1 on Windows 10 Based on Qt 5.10.1 (MSVC 2015, 32 bit) Built on May 2 2018 04:24:33 qmake with mingw491_32 There is a project from the web which makes use of a botanwrapper with the include Botan.pri The full code is quite…
2
votes
1 answer

AEAD mode security

When I was reading Botan document, I came across the following note: During decryption, finish will throw an instance of Integrity_Failure if the MAC does not validate. If this occurs, all plaintext previously output via calls to update must be…
Arolia
  • 511
  • 2
  • 6
  • 12
2
votes
1 answer

Access violation reading location using Botan

I have integrated botan library for TLS security. I get below error: First-chance exception at 0x6DBFD1CE (vcruntime140.dll) in jsonrpctest.exe: 0xC0000005: Access violation reading location 0x00962000. If there is a handler for this exception, the…
pankaj
  • 1,030
  • 5
  • 19
  • 41
2
votes
1 answer

What do I wrong? Botan & QT & SHELL decrypting

first i create my singing keys: (Shell/Debian 9) >openssl genrsa -out ./priv.rsa 2048 >openssl pkcs8 -topk8 -inform PEM -outform PEM -in ./priv.rsa -out priv.pem >openssl rsa -in ./priv.pem -pubout -out pub.pem Then i ceate my encrypt.txt…
blackmoon
  • 324
  • 6
  • 17
1
2
3
8 9