Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ _site
.sass-cache
node_modules
.DS_Store
.jekyll-cache/
69 changes: 0 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,72 +4,3 @@ Remake table of contents:

# npm install doctoc
doctoc protocol.md

#### Python Reference

Here's an example of using the [`ecdsa`](https://pypi.python.org/pypi/ecdsa/) and [`pyjwt`](https://github.com/jpadilla/pyjwt) Python libraries to generate a setup token:

{% highlight bash %}
pip install pyjwt ecdsa
{% endhighlight %}

{% highlight python %}
# on the SimpleFIN Server
from uuid import uuid4
from ecdsa import SigningKey


key_database = {}

def generateSetupToken(internal_user_id):
token_id = str(uuid.uuid4())
private_key = SigningKey.generate()
public_key = private_key.get_verifying_key()

# save for verifying later
key_database[token_id] = public_key.to_string().encode('hex')

return json.dumps({
'id': token_id,
'secret': private_key.to_string().encode('hex'),
'url': 'https://simplefin.example.com',
}).encode('base64')

{% endhighlight %}

{% highlight python %}
# on a Consumer
private_pem = SigningKey.from_string('044be9c05ac12793a1deeb1c983539f3db0d3fb853bdc83b'.decode('hex')).to_pem()

# ...
# back on the server
assert public_key.verify(signature, "message")
{% endhighlight %}



###

from ecdsa import SigningKey
import jwt
secret = "044be9c05ac12793a1deeb1c983539f3db0d3fb853bdc83b"
data = {
"id": "6e71a22a6ce9458b9897242423734d9c",
"iat": 1435724162,
"exp": 1435724222
}
key = SigningKey.from_string(secret.decode('hex')).to_pem()
jwt.encode(data, key, algorithm='ES256')





from Crypto.PublicKey import RSA
>>> RSAkey = RSA.generate(1024)
private = RSA.generate(1024)
>>> public = private.publickey()
>>> private.exportKey()
'-----BEGIN RSA PRIVATE KEY-----\nMIICXgIBAAKBgQDo1M0P3nryaF8ZITv8vCFVnjUJ1mnIsrqXZRTzjin69xepr3cz\nKicG3EYSUqMODQAsvMj0tGMo+ElGOVOkPFLVVBHd8izgA/E1RqUzbUDMj4WnhlhA\nQq7tNaViOXNaZ7krJZHabZKxfYvLAQtm4tr+m5NtXPBaWvjwhd5M9xvktwIDAQAB\nAoGBANVsS1Rikbymo5V7e2teYAgFb4THAEyyWIvyYlQnWp/r48rtRoyl9QQ64hhl\nm4WDsUdQ/bwhpkul3DT804jWqu2V71p68rQP7h5D6ldCBUr5nQc9o/uEyy4YCgxD\n/ZxNiY5Bb/lMP9nhb2NbG4184mhUMHu+06wWX6RrXQtMtjYhAkEA8DioToMZIy3s\nhPohri3CAgByV2Jxf7JPqVZ93JjlSlBz+aybSv1mOJUPRFpkMk2xiPmHtEn16hYr\nesVK11tcjwJBAPgf4QYAw9dV+DuVqdwz+kmTjnlkr0Q7fjaGfl60DWmuLWmxiRhe\nMYQ2+8iyPDmxcPFTGSpGqyvyJDjQ/wOlWVkCQQCRIuotZW/OnXSFc0reHa9V3kc3\nHLdOW8FdonAw0//Uwn8PnoXE7QzRqt2qgqJ+8goNpBWli/oUEIj8iC8LpptpAkBV\nFFlMfaaph8j+ZWtBHnGMGRSZe3S9qMi2WZerUYHn4tmfjEi+Gk5QT6o2Pyd3gOiB\nV0Uhwemfv/+7m65VybTBAkEA5H59kG+B9HHD5hJtksAtMh8dxk/MI8G0csduU0vu\n7K5ejL522XsHurVrWdqnk6KvjlRXqB4FsMWLE6RBgBNV0A==\n-----END RSA PRIVATE KEY-----'
>>> public.exportKey()
'-----BEGIN PUBLIC KEY-----\
Binary file modified img/safe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/safe.small.png
Binary file not shown.
6 changes: 2 additions & 4 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ layout: default

SimpleFIN (also SFIN) stands for Simple Financial Interchange and makes read-only financial interchange simple. It's like RSS for financial information.

# Why give them the combination to your safe...
<span style="font-size: 2rem;">Why give out your <span style="font-weight: bold; font-style: italic;">key</span> when they only need a <span style="font-weight: bold; font-style: italic;">window?</span></span>

<center>
<img src="/img/safe.small.png" style="width: 50%;">
<img src="/img/safe.png">
</center>

# ...when they only need to look through a window?

SimpleFIN is like a window on a safe: it lets people look at, but not touch your financial information. And you control who can look through the window!

You should use SimpleFIN because:
Expand Down