- Implemented the GostKeyValue class for handling public key parameters in ГОСТ Р 34.10 digital signatures. - Created the GostSignedXml class to manage XML signatures using ГОСТ 34.10, including methods for computing and checking signatures. - Developed the GostSignedXmlImpl class to encapsulate the signature computation logic and public key retrieval. - Added specific key value classes for ГОСТ Р 34.10-2001, ГОСТ Р 34.10-2012/256, and ГОСТ Р 34.10-2012/512 to support different signature algorithms. - Ensured compatibility with existing XML signature standards while integrating ГОСТ cryptography.
4.3 KiB
GostCryptography
.NET driver for ViPNet CSP and CryptoPro CSP.
Implements crypto algorithms based on Russian national cryptographic standards GOST 28147-89, GOST R 34.12,
GOST R 34.10 and GOST R 34.11. Also provides abstractions to sign and verify CMS/PKCS #7 messages, sign,
verify and encrypt XML documents.
Implemented Algorithms
-
Hash-based Message Authentication Code (HMAC) based on GOST 28147-89
-
Hash-based Message Authentication Code (HMAC) based on GOST R 34.12 Magma
-
Hash-based Message Authentication Code (HMAC) based on GOST R 34.12 Kuznyechik
-
Hash-based Message Authentication Code (HMAC) based on GOST R 34.11-94, 2012/256, 2012/512
-
Pseudorandom Function (PRF) based on GOST R 34.11-94, 2012/256, 2012/512
-
Asymmetric algorithm based on GOST R 34.10-2001, 2012/256, 2012/512
-
Asymmetric algorithm with an ephemeral key based on GOST R 34.10-2001, 2012/256, 2012/512
-
Asymmetric key exchange formatter based on GOST R 34.10-2001, 2012/256, 2012/512
-
Asymmetric key exchange deformatter based on GOST R 34.10-2001, 2012/256, 2012/512
-
Asymmetric signature formatter based on GOST R 34.10-2001, 2012/256, 2012/512
-
Asymmetric signature deformatter based on GOST R 34.10-2001, 2012/256, 2012/512
-
XML encryption based on GOST R 34.10-2001, 2012/256, 2012/512
-
XML signing based on XML-DSig and GOST R 34.10-2001, 2012/256, 2012/512
-
Signing and verifying of CMS/PKCS #7 messages based on GOST R 34.10-2001, 2012/256, 2012/512
Tested On
- Windows 10 x64, CryptoPro CSP 5.0.13000 KC1
- Windows 10 x64, ViPNet CSP 4.2.8.51670
Build instructions
To build package run in repository root:
dotnet build --configuration Release