- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我收到来自 URL 的加密响应,该响应是使用 CryptoJS 加密的。我计划使用 Crypto Cipher 在 Python 中解密响应。这是附加的 JS 代码,用于解码响应。我尝试做任何想法或指示如何做?
Javascript:
function decodeResponse(result)
{
var keyBase64 = CryptoJS.enc.Base64.parse("ITU2NjNhI0tOc2FmZExOTQ==");
var iv1 = CryptoJS.enc.Base64.parse('AAAAAAAAAAAAAAAAAAAAAA==');
var bytes = CryptoJS.AES.decrypt(result, keyBase64, {iv: iv1}, {mode: CryptoJS.mode.CBC});
var plaintext = bytes.toString(CryptoJS.enc.Utf8);
return plaintext
}
Python 代码:
from Crypto.Cipher import AES
import base64
def decrypt(encrypted, passphrase, iv1):
aes = AES.new(passphrase, AES.MODE_ECB, iv1)
return aes.decrypt(base64.b64decode(encrypted))
def main():
message = 'F\/VDFb\/tLplCXIgvPGlpppHawetuV1a5DtWOtmO1ZkS\/87wBEfaIV4VvxPeEyouCopt\/4G+3GDd\/kWnm6jjiBudpiOZnCmqOgQN6E\/K4P4oeGfeYrM51936xLc6CGjFl2McgbQ7YhldDobeuv3OCjYFd3Am3G2pzG6z7F44VP4e2p4ZVU3ysgXLVdqHnl8lVPzXX4AAH54yI1wjsoywDckbH9SXea4VvMryJ5bZsVs5XXG9GPlOJuwIkay46ubpZ5SZxM586C2bPVxi42RCF2a\/GsdagaMpQ83x\/PXN\/t3GBeKoxHN1WPbLskHvOirJeme7CIRmFRdswJkHbCFiUF9KChKuO06hdnZJECG76Y+xeB44R5254O\/E8R7K9uaCKRFFLBg7UoFwtlNKETiBBrrrT8l\/V4nY6u5P22uWy1Ioms2yj\/aJSP0HoHeR9vnbrmNQDSDRbOtBly4QfPaq1A5Vn2as+5CjnGmqE3CnsONO9a1LDdt\/kg5N89\/1KXEi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UwQIzH0o6DelFuudtrlkN4t+ScUOirhzpggp3aplXTVw9ZyX1TePHNkzh6xgjvns8IKET2GK\/IX0AacY9nrtN2nv6Xix4WEGVIjVg\/GfSgFfCN84iddUGMNSCACbgarvQAEIy29FA+M5f9iEMi4ywO564GRq3C3qk1bfNStSFmzp2iQ6y0meXMKUMC0ecsgMVwZUzcG1TcU1v6t1R6LrP3VwjgKXILX3zw4K9Mg8IM6edTseNoeUYC1q\/CvvNZ4JnF\/tG\/qx5a2oF0dcMj7W6nu1Sy+p5K7ltIhOb0urPQLrFd3F9klFZiOQ3vy3NVyyT4Nw7\/dSqBoiy\/m3a\/c24vEvXHTQ0nb3s8rBJKeqqQCLHOAcA7QRLBoRckgWKzqzhOwu1Uu9z4xMbe9nas6NnW4XxHDZS\/xHVloB2ij6Q1CMWv5tmZx7f96mAq1R4p7v\/lcWk0zOKGbqOi2NdR5reYETrWvE9E\/g6Tc1Xrxe9cbnUnW387jCW\/pP5dge\/SvdzogdgzovExOV5dUZqpMxlN888GcUlJS3+M+KDSelMae3qF0rOf5yz2WSYUYwoXt4xk3uUvtSEAbvEoqoJbnBLrYdQqyUupkHwD\/v4OG1gJQA161q2ZAgXZWmgbsNpj73xzIvvU\/shMceT6he4Qa3OeSHMetePGgQ+FJBVkomYFvL\/McrZukyRss5Cktf3Z+P0h9aWx2oOs+VIr+pYJtT03dbx+ArKejpX9Xjdze7FOjn3biPNt1p\/a9nE3TRmWhcFZzqgvfPBpKk8Kq\/peJMvQy\/5w8gicl7JmEkTJrHbSu6wJC2Mo8RAUiFs7fzBPY3eubIHc2f\/SO7afR+aXXMLgOoQW5djdq0LsWmZCB8HeMHOo='
keyBase64 = "ITU2NjNhI0tOc2FmZExOTQ=="
iv1 = 'AAAAAAAAAAAAAAAAAAAAAA=='
message = decrypt(message, keyBase64, iv1)
print message
if __name__ == '__main__':
main()
最佳答案
您使用了错误的操作模式。您可以在 Python 中指定 ECB 模式,而在 JavaScript/CryptoJS 中使用 CBC 模式。
<小时/>请注意:
不,我不会为您编写代码。仅在此处复制并粘贴 Python 代码并不足以保证我们为您移植代码。
关于javascript - 使用 python Crypto.Cipher 进行 AES 解密,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50460114/
使用 Cipher.ENCRYPT_MODE 有什么区别/好处/缺点吗加密 key 以使用 Cipher.WRAP_MODE 进行传输? 我的理解是,我仍然需要第二个,可能更小的 key 来包装/加密
我创建了一个传递两个缓冲区的密码。 buf1 是它们的键,一个 32 字节的缓冲区,而 buf2,即 IV,也是一个 32 字节的缓冲区,我将其切片为仅使用 16 字节。文档说 cipher.upda
我刚刚将我的 Mac 升级到 Snow Leopard,并启动并运行了我的 Rails 环境。除了 OSX 之外,我之前安装的唯一区别是我现在运行的是 ruby 1.8.7 (2008-08-11 p
正在尝试在客户端和服务器之间建立 SSL 连接。但每当我尝试从客户端连接时,我的服务器上都会收到 javax.net.ssl.SSLHandshakeException: no cipher suit
在多线程 Java 应用程序中,我们使用 AES-256 对磁盘文件进行加密和解密。请注意,多个线程可以同时调用不同文件的加密和解密方法。 加密: Cipher encrypter = Cipher.
我试图将安全提供程序从 SunJCE 切换到 Bouncy CaSTLe (BC),并在 Cipher 对象中偶然发现了这种特殊行为。据我所知,SunJCE 的 cipher.update(bytes
我应该如何使用从服务器端传输的公钥在客户端加密 session key ? 我应该使用 Cipher.WRAP_MODE 还是 Cipher.ENCRYPT_MODE? Cipher cipher =
SecretKey key = keyFactory.generateSecret(keySpec); Cipher cipher = Cipher.getInstance("AES/CBC/PKCS
我正在尝试使用 AES 解密字符串,并且使用 jce.jar 来执行此操作。 我有以下方法来解密。 public String decrypt(String strToDecrypt) {
我有一个带有解密功能的 Android 应用程序,如下所示: private static byte[] decrypt(byte[] keybytes, byte[] data) { Sec
我正在实现 DES - CBC。我对 cipher.init 、 cipher.update 和 cipher.dofinal 的作用感到困惑。我只是使用 init 来设置 key 并使用 dofin
使用 Digicert's SSL mechanism explanation我已经了解数据在浏览器和服务器之间是如何加密的,以下是我的理解。 浏览器将向服务器发送请求以获取一些资源。服务器检查请求的
我正在使用 javax.crypto 在 java 中进行 AES CBC 解密。我正在使用以下 Cipher 类方法: public final void init (int opmode, Key
我能否在多个方法中使用相同的 Cipher 对象,因为 getInstance 和 init 的方法参数不会改变? 例如,假设应用程序的多个部分使用实用程序类中的 decrypt 方法。所有传递的加密
很简单,javax.crypto.Cipher 的一个实例(例如 Cipher.getInstance("RSA"))可以从多个线程中使用,还是我需要将它们中的多个粘贴在 ThreadLocal 中(
Rails4默认使用加密的cookie session 存储。当应用程序尝试加密cookie时,会引发以下错误:OpenSSL::Cipher::CipherError: Illegal key si
我正在使用this code . 当所有代码都在 main 方法中的一个 try catch 中时,它似乎可以工作,但当它被分成另一个类并通过 Security 对象调用解密时,它就不起作用了。 我猜
我目前正在使用 Cipher 创建一个使用始终相同的 key 的解决方案。我知道这不是最安全的解决方案,但这是我被要求做的。我应该使用 AES256 和 EBC,但我无法正确加密。问题是我有未知的字符
我正在尝试读取一个大小为1KB的文件,然后使用CBC模式下的AES算法对其进行加密和解密。当我尝试初始化密码时,它抛出一个错误。请找到下面的代码。我在密码类中找不到接受“加密模式”、“ key ”和类
你好,我构建了这两种方法,加密工作正常,但解密出现错误,因为密码想要一个字节,我想从字符串加密 import javax.crypto.Cipher; import javax.crypto.spec
我是一名优秀的程序员,十分优秀!