warner / python-spake2 Goto Github PK
View Code? Open in Web Editor NEWpure-python implementation of the SPAKE2 Password-Authenticated Key Exchange algorithm
License: Other
pure-python implementation of the SPAKE2 Password-Authenticated Key Exchange algorithm
License: Other
I'll start by just copying the magic-wormhole .appveyor.yml
. Magic-wormhole passes on appveyor, so SPAKE2 must be working, but it'd be good to get real coverage.
The README says this library has no dependencies, whereas it actually has one on HKDF.
self.pw and self.pw_scalar are the "same". They need to be cryptographically different and not dependent on the other:
self.pw_scalar = params.group.password_to_scalar(hkdf(pw, "pw1"))
self.pw = hkdf(pw, "pw2")
This is especially true for the client-server augmentation of SPAKE2, PAKE2+.
self.pw_scalar = params.group.password_to_scalar(hkdf(pw, "pw1"))
self.pw = hkdf(pw, "pw2")
self.pw3 = params.group.password_to_scalar(hkdf(pw, "pw3"))
This repo uses an old version of Versioneer, which uses the SafeConfigParser
deprecated in Python 3.2 and to be removed in 3.12.
Please update to the newest version of Versioneer for continued compatibility:
python -m pip install -U versioneer
versioneer install
If you're using my old draft you should know it has a big mistake. SPAKE2 includes the password to be secure in concurrent settings. See http://www.di.ens.fr/~mabdalla/papers/AbPo05a-letter.pdf for details.
I've started work on this in the "pake2+" branch. The algorithm is defined in the last section of "The Twin Diffie-Hellman Problem and Applications" (Cash, Kiltz, Shoup), available at http://www.research.rutgers.edu/~dc789/dh.pdf :
pw0
and pw1
pw0
and L=B*pw1
x
, send element X
= B*x + U*pw0
y
, send element Y
= B*y + V*pw0
Z
= (X-U*pw0)*y
N
= L*y
hash(pw0, X, Y, Z, N)
Z
= (Y-V*pw0)*x
N
= (Y-V*pw0)*pw1
hash(pw0, X, Y, Z, N)
A server compromise doesn't immediately reveal a password-equivalent, because the server stores B*pw1
instead of pw1
, so the attacker must first run an offline dictionary attack to reverse the scalarmult.
Relative to (symmetric) SPAKE2, this just adds the N
term and server-side storage for L
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.