shadowsocks-libuv
shadowsocks-libuv copied to clipboard
Throw openssl dependency away
@clowwindy @madeye
RC4 have a very simple algorithm and can be implemented in just few lines of code. According to my test, we only need the EVP_BytesToKey(3)
to make password derivation. It seems that EVP_BytesToKey(3)
is using PKCS#5 v1.5 so it's possible just implement this algorithm and throw openssl dependency away.
In my encrypt.c
, I just used EVP_BytesToKey(3)
to do derivation. After that I used a rc4 implementation I found in OpenBSD Directory
and it's working very well.