3.1 KiB
3.1 KiB
RootPack_RU Crypto Fork Notes (CryptoPro / GOST) · 2025-11-25
Why
- We need a patchable, source-controlled CryptoPro/GOST stack to ship RootPack_RU without relying on the vulnerable
IT.GostCryptography6.0.0.1 package. - The fork lives at
third_party/forks/AlexMAS.GostCryptographyand is now wired intoStellaOps.Cryptography.Plugin.CryptoPro.
Fork specifics
- Upstream: https://github.com/AlexMAS/GostCryptography @ commit
31413f6. - Retargeted to
net10.0; packaging-on-build disabled to avoid accidental nuget pushes. - Added deps:
System.Security.Cryptography.Xml8.0.1,System.Security.Permissions8.0.0, warning suppressions (CA1416, SYSLIB0004) for Windows-only CSP APIs. - Build entrypoint:
third_party/forks/AlexMAS.GostCryptography/Source/GostCryptography/GostCryptography.csproj.
How we consume it
src/__Libraries/StellaOps.Cryptography.Plugin.CryptoPronow project-references the fork (removedIT.GostCryptographynuget).- Runtime still Windows-only; plugin uses CSP (
CspParameters) for key material when available. - Tests are opt-in and Windows/CSP only: set
STELLAOPS_CRYPTO_PRO_ENABLED=1and runscripts/crypto/run-cryptopro-tests.ps1.
How to sync the fork
- Track the pinned upstream commit in
third_party/forks/AlexMAS.GostCryptography/STELLA_NOTES.md(currently31413f6). - To refresh:
git clone https://github.com/AlexMAS/GostCryptography.git /tmp/gost && cd /tmp/gost && git checkout <commit-or-tag>rsync -a --delete --exclude .git /tmp/gost/ third_party/forks/AlexMAS.GostCryptography/- Update
STELLA_NOTES.mdwith the new commit hash and any upstream changes that matter for CSP/Magma/Kuznyechik. - Run
dotnet build third_party/forks/AlexMAS.GostCryptography/Source/GostCryptography/GostCryptography.csproj -c Releaseplusdotnet build src/__Libraries/StellaOps.Cryptography.Plugin.CryptoPro -c Releaseto confirm the fork still compiles inside the monorepo.
- Keep the folder free of binary outputs (no
.nupkgorbin/objcommitted) so RootPack stays reproducible.
Build & test quickstart (Windows runner with CryptoPro CSP installed)
dotnet build src/__Libraries/StellaOps.Cryptography.Plugin.CryptoPro/StellaOps.Cryptography.Plugin.CryptoPro.csproj -c Release
scripts/crypto/run-cryptopro-tests.ps1 -Configuration Release
CI (opt-in)
- Workflow:
.gitea/workflows/cryptopro-optin.yml - Trigger:
workflow_dispatchonly; assumes runner already has CryptoPro CSP installed/licensed. - Env guard:
STELLAOPS_CRYPTO_PRO_ENABLED=1set in workflow to enable CryptoPro tests.
What remains (tracked in SEC-CRYPTO-90-019/020)
- Run the fork + plugin tests on a Windows+CSP agent.
- Wire an opt-in CI lane for CryptoPro so default pipelines stay green.
- Add platform-aware smoke tests for signer/verify with real CSP key.
Licensing & distro notes
- Upstream license: MIT; keep
LICENSE+NOTICEfrom the fork inside RootPack bundles and in third-party notices. - Plugin remains AGPL-3.0-or-later; ensure fork sources stay vendored (no binary-only blobs).
- Do not publish the fork to public feeds; only build from source inside RootPack bundles.