Ad
Where Can I Set The Number Of Rounds Of Key In Crypto++ (AES/CBC Mode)?
Are the rounds of key already set in CBC mode(AES-128:10 rounds,AES-192:12 rounds,Aes-256:14 rounds) or is there other way to set the rounds of key? I've found setkeywithround(), but it doesn't seem to work with CBCmode. Below is the sample code I copied and modified from crypto++ wiki
void CBC_modified() {
AutoSeededRandomPool prng;
SecByteBlock key(32);
SecByteBlock iv(AES::BLOCKSIZE);
prng.GenerateBlock(key, key.size());
prng.GenerateBlock(iv, iv.size());
std::string plain = "CBC test mode";
std::cout << "plain text: " << plain << endl<<endl;
try
{
CBC_Mode< AES >::Encryption e;
e.SetKeyWithIV(key, key.size(), iv);
Ad
Answer
Number of rounds of standard algorithms such as AES
are predefined and I have never seen anybody change it. if you do so, it will be another algorithm and you will not be able to decrypt it with any standard version of algorithm.
Round of AES
are like this:
- AES-128 -> 10 round
- AES-192 -> 12 round
- AES-256 -> 14 round
BTW, rounds of algorithm is not related to its mode such as CBC
.
Ad
source: stackoverflow.com
Related Questions
- → Php&Laravel passing encrypted object via url
- → Licensing system for client side code web application
- → Working with encrypted files in Laravel (how to download decrypted file)
- → binding.PBKDF2 error when hashing passwords Node.JS
- → Using Crypt with Laravel phpunit tests
- → Route Model Binding and encryption on laravel
- → How to apply client side password encryption in laravel
- → Using bcryptjs with Mongo
- → Encrypting using node-forge and decrypting using python with RSA-OAEP
- → Laravel request()->fingerprint() function and possibility of encrypted user data logging?
- → how to see encrypted password stored in laravel and show in admin dashboard page
- → custom authenticate and password encryption laravel 5
- → Call to undefined function IlluminateEncryptionopenssl_decrypt()
Ad