planet-nine-app / sessionless

A repo for the sessionless protocol
https://sessionless.org
MIT License
42 stars 10 forks source link

The plan #3

Open zach-planet-nine opened 6 months ago

zach-planet-nine commented 6 months ago

Ok, so where this repo is headed is to be a version of this: https://oauth.net/code/ that is made in the 2020s. That is we have a site (I have sessionless.org) that links to the package managers for various languages. Along with that we have example implementations in this repo.

To get there we first implement Sessionless in each language, then we build the reference implementations while building the site. I'll create an issue for each language and whether it's client side or server side. If you want to take up that language, just comment on the issue.

What does implementing a language mean? Start by reading this: https://github.com/planet-nine-app/sessionless/blob/main/docs/Cryptography.md. The bit at the end where it talks about private key storage, and randomness are the things we need to figure out.

And of course we need to find the crypto library for the secp256k1 elliptical curve that Sessionless uses. This is the same curve Bitcoin and Ethereum use, so the workflow is usually:

Pull the secp256k1 lib from the language's Ethereum implementation -> Figure out how to do randomness properly (usually also by referencing the Ethereum implementation) -> Figure out where to store keys -> Implement the five to seven methods:

generateKeys
sign
verifySignature
generateUUID
associate
revoke       // implemented only on servers
getKeys     // implemented only on clients
saveKeys.  // implemented only on clients

After the implementations we can start building examples.