Python jenc jpencconverter encryption implementation
Project description
jenc-py
- Working - jenc/Markor decrypt tool
- Not yet working - jenc/Markor encrypt tool
The aim is to have a pure python (with crypto dependencies) jenc (as used by Markor) decrypt/encrypt library.
Test jenc file https://github.com/opensource21/jpencconverter/blob/master/src/test/encrypted/Test3.md.jenc
Test password geheim
from https://github.com/opensource21/jpencconverter/blob/master/src/test/resources/application.properties
jenc file format
There are multiple versions V001 (and the old U001).
File format:
- 4 bytes - define the version.
- nonce bytes - bytes as nonce for cipher depends. The length depends on the version.
- salt bytes - bytes to salt the password. The length depends on the version.
- content bytes - the encrypted content-bytes.
From the original Java code for jpencconverter it appears that strings are converted to/from UTF-8 (i.e. passwords and plaintext).
jenc file format - V001
From Python code:
# note CamelCase to match https://github.com/opensource21/jpencconverter/blob/f65b630ea190e597ff138d9c1ffa9409bb4d56f7/src/main/java/de/stanetz/jpencconverter/cryption/JavaPasswordbasedCryption.java#L229
'keyFactory': 'PBKDF2WithHmacSHA512',
'keyIterationCount': 10000, # this is probably too small/few in 2024
'keyLength': 256,
'keyAlgorithm': 'AES',
'keySaltLength': 64, # in bytes
'cipher': 'AES/GCM/NoPadding',
'nonceLenth': 32, # nonceLenth (sic.) == Nonce Length # in bytes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file jenc-0.0.2.dev1.tar.gz
.
File metadata
- Download URL: jenc-0.0.2.dev1.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aaf4f40c1b65d01298e0b9c7559cb88bb31a2d922c61169b72a0c4ab4c85872 |
|
MD5 | 210956ceaeebb8acf7f35bfd59d4a456 |
|
BLAKE2b-256 | ccac9170acab95ce260ffe8867130c541285dcc52365ac4b6ddaf20af32f4a97 |