-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browser decryption failed with "Bad MAC" #63
Comments
Without more info, it is hard to be helpful, but it sounds similar to this issue, which appears to have been an environment issue: #52 |
Please share what more info I can provide? |
So we have packed the module in a webpack deployment. There is no compilation error. The same code and modules are used for all of those cases but a few in thousand fail. |
Without anything to reproduce this issue, I'm afraid I'm not sure how to help. Are you using the latest browser versions? Which browser are you using. is there any pattern with the cases that fail (like character length)? |
Not sure about that, The data all cases are like similar in structure and format. |
I get a lot of BAD MAC on nodejs decryption using encryption from Browser. Probably about 10% of (priv, pub) pairs |
Yeah, any luck on debugging? Anything special you are trying? |
We are facing a similar problem when data is encrypted in Browser and decrypted in Node.js, and vice versa. When decrypt failure occurs on Node, executing the decrypt function for browser works ! In other words, Node and Browser implementation do not seem to be plainly compatible. |
Hi! Here is stack trace of error: Here is data to reproduce Bad MAC: "key":"gX7jM+34dQLfDSbO3vMBlAu3m+vRn2Es9+NUGpZSW+w=" |
We found the possible root cause related to this issue, please refer to PR #96 for more information. |
The decryption failed with the "Bad MAC" error on the browser. This is happening on 'eth-crypto' module which uses this as a dependency.
This case happens only like ~ 1/300 cases. Rest 299 decrypt with perfectly fine on the browser itself.
Even the cases that failed on browser are being able to decrypt on Node easily without any problems. Points me to check the newer builds.
We are using Webpack and have been using this same module the same version for more than a year. and this started recently. I am trying to trace right now but any help would be appreciated.
Thank you for your time.
Ref ticket for Eth-crypto: https://github.com/pubkey/eth-crypto/issues/281
The text was updated successfully, but these errors were encountered: