Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: IV must be 16 bytes long #1

Open
najashark opened this issue May 25, 2016 · 4 comments
Open

ValueError: IV must be 16 bytes long #1

najashark opened this issue May 25, 2016 · 4 comments

Comments

@najashark
Copy link

najashark commented May 25, 2016

i have no problem with hide and analyse option, but when try to extract it says ValueError: IV must be 16 bytes long

r0x@b0x:~/Desktop/C11/cloacked-pixel$ python lsb.py extract ../wgmy_03_x.bmp out 12345
[+] Image size: 1024x622 pixels.
Traceback (most recent call last):
  File "lsb.py", line 194, in <module>
    extract(sys.argv[2], sys.argv[3], sys.argv[4])
  File "lsb.py", line 123, in extract
    data_dec = cipher.decrypt(data_out)
  File "/home/r0x/Desktop/C11/cloacked-pixel/crypt.py", line 23, in decrypt
    cipher = AES.new(self.key, AES.MODE_CBC, iv)
  File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/AES.py", line 94, in new
    return AESCipher(key, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/AES.py", line 59, in __init__
    blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py", line 141, in __init__
    self._cipher = factory.new(key, *args, **kwargs)
ValueError: IV must be 16 bytes long
@Mod233
Copy link

Mod233 commented Apr 28, 2018

u can debug the "lsb.py", line 115: data_out = assemble(v), it obviously that function assemble() made a big mistake.

@Zciurus-Alt-Del
Copy link

I may be a little bit late to the party, but I am also having this problem and there's no solution yet.

@ChangedMMA777
Copy link

You need to use .png images instead of .jpg images

@rakeshsivaji
Copy link

@najashark did you find the solution, I am also getting the same error while decrypting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants