clach04 / puren_tonbo

Plain text notes Tombo (chi) alternative, also supports, ccrypt, GnuPG (OpenPGP, gpg), OpenSSL AES-256-CBC, AES-256 ZIP AE-1/AE-2 and VimCrypt encrypted files. Integrates with VIM. WIP
https://pypi.org/project/puren-tonbo/
GNU Lesser General Public License v2.1
1 stars 0 forks source link

PurePyZipAES / mZipAES returns None for unsupported (zip) files #8

Closed clach04 closed 1 year ago

clach04 commented 1 year ago

Two issues:

  1. doesn't work - this is expected, flawed test. Test files where actaually using the old ZipCrypto format :-( 7z does not (as of 2023-02-12) support creating AE-1 nor AE-2 zip files, the only encrypted zip files 7z can create are the old format. It does support reading them, and of course writing 7z AES encrypted files
  2. when it fails get None back from FileSystemNotes - needs investigation, test case:

    python -m puren_tonbo.tests.testsuite -v TestFileSystemNotes.test_aesop_win_7z_old_zip_using_purepyzipaes python -m puren_tonbo.tools.ptcipher -d --cipher=aes256.zip -ppassword puren_tonbo\tests\data\aesop_win_7z.old.zip

clach04 commented 1 year ago

Smallest test case without test suite:

python -m puren_tonbo.tools.ptcat -p password puren_tonbo\tests\data\aesop_win_7z.aes256.zip
python -m puren_tonbo.tools.ptcat -p password puren_tonbo\tests\data\aesop_win_7z.aes256stored.zip

With test suite, assuming no pyzipper available:

python -m puren_tonbo.tests.testsuite -v  TestFileSystemNotes.test_aesop_win_7z_aes256_zip

TODO add a new test for when pyzipper is available. Options:

that way the error won't be hidden when pyzipper is available.

clach04 commented 1 year ago

New test added in 5e0c8c9b100004c39798932e0d91d5726a66efad

python -m puren_tonbo.tests.testsuite -v TestFileSystemNotes.test_aesop_win_7z_aes256_zip_using_purepyzipaes
clach04 commented 1 year ago
python -m puren_tonbo.tools.ptcipher -p password puren_tonbo\tests\data\aesop_win_7z.aes256.zip
clach04 commented 1 year ago

AES and zip notes