I am attempting to access an encfs filesystem using JavaScript, but am struggling to understand the correct approach. I am utilizing the CryptoJS library for this task.
The .ecnfs6.xml file contains standard settings and uses the password "123456":
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="9">
<cfg class_id="0" tracking_level="0" version="20">
<version>20100713</version>
<creator>EncFS 1.7.4</creator>
<cipherAlg class_id="1" tracking_level="0" version="0">
<name>ssl/aes</name>
<major>3</major>
<minor>0</minor>
</cipherAlg>
<nameAlg>
<name>nameio/block</name>
<major>3</major>
<minor>0</minor>
</nameAlg>
<keySize>192</keySize>
<blockSize>1024</blockSize>
<uniqueIV>1</uniqueIV>
<chainedNameIV>1</chainedNameIV>
<externalIVChaining>0</externalIVChaining>
<blockMACBytes>0</blockMACBytes>
<blockMACRandBytes>0</blockMACRandBytes>
<allowHoles>1</allowHoles>
<encodedKeySize>44</encodedKeySize>
<encodedKeyData>
A2MxizkB27kOot67DqX/ftXoAiO0P8ORF4BqbKnbMeHuIusJl5y36Qy8o8w=
</encodedKeyData>
<saltLen>20</saltLen>
<saltData>
z59o4aHs2QaKGdoEMEigtqSkXyw=
</saltData>
<kdfIterations>97742</kdfIterations>
<desiredKDFDuration>500</desiredKDFDuration>
</cfg>
</boost_serialization>
I have created a file named "test" with content "test" and attempted to decrypt it without success:
var data = "Q75cZB2ok,JdXDqvWh8HbwHI"; // filename
var key = "123456";
var salt = "z59o4aHs2QaKGdoEMEigtqSkXyw=";
data = CryptoJS.enc.Base64.parse(data);
salt = CryptoJS.enc.Base64.parse(salt);
var cipher = CryptoJS.AES.decrypt(data, key, {keySize: 192/32});