python-spake2 icon indicating copy to clipboard operation
python-spake2 copied to clipboard

Thread-safety & Locking

Open jtdoepke opened this issue 6 years ago • 2 comments

I encountered a race condition while running wormhole receive where one thread called spake2.spake2.SPAKE2_Symmetric.finish() before spake2.spake2.SPAKE2_Symmetric.start() was complete. Now I'm having trouble recreating it in wormhole (of course :smile: ), but easy enough fix: this PR adds locking to the start and finish methods of _SPAKE2_Base. It also upgrades the included version of six to 1.11.0 because there was also a thread-safety bug in six<=1.9.0.

jtdoepke avatar Oct 12 '17 14:10 jtdoepke

Coverage Status

Changes Unknown when pulling 84c7d5c8f2e9fb8d96660c20b58416a56b9640ff on jtdoepke:locking into ** on warner:master**.

coveralls avatar Oct 12 '17 15:10 coveralls

warner/magic-wormhole#280 sounds like it addressed the same bug, so I guess this PR is no longer necessary.

jtdoepke avatar Mar 07 '18 15:03 jtdoepke