pyasn1-fasder
pyasn1-fasder is a DER decoder for pyasn1 with a focus on checking the correctness of encoding. This decoder is more pedantic than most other decoders in terms of flagging DER encoding errors, and this behavior is unlikely to change.
Installation
pip install pyasn1-fasder
Usage
pyasn1-fasder exposes a single function: decode_der. The signature and return type are the same as the pyasn1 decode function, as it is intended to be a drop-in replacement of pyasn1.codec.der.decoder.decode.
from pyasn1.type.char import PrintableString
from pyasn1_fasder import decode_der
substrate = b'\x13\x03\x41\x42\x43'
decoded, rest = decode_der(substrate, asn1Spec=PrintableString())
assert rest == b''
assert str(decoded) == 'ABC'
Limitations
- There is no encoding counterpart.
- Trailing octets present after the
substrateTLV are not tolerated and will result in an exception being raised. In other words, therestcomponent of the tuple return value will always be an emptybytesobject. - Schemaless decoding is not supported. In other words, a non-
Noneasn1Specmust be passed todecode_der. Sets withnamedTypesare not supported. These are (almost?) never used in cryptography standards, but support can be added if there are valid use cases.openTypesdecoding is currently not supported. This can be added if there is interest.- The pedantic checks for correctness of encoding cannot be disabled.
Bugs?
Please create a Github issue.
Contributing
Contributions for bug fixes and new features are welcome.
Metadata
Release files for pyasn1-fasder 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyasn1_fasder-0.1.3.tar.gz | 18.7 kB | Details |
Built distributions (wheels)
Total release size: 2.6 MB
Release files / pyasn1_fasder-0.1.3.tar.gz
| Download URL | pyasn1_fasder-0.1.3.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73fe744d7e856d98b59a4eb86d7c0533be6d78defc1b02fddf7531716add133d
|
|
BLAKE2b-256 checksum How to use checksums |
ebbc61a461783362a5c8a3f2095e02d3dcc2baa2dfab0f7ff71618a8ebbbbc1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|
Release files / pyasn1_fasder-0.1.3-cp39-abi3-win_amd64.whl
| Download URL | pyasn1_fasder-0.1.3-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 145.8 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
752a5fbb41cb3cb126142e873babf10cd0c1b1cf8b2399517130dbe3a987339d
|
|
BLAKE2b-256 checksum How to use checksums |
fd47cbb6e517cb49586c78b926752d79ab4bd92b3f00c063fc6cc300f2f15410
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|
Release files / pyasn1_fasder-0.1.3-cp39-abi3-win32.whl
| Download URL | pyasn1_fasder-0.1.3-cp39-abi3-win32.whl |
|---|---|
| Size | 135.5 kB |
| Tags | CPython 3.9 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
6d55904e40bc213e7698efd36af428211e8e3a493231a5f66f3a29d42a85d4ba
|
|
BLAKE2b-256 checksum How to use checksums |
b80a58cc48ebff96d05665468b2250041d0f5bc300fb76157e77f08ede9d70a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|
Release files / pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 279.4 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2002e97834c836b9a1cb3098bcb319b57ab50fb2df92671dc7c45ddaee77034a
|
|
BLAKE2b-256 checksum How to use checksums |
4744f27b073c961436c1d1a7f552065aaafa25a0bbd4e8efa875f5aad0db93fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|
Release files / pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
| Download URL | pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl |
|---|---|
| Size | 322.7 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ IBM System/390x abi3 |
|
SHA-256 checksum How to use checksums |
4506a06c1818e5ae94c48ecf406cac5d4517cf3808e44d5b8be75423d65fb21b
|
|
BLAKE2b-256 checksum How to use checksums |
9f2406a0a423539da205252f0a708102ee8efc8b559f83bddb2d163295896b01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|
Release files / pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 316.2 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ PowerPC 64-le abi3 |
|
SHA-256 checksum How to use checksums |
a6a695c05bafa21b348123e326a2b05276e684fd6c5db8f6ccc72f402baa2216
|
|
BLAKE2b-256 checksum How to use checksums |
8285d24788f4663f514a202d1a031f6053bf0124f486e5b4cdff7f73a58a6d03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|
Release files / pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 289.3 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
5d019e4a3cd5ff33ed4e3b6fd7b7908869ce42fe4e20efd96915cbd577b9c255
|
|
BLAKE2b-256 checksum How to use checksums |
0d4cf321694fd954b852f56d3880f9da2e4929d2b39cf1743a28b4b5b37efe36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|
Release files / pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 286.9 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
373f71d732b0ce9b4abd045e9a23ee694bd68457913500d24317465ee5d9b759
|
|
BLAKE2b-256 checksum How to use checksums |
4bad180edc27854aee136538dabf535060f2b6cce8352083b1a47d4484df4728
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|
Release files / pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl
| Download URL | pyasn1_fasder-0.1.3-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl |
|---|---|
| Size | 294.3 kB |
| Tags | CPython 3.9 Linux glibc 2.5+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
60aead2322e199dcf234d31dcb4ba28e3a396a721c89ca2fe03aff9b2a5ba529
|
|
BLAKE2b-256 checksum How to use checksums |
6f118193a7c453143e25635286f9fd9393bb96a86d8f7d3d2a9a9c286fb01049
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|
Release files / pyasn1_fasder-0.1.3-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | pyasn1_fasder-0.1.3-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 241.4 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8f822f34da8558cf83bdd9bce2c063fe9b93c5444062477bf5619252b8302c21
|
|
BLAKE2b-256 checksum How to use checksums |
84704a694ff2475f1b035fc5124c60a00f70cd3daae5c0eff87d85bfd0a489e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|
Release files / pyasn1_fasder-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | pyasn1_fasder-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 249.5 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
b7a4ac54b739a8c9003fed32990938c84ddc2586daeded1aad08825e759a623f
|
|
BLAKE2b-256 checksum How to use checksums |
2e835e0fb9000c95e5f8dec4d8d3341f355a1a0663f1a37901673dc030944c8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.4
|