core icon indicating copy to clipboard operation
core copied to clipboard

Problem with encrypted files

Open sensemila opened this issue 11 years ago • 8 comments

Hi,

I have problem with owncloud encryption modules, in fact i have lot of file encrypted and i cannot open it.

I have this error when my client try to sync and when i try with internet Browser return error 500

Thanks for your help

Sync client logs 20/07/2015 11:19:36PO SAGE.xmind ownCloud Cet élément n'a pas été synchronisé en raison des erreurs précédentes : Error downloading http://192.168.1.169/remote.php/webdav/PO SAGE.xmind - server replied: Service Unavailable
20/07/2015 11:19:36PBE/CBEMA/Grille_atelier_salle1.odt ownCloud Operation canceled12 Kio
20/07/2015 11:19:36PBE/CBEMA/Diaporama-séminaire-PBE-30juin2014.pdf ownCloud Operation canceled3 Mio
20/07/2015 11:19:36PBE/CBEMA/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf ownCloud Connexion fermée110 Kio
20/07/2015 11:19:36Fil-ariane.ott ownCloud Cet élément n'a pas été synchronisé en raison des erreurs précédentes : Error downloading http://192.168.1.169/remote.php/webdav/Fil-ariane.ott - server replied: Service Unavailable
20/07/2015 11:19:36CR-modele.ott ownCloud Cet élément n'a pas été synchronisé en raison des erreurs précédentes : Error downloading http://192.168.1.169/remote.php/webdav/CR-modele.ott - server replied: Service Unavailable
20/07/2015 11:19:33PBE/CODIR EAU/CODIR Eau 2014-12-17 CR.doc ownCloud Operation canceled61 Kio
20/07/2015 11:19:33PBE/CODIR EAU/CODIR EAU-2014-11-26-OJ.odt ownCloud Operation canceled23 Kio
20/07/2015 11:19:33PBE/CBEMA/Grille_atelier_salle2.odt ownCloud Operation canceled12 Kio
20/07/2015 11:19:33PBE/CBEMA/Grille_atelier_salle1.odt ownCloud Operation canceled12 Kio
20/07/2015 11:19:33PBE/CBEMA/Diaporama-séminaire-PBE-30juin2014.pdf ownCloud Operation canceled3 Mio
20/07/2015 11:19:33PBE/CBEMA/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf ownCloud Connexion fermée110 Kio
20/07/2015 11:19:29PBE/CBEMA/Grille_atelier_salle1.odt ownCloud Operation canceled12 Kio
20/07/2015 11:19:29PBE/CBEMA/Diaporama-séminaire-PBE-30juin2014.pdf ownCloud Operation canceled3 Mio

Server configuration

Operating system: i running Linux owncloud 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64 GNU/Linux (Wheezy)

Web server: Apache/2.2.22 (Debian) Database: mysql Ver 14.14 Distrib 5.5.43, PHP version: PHP 5.4.41-0+deb7u1

ownCloud version: ownCloud 8.0.4 (stable) Updated from an older ownCloud or fresh install: Updated from last deb package List of activated apps: Enabled:

  • adminuser
  • files
  • files_encryption
  • files_pdfviewer
  • files_sharing
  • files_texteditor
  • files_trashbin
  • files_versions
  • gallery
  • user_external
  • user_ldap
'/var/www/owncloud/data', 'dbtype' => 'mysql', 'version' => '8.0.4.2', 'dbname' => 'owncloud', 'dbhost' => 'localhost', 'enable_previews' => true, 'dbtableprefix' => 'oc_', 'mail_smtphost' => 'smtp.xxxx.fr', 'mail_smtpmode' => 'smtp', 'default_language' => 'fr', 'dbuser' => 'oc_admin', 'installed' => true, 'maintenance' => false, 'loglevel' => '0', 'proxy' => '192.168.1.73:8080', 'enable_avatars' => false, 'ldapIgnoreNamingRules' => false, 'theme' => '', 'preview_libreoffice_path' => '/usr/bin/libreoffice', 'trusted_domains' => array ( 1 => '192.168.1.169', ), 'mail_from_address' => 'no-reply', 'mail_domain' => 'xxxx.fr', ); **Are you using encryption:yes **Are you using an external user-backend, if yes which one:ActiveDirectory #### LDAP configuration +------------------------------+--------------------------------------------------------------------+ | Configuration | s02 | +------------------------------+--------------------------------------------------------------------+ | hasMemberOfFilterSupport | 1 | | hasPagedResultSupport | | | homeFolderNamingRule | | | lastJpegPhotoLookup | 0 | | ldapAgentName | cn=ldapuser,ou=applis,ou=xxxx.fr,dc=xxxx,dc=fr | | ldapAgentPassword | **\* | | ldapAttributesForGroupSearch | | | ldapAttributesForUserSearch | | | ldapBackupHost | host2.xxxx.fr.fr | | ldapBackupPort | 389 | | ldapBase | dc=xxxx.fr,dc=fr | | ldapBaseGroups | ou=xxxx.fr,dc=xxxx.fr,dc=fr | | ldapBaseUsers | ou=xxxx.fr,dc=xxxx.fr,dc=fr | | ldapCacheTTL | 3600 | | ldapConfigurationActive | 1 | | ldapEmailAttribute | mail | | ldapExperiencedAdmin | 0 | | ldapExpertUUIDGroupAttr | | | ldapExpertUUIDUserAttr | sAMAccountName | | ldapExpertUsernameAttr | cn | | ldapGroupDisplayName | cn | | ldapGroupFilter | (&(|(objectclass=group))(|(cn=APAL))) | | ldapGroupFilterGroups | | | ldapGroupFilterMode | 0 | | ldapGroupFilterObjectclass | group | | ldapGroupMemberAssocAttr | member | | ldapHost | host1.xxxx.fr.fr | | ldapIgnoreNamingRules | | | ldapLoginFilter | (&(&(|(objectclass=user)))(samaccountname=%uid)) | | ldapLoginFilterAttributes | | | ldapLoginFilterEmail | 0 | | ldapLoginFilterMode | 1 | | ldapLoginFilterUsername | 1 | | ldapNestedGroups | 0 | | ldapNoCase | 1 | | ldapOverrideMainServer | 0 | | ldapPagingSize | 500 | | ldapPort | 389 | | ldapQuotaAttribute | | | ldapQuotaDefault | | | ldapTLS | 1 | | ldapUserDisplayName | displayname | | ldapUserFilter | (&(objectCategory=person)(objectclass=user)(mail=*)) | | ldapUserFilterGroups | | | ldapUserFilterMode | 1 | | ldapUserFilterObjectclass | user | | ldapUuidGroupAttribute | auto | | ldapUuidUserAttribute | auto | | turnOffCertCheck | 1 | +------------------------------+--------------------------------------------------------------------+ ### Client configuration **Browser:** Firefox ou chrome in last version **Operating system:** Windows 7 ### Logs #### Web server error log Insert your webserver log here [Mon Jul 20 11:01:40 2015] [error] [client 172.16.2.232] Negotiation: discovered file(s) matching request: /var/www/owncloud/settings/personal (None could be negotiated). [Mon Jul 20 11:01:47 2015] [error] [client 172.16.2.232] Negotiation: discovered file(s) matching request: /var/www/owncloud/settings/personal (None could be negotiated)., referer: http://192.168.1.169/index.php?redirect_url=%2Findex.php%2Fsettings%2Fpersonal [Mon Jul 20 11:05:24 2015] [error] [client 172.16.2.232] Negotiation: discovered file(s) matching request: /var/www/owncloud/settings/personal (None could be negotiated)., referer: http://192.168.1.169/index.php/apps/files?dir=%2FPBE%2FCBEMA [Mon Jul 20 11:09:37 2015] [error] [client 172.16.2.232] Negotiation: discovered file(s) matching request: /var/www/owncloud/settings/personal (None could be negotiated)., referer: http://192.168.1.169/index.php/apps/files?dir=%2FPBE%2FCBEMA [Mon Jul 20 11:11:12 2015] [error] [client 172.16.2.232] File does not exist: /var/www/owncloud/favicon.ico, referer: http://192.168.1.169/remote.php/webdav/ [Mon Jul 20 11:22:35 2015] [error] [client 172.16.2.232] Negotiation: discovered file(s) matching request: /var/www/owncloud/settings/personal (None could be negotiated)., referer: http://192.168.1.169/index.php/apps/files #### ownCloud log (data/owncloud.log) {"reqId":"056d5e96da291ee3a07578cbfa170819","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf\" dng attempted read via stream","level":4,"time":"2015-07-20T09:19:29+00:00","mod":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaireE-30juin2014.pdf"} {"reqId":"f09ab7e3e8721f8cf429ecc1f88cbfef","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-s\u00e9minaire-PBE-30juin2014.pdf\" dur attempted read via stream","level":4,"time":"2015-07-20T09:19:29+00:00","met":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-s%C3%A9minaire-PBEjuin2014.pdf"} {"reqId":"27b591b8845dcd932243f986a7465a95","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf\" dng attempted read via stream","level":4,"time":"2015-07-20T09:19:32+00:00","mod":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaireE-30juin2014.pdf"} {"reqId":"3e134f84febaa5e7eba2b9aa7c96dc3f","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-s\u00e9minaire-PBE-30juin2014.pdf\" dur attempted read via stream","level":4,"time":"2015-07-20T09:19:32+00:00","met":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-s%C3%A9minaire-PBEjuin2014.pdf"} {"reqId":"a37af6c922eb45fd2ff3076920f8a8fb","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CODIR EAU\/CODIR EAU-2014-11-26-OJ.odt\" during attempteead via stream","level":4,"time":"2015-07-20T09:19:33+00:00","method":"GET","":"\/remote.php\/webdav\/PBE\/CODIR%20EAU\/CODIR%20EAU-2014-11-26-OJ.odt"} {"reqId":"32cca8849bd65ab50ed35595dd94f7f5","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CODIR EAU\/CODIR Eau 2014-12-17 CR.doc\" during attempteead via stream","level":4,"time":"2015-07-20T09:19:33+00:00","method":"GET","":"\/remote.php\/webdav\/PBE\/CODIR%20EAU\/CODIR%20Eau%202014-12-17%20CR.doc" {"reqId":"f8631d2cf6e4eade938032ed66ca7d67","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf\" dng attempted read via stream","level":4,"time":"2015-07-20T09:19:36+00:00","mod":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaireE-30juin2014.pdf"} {"reqId":"2446b3038eed8bc00cf01cdb6e4fa1f6","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-s\u00e9minaire-PBE-30juin2014.pdf\" dur attempted read via stream","level":4,"time":"2015-07-20T09:19:36+00:00","met":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-s%C3%A9minaire-PBEjuin2014.pdf"} {"reqId":"056d5e96da291ee3a07578cbfa170819","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf\" dng attempted read via stream","level":4,"time":"2015-07-20T09:19:29+00:00","mod":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaireE-30juin2014.pdf"} {"reqId":"f09ab7e3e8721f8cf429ecc1f88cbfef","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-s\u00e9minaire-PBE-30juin2014.pdf\" dur attempted read via stream","level":4,"time":"2015-07-20T09:19:29+00:00","met":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-s%C3%A9minaire-PBEjuin2014.pdf"} {"reqId":"27b591b8845dcd932243f986a7465a95","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf\" dng attempted read via stream","level":4,"time":"2015-07-20T09:19:32+00:00","mod":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaireE-30juin2014.pdf"} {"reqId":"3e134f84febaa5e7eba2b9aa7c96dc3f","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-s\u00e9minaire-PBE-30juin2014.pdf\" dur attempted read via stream","level":4,"time":"2015-07-20T09:19:32+00:00","met":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-s%C3%A9minaire-PBEjuin2014.pdf"} {"reqId":"a37af6c922eb45fd2ff3076920f8a8fb","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CODIR EAU\/CODIR EAU-2014-11-26-OJ.odt\" during attempteead via stream","level":4,"time":"2015-07-20T09:19:33+00:00","method":"GET","":"\/remote.php\/webdav\/PBE\/CODIR%20EAU\/CODIR%20EAU-2014-11-26-OJ.odt"} {"reqId":"32cca8849bd65ab50ed35595dd94f7f5","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CODIR EAU\/CODIR Eau 2014-12-17 CR.doc\" during attempteead via stream","level":4,"time":"2015-07-20T09:19:33+00:00","method":"GET","":"\/remote.php\/webdav\/PBE\/CODIR%20EAU\/CODIR%20Eau%202014-12-17%20CR.doc" {"reqId":"f8631d2cf6e4eade938032ed66ca7d67","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf\" dng attempted read via stream","level":4,"time":"2015-07-20T09:19:36+00:00","mod":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-GEMAPI-seminaireE-30juin2014.pdf"} {"reqId":"2446b3038eed8bc00cf01cdb6e4fa1f6","remoteAddr":"172.16.2.232","app"emote","message":"Encryption key not found for \"\/35E51C47-0ABB-4A3F-B9A2-E8A25CD1E\/files\/PBE\/CBEMA\/Diaporama-s\u00e9minaire-PBE-30juin2014.pdf\" dur attempted read via stream","level":4,"time":"2015-07-20T09:19:36+00:00","met":"GET","url":"\/remote.php\/webdav\/PBE\/CBEMA\/Diaporama-s%C3%A9minaire-PBEjuin2014.pdf"}

sensemila avatar Jul 20 '15 12:07 sensemila

@schiesbn any advise?

karlitschek avatar Jul 20 '15 12:07 karlitschek

I have found my Encryption key for my file here /var/www/owncloud/data/35E51C47-0ABB-4A3F-B9A2-E8401A25CD1E/encryption_migration_backup_2015-07-20_09-01-24/

But the private keys has not the same value.

And if i copy my old private key i have message say my that key are not initialised

sensemila avatar Jul 21 '15 11:07 sensemila

How i can find solution ?

sensemila avatar Aug 06 '15 15:08 sensemila

Hi i have working on my problem.

I am going to encryption_migration_backup for try tu decode private key.

I have use this method (source 1).

And after i try to make password field for try many password and if matching i can decode my file and it's working (source 2)

But i think something as changed with owncloud 7.1 and owncloud 8.0.4 because many files can be decrypted

i have tried this on one files and i decode my file And i get Cannot find header.

Can you help me for give me an initial response ?

Thanks a lot

Password:
'; // first get users private key and decrypt it $encryptedUserKey = file_get_contents('/var/www/owncloud/data/35E51C47-0ABB-4A3F-B9A2-E8401A25CD1E/encryption_migration_backup_2015-07-17_09-36-46/35E51C47-0ABB-4A3F-B9A2-E8401A25CD1E.privateKey'); $decryptedUserKey = OCA\Files_Encryption\Crypt::decryptPrivateKey($encryptedUserKey, $password); echo '1 :' . $encryptedUserKey; echo '
'; echo '
'; echo '2 :' . $decryptedUserKey; echo '
'; echo '
'; // now we need to decrypt the file-key, therefore we use our private key and the share key $shareKey = file_get_contents('/var/www/owncloud/data/35E51C47-0ABB-4A3F-B9A2-E8401A25CD1E/encryption_migration_backup_2015-07-17_09-36-46/keys/PBE/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf/35E51C47-0ABB-4A3F-B9A2-E8401A25CD1E.shareKey'); $encryptedKeyfile = file_get_contents('/var/www/owncloud/data/35E51C47-0ABB-4A3F-B9A2-E8401A25CD1E/encryption_migration_backup_2015-07-17_09-36-46/keys/PBE/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf/fileKey'); echo '3 :' . $shareKey; echo '
'; echo '
'; echo '4 :' . $encryptedKeyfile; echo '
'; echo '
'; $decryptedKeyfile = OCA\Files_Encryption\Crypt::multiKeyDecrypt($encryptedKeyfile, $shareKey, $decryptedUserKey); // finally we can use the decrypted file-key to decrypt the file // but first, strip header block $handle = fopen('/var/www/owncloud/data/35E51C47-0ABB-4A3F-B9A2-E8401A25CD1E/files/PBE/CBEMA/Diaporama-GEMAPI-seminaire-PBE-30juin2014.pdf', 'r'); // if this block contained the header we move on to the next block $data = fread($handle, OCA\Files_Encryption\Crypt::BLOCKSIZE); // if this block contained the header, we can continue if (OCA\Files_Encryption\Crypt::isHeader($data)) { $header = OCA\Files_Encryption\Crypt::parseHeader($data); $cipher = OCA\Files_Encryption\Crypt::getCipher($header); } else { die('Cannot find header'); } while ($data = fread($handle, OCA\Files_Encryption\Crypt::BLOCKSIZE)) { // Decrypt the block $decryptedBlock = OCA\Files_Encryption\Crypt::symmetricDecryptFileContent($data, $decryptedKeyfile, $cipher); // A that point you can write the decrypted block to the decrypted file // instead of appending it to $decryptedContent. But I don't fear memory // limits and I choose to append the block to my string and write the // file at the end $decryptedContent .= $decryptedBlock; } fclose($handle); // Decrypt the content block by block ``` echo $decryptedContent; } ############# source 1 ############## '; echo '
'; echo '2 :' . $decryptedUserKey; echo '
'; echo '
'; // now we need to decrypt the file-key, therefore we use our private key and the share key $shareKey = file_get_contents($datadir . $username . '/test/keys/' . $filepath . '/' . $username . '.shareKey'); $encryptedKeyfile = file_get_contents($datadir . $username . '/test/keys/' . $filepath . '/fileKey'); echo '3 :' . $shareKey; echo '
'; echo '
'; echo '4 :' . $encryptedKeyfile; echo '
'; echo '
'; $decryptedKeyfile = OCA\Files_Encryption\Crypt::multiKeyDecrypt($encryptedKeyfile, $shareKey, $decryptedUserKey); // finally we can use the decrypted file-key to decrypt the file // but first, strip header block $handle = fopen($datadir . $username . '/files/' . $filepath, 'r'); $data = fread($handle, OCA\Files_Encryption\Crypt::BLOCKSIZE); echo $data; echo '
'; echo OCA\Files_Encryption\Crypt::isHeader($data); // if this block contained the header we move on to the next block if (OCA\Files_Encryption\Crypt::isHeader($data)) { echo $data; $header = OCA\Files_Encryption\Crypt::parseHeader($data); echo $data; $cipher = OCA\Files_Encryption\Crypt::getCipher($header); } else { die('Cannot find header'); } // Decrypt the content block by block $decryptedContent = ''; while ($data = fread($handle, OCA\Files_Encryption\Crypt::BLOCKSIZE)) { $decryptedContent .= OCA\Files_Encryption\Crypt::symmetricDecryptFileContent($data, $decryptedKeyfile, $cipher); } fclose($handle); ?>

######### end source 1 #################

######## begin source 2 #################

Password:
'; // first get users private key and decrypt it $encryptedUserKey = file_get_contents($datadir . $username . '/files_encryption/' . $username . '.privateKey'); $decryptedUserKey = OCA\Files_Encryption\Crypt::decryptPrivateKey($encryptedUserKey, $password); echo '1 :' . $encryptedUserKey; echo '
'; echo '
'; echo '2 :' . $decryptedUserKey; echo '
'; echo '
'; // now we need to decrypt the file-key, therefore we use our private key and the share key $shareKey = file_get_contents($datadir . $username . '/files_encryption/keys/' . $filepath . '/' . $username . '.shareKey'); $encryptedKeyfile = file_get_contents($datadir . $username . '/files_encryption/keys/' . $filepath . '/fileKey'); echo '3 :' . $shareKey; echo '
'; echo '
'; echo '4 :' . $encryptedKeyfile; echo '
'; echo '
'; $decryptedKeyfile = OCA\Files_Encryption\Crypt::multiKeyDecrypt($encryptedKeyfile, $shareKey, $decryptedUserKey); // finally we can use the decrypted file-key to decrypt the file // but first, strip header block $handle = fopen($datadir . $username . '/files/' . $filepath, 'r'); // if this block contained the header we move on to the next block echo $data; $data = fread($handle, OCA\Files_Encryption\Crypt::BLOCKSIZE); // if this block contained the header, we can continue if (OCA\Files_Encryption\Crypt::isHeader($data)) { $header = OCA\Files_Encryption\Crypt::parseHeader($data); $cipher = OCA\Files_Encryption\Crypt::getCipher($header); } else { die('Cannot find header'); } while ($data = fread($handle, OCA\Files_Encryption\Crypt::BLOCKSIZE)) { // Decrypt the block $decryptedBlock = OCA\Files_Encryption\Crypt::symmetricDecryptFileContent($data, $decryptedKeyfile, $cipher); // A that point you can write the decrypted block to the decrypted file // instead of appending it to $decryptedContent. But I don't fear memory // limits and I choose to append the block to my string and write the // file at the end $decryptedContent .= $decryptedBlock; } fclose($handle); // Decrypt the content block by block ``` echo $decryptedContent; } ?>

####################################

sensemila avatar Nov 10 '15 09:11 sensemila

And when i open my file with notepad i dont have this HBEGIN:cipher:AES-256-CFB:HEND in the first line

sensemila avatar Nov 10 '15 14:11 sensemila

Are you still having trouble, does this still happen in 8.2.2 ?

PVince81 avatar Mar 04 '16 18:03 PVince81

Closing due to lack of feedback.

PVince81 avatar Aug 15 '16 16:08 PVince81

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Aug 03 '19 19:08 lock[bot]