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
Complete/update WAMP-cryptosign spec section #230
Comments
HELLO messageA client that wants to connect to a WAMP router using WAMP-cryptosign authentication first needs a public-private Ed25519 key pair.
To connect, the client sends a
The
The
The dict is then serialized according to the
|
CHALLENGE messageA router receiving a
The router must then send a
The
The dict is then serialized according to the |
AUTHENTICATE messageWhen a client receives a
The Ed25519 signature created (a 64 byte value) is then base64 encoded, and a |
WELCOME messageWhen a router receives a
Send a If the realm was assigned dynamically, the |
No certificatesSome words regarding certificates. WAMP-cryptosign deliberately leaves out certificates, and "only" retains the bare bones of a PKI: the public-private key pair based authentication and cryptography. The management, distribution and possibly revocation of public keys as well as private keys, if there is any sharing of private keys across endpoints, is left to the application. E.g. one could imagine having OpenPGP signed trust lists of public keys, or trusted root public keys hard-coded in program code, or have your public keys attached to your domain as custom DNS resource records. |
Here is a log of a (python279_1)oberstet@thinkpad-t430s:~/scm/crossbario/crossbarexamples/authentication/cryptosign/static$ python client.py --realm devices --authid client01@example.com --key client01.key
pubkey = 545efb0a2192db8d43f118e9bf9aee081466e1ef36c708b96ee6f62dddad9122
Connecting to ws://localhost:8080/ws: realm=devices, authid=client01@example.com
2016-01-05T00:53:30+0100 ClientSession connected. Joining realm <devices> under authid <client01@example.com>
2016-01-05T00:53:30+0100 TX WAMP HELLO Message (realm = devices, roles = {u'subscriber': subscriber(publisher_identification=True, payload_transparency=True, pattern_based_subscription=True, subscription_revocation=True, payload_encryption_cryptobox=True), u'publisher': publisher(publisher_identification=True, publisher_exclusion=True, payload_transparency=True, subscriber_blackwhite_listing=True, payload_encryption_cryptobox=True), u'caller': caller(payload_encryption_cryptobox=True, progressive_call_results=True, payload_transparency=True, caller_identification=True), u'callee': callee(payload_encryption_cryptobox=True, payload_transparency=True, pattern_based_registration=True, shared_registration=True, caller_identification=True, registration_revocation=True, progressive_call_results=True)}, authmethods = [u'cryptosign'], authid = client01@example.com, authrole = None)
2016-01-05T00:53:30+0100 RX WAMP CHALLENGE Message (method = cryptosign, extra = {u'challenge': 'fb645e01a5c3e54a718b5e1f91e887bdb16290e1088fc5b6e2b5230e28d690e4'})
2016-01-05T00:53:30+0100 ClientSession challenge received: Challenge(method=cryptosign, extra={u'challenge': 'fb645e01a5c3e54a718b5e1f91e887bdb16290e1088fc5b6e2b5230e28d690e4'})
2016-01-05T00:53:30+0100 TX WAMP AUTHENTICATE Message (signature = 5f336d51e8d058c08b754ad81ce76e55c4f13d0ab17f29a3f727e65c0b061ad33e47e169a0143569d5855c5eb1130e015f4ed716067599da05c60aec75e2ba06fb645e01a5c3e54a718b5e1f91e887bdb16290e1088fc5b6e2b5230e28d690e4, extra = {})
2016-01-05T00:53:30+0100 RX WAMP WELCOME Message (session = 6305273498872453, roles = {u'broker': broker(publisher_identification=True, pattern_based_subscription=True, subscription_meta_api=True, payload_encryption_cryptobox=True, payload_transparency=True, subscriber_blackwhite_listing=True, session_meta_api=True, publisher_exclusion=True, subscription_revocation=True), u'dealer': dealer(payload_encryption_cryptobox=True, payload_transparency=True, pattern_based_registration=True, registration_meta_api=True, shared_registration=True, caller_identification=True, session_meta_api=True, registration_revocation=True, progressive_call_results=True)}, realm = devices, authid = client01@example.com, authrole = device, authmethod = cryptosign, authprovider = static, authextra = None)
2016-01-05T00:53:30+0100 ClientSession joined: SessionDetails(realm=<devices>, session=6305273498872453, authid=<client01@example.com>, authrole=<device>, authmethod=cryptosign, authprovider=static, authextra=None)
2016-01-05T00:53:30+0100 TX WAMP GOODBYE Message (message = None, reason = wamp.close.normal)
2016-01-05T00:53:30+0100 RX WAMP GOODBYE Message (message = None, reason = wamp.close.normal)
2016-01-05T00:53:30+0100 ClientSession left: CloseDetails(reason=<wamp.close.normal>, message='None')
2016-01-05T00:53:30+0100 WAMP-over-WebSocket transport lost: wasClean = True, code = 1000, reason = 'None'
2016-01-05T00:53:30+0100 ClientSession disconnected
2016-01-05T00:53:30+0100 Main loop terminated. |
Is there an updated spec for cryosign? This one looks like it's out of date. |
@davidwdan yeah, the current text needs some work. some details, but also stuff like TLS channel binding need text |
This should also have an intro section that goes into the background, differences and use for common elliptic curves:
|
To @davidwdan and all other implementers. You can find an additional (dartlang) implementation of cryptosign here: |
The following describes
wamp-cryptosign
, a new WAMP-level authentication mechanism using the Ed25519 digital signature scheme which is based on elliptic-curve cryptography, but uses Curve25519 instead of a NIST curve like P-256.The scheme is gaining traction as it has several attractive features both cryptographically as well as technically, and comes with a secure and high-performance implementation (NaCl, libsodium and PyNaCl).
The spec below describes an authentication scheme for WAMP based on Ed25519 with the following features:
WAMP-cryptosign works using the standard WAMP opening handshake in it's authenticated variant. This message exchange looks like this:
The following 4 comment sections explain the use of the WAMP messages and attributes for Ed25519-based authentication, and the steps performed by the client and the router during the authenticating opening handshake.
The text was updated successfully, but these errors were encountered: