Python AES decryption

后端 未结 1 638
刺人心
刺人心 2021-02-06 13:25

I have the following piece of code in Java that I want to replicate in Python.

public class AESDecryption {

    protect         


        
1条回答
  •  终归单人心
    2021-02-06 13:31

    The problem is that the server code uses a fixed IV (which is bad) with zeroes in it, but in your python code, you pass a new randomly generated IV to AES.new.

    You can replace rndfile.read(BLOCK_SIZE) with "\x00"*BLOCK_SIZE.

    0 讨论(0)
提交回复
热议问题