Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

directly require / submodule oscrypto instead of built-in #2

Open
ThunderEX opened this issue Apr 27, 2017 · 3 comments
Open

directly require / submodule oscrypto instead of built-in #2

ThunderEX opened this issue Apr 27, 2017 · 3 comments

Comments

@ThunderEX
Copy link

because I saw you struggling on encrypt, and I think no need to reinvent the wheel.

@FTwOoO
Copy link
Owner

FTwOoO commented Jun 3, 2017

The main goal of this project is using pure Python3 code without any third party library, especially library written in frustrated C/C++, which may unexpectedly crash with unknown reason when installing. Without any third party depandencies, we can install it with only 1 command(than run it in with 1 command), never crash when installing.

I think the best solution is implement some simple but strong encryption method(Chacha20?) in Python3 by myself, but i have no time and no patience to do this.

Then i found oscrypt, the open source module uses openssl dynamic library along with ctypes/CFFI as crypto, which already exists on system.
I ported oscrypt and remove any third party library dependencies, just use ctypes(available in standard library) with openssl.

Now, i compile the openssl into dynamic library(libcrypto.dylib/libcrypto.so) and then don't need openssl on the system, since openssl's API is not stable from 0.9.8 to 1.0.2/1.1.0.

Maybe pyaes is better.

@ThunderEX
Copy link
Author

I see. I think pyaes may be better just a backup. Its implementation of pure python may slow down decrypt/encrypt seriously. Since you are aleady using async here, it seems not worthy of the performance loss.

@FTwOoO
Copy link
Owner

FTwOoO commented Mar 7, 2018

i used pyaes for decrypt/encrypt, but it's too slow,
so give up

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants