You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Does this code work on Windows?
I'm attempting to run it on:
Windows 7
Python 2.7
PyCrypto 2.6 for Python 2.7
A Keepass 1.24 database file
I get the following stack trace:
Traceback (most recent call last):
File "keepassc.py", line 10, in
cliobj()
File "./python\keepass\cli.py", line 78, in call
meth(cmdopts)
File "./python\keepass\cli.py", line 143, in _open
self.db = kpdb.Database(files[0],opts.masterkey)
File "./python\keepass\kpdb.py", line 29, in init
self.read(filename)
File "./python\keepass\kpdb.py", line 55, in read
self.header.encryption_iv)
File "./python\keepass\kpdb.py", line 99, in decrypt_payload
payload = self.decrypt_payload_aes_cbc(payload, finalkey, iv)
File "./python\keepass\kpdb.py", line 116, in decrypt_payload_aes_cbc
payload = cipher.decrypt(payload)
File "C:\Python27\lib\site-packages\Crypto\Cipher\blockalgo.py", line 295, in decrypt
return self._cipher.decrypt(ciphertext)
ValueError: Input strings must be a multiple of 16 in length
The text was updated successfully, but these errors were encountered:
I've not tested this on Windows. It was developed on Debian. The error you show does not look to me to be related to platform differences. It's been a while that I've used this code so maybe this multiple of 16 is a new requirement in the Crypto module(?).
Is it possible to zero-pad the ciphertext payload out to a multiple of 16 before the decrypt and recover the plaintext?
Hi. Does this code work on Windows?
I'm attempting to run it on:
I get the following stack trace:
Traceback (most recent call last):
File "keepassc.py", line 10, in
cliobj()
File "./python\keepass\cli.py", line 78, in call
meth(cmdopts)
File "./python\keepass\cli.py", line 143, in _open
self.db = kpdb.Database(files[0],opts.masterkey)
File "./python\keepass\kpdb.py", line 29, in init
self.read(filename)
File "./python\keepass\kpdb.py", line 55, in read
self.header.encryption_iv)
File "./python\keepass\kpdb.py", line 99, in decrypt_payload
payload = self.decrypt_payload_aes_cbc(payload, finalkey, iv)
File "./python\keepass\kpdb.py", line 116, in decrypt_payload_aes_cbc
payload = cipher.decrypt(payload)
File "C:\Python27\lib\site-packages\Crypto\Cipher\blockalgo.py", line 295, in decrypt
return self._cipher.decrypt(ciphertext)
ValueError: Input strings must be a multiple of 16 in length
The text was updated successfully, but these errors were encountered: