CryptoJS decode with PyCrypto

懵懂的女人 提交于 2021-01-29 05:23:41

问题


Hey I have such Javascript code

CryptoJS.algo.AES.keySize = 32, CryptoJS.algo.EvpKDF.cfg.iterations = 1e4, CryptoJS.algo.EvpKDF.cfg.keySize = 32;
var decrypted = CryptoJS.AES.decrypt(message, passphrase);

And I need to create an analog using Python (I'm trying to use pycryptodome)

But I have several questions:

  • Have can I get key and iv from passphrase?
  • How should reflect all these (CryptoJS.algo.AES.keySize = 32, CryptoJS.algo.EvpKDF.cfg.iterations = 1e4, CryptoJS.algo.EvpKDF.cfg.keySize = 32) in my Python code?
  • What kind of AES mode CryptoJS uses by default?

Thanks

来源:https://stackoverflow.com/questions/65844902/cryptojs-decode-with-pycrypto

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!