[论文解读] Freestyle, a randomized version of ChaCha for resisting offline brute-force and dictionary attacks
Freestyle 是一种随机化、可变轮数的 ChaCha 流密码变体,通过引入有界哈希终止条件和密钥猜测惩罚(KGP)来抵抗离线暴力破解和字典攻击。它每组密钥和 nonce 最多可生成 $2^{128}$ 种不同的密文,使已知明文、 chosen-plaintext 和 chosen-ciphertext 攻击在实践中不可行,代价是性能比 ChaCha20 慢 1.6–3.2 倍,且密文大小增加 3.125%。
This paper introduces Freestyle, a randomized and variable round version of the ChaCha cipher. Freestyle uses the concept of hash based halting condition where a decryption attempt with an incorrect key is likely to take longer time to halt. This makes Freestyle resistant to key-guessing attacks i.e. brute-force and dictionary based attacks. Freestyle demonstrates a novel approach for ciphertext randomization by using random number of rounds for each block, where the exact number of rounds are unknown to the receiver in advance. Freestyle provides the possibility of generating $2^{128}$ different ciphertexts for a given key, nonce, and message; thus resisting key and nonce reuse attacks. Due to its inherent random behavior, Freestyle makes cryptanalysis through known-plaintext, chosen-plaintext, and chosen-ciphertext attacks difficult in practice. On the other hand, Freestyle has costlier cipher initialization process, typically generates 3.125% larger ciphertext, and was found to be 1.6 to 3.2 times slower than ChaCha20. Freestyle is suitable for applications that favor ciphertext randomization and resistance to key-guessing and key reuse attacks over performance and ciphertext size. Freestyle is ideal for applications where ciphertext can be assumed to be in full control of an adversary, and an offline key-guessing attack can be carried out.
研究动机与目标
- 设计一种对称密码,能够抵抗离线密钥猜测攻击(包括暴力破解和基于字典的攻击),尤其在密文暴露给攻击者的情况下。
- 解决如 KRACK 攻击所揭示的,当密钥或 nonce 重复使用时,确定性流密码(如 ChaCha)的不安全性。
- 引入一种机制,使得使用错误密钥解密的时间显著长于使用正确密钥,从而提高攻击者的计算成本。
- 在不改变密钥或 nonce 的前提下实现密文随机化,从而防止通过重复密文异或分析的密码分析攻击。
- 形式化并量化对密钥猜测攻击的抵抗能力,使用密钥猜测惩罚(KGP)这一指标,反映攻击者所承受的相对计算负担。
提出的方法
- Freestyle 对每个消息块使用随机选择的可变轮数 $R_i$,范围为 $[R_{\text{min}}, R_{\text{max}}]$,其中默认 $R_{\text{min}} = 12$,$R_{\text{max}} = 36$,以实现密文随机化。
- 强制实施有界哈希终止条件:在固定间隔 $H_I$ 处计算 16 位哈希值,仅当哈希值与预计算值匹配时,解密才可终止,从而增加错误密钥的处理时间。
- 密码初始化包含可配置的迭代次数(pepper 位数)和哈希复杂度参数 $H_C \in \{1,2,3\}$,用于控制终止条件的计算成本。
- 哈希函数使用 ARX(加法-XOR-循环)指令设计,以抵抗侧信道攻击,并通过在发生碰撞时递增来实现对碰撞的容忍性。
- 引入非确定性 CTR 模式,由于轮数和 pepper 值的随机性,使得相同密钥、nonce 和消息可生成 $2^{128}$ 种不同的密文。
- 无论用户输入如何,密码强制执行最少 12 轮、最多 36 轮,确保即使在弱参数下仍具备足够的随机性和安全性。
实验结果
研究问题
- RQ1能否设计一种对称密码,使得使用错误密钥解密的时间显著长于使用正确密钥,从而大幅提高离线密钥猜测攻击的成本?
- RQ2如何在不改变密钥或 nonce 的前提下实现密文随机化,以防止基于多个密文异或的攻击?
- RQ3可变轮数和基于哈希的终止机制对 ChaCha 等流密码的安全性和性能有何影响?
- RQ4在实际中能否实现大于 1 的密钥猜测惩罚(KGP)?其对合法用户与攻击者之间相对性能的影响如何?
- RQ5是否可行设计一种即使在密钥和 nonce 重复使用时,仍能抵御已知明文、chosen-plaintext 和 chosen-ciphertext 攻击的密码?
主要发现
- Freestyle 实现了大于 1 的密钥猜测惩罚(KGP),意味着使用错误密钥的攻击者所需计算量至少是合法用户的 KGP 倍,显著减缓了离线攻击速度。
- 由于轮数和 pepper 值的随机性,该密码可为同一组密钥、nonce 和消息生成最多 $2^{128}$ 种不同的密文,使密钥和 nonce 重复使用在基于异或的密码分析中依然安全。
- Freestyle 的性能比 ChaCha20 慢 1.6 至 3.2 倍,主要由于可变轮数和哈希计算的开销,且密文大小增加 3.125%。
- 有界哈希终止条件通过要求完整哈希验证,显著增加了错误密钥的解密时间,而合法用户使用正确密钥可更快完成解密。
- 使用基于 ARX 的哈希函数并结合可配置参数($H_I$、$H_C$、pepper 位数),可在不损害对侧信道攻击抵抗能力的前提下,灵活调节安全与性能的权衡。
- 即使用户提供的参数较弱,Freestyle 仍默认使用 $R_{\text{min}} = 12$ 和 $R_{\text{max}} = 36$,确保足够的随机性和安全性,从而防止因配置不当导致的漏洞。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。