Skip to content
This repository was archived by the owner on Nov 11, 2026. It is now read-only.
channelmePublic archive

About

New cryptographic keyserver for Cotonic

Resources

Stars

4 stars

Watchers

3 watching

Forks

Latest commit

 

History

72 Commits

Folders and files

Repository files navigation

keyserver

Keyserver is a key distribution mechanism for IoT like communicating entities. It can be used to exchange keys for direct communication and for publish/subscribe communication patterns.

A javascript library which is able to interact with this keyserver can be found in the Cotonic library.

Notification

Development moved to https://github.com/zotonic/keyserver

Usage

Create a new keyserver:

{ok, Pid} = keyserver:start(my_first_keyserver, CallbackModule, []),

This starts a new keyserver. In order to communicate with the keyserver you must first know the public encryption key of the keyserver and the name of the keyserver. All connection request to the keyserver are encrypted with this key. The keyserver can decrypt the connection request and register the entity.

The CallbackModule will be called to check if entities are allowed to connect, publish, subscribe, or communicate directly.

{ok, PubEncKey} = keyserver:public_enc_key(my_first_keyserver).

The public encryption key must be transport out of band to the client. It is possible to this via a normal TLS connection or another safe method.

After retrieving the public encryption key, a client can request a key from the keyserver to communicate with another entity.

Key = keyserver_crypto:generate_key(),
Nonce = keyserver_crypto:generate_nonce(),

{ok, _ServerNonce, {hello_response, KeyES, Nonce1}} =
    keyserver:connect_to_server(my_first_keyserver, "me", Key, Nonce, ServerEncKey).

...

About

New cryptographic keyserver for Cotonic

Resources

Stars

4 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages