From 60575d9a496bd4b796bab73888b69c249a1f8048 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 8 Apr 2016 23:51:29 +0200 Subject: Windows: start implementation of volume ID mechanism that will be used to identify VeraCrypt disk volumes instead of device name. --- src/Driver/Ntvol.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Driver/Ntvol.c') diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c index 46dd46fd..317e3653 100644 --- a/src/Driver/Ntvol.c +++ b/src/Driver/Ntvol.c @@ -517,6 +517,9 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, Extension->cryptoInfo->bPartitionInInactiveSysEncScope = mount->bPartitionInInactiveSysEncScope; + /* compute the ID of this volume: SHA-512 of the effective header */ + sha512 (Extension->volumeID, readBuffer, TC_VOLUME_HEADER_EFFECTIVE_SIZE); + if (volumeType == TC_VOLUME_TYPE_NORMAL) { if (mount->bPartitionInInactiveSysEncScope) -- cgit v1.2.3