Dogs Of War Vu

Network of Friends => Tacview => Topic started by: frenzon on January 15, 2021, 03:01:12 AM

Title: Password hash algorithm different than CRC-64-ECMA?
Post by: frenzon on January 15, 2021, 03:01:12 AM
In the TacView Real-time Telemetry docs[1], it talks about how the password hash uses CRC-64-ECMA. However, from sniffing the TCP stream, using online CRC-64[2] encoders, and going so far as implementing my own version of CRC-64-ECMA in two different languages[3], it looks like the Tacview client uses it in a different way or I'm interpreting it incorrectly:

As an example, when I encode 'glen':
The TacView client and server use and expect: '2f43af03508ceac5' or '37bcf8f2' (it seems to send both in separate packets)
CRC64ECMA creates: 'aa3a22c699bca958'

It's only when I use the 32-bit hash, "37bcf8f2", that I can create a connection, but I don't know what algorithm created that hash.

I searched the forum and couldn't find anything relevant - does anyone have any hints or guidance here?

[1] https://www.tacview.net/documentation/realtime/en/ (https://www.tacview.net/documentation/realtime/en/)
[2] https://crc64.online/ (https://crc64.online/)
[3] https://github.com/glenmurphy/crc64 (https://github.com/glenmurphy/crc64)
Title: Re: Password hash algorithm different than CRC-64-ECMA?
Post by: Vyrtuoz on January 18, 2021, 06:16:33 PM
Make sure that you are calculating the crc64 on a 16-bit wide character string (pseudo UTF-16).

Note that the DCS World exporter is currently limited to 32-bit for historical reasons.

So, if you are listening to it, make sure you are calculating a crc32 based on the polynomial representation 0x04C11DB7. The common one compatible with zip and png files if you know what I mean.
Title: Re: Password hash algorithm different than CRC-64-ECMA?
Post by: frenzon on January 18, 2021, 08:58:42 PM
Ah thank you for the detailed answer!

This worked great - it exposed that I was:
- Not calcing UTF16 bytes correctly (wrong byte ordering)
- Not XORing my CRC64 output (which happens in CRC64-WE)