Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Using the Blind Pin Server #21

Open
FastRatRun opened this issue Sep 15, 2023 · 2 comments
Open

Help Using the Blind Pin Server #21

FastRatRun opened this issue Sep 15, 2023 · 2 comments

Comments

@FastRatRun
Copy link

Hi,

I am having trouble setting up a pin server for personal use out side of jade wallet. Is there documentation on the server API calls?

If not I'd like to just be able to store a bit of data in the server that can only be fetched via the pin.

Thanks!

@JamieDriver
Copy link
Collaborator

JamieDriver commented Nov 22, 2023

As it stands the server serves a (initially randomly generated, but then persisted) 32-byte key when a correct PIN is given.
If an incorrect PIN is given a random 32-bytes is returned. (This is to make attacks more difficult, as an attacker can't probe with random PINs looking for 'pin incorrect' error responses).

This 32-bytes should be combined with the PIN client side, to yield an AES key, or something very similar, which you can then use client side.

There is no option to push explicit data to the server as it stands.

eg.

  • user enters PIN
  • client salts/hashes in some way, and sends to PINserver as the 32-byte 'pin_secret' (hashed so an attacker can't obtain the numeric PIN from pin-secret, and salted so attacker can't tell if two users have the same PIN or brute force for the hashes of the 1million PINs).
  • server returns 32-byte response (ie. persisted key entropy if pin correct, random noise if bad)
  • client combines entered PIN with returned 32-bytes to get local key, eg. hmac(server_data, pin) (so attacker can't deduce local key from seeing value returned by server).
  • use key to check an hmac or similar, to verify key same as was used to previously encrypt (will fail if PIN was incorrect and returned server-data was junk)
  • use key to unlock/decrypt locally persisted data

@petre-c
Copy link

petre-c commented Dec 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants