首页
社区
课程
招聘
[原创][推荐][原创] 2021 KCTF 秋季赛 防守方提交题目
发表于: 2021-10-7 11:36 7923

[原创][推荐][原创] 2021 KCTF 秋季赛 防守方提交题目

2021-10-7 11:36
7923

de23f9d82798377ea01743d43d5353cd

def pure_block_cipher_encrypt(p: list, k: list, round_n: int, constant_c: list):
    assert len(p) == 2
    assert len(k) == 2
    pl = p[0]
    pr = p[1]
    tmpl = pl
    tmpr = pr
    for i in range(round_n):
        tmpl, tmpr = pure_block_cipher_enc_round(tmpl, tmpr, k[i % 2], constant_c[i])
    return tmpl, tmpr
 
def pure_block_cipher_enc_round(xl, xr, ki, ci):
    yl = xr
    yr = xl + (xr + ki + ci)^3
    return (yl, yr)
def pure_block_cipher_encrypt(p: list, k: list, round_n: int, constant_c: list):
    assert len(p) == 2
    assert len(k) == 2
    pl = p[0]
    pr = p[1]
    tmpl = pl
    tmpr = pr
    for i in range(round_n):
        tmpl, tmpr = pure_block_cipher_enc_round(tmpl, tmpr, k[i % 2], constant_c[i])
    return tmpl, tmpr
 
def pure_block_cipher_enc_round(xl, xr, ki, ci):
    yl = xr
    yr = xl + (xr + ki + ci)^3

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

最后于 2021-12-15 13:05 被kanxue编辑 ,原因:
上传的附件:
收藏
免费 3
支持
分享
最新回复 (1)
雪    币: 50161
活跃值: (20625)
能力值: (RANK:350 )
在线值:
发帖
回帖
粉丝
2
题目收到
2021-11-9 10:13
0
游客
登录 | 注册 方可回帖
返回
//