Use cryptography instead of Crypto for AES256 encryption + Use PyQt6 to solve CAPTCHA - #57
Use cryptography instead of Crypto for AES256 encryption + Use PyQt6 to solve CAPTCHA#57AdityaGarg8 wants to merge 9 commits into
Conversation
The Crpyto module is no longer included in many distros due to security concerns. Cryptography is a better alternative and is widely used in the Python community. Also, it is already being used for AESGCM in the same file.
cv2 and numpy are very large dependencies, when a lighter one like PyQt6-WebEngine can be used to solve the CAPTCHA. Also, each dependency to solve the CAPTCHA will now be imported only when needed, to avoid unnecessary imports and reduce the initial load time of the application.
|
cv2 and numpy are very large dependencies, when a lighter one like PyQt6-WebEngine can be used to solve the CAPTCHA. Also, each dependency to solve the CAPTCHA will now be imported only when needed, to avoid unnecessary imports and reduce the initial load time of the application. |
|
Btw, where and for what is AES256 encryption used in this code? |
|
The AES256 encryption commit has been tested only with sending mails btw. I didn't try with receiving mails, but if the same encryption is being used in both, I think it's fine. |
Looks like only aes256_decrypt is used in the API that too to download encrypted files. The commit I sent to use cryptography instead of Crypto is working properly with that. |
|
Btw cv2 is a huge library, taking around 600+ Mb on Ubuntu. Maybe we can make this optional? PyQt takes around 100-150 Mb. I find using pyqt more reliable than cv2 as well. |
Also, properly encode quoted printable text in the client to ensure it is correctly formatted when sent. quoted printable is the default encoding for plain text emails.
|
@opulentfox-29 , can you tell me why is this required: https://github.com/opulentfox-29/protonmail-api-client/blob/master/src/protonmail/client.py#L1498 |
Significantly reduces the number of CAPTCHA incidences
|
Looks like the type of account if used as 4 instead of 32 will eliminate the need for creating a multipart message. |
|
@opulentfox-29 , just wondering if you are still maintaining this or not? |
The Crpyto module is no longer included in many distros due to security concerns. Cryptography is a better alternative and is widely used in the Python community. Also, it is already being used for AESGCM in the same file.