World wide free shipping on orders over 100€ - PayPal and Stripe payments - Made in Finland

IOTA Masked Authentication Messaging: messaging protected with symmetric key encryption over distributed ledger

Masked Authenticated Messaging (MAM)

IOTA Masked Authenticated Messaging makes it possible for sensors and other devices to encrypt entire data streams and securely anchor those into the IOTA Tangle in a quantum proof fashion. Only authorized parties will be able to read and reconstruct the entire data stream. In essence it works a lot like a radio where only those with the right frequency can listen in, in MAM only those with the right channel IDs get access to the data. More information about MAM can be read on IOTA development roadmap.

Get started

First, update your RuuviTags to the hackathon firmware with your phone. The full firmware contains complete hex package, you can use it if you want to have a connection to RuuviTag with developer shield. Instructions on how to upload the firmware can be found on DFU page.

We have made a NodeJS program which listens to incoming Bluetooth advertisements and tries to automatically connect to anything which has Nordic UART service available. The connection sometimes fails, and if there is an exception while program is running you might have to restart your bluetooth stack using sudo hciconfig hci0 restart. The program is tested both on Debian and Raspberry Pi running Rasbian.

Run “node example.js”, you will be given and command prompt where you can send commands to the Connected RuuviTag. If you send “4”, RuuviTag will read the temperature, humidiy and pressure sensors and send the values in plain text encrypted by MAM. Program will receive the message in series of chunks and reassemble the chunks into a MAM payload. MAM payload is then published to Tangle. Destination address is hardcoded into javascript example file, you can change the address to suit your needs.

How does it work?

RuuviTag starts advertising itself on boot and keeps advertising until a BLE connection is made. Program will send a predefined data packet when command is given through command line interface. RuuviTag parses this package and replies with plaintext package with message “INIT MAM”. After a few seconds the MAM encryption is complete on RuuviTags side and and the message is split into chunks which will be sent to connected device. You can follow the progress of the program by checking the RED LED: Led is on when there is activity on RuuviTag. You’ll see that LED is on for a few seconds while message is being processed and then led starts blinking while message is transmitted in chunks.

Once transmission is complete, RuuviTag goes back to sleep to conserve power. You can disconnect and reconnect later on to your RuuviTag and send “4” again to get another MAM message. You can check the messages in the iotasearch service.

What can I do with it?

The demonstration allows you to store environmental data into IOTA Tangle, protected with MAM. If you have an use case in your mind we’ll be happy to help you to implement any additional features you’ll require on RuuviTag.

Tell us…

How did you use the MAM protocol? We’re sure others would love to know!

Check IOTA’s site and our blog post to read more.

Featured Products

Find the right products for your measuring needs
  • RuuviTag sensor measures temperature, air humidity, air pressure and motionIn stock
    RuuviTag is a Bluetooth sensor that sends temperature, relative...
    Read more

    RuuviTag Sensor (4in1)

    39,90
  • Ruuvi KitIn stock
    Every Ruuvi Gateway product is shipped with...
    Read more

    Ruuvi Sensor Measurement Kit

    339,00
  • Ruuvi GatewayIn stock
    Note! Every Ruuvi Gateway product is shipped with a...
    Read more

    Ruuvi Gateway Router

    199,00
  • RuuviTag Pro 3in1 measures temperature, air humidity and motionIn stock
    Choose your model (2in1, 3in1 or 4in1) depending on...
    Read more

    RuuviTag Pro Sensor

    49,9055,90