Skip to content

Add SHA-256 self-integrity checks#40

Open
18166714330cl-maker wants to merge 2 commits into
javelin-anticheat:mainfrom
18166714330cl-maker:main
Open

Add SHA-256 self-integrity checks#40
18166714330cl-maker wants to merge 2 commits into
javelin-anticheat:mainfrom
18166714330cl-maker:main

Conversation

@18166714330cl-maker

Copy link
Copy Markdown

/claim #4

Summary:

  • Add SHA-256 self-integrity verification alongside the existing CRC32 check.
  • Allow builds to enable CRC32, SHA-256, or both through JAVELIN_EXPECTED_CRC32 and JAVELIN_EXPECTED_SHA256.
  • Document the build-time integrity flags in the README.

Testing:

  • Not run locally: this source depends on Windows SDK headers (windows.h), and the current environment is macOS without the Windows build toolchain.

Closes #4

@18166714330cl-maker

Copy link
Copy Markdown
Author

Thanks for taking a look.

I treated this as a narrow integrity-check addition rather than changing the anti-cheat flow.

The issue I’m addressing is that CRC32 alone is weak for tamper detection. This PR adds optional SHA-256 verification while preserving the existing CRC32 path and allowing builds to choose CRC32, SHA-256, or both through compile-time flags.

What changed:

  • Added SHA-256 self-integrity verification.
  • Preserved existing CRC32 behavior.
  • Added JAVELIN_EXPECTED_SHA256 documentation alongside the existing CRC32 flag.
  • Left the rest of the anti-cheat flow unchanged.

Verification:

  • I could not compile locally because this source depends on Windows SDK headers and my environment is macOS.
  • I kept the change limited to the integrity-check path and documented the build-time flags.

The main thing I’d like review on is whether the SHA-256 helper placement and flag naming match the project style. If you prefer a different naming convention or build flag shape, I can adjust it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add Integrity Verification (Hash of Executable/Script)

1 participant