KoffeinFlummi / armake2

Successor to armake written in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Signatures are wrong for some PBOs

veteran29 opened this issue · comments

I was using same setup for one of my addons for like last ~1month simple bat that builds via armake2 then signs files with key. So far it was working really nice but today I've created small addon to unlock all vanilla faces in arsenal.

PBO of this particular addon is getting signature errors on server when signed via armake2 and works properly when signed via DSUtil.

Strangely when I'm checking v3 sig from armake2 that is not valid for the server DSUtils says it's fine anyway. When I'm checking v2 armake generated sig, DSUtils says its not valid. (both don't work on server).

After inspecting v3 sig from armake2 vs v3 sig from DSUtils I've noticed that there is some difference between them (some bytes are offset?):
Comparison output from windows FC /B: https://pastebin.com/Yx83V89p

problematic_pbo_and_signatures.zip

Small update:

After adding 48kB PAA file to PBO, signature produced with armake2 was equal to one from DSUtils

Is the size of the PAA important or is that just randomly 48kB?

It was random paa, I guess the bug is present if pbo is smaller than some size.

I had problems with sigs before with hemtt which uses armake2 internally, and it was with really small addon too.

If you have the time it would be helpful to find that critical size. Or at least narrowing it down to some area.
You could simply use text files of different size (should be easily doable via copy&paste) and see in which size regions it works and in which it doesn't work.

I will try to create automated test, no way I'm doing that manually :P

The issue was with the padding of the signature data, so the fact that the file that fixed it was small was completely coincidental; almost any change would have prevented this issue. In fact, you were quite (un)lucky to even encounter this. Unfortunate that DSUtils doesn't check the padding in the same way as the server does.