On 22/11/2018 19:17, Christopher Schultz wrote: > Mark, > > On 11/22/18 05:21, Mark Thomas wrote: >> On 21/11/2018 22:39, Christopher Schultz wrote: >>> Mark, >>> >> <snip/> > >>>> I thought you were using CBC so a missing block (a message >>>> being one or more blocks) means that the next message can't be >>>> decrypted. >>> >>> CBC *is* being used, but the cipher is reset after each message, >>> and a new IV is being randomly generated for that purpose. There >>> is no state-carryover between messages. At least, there shouldn't >>> be. > >> Ah. Thanks for the explanation. I should have looked at the code. >> That should all work then. > >> I'll try and find some time today to figure out what is causing >> the error messages I am seeing. > > Thanks, I'd appreciate a second set of eyes. > > I can't seem to find any problems with it. The only "problems" I ended > up finding were poorly-written tests :)
syncs on encrypt() and decrypt() seem to have done the trick. That was just a quick hack to confirm a suspicion - it isn't the right long term fix. If we want this to be performant under load I'd lean towards using a Queue for encryption ciphers and another for decryption ciphers along the lines of the way SessionIdGeneratorBase handles SecureRandom. We should probably handle SecureRandom the same way. I'll start working on a patch. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org