Potential implementation and verification issues in several cryptanalysis artifacts

未关闭
#3 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
cpp, python, shell

调研方向

Start with Cryptography/LOCKER-ROLLO/artifacts/ciphertext_attacks/sparse_krylov/tsm_bw.cpp and verify_s16.sh to check how polynomial degrees above 63 are represented. Then inspect the two ARADI attack scripts and Cryptography/COLM/artifacts/splice_forgery/run.sh alongside splice.c; the issue describes the fallback and boundary-test concerns. Done means the configurations and experiments report outcomes that reflect the behavior actually exercised.

由索引模型根据 Issue 内容生成。

描述

Hello,
I was reviewing the implementations in your repository and noticed a few potential issues that may affect correctness or experimental reproducibility.

  1. LOCKER-ROLLO: Undefined behavior in polynomial construction
    File: Cryptography/LOCKER-ROLLO/artifacts/ciphertext_attacks/sparse_krylov/tsm_bw.cpp (lines 18–20)
    for (int j = 0; j < m; ++j)
    g[j] = (gbits >> j) & 1ULL;
    Since gbits is a uint64_t, shifting it by 64 or more bits causes undefined behavior in C++.
    However, verify_s16.sh includes configurations with m = 67, 71, and 107.
    This may introduce incorrect coefficients into the modulus polynomial, potentially affecting the constructed quotient ring and subsequent MaxMinors matrix.
    It would be worth using a representation that supports arbitrary polynomial degrees.
  2. ARADI: Known-key fallback is reported as successful recovery
    Files:
    attack_5r_lowdata.py (lines 935–954)
    attack_6r_48cp.py (lines 281–293)
    When pycryptosat is unavailable, the fallback paths use the actual round keys as witnesses rather than independently recovering them.
    For example:
    rec_true = {
    rk_idx: _pack128(rks_witness[rk_idx])
    for rk_idx in order
    }
    return [rec_true]
    The experiments can still report successful master-key recovery.
    I noticed that the README already documents this fallback, so the behavior itself is not hidden. However, it would be clearer to distinguish witness verification from independent key recovery, especially in automated experiment summaries.
  3. COLM: Boundary tests may report false positives
    File: Cryptography/COLM/artifacts/splice_forgery/run.sh (lines 94–107)
    The check_sweep() function defaults to REJECTED unless the output contains a positive acceptance count.
    However, the command's exit status is captured but never checked.
    Consequently, a crashed or failed experiment may still be classified as a successful rejection test.
    Additionally, the test labeled "query 1 complete, query 2 15-byte last block" sets PARTIAL2=15, but splice.c uses MLEN instead of MLEN2 when diff_len is false. Therefore, the intended incomplete-block condition does not appear to be exercised.
    I would suggest checking the exit status explicitly and verifying the actual message lengths used by each test.
    These observations do not necessarily invalidate the underlying cryptanalytic results, but they seem worth addressing to improve implementation correctness and the reliability of the experimental evidence.
    Could you please take a look and confirm whether these behaviors are intentional?
    Thanks for making the research and implementations publicly available.
主要语言
TeX
星标
108
派生
10
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

相似的 Issue

更多 Cryptography Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。