Coder Social home page Coder Social logo

python-spake2's Issues

turn on appveyor tests for windows

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.

Show dependencies

The README says this library has no dependencies, whereas it actually has one on HKDF.

Password keys 1 and 2 are the same

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"))

implement SPAKE2+ (augmented PAKE)

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 :

  • password (maybe after stretching) is split into two pieces, pw0 and pw1
  • setup: server stores pw0 and L=B*pw1
  • client: pick random scalar x, send element X = B*x + U*pw0
  • server: pick random scalar y, send element Y = B*y + V*pw0
  • server: compute element Z = (X-U*pw0)*y
  • server: compute element N = L*y
  • server: compute shared key as hash(pw0, X, Y, Z, N)
  • client: compute element Z = (Y-V*pw0)*x
  • client: compute element N = (Y-V*pw0)*pw1
  • client: compute shared key as 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.