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.1.dev1.tar.gz
.
File metadata
- Download URL: jenc-0.0.1.dev1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee1b9f58bf5904fa6c679460a4a0864854d543609fa6cccc1ea3a545090d4264 |
|
MD5 | bee6b3b74204c766e51f0dce3a1d249c |
|
BLAKE2b-256 | e3e425ced14a0883a1229e611b8167ea19ca190b8b66e4b3b2acfcf5b936a2dd |