Hi Sean, yes, this seems to fix the issue with slow decryption. I ran the unit test with keygen and crypto about 20 times and there were no more bumps in performance during decryption. Thanks alot for the patch and for your quick response :)
Kind regards, Tankred Am 21. April 2012 09:17 schrieb Sean Colyer <[email protected]>: > I think I realized that the issue was that "c" of the equation below: > (From RFC 4880, 3.7.1.3) > > #define EXPBIAS 6 > count = ((Int32)16 + (c & 15)) << ((c >> 4) + EXPBIAS); > > > Was generated as random, when that was unnecessary and could have lead to > very large iteration counts. I have changed this to be a constant of 96. 96 > equates to 65k iteration, which is what gpg uses as their standard. > > Please let me know if this gives you more consistent performance. > > Thanks, > Sean > > On Fri, Apr 20, 2012 at 8:35 PM, Tankred Hase <[email protected]> wrote: > >> Hey, >> >> has anyone else been having trouble with decryption taking several >> seconds for certain keys, if the keys was generated in openpgp.js with a >> passphrase? >> >> Im not sure if it's my implementation of how I call decrypt or perhaps an >> issue in the library. Im using the example which is on the homepage. Thanks! >> >> Tankred >> >> _______________________________________________ >> >> http://openpgpjs.org >> >> > > _______________________________________________ > > http://openpgpjs.org > >
_______________________________________________ http://openpgpjs.org

