问题标签 [ctr-mode]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
244 浏览

python - 使用相同密钥/IV 的 Python AES CTR 模式

我发现了一个加密的 PIN 码(在本例中为 9999)的哈希值,我知道它是使用 AES CTR 加密的。

问题是,我不知道如何在 python 中编写它。我知道密钥和 IV 是相同的,但是我知道 CTR 模式不需要 IV,而是使用计数器。我只是不知道如何使用 CTR 的 IV/Counter 部分。

我也尝试过使用计数器:

任何帮助都会非常感谢。