Skip to contentSkip to conversation

LUKS encrypted hard disk crashed. Recovery question

dm-crypt Saibal Kumar Adhya 3 participants 4 messages Aug 19, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 874579112.14972576.1471597033535.JavaMail.yahoo.ref@mail.yahoo.com

#1 lore raw

Dear experts,   I had a 500GB hard disk which was encrypted using the following specification.
type:    LUKS1cipher:  aes-xts-plain64keysize: 512 bitsdevice:  /dev/sda5offset:  4096 sectorssize:    999708672 sectorsmode:    read/write Pass phrase is known.
Unfortunately, the hard disk crashed sometime back. It is a hardware fault. There was no backup.
A data recovery agency managed to recover 50% of the sectors. However it is unable to recover any data as the original disk was encrypted. So now trying to figure out how to de-crypt and recover some of the data?
I'll be extremely grateful if you can provide some answer. Thanks in advance.
--Regards~Saibal
Saibal Kumar AdhyaDebian user and Linux enthusiast.

#2 lore raw

On 19 Aug 2016 08:57 +0000, from [email protected] (Saibal Kumar Adhya):

Quoted 7 lines

Unfortunately, the hard disk crashed sometime back. It is a hardware fault. There was no backup.
A data recovery agency managed to recover 50% of the sectors. However it is unable to recover any data as the original disk was encrypted.
So now trying to figure out how to de-crypt and recover some of the data?

Unfortunately, if the key slots are lost or damaged beyond repair, and you have no backup, then I am fairly certain that you are out of luck.

I assume that when you say that there was no backup, you also mean that you do not have a LUKS header copy or master key data for the container.

Such a situation is similar to having overwritten the key slot area of the disk, which is a good way to quickly decomission a LUKS-encrypted disk because it renders all other data non-recoverable (the data required to gain access to the payload data no longer exists).

If you are able to somehow gain access to the key slots in the LUKS header, it should be possible to decrypt the (stored) payload data, to the extent that the data recovery agency was able to recover the data. What they were not able to recover will decrypt to nonsense.

Signature · 3 lines
Michael Kjörling • https://michael.kjorling.se • [email protected]
                 “People who think they know everything really annoy
                 those of us who know we don’t.” (Bjarne Stroustrup)
#3 lore raw
In reply to Saibal Kumar Adhya

[saibal] Thanks a lot Michael.

Quoted 4 lines

If you are able to somehow gain access to the key slots in the LUKS header, it should be possible to decrypt the (stored) payload data, to the extent that the data recovery agency was able to recover the data. What they were not able to recover will decrypt to nonsense.


[saibal] I have couple of following question. 1) Is there a way to know, if the key slot area in the LUKS header has been recovered or not? How to recover the entire partition from there?
2) This question is for my information. As I understand, LUKS header and "key-slot" are very very critical. So, if any of these sectors get damaged then the entire partition is un-usable. Is there a backup copy of LUKS header and key slots, kept within the partition itself? Thanks in advance.
--Regards~Saibal
Saibal Kumar AdhyaDebian user and Linux enthusiast.

Quoted 5 lines

--
Michael Kj?rling ? https://michael.kjorling.se ? [email protected] ?People who think they know everything really annoy those of us who know we don?t.? (Bjarne Stroustrup)

On Friday, August 19, 2016 2:27 PM, Saibal Kumar Adhya <[email protected]> wrote:

Dear experts,   I had a 500GB hard disk which was encrypted using the following specification.
type:    LUKS1cipher:  aes-xts-plain64keysize: 512 bitsdevice:  /dev/sda5offset:  4096 sectorssize:    999708672 sectorsmode:    read/write Pass phrase is known.
Unfortunately, the hard disk crashed sometime back. It is a hardware fault. There was no backup.
A data recovery agency managed to recover 50% of the sectors. However it is unable to recover any data as the original disk was encrypted. So now trying to figure out how to de-crypt and recover some of the data?
I'll be extremely grateful if you can provide some answer. Thanks in advance.
--Regards~Saibal
Saibal Kumar AdhyaDebian user and Linux enthusiast.

#4 lore raw

Hi Saibal,

Quoted 4 lines · Saibal Kumar Adhya

[saibal] Thanks a lot Michael.

Quoted 2 lines

If you are able to somehow gain access to the key slots in the LUKS header, it should be possible to decrypt the (stored) payload data,

to

Quoted 8 lines
Quoted 1 line

the extent that the data recovery agency was able to recover the

data.

Quoted 1 line

What they were not able to recover will decrypt to nonsense.

[saibal] I have couple of following question.

1) Is there a way to know, if the key slot area in the LUKS header has been recovered or not? How to recover the entire partition from there?

Try a LuksOpen. It does not care about filesystem damage, but it will obnly work if header and keyslot are undamaged.

Quoted 5 lines

2) This question is for my information. As I understand, LUKS header and "key-slot" are very very critical. So, if any of these sectors get damaged then the entire partition is un-usable. Is there a backup copy of LUKS header and key slots, kept within the partition itself? Thanks in advance.

No. You have to do such a backup yourself. See most of FAQ Section 6:
https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions

Regards,
Arno

Signature · 7 lines
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: [email protected]
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier