'Reading ['encrypted_content'] is very slow while parsing a CMS envelope using asn1crypto
I am parsing envelope encrypted audio files. I can quickly extract all parameters from the envelope object such as 'Key Encryption Key' and details of algorithms. But when extracting the symmetrically encrypted content (['encrypted_content']); the library takes unacceptable amount of time. e.g. for a 48 MB file this step takes approx. 2-3 minutes. Please suggest if I am doing anything wrong. The actual symmetric decryption process itself (using AES) is actually super fast.
from asn1crypto import cms
# the slow step
# file_content is the bytes read.
cms.ContentInfo.load(file_content))['content']['encrypted_content_info']['encrypted_content'].native
Is this the expected performance?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
