Add support for ГОСТ Р 34.10 digital signatures
- 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.
This commit is contained in:
@@ -11,6 +11,11 @@ public sealed class CryptoProGostKeyOptions
|
||||
|
||||
public string Algorithm { get; set; } = SignatureAlgorithms.GostR3410_2012_256;
|
||||
|
||||
/// <summary>
|
||||
/// Wire format emitted by the signer. Defaults to DER (ASN.1 sequence). Set to Raw for (s || r).
|
||||
/// </summary>
|
||||
public GostSignatureFormat SignatureFormat { get; set; } = GostSignatureFormat.Der;
|
||||
|
||||
/// <summary>
|
||||
/// Optional CryptoPro provider name (defaults to standard CSP).
|
||||
/// </summary>
|
||||
@@ -21,6 +26,11 @@ public sealed class CryptoProGostKeyOptions
|
||||
/// </summary>
|
||||
public string? ContainerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set to true when the container lives in the machine key store.
|
||||
/// </summary>
|
||||
public bool UseMachineKeyStore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Thumbprint of the certificate that owns the CryptoPro private key.
|
||||
/// </summary>
|
||||
@@ -45,6 +55,8 @@ public sealed class CryptoProGostKeyOptions
|
||||
CertificateThumbprint = CertificateThumbprint,
|
||||
SubjectName = SubjectName,
|
||||
CertificateStoreLocation = CertificateStoreLocation,
|
||||
CertificateStoreName = CertificateStoreName
|
||||
CertificateStoreName = CertificateStoreName,
|
||||
UseMachineKeyStore = UseMachineKeyStore,
|
||||
SignatureFormat = SignatureFormat
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user