Class PhysicalMachineBinding
Derives a stable, non-secret fingerprint from the current system/platform UUID for lightweight machine binding.
Inherited Members
Namespace: Eigenverft.NetLib.Infrastructure.Security.MachineBinding
Assembly: Eigenverft.NetLib.Infrastructure.dll
Syntax
public static class PhysicalMachineBinding
Remarks
This helper is intentionally not a hardware security boundary and the returned fingerprint is not a secret. Its purpose is narrower: an attacker who copies an application's files to another machine should also need to obtain system information from the original machine before a value derived from this fingerprint can be reproduced. This adds an additional offline/lateral-movement step; it does not defend against an attacker who can already read the platform UUID on the source machine or inspect a process after the fingerprint has been derived.
Version 1 deliberately uses one semantically comparable platform identifier on every supported operating system: the SMBIOS system UUID on Windows, the DMI product UUID on Linux, and IOPlatformUUID on macOS. Virtual machines generally expose a virtual platform UUID, so in that environment the binding is to the VM identity rather than to the physical host. Cloning or re-provisioning a VM may therefore preserve or change the binding depending on the hypervisor and provisioning process.
The implementation intentionally has no additional management-library dependency. If broader machine inventory becomes useful later, Microsoft.Management.Infrastructure can be evaluated as an extension point; collecting a wider CIM/hardware inventory is explicitly outside the scope of this minimal V1 binding.
Methods
| Edit this page View SourceGetFingerprint()
Gets the V1 machine fingerprint for the current system.
Declaration
public static string GetFingerprint()
Returns
| Type | Description |
|---|---|
| string | An uppercase SHA-256 hexadecimal string derived from a versioned canonical representation of the platform UUID. |
Remarks
Hashing normalizes the representation and avoids propagating the raw platform UUID through consuming APIs; it does not make the underlying UUID secret. The version/domain prefix is part of the fingerprint contract so a future binding strategy can coexist with V1 instead of silently changing previously derived AES material.
Exceptions
| Type | Condition |
|---|---|
| PlatformNotSupportedException | The current operating system is not supported. |
| InvalidOperationException | The current operating system is supported, but no valid system/platform UUID is available. |
TryGetFingerprint(out string)
Attempts to derive the V1 machine fingerprint for the current system.
Declaration
public static bool TryGetFingerprint(out string fingerprint)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fingerprint | Receives the uppercase SHA-256 hexadecimal fingerprint on success. |
Returns
| Type | Description |
|---|---|
| bool | true when a valid platform UUID was available; otherwise false. |
TryGetSystemPlatformUuid(out string)
Attempts to read the normalized system/platform UUID used as the V1 binding source.
Declaration
public static bool TryGetSystemPlatformUuid(out string platformUuid)
Parameters
| Type | Name | Description |
|---|---|---|
| string | platformUuid | Receives the canonical uppercase UUID in |
Returns
| Type | Description |
|---|---|
| bool |
Remarks
The returned UUID is machine information, not secret key material. Callers that only need a binding value should prefer GetFingerprint() or TryGetFingerprint(out string) so the V1 normalization contract remains centralized here.