Comments (6)
Works fine with (slightly) larger aesop.txt
file. Can decrypt file after it's encrypted. Get same (correct) CRC as:
- pyzipper
- 7z
- WinRar
Can also decrypt those fine too.
from puren_tonbo.
Using 7z with the exact same data as used in the test, see same CRC as is put into file metadata, a55c1cb0
.
7z a -mx0 -ppassword short_win_7z.aes256stored.zip encrypted.md
0xa55c1cb0 is see in the GUI. how ever in command line calc crc mode also see the "bad" crc:
(py310venv) C:\code\py\puren_tonbo>7z h puren_tonbo\tests\data\short_win_7z.aes256stored.zip
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning
1 file, 205 bytes (1 KiB)
CRC32 Size Name
-------- ------------- ------------
044CA98D 205 puren_tonbo\tests\data\short_win_7z.aes256stored.zip
-------- ------------- ------------
044CA98D 205
Size: 205
CRC32 for data: 044CA98D
Everything is Ok
from puren_tonbo.
7z tests (its own) zip fine too:
(py310venv) C:\code\py\puren_tonbo>7z t -ppassword puren_tonbo\tests\data\short_win_7z.aes256stored.zip
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive for archives:
1 file, 205 bytes (1 KiB)
Testing archive: puren_tonbo\tests\data\short_win_7z.aes256stored.zip
--
Path = puren_tonbo\tests\data\short_win_7z.aes256stored.zip
Type = zip
Physical Size = 205
Everything is Ok
Size: 35
Compressed: 205
from puren_tonbo.
Creating zip using ctcipher:
(py2764) C:\code\py\puren_tonbo>python -m puren_tonbo.tools.ptcipher -e -p password puren_tonbo\tests\data\encrypted.md -o puren_tonbo\tests\data\delete_me.aes256stored.zip
DEBUG tmp_out_filename 'C:\\code\\py\\puren_tonbo\\puren_tonbo\\tests\\data\\delete_me.aes256stored.zip20230211_162049pzt6iu'
about to write crc into zip meta 0xa55c1cb0
same crc seen in 7zip GUI with this file.
7z thinks the file is corrupted:
(py310venv) C:\code\py\puren_tonbo>7z h puren_tonbo\tests\data\delete_me.aes256stored.zip
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning
1 file, 207 bytes (1 KiB)
CRC32 Size Name
9D93B581 207 puren_tonbo\tests\data\delete_me.aes256stored.zip
9D93B581 207
Size: 207
CRC32 for data: 9D93B581
Everything is Ok
(py310venv) C:\code\py\puren_tonbo>7z t -ppassword puren_tonbo\tests\data\delete_me.aes256stored.zip
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive for archives:
1 file, 207 bytes (1 KiB)
Testing archive: puren_tonbo\tests\data\delete_me.aes256stored.zip
Path = puren_tonbo\tests\data\delete_me.aes256stored.zip
Type = zip
Physical Size = 207
ERROR: CRC Failed in encrypted file. Wrong password? : encrypted.md
Sub items Errors: 1
Archives with Errors: 1
Sub items Errors: 1
also showing different CRC in console versus GUI.
At this stage looks like content of corrupted generation of stored (no compression) for pure Python AES.
Unclear why compat tests comparing with pyzipper work.
from puren_tonbo.
confirmed can read in pyzipper created stored fine:
python -m puren_tonbo.tools.ptcat -p password puren_tonbo\tests\data\pyzipper_delete_me.aes256stored.zip
from puren_tonbo.
Fixed in 7c12631
from puren_tonbo.
Related Issues (20)
- ccrypt encryption support HOT 5
- ptig edit - support for xdg-open
- ptpyvim usability issues
- ptpyvim / pyvim copy / paste usability issues
- ptig enhancements/ todo
- age passphrase encryption
- refactor highlight API parameters HOT 2
- WOPI support HOT 1
- SciTE text editor integration HOT 6
- add command line interfaces to match existing tools
- android support
- pttkview - tk GUI encrypted file viewer HOT 2
- idea Grammer checker
- similar tools
- Frecency (Frequency / Recently) used, LRU list HOT 1
- GitHub Workflow Actions - broken Python 2.7 testing
- new test - add tests for ptig HOT 1
- ptig Open directory using native file explorer / browser HOT 2
- TODO add Cpython 2.7 testing for Ubuntu GitHub Workflow Actions HOT 1
- bug pt.vim vim integration - write corruption HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puren_tonbo.