kpbe is an opensource command line Password Based Encryption (PBE) tool for files. It is based on bouncycastle encryption algorithms and can be used to encrypt and password protect files using standard encryption algorithms like AES, RC4, RC2, Triple DES, Blowfish and Twofish.
kpbe runs on .NET 3.5+ and Mono 2.8+
Please visit project homepage for more details.
[License: GPLv3]
Written by Kamran


I am trying to decrypt the content catured form a iphone which is aes 128 bit encrypted and the key of the content is avaialble in separated file. But using your tool, i am not able to decrypt the content and it throws the error as pad block corrupted.
Similar kind of issue is there while decrypting using the OpenSLL and it says Bad Decrypt.
I have tried using 2-3 different files. Can you help me out in decrypting the content. Thanks in advance.
At the moment, kpbe doesn’t support keys on files. I will add this feature in the next release.
thanks
but in the current release along with the Key if i want to give IV value, how can i give it.
i dont see any option to give IV value explicitly???
can u guide me on this??
The IV value is hardcoded for different algorithms, in the next release i’ll allow user input for this.
thanks
Can you tell me where i can change this hard coded value in the code of kpbe to test my file if i will bale to decode it or not.
I am not finding anywhere the vi value being hard-coded. I can only see the viSize parameter but not the viBytes itself.
the IV is currently generated based on the hardcoded IV size. The method PbeParametersGenerator.GenerateDerivedParameters does that. So rather than generating the init vector value you can also supply it when creating the ParametersWithIV like:
ParametersWithIV parameters=new ParametersWithIV(pGen.GenerateDerivedParameters(pbe.BaseAlgorithm, pbe.KeySize), ivValue);
The ivValue can be provided as a command line argument. I will try to incorporate all this in the next release.