Class Gost3410_2012_512EphemeralCryptoServiceProvider
Алгоритм формирования общих ключей (SharedSecret) на основе алгоритма ГОСТ Р 34.10, эфимерного ключа и Криптопровайдера.
Inheritance
Implements
Inherited Members
Namespace: CryptoPro.Security.Cryptography
Assembly: CryptoPro.Security.Cryptography.dll
Syntax
public sealed class Gost3410_2012_512EphemeralCryptoServiceProvider : Gost3410, IDisposable
Constructors
Gost3410_2012_512EphemeralCryptoServiceProvider()
Инициализация алгоритма с параметрами заданными внутри реализации CSP.
Declaration
public Gost3410_2012_512EphemeralCryptoServiceProvider()
Gost3410_2012_512EphemeralCryptoServiceProvider(Gost3410Parameters)
Инициализация алгоритма с заданными параметрами.
Declaration
public Gost3410_2012_512EphemeralCryptoServiceProvider(Gost3410Parameters basedOn)
Parameters
Type | Name | Description |
---|---|---|
Gost3410Parameters | basedOn | Параметры алгоритма, на основе которого будет сформирована секретная ключевая пара. Используется OID хэширования и открытого ключа, остальные параметры не используются. |
Methods
CreateAgree(Gost3410Parameters)
Создание ключа согласования.
Declaration
public override GostSharedSecretAlgorithm CreateAgree(Gost3410Parameters alg)
Parameters
Type | Name | Description |
---|---|---|
Gost3410Parameters | alg | Параметры открытого ключа. |
Returns
Type | Description |
---|---|
GostSharedSecretAlgorithm | Распределенный секрет. |
Overrides
Dispose(bool)
Освобождает неуправляемые объектом класса Gost3410EphemeralCryptoServiceProvider ресурсы и, по выбору, управляемые.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true, чтобы освободить и управляемые, и неупавляемые ресурсы; false, чтобы освободить только неуправляемые. |
Overrides
ExportParameters()
Экспорт параметров Gost3410Parameters алгоритма ГОСТ Р 34.10-2012 256 в CSP.
Declaration
public override Gost3410Parameters ExportParameters()
Returns
Type | Description |
---|---|
Gost3410Parameters | Параметры в виде структуры Gost3410Parameters |
Overrides
ImportParameters(Gost3410Parameters)
Импорт параметров алгоритма.
Declaration
public override void ImportParameters(Gost3410Parameters parameters)
Parameters
Type | Name | Description |
---|---|---|
Gost3410Parameters | parameters | Параметры алгоритма. |
Overrides
Exceptions
Type | Condition |
---|---|
CryptographicException | Всегда. |
ImportPublicKey(ReadOnlySpan<byte>, ReadOnlySpan<byte>)
Imports encoded public key.
Declaration
public override void ImportPublicKey(ReadOnlySpan<byte> encodedPublicKey, ReadOnlySpan<byte> encodedParameters)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | encodedPublicKey | The encoded public key. |
ReadOnlySpan<byte> | encodedParameters | The encoded parameters. |
Overrides
SignHash(byte[])
Declaration
public override byte[] SignHash(byte[] hash)
Parameters
Type | Name | Description |
---|---|---|
byte[] | hash |
Returns
Type | Description |
---|---|
byte[] |
Overrides
TrySignHashCore(ReadOnlySpan<byte>, Span<byte>, out int)
Attempts to create the ECDSA signature for the specified hash value in the indicated format into the provided buffer.
Declaration
protected override bool TrySignHashCore(ReadOnlySpan<byte> hash, Span<byte> destination, out int bytesWritten)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | hash | The hash value to sign. |
Span<byte> | destination | The buffer to receive the signature. |
int | bytesWritten | When this method returns, contains a value that indicates the number
of bytes written to |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
Exceptions
Type | Condition |
---|---|
CryptographicException | An error occurred in the signing operation. |
VerifyHashCore(ReadOnlySpan<byte>, ReadOnlySpan<byte>)
Verifies that a digital signature is valid for the provided hash.
Declaration
protected override bool VerifyHashCore(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> signature)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | hash | The signed hash. |
ReadOnlySpan<byte> | signature | The signature to verify. |
Returns
Type | Description |
---|---|
bool | true if the digital signature is valid for the provided data; otherwise, false. |
Overrides
Exceptions
Type | Condition |
---|---|
CryptographicException | An error occurred in the verification operation. |