mangosone-server/.github
H0zen 5c87487ca1 RC4 comes into the tree, and the legacy provider goes out of the deployment
Thirty lines of cipher were costing a DLL.

OpenSSL 3 moved RC4 to the legacy provider, which is not compiled into
libcrypto -- it is a separate module discovered on disk at run time. So a
256-byte permutation dragged in ossl-modules/legacy.dll beside the executable,
an OPENSSL_MODULES search path, CMake that hunted for the file and copied it,
CI that pointed an environment variable at it, an installer obliged to ship it,
and a start-up check in both daemons that REFUSED TO BOOT without it.

It was also a loaded gun. The legacy provider is deprecated; the release that
finally drops it would have stopped this emulator starting, for want of a
cipher any competent programmer can write from the specification. And the
protocol needs RC4 forever, because the 2.4.3 client is never going to be
updated -- a cipher the wire mandates in perpetuity belongs in the tree, not
behind a compatibility shim someone else maintains for our convenience.

So: ARCFOUR, written out. A key schedule, a permutation, a stream that XORs.
The class keeps its interface, so no caller changed -- AuthCrypt and Warden
were not touched. CryptoStressTest was not touched either, and that is the
point: `Crypto_arc4_matches_the_published_vector` passes against the same
published vector it always checked, so the equivalence is demonstrated rather
than claimed.

Two details worth keeping. Init rebuilds the permutation from the identity
every time, because it is a RE-key as often as a first key and keying on top of
a used state would make the stream depend on how much traffic preceded it; and
it rewinds the stream position, forgetting which is the classic way to build a
cipher that decrypts the first session and nothing after it.

OpenSSLProvider and its test are deleted outright. RC4 was the only thing this
tree ever asked the legacy provider for; SHA-1, SHA-256, AES and the bignum
work all live in the DEFAULT provider, which is inside libcrypto and needs
nothing on the side. The mangosd binary now contains no reference to
ossl-modules, to OSSL_PROVIDER, or to a legacy provider at all.

Linking is unchanged and still dynamic. This removes a module that had to be
FOUND at run time, which is a different problem from where libcrypto itself
comes from.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 23:34:27 +01:00
..
apps Terrain, extractor, config and networking work from the alignment branch 2026-08-09 23:08:31 +01:00
workflows RC4 comes into the tree, and the legacy provider goes out of the deployment 2026-08-13 23:34:27 +01:00