You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have problem with ECIES decrypter. I have very specific case, in which I want to decrypt some data from foreign source(c++ library). We have: encrypted data in Buffer, PrivateKey and IV, but we don't have MAC. Is there any posibility to decrypt data without encrypting erlier with eccrypto?
Best regards!
The text was updated successfully, but these errors were encountered:
The spec eccrypto uses for encryption and decryption is ECIES. A quick explanation for how this ECIES implementation in eccrypto works is it uses ECDH (elliptic curve diffie hellman) to generate a shared key: sha512(g^(x1.x2)). It then uses this shared key to encrypt using a symmetric key encryption scheme called AES.
only the first 32 bytes are used in the sha512 as the encryption key, since aescbc256 accepts a 256 bit key. the last 32 bytes are used for a MAC check,
you can generate the MAC based off the line I've linked, and as long as you have libraries that support AESCBC256 encryption and some generic elliptic curve library you should be able to reproduce a compatible encrypted message that can be decrypted by eccrypto
Hi,
I have problem with ECIES decrypter. I have very specific case, in which I want to decrypt some data from foreign source(c++ library). We have: encrypted data in Buffer, PrivateKey and IV, but we don't have MAC. Is there any posibility to decrypt data without encrypting erlier with eccrypto?
Best regards!
The text was updated successfully, but these errors were encountered: