help understanding key derivation
- Vorherrschende Sprache
- Go
- Sterne
- 278
- Forks
- 44
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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!
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Das Issue stellt die Sicherheit der Schlüsselableitung in pakkero infrage. Beginne damit, den README-Abschnitt zur Entschlüsselung sowie den Quellcode für die Schlüsselgenerierung und Entschlüsselung zu lesen. Untersuche, wie OFFSET1 verwendet wird und ob der beschriebene Brute-Force-Angriff durchführbar ist. Für die Bewertung der Schwachstelle sind Kenntnisse kryptografischer Konzepte und der Implementierung von pakkero erforderlich.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- security
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 30/100