-
Notifications
You must be signed in to change notification settings - Fork 514
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
Very slow encrypt speed #225
Comments
I agree that encryption is slow for the reasons you mentioned. I'll try to integrate sjcl and do some tests. I'm not sure it will be faster though. |
I compared with this Stuk/jszip#696 , It's 10x faster on my machine even without fflate(using pako) . |
@xqdoo00o Out of curiosity, wouldn't you want to contribute to zip.js in order to integrate sjcl? |
I will if I have time |
I'm asking you this because I looked at your implementation and I'm realizing you have a certain level of expertise with sjcl that I don't have. |
I rollbacked the changes, the implementation is still buggy... |
To simplify the code, if using pako to deflate, the pako output chunksize is alway 16384 except the last chunk. so don't need pendingInput in AESEncrypt constructor if it's pako mode, the fflate mode need. |
I could modify the code today or tomorrow |
Actually, my unit tests worked with my implementation of Deflate/Inflate. However, there was an issue when It tried the implementation with the demos. It was a bit late so I preferred to rollback, I don't think it's a big issue. Hopefully, I'll be able to fix it today. I'll keep you updated :) |
Ok, I find a issue that the commit |
Oh thank you! As I said, it was late. Sorry for that totally useless commit. |
Every 16 bytes a async func subtle.encrypt is the most doubtful reason, too much async functions, and it's serial runs.
But If use Web Crypto API, it's necessary to do it, because the ctr mode counter is difference with NIST standard.
So I recommend use sjcl to do it.
I read this 101arrowz/fflate#45 , then I try to use, and found the issue.
The text was updated successfully, but these errors were encountered: