sanitizer
sanitizer copied to clipboard
Add support to Vault version 7
When trying to decrypt a vault with some files that Drive File Stream sent to lost and found, Sanitizer returns:
"Exception in thread "main" java.lang.IllegalArgumentException: Unsupported vault version 7 [...]"
Seems to be the same situation as this community post, so is it possible to add support for the newer version (7)?
Yes, very important! Please add the support for v7.
We have plans to integrate plausibility checks into the main applications.
Any advice on how to deal with version 7 vaults in the meantime?
UPDATE: I was able to make decryptFile
work given that I had a version 6 masterkey.cryptomator.bkup
file with the following instructions:
- Locate the vault directory (e.g.
src/
) - Create a new empty folder (e.g.
dst/
) - Copy
src/d/
todst/d/
. - Copy
src/masterkey.cryptomator.bkup
todst/masterkey.cryptomator
- Run
java -jar sanitizer-0.16.jar decryptFile -vault dst/
The other commands (i.e. check
, decryptVault
, encryptPath
) did not worked though.
masterkey.cryptomator
{
"scryptSalt": "...",
"scryptCostParam": 32768,
"scryptBlockSize": 8,
"primaryMasterKey": "...",
"hmacMasterKey": "...",
"versionMac": "...",
"version": 7
}
masterkey.cryptomator.bkup
{
"scryptSalt": "...",
"scryptCostParam": 32768,
"scryptBlockSize": 8,
"primaryMasterKey": "...",
"hmacMasterKey": "...",
"versionMac": "...",
"version": 6
}
I have at least four corrupted files (3x JPG, 1x MP4). Need this sanitizer really bad.
Apparently me too. Spent a lot of time isolating problems and have determined I have some corruption, and accordingly stumbled on this, and sadly discover I need the version 7 support.
お願いします。
Not an expert on this, but I've forked and managed to make it work to check and decrypt the vault with version 7. I'm assuming that there are several things that I'm missing as it appeared to be an easy fix. As such, I'm not sure if I should open a PR or not.
This is the relevant commit: https://github.com/travellingfreak/sanitizer/commit/ec4ca00b25b680cf1699c97f3e1f1fcde24f4edf
With vault format 7, huge parts of the vault structure changed. While it may still be possible to decrypt single files by merely updating the libraries, you can't check the integrity of the dir structure.
We're currently preparing integration of sanitizer right into the main desktop application and have already implemented the first checks. This is going to be a part of Cryptomator 1.6.0.
Not an expert on this, but I've forked and managed to make it work to check and decrypt the vault with version 7. I'm assuming that there are several things that I'm missing as it appeared to be an easy fix. As such, I'm not sure if I should open a PR or not.
This is the relevant commit: travellingfreak@ec4ca00
This worked great for me to decyrpt folders and files! Worth forking the repo entirely and making a PR IMO. While it's probably not perfect, it's way better than nothing.