im no encryption expert. but i remember in 2018, i literally copied and pasted some encryption code and was able to just edit a few variables and put it into the functions i wanted. it worked great. i was encrypting strings with just a function call and a key and a vector. this was on ..
Category : aes
I’m currently writing a C++ software which have to be compatible with a legacy network service. The encryption/decryption which is used by that service is AES-128-OFB-PKCS#7(yes, it pads the data in OFB mode). Because OFB mode does not require padding OpenSSL does not apply or remove such padding which gives me the troubles. I’ve been ..
S-box I want to implement AES Data Encryption so I need S-box in array representation. Source: Windows Que..
I want to direct multiple lines of output from a .txt file to that encrypt() function. The .txt file contains addresses of files I want to encrypt. The code compiles but no encryption pans out. I am using EVP_aes_256_cbc() for encryption. What am I doing wrong? int encrypt(unsigned char* plaintext, int plaintext_len, unsigned char* key, ..
I want to encrypt all the files in the test folder This works successfully for text files But not for binaries Source Code : void l(string& foldername, vector<string>& output) { DIR* dir; struct dirent* DirEntry; if ((dir = opendir(foldername.c_str())) != NULL) { while ((DirEntry = readdir(dir)) != NULL) { if (strcmp(DirEntry->d_name, ".") && strcmp(DirEntry->d_name, "..")) ..
I aim to create a function that takes array inputs and encrypts them with AES-CBC mode. I have tried with msdn crypto API example that is for RSA. But I can’t seem to make it work. Can someone guide me on its feasibility and structure? Source: Windows Que..
I want to encrypt a binary file This is not done But it is done for text files But it does not encrypt the binary file Code : SecByteBlock key(AES::MAX_KEYLENGTH + AES::BLOCKSIZE); HKDF<SHA256> s256; s256.DeriveKey(key, key.size(), (const CryptoPP::byte*)pa.data(), pa.size(), (const CryptoPP::byte*)iv.data(), iv.size(), NULL, 0); ifstream file("1.rar", ios::binary); std::string t((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>()); if (file.is_open()) { string enc; ..
Can someone tell me whats wrong with my code? It works fine in my test example.. but when I use it in production model it decrypts the string but adds a padded symbol to maintain some kind of block size or something. I didn’t post my encrypt/decrypt methods as they would make this post too ..
what I want to do is run one AES round like _mm_aesenc_si128 but using the kernel. I want to make this as cross platform as possible… and on some CPU’s there is a cryptographic engine that uses a kernel module to run. I have tried using openssl but it doesn’t seem like you can do ..
I have some C# code that encrypts the body of an email before it sends it to another email account, using AES: [link 1] I believe the default mode for AES in C# is CBC and I also believe the default padding method in C# is PKCS#7. The C# code applies the Default encoding to ..
Recent Comments