Added a brief overview of the algorithm

This commit is contained in:
puddly
2017-10-25 23:41:22 -04:00
parent 68743a281a
commit ecb8fa5e57

View File

@@ -1,6 +1,6 @@
# XLD Log Signer
Based heavily on [barrybingo/xld_sign](https://github.com/barrybingo/xld_sign). This is a complete disassembly of the XLD log checking algorithm, re-implemented in Python 3.6+. Includes an option to fix those pesky edited logs.
Based heavily on [barrybingo/xld_sign](https://github.com/barrybingo/xld_sign). This is a complete disassembly of the XLD log signing algorithm, re-implemented in Python 3.6+. Includes an option to fix those pesky edited logs.
# Usage
@@ -16,6 +16,11 @@ Based heavily on [barrybingo/xld_sign](https://github.com/barrybingo/xld_sign).
--verify verify a log
--sign sign or fix an existing log
# Why
# Overview
:-)
The final code isn't pretty, but it is simple enough to describe the algorithm.
1. The log is encoded as UTF-8 and hashed with a SHA-256 variant that uses a different IV.
2. The digest is converted to hex and the string `\nVersion=0001` is appended onto the end.
3. The versioned hex-digest is then passed through an unidentified scrambling function that operates on pairs of bytes (open an issue if you recognize it).
4. The resulting bytestring is then encoded using a 65-character lookup table with a strange mapping.