crypto++

Sending PublicKey within packet payload

纵然是瞬间 提交于 2019-12-12 13:14:24
问题 For an academic network application, I'd like to set up an RSA key exchange between 2 virtual machines. I am using Crypto++ to generate the RSA::PublicKey , and I must now send it within a custom layer-2 frame (the packet will be crafted with libcrafter). The thing is, I have no idea of how write the key in the network , such as the receiver, sniffing the packet, is able to re-build, somehow, the RSA::PublicKey . I tried to save it raw in a string, but as they say here, the PublicKey class

QT and Crypto++ with /MTd

℡╲_俬逩灬. 提交于 2019-12-12 12:31:05
问题 I have two QT 5.5 projects with MSVC2013 32bit compiler. The first is Qt console application and is using crypto++ and this two in the pro file: QMAKE_CXXFLAGS_RELEASE += /MT QMAKE_CXXFLAGS_DEBUG += /MTd The second is Qt widgets application where is dialog based GUI builded. Individually, each starts successfully, but also individually the GUI project with the same additions in the pro file like these above is givving the same old error: qtmain.lib(qtmain_win.obj):-1: error: LNK2038: mismatch

Creation of ECDSA public key given curve and public point?

孤者浪人 提交于 2019-12-12 09:58:33
问题 I am struggling with the creation of a ECDSA public key from a string representation of a public key i.e string devicePublicKey("86FB5EB3CA0507226BE7197058B9EC041D3A3758D9D9C91902ACA3391F4E58AEF13AFF63CC4EF68942B9B94904DC1B890EDBEABD16B992110624968E894E560E"); previously I found that I had to prefix this key with '04' so not sure if this is require this time? I am trying to generate it to use in verifying a signature string ecs04b2ExpSignature(

Convert encoded std::string from Base16 to Base10? [closed]

折月煮酒 提交于 2019-12-12 05:56:04
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have a std::string with a large integer encoded in Base16: bbb91c1c95b656f386b19ab284b9c0f66598e7761cd71569734bb72b6a7153b77613a6cef8e63 e9bd9bb1e0e53a0fd8fa2162b160fcb7b461689afddf098bfc32300cf6808960127f1d9f0e287

Decrypted file has strange characters after AES CBC decryption process

ⅰ亾dé卋堺 提交于 2019-12-12 04:39:27
问题 I am decrypting a file with AES CBC method using the Cryptopp library in vc++, VS2015 and QT libraries. I could obtain a result file decrypted but there are some characters which are not being decrypted correctly. The code I use is: const std::string encrypted_file("C:\\TEMP\\G0030013.xml"); const std::string decrypted_file("C:\\TEMP\\decrypted0.xml"); const int key_size(CryptoPP::AES::DEFAULT_KEYLENGTH); const int iv_size(CryptoPP::AES::BLOCKSIZE); CryptoPP::CBC_Mode<CryptoPP::AES>:

LNK1104 Cryptopp.lib with CRYPTOPP_DEFAULT_NO_DLL defined in dll project

岁酱吖の 提交于 2019-12-12 03:07:21
问题 I'm using Visual Studio 2013, with the 2012 toolset and I'm trying to split an win32 executable project up into an exe that consumes a dll that contains all the program logic. The end goal is to be able to create a seperate project for unit tests that can link against the new dll. Now the old version of the project compiles absolutely fine and uses cryptlib.lib (thanks SVN!), but once I separated it out in to a dll with the program logic and the same project settings I get the following error

BAD_ACCESS (code=EXC_I386_GPFLT) when signing with ECDSA

馋奶兔 提交于 2019-12-12 02:58:24
问题 I am trying to use Crypto++ on iOS. I downloaded a prebuilt version of the library from Marek Kotewicz's GitHub. I am struggling hard to run this sample code from the Crypto++ wiki. ECDSA<ECP, CryptoPP::SHA256>::PrivateKey privateKey; ECDSA<ECP, CryptoPP::SHA256>::PublicKey publicKey; AutoSeededRandomPool prng, rrng; privateKey.Initialize(prng, CryptoPP::ASN1::secp256k1()); privateKey.MakePublicKey(publicKey); string signature; string message = "Do or do not. There is no try."; StringSource s

Cryptopp fatal signal 11

最后都变了- 提交于 2019-12-12 02:22:49
问题 Here is log1 aplication output: : ... 25 more W/System.err( 1500): java.lang.ClassNotFoundException: android.graphics.drawable.VectorDrawable W/System.err( 1500): at java.lang.Class.classForName(Native Method) W/System.err( 1500): at java.lang.Class.forName(Class.java:217) W/System.err( 1500): at java.lang.Class.forName(Class.java:172) W/System.err( 1500): at org.qtproject.qt5.android.ExtractStyle.getClass(ExtractStyle.java:388) W/System.err( 1500): at org.qtproject.qt5.android.ExtractStyle.

Integrate Crypto++ code to Qt Application In Linux

懵懂的女人 提交于 2019-12-12 01:18:14
问题 I try to use this example code of using AES algorithm. I am new to qt and linux and try to figure out how should I use this library. I downloaded the file Crypto++ 5.0 from here and unzip it . Now I have direcory in ~/Downloads/crypto with many cpp and header files but I dont know what's next. which file should I compile? how can I integrate this to small Qt project? If I copy the code from the link , the compiler cant find all the include files (which is make sense). so what i need to do to

Encrypt file using file buffer loop

爱⌒轻易说出口 提交于 2019-12-11 19:27:47
问题 Last year I made an encryption program using AES 256 GCM using C++ and the crypto++ lib. This year I wanted to upgrade it to QT and change the way I was reading in the file. The old way was reading the entire file into a char* and then encrypting it and writing it out. I noticed that big files did not work, so I needed to switch this to a buffer. I switched it to a read 8kb, encrypt, write repeat system, but now every time it loops, it adds an additional 33bytes to the output, and I am not