Add OpenSSL 1.1 support to CryptMessage plugin by using radfish's pyelliptic version
This commit is contained in:
parent
be742c78e7
commit
fbafd23177
11 changed files with 2169 additions and 4 deletions
|
@ -7,7 +7,7 @@ ecc_cache = {}
|
|||
|
||||
|
||||
def eciesEncrypt(data, pubkey, ephemcurve=None, ciphername='aes-256-cbc'):
|
||||
import pyelliptic
|
||||
from lib import pyelliptic
|
||||
pubkey_openssl = toOpensslPublickey(base64.b64decode(pubkey))
|
||||
curve, pubkey_x, pubkey_y, i = pyelliptic.ECC._decode_pubkey(pubkey_openssl)
|
||||
if ephemcurve is None:
|
||||
|
@ -34,7 +34,7 @@ def split(encrypted):
|
|||
|
||||
|
||||
def getEcc(privatekey=None):
|
||||
import pyelliptic
|
||||
from lib import pyelliptic
|
||||
global ecc_cache
|
||||
if privatekey not in ecc_cache:
|
||||
if privatekey:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue