Add New Page: You are not allowed to add pages Select section/namespace. New page title.

Commotion Service Signing

When a Commotion service is added, an announcement is created and signed by a Serval key. In DR1, the node's primary Serval key is used, and in DR2 it is planned to use a different key for each service. The following is the template used for signing:


Above, each @$variable@ is replaced by the service's relevant information. The one exception is @$app_types@, which has the following format:


Note that the above type template is repeated for each service category, all on one line.


The following is an example of a signing template:

<txt-record>application=Dan's webchat server</txt-record>
<txt-record>description=Chat online with your friends!</txt-record>

A signature is created by piping the filled-out template into the @serval-sign@ program, as follows:

$ echo "<type>_http._tcp</type>
> <domain-name>mesh.local</domain-name>
> <port>80</port>
> <txt-record>application=Dan's webchat server</txt-record>
> <txt-record>ttl=2</txt-record>
> <txt-record>ipaddr=</txt-record>
> <txt-record>type=Community</txt-record><txt-record>type=Fun</txt-record>
> <txt-record>icon=</txt-record>
> <txt-record>description=Chat online with your friends!</txt-record>
> <txt-record>expiration=86400</txt-record>" \
> |serval-sign

The first line of output, a 128-character hex string, is the signature, while the second 64-char hex string is the Serval key used to sign the announcement. You can optionally pass @-s <key>@ to the @serval-sign@ program to use a specific Serval key.

Future improvements

  • Include each service category txt-record on a new line, and sort them alphabetically