89luca89 / 89luca89/pakkero

help understanding key derivation

未关闭
#13 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
278
派生
44
PR 合并指标
30 天内没有已合并 PR

描述

hi,

i'm not looking to use pakkero, i was just taking a look at vanilla OS and ended up in this rabbit hole. btw, thanks for your work on these projects!

so i was trying to understand the [key derivation](https://github.com/89luca89/pakkero?tab=readme-ov-file#decryption) in pakkero, and i run into a problem. i'm concluding that i'm not understanding it, because otherwise there seems to be a a trivial way of attacking it.

if the key is just `sha512sum(Launcher+OFFSET1)`, what is stopping you from postulating offset1 to be a low number, computing the hash/key, decrypting some block starting at offset1 with the computed key, checking for success (check ELF header, entropy, or whatever), increasing offset1 by its granularity (byte), and loop by extending the previously calculated hash?

with an offset1 in the recommended 2M range, the key space would be just 2^21 which is easily bruteforceable, no need to do any dynamic or static analysis. and the fatal flaw would be that the key space is linear with file size, which implies that file size is exponential with key size. it seems a key size of 64 bits would require a file size of 4503599627370496 TB, while 128 bits would require 8.3*10^34 TB.

so what am i getting wrong here? thanks!

贡献指南

这个仓库没有索引到贡献指南

调研方向

该 issue 对 pakkero 中密钥派生的安全性提出质疑。首先阅读 README 中关于解密的部分,以及密钥生成和解密的源代码。检查 OFFSET1 的使用方式,以及所描述的暴力破解攻击是否可行。评估该漏洞需要理解密码学概念和 pakkero 的实现。

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

评估

领域
security
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
30/100

把新 issue 发到你的邮箱

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