is there aes 256 with cbc encryption in ubuntu/linux/unix? - c++

I would like to create an IV encryption with aes 256 and cbc pkcs7 padding. I would like to ask if there is a library in linux that implements this type of encryption. I don't want to add dependency files/ libraries. THX! APPRECIATE
If there is nothing like this includes in Linux(I am working on Ubuntu) could you please specify a simple and easy way to do this encryption in c++ (add it's files and headers in my code). THX. APPRECIATE!!

You can use Crypto++
http://www.cryptopp.com/
I use it for the RSA and find it satisfactory.

See http://www.openssl.org/docs/crypto/crypto.html

Related

Encrypting files with crypto++ using RSA

I wanted to encrypt a large binary file using crypto++ library with asymmetric encryption(RSA) algorithm. I have searched for working example and couldn't find it.
Is it possible? What kind of things should i consider when i implement it using this library

How i can use Cryptography library to encryption files in python

I'm trying to encrypt and decrypt PDF file using crypto and everything works well but I need to use another library like Cryptography https://github.com/pyca/cryptography .
How I can use Cryptography library to encrypt and decrypt files like PDF file because I search a lot and I can't find one example of how I can use Cryptography with files.
Any example may help.
To answer your question Cryptography's documentation could potentially help you with this. I used the library to encrypt text files, python files, i not sure about pdf's though. But the doc's were helpful. https://cryptography.io/en/latest/
Plus this website also helped me out as well.
https://www.thepythoncode.com/article/encrypt-decrypt-files-symmetric-python
It implements the Fernet key type encryption which is symmetric encryption.
There is asymmetric encryption (I believe this type uses public and private keys) you can as far i know encrypt strings with this type of encryption. As far as encrypting files with this type of encryption i am not sure about that as i have not done any research on that my self lol!
I was messing around with some of the functions in this library and found some useful things in it. Hope this helps.
p.s. Stay away from the hazmat section of this library. ONLY use this if you really know what your doing in terms of cryptography!

Does Crypto++ support TOFB-I?

I'm developing a C++ application to decrypt the data encrypted by someone else with TOFB-I (TDEA Output Feedback - Interleaved).
To do this I'm using the Crypto++ library.
Unfortunately, the result of the decryption doesn't seem to work: the first byte is decrypted correctly, the rest is just meaningless data.
I've double checked with the Linux command line tool OpenSSL and get exactly the same result.
So I'm inclined to believe that I'm applying a decryption algorithm with wrong feedback, so that the first IV works fine but something goes wrong with the feedbacks.
My question is: how do I apply the interleaved variant of the DES_OFB mode?
Couldn't find anything about this either in the Crypto++ or in the OpenSSL documentation.
Apparently Crypto++ (and also OpenSSL) doesn't support TOFB-I operation mode:
http://csrc.nist.gov/groups/STM/cavp/documents/des/tripledesval.html
Actually, according to the above link no implementation has been validated yet as conforming to TOFB-I!
So I guess I'll need to implement my own TOFB-I algo.

is there any library support RSASSA-PSS with EMSA-PSS encoding technique and certificate validation..?

i need to sign the data using RSASSA-PSS with EMSA-PSS encoding .. openssl does not support this algorithm .can any tell me is there any other open source libraries available to do this..?
Crypto++ mentiones PSS and EMSA.
OpenSSL supports RSA-PSS (http://www.openssl.org/docs/apps/pkeyutl.html#RSA_ALGORITHM), as well as other libraries (BouncyCastle should do that as well).
Have look here:
http://fixunix.com/openssl/526614-signing-verifying-messages-rsassa-pss.html
I haven't try this implementation, but I have one of my own that looks like this one, and it's perfectly working

How to sign XML document or verify XML document signature with C++?

Subj. I need to sign/verify under Windows in native C++ (no .NET), using private key for signing, public key for verification.
I saw few examples on MSDN (http://msdn.microsoft.com/en-us/library/ms761363(VS.85).aspx) that demonstrate how to sign the document with CSP (I don't know what this means).
For my case I need to use a "key" from the binary data array (using DSA encryption algorithm)... can somebody help me with that?
Thank you in advance.
I recommand libxml2 and xmlsec which are perfect for this purpose.
The API can seem hard to read at first, but it works well. xmlsec uses OpenSSL to achieve the cryptographic part.
Providing a "short" example here is probably hard because the three libraries require some initialization and a lot of C calls.
Google's keyczar lib is also very easy to use
There's also Crypto++