Table of Contents

Class DatasetDecryptionException

Namespace
EncDotNet.S100.ExchangeSets.Protection
Assembly
EncDotNet.S100.ExchangeSets.dll

The exception thrown when a protected dataset's permit authorized it, but the cell key unwrapped from that permit could not decrypt the dataset.

public sealed class DatasetDecryptionException : CryptographicException, ISerializable
Inheritance
DatasetDecryptionException
Implements
Inherited Members

Remarks

S-100 Edition 5.2.1 Part 15 §15-6, §15-7.4.4. A dataset permit's encrypted cell key is a bare AES block with no checksum, so unwrapping it with the wrong hardware id silently yields a different key. The mismatch only shows when that key fails to decrypt the dataset, which is when this exception is thrown. The most likely causes are a wrong hardware id, a hardware id recovered with the wrong manufacturer key (M_KEY), or a permit issued for a different Data Client; a corrupt permit or dataset has the same effect.

Detection relies on the PKCS#7 padding check, so roughly one wrong key in 256 decrypts without error and yields unreadable content instead. Permit policy refusals, such as an edition mismatch, are reported separately by DatasetPermitException before any decryption is attempted.

This type derives from CryptographicException, so code that already catches the underlying decryption failure keeps working; the original failure is available as InnerException.

Constructors

DatasetDecryptionException(string, Exception?)

Creates an exception for a dataset its cell key could not decrypt.

public DatasetDecryptionException(string datasetPath, Exception? innerException)

Parameters

datasetPath string

The relative path of the protected dataset.

innerException Exception

The underlying decryption failure.

Properties

DatasetPath

The relative path of the protected dataset that failed to decrypt.

public string DatasetPath { get; }

Property Value

string