Secure LoRa Mesh Communication Network

Laptop connected via Ethernet to Raspberry Pi-based secure radio device with antenna

The Internet has allowed us to communicate more easily than ever before, and thanks to modern cell-phone networks, we don’t even have to be tied down to a hard line anymore. But what if you want something a little more direct? Maybe you’re in an area with no cell-phone coverage, or you don’t want to use public networks for whatever reason. For those cases, you might be interested in this Secure Communication Network project by [Thomas].

By leveraging the plug-and-play qualities of the Raspberry Pi 4 and the Adafruit LoRa Radio Bonnet, [Thomas] has been able to focus on the software side of this system that really turns these parts into something useful.

Window showing secure text communications
Messages are tagged as “authenticated” when a shared hashing code is included in the message

Rather than a simple point-to-point radio link, a mesh network is built up of any transceivers in range, extending the maximum distance a message can be sent, and building in resilience in case a node goes down. Each node is connected to a PC via Ethernet, and messages are distributed via a “controlled flooding” algorithm that aims to reduce unnecessary network congestion from the blind re-transmission of messages that have already been received.

Security is handled via RSA encryption with 256-byte public/private keys and additional SHA256 hashes for authentication.

The packet-size available through the LoRa device is limited to 256 bytes, of which 80 bytes are reserved for headers. To make matters worse, the remaining 176 bytes must contain encrypted data, which is almost always more lengthy than the raw message it represents. Because of this, longer messages are fragmented by the software, with the fragments sent out individually and re-assembled at the receiving end.

If you’re in need of a decentralized secure radio communications system, then there’s a lot to like about the project that [Thomas] has documented on his Hackaday.io page. He even includes an STL file for a 3D printed case. If you need to send more than text, then this Voice-over-LoRa Mesh Network project may be more your style.

20 thoughts on “Secure LoRa Mesh Communication Network

  1. > Security is handled via RSA encryption with 256-byte public/private keys and additional SHA256 hashes for authentication.

    Encryption key sizes are normally given in bits… so that’d be 2048 bits if my math is correct. Not bad, but in 2022 we should be aiming for 4096-bit or looking to ECC.

    1. There may be vulnerabilities I’m not aware of, but even SHA-256 should be more than enough bits if you’re doing simple hash encryption. The answer on the Bitcoin stackexchange linked below gives 7e51 years for the entire Bitcoin mining (ca. 2018) network to break a 256-bit hash.

      To me, 256-bit encryption is more than enough until quantum computing really gets rolling, at which point my (very possibly wrong) understanding is that 16x as many digits won’t really save you, just maybe buy a decade as they scale the number of qbits. It looks like basic ECC won’t, either. I think the only solution is to only put things across WANs that one expects the NSA to save and decrypt within a few decades, or a half-century at most.

      If I were a cryptography nerd (not meant in a pejorative manner), I’d be concentrating on post-quantum cryptography, as anything else is just giving a future NSA crypto nerd just now being born a challenging, but solvable, puzzle.

      https://bitcoin.stackexchange.com/questions/41829/wont-asic-miners-eventually-break-sha-256-encryption

  2. “The Internet has allowed us to communicate more easily than ever before [..]

    As have CompuServe, Videotex (BTX/Datex-J, Minitel/Teletel), Datex-P (aka any other X.25 network), AOL, BBSes/Mailbox systems and Packet-Radio since the late 1970s and 80s.

    And FAX machines.. ;)

      1. RTTY.. Yes. It’s still in use by radio amateurs. 5-Bit Baudot (7-Bit actually? , with the start/stop information) is still the norm. It uses 45,45 Baud or 50 Baud and is being used during contests.

        However, Packet-Radio was much more sophisticated by comparison. While the ancient OSCAR-7 satellite had a RTTY beacon, for example, Packet-Radio really was a true computer application.

        Packet-Radio used AX.25 protocol, a variation of the X.25 protocol that was simewhat popular before TCP/IP.

        Nowadays, sound modems like Soundmodem or DireWolf support FX.25, an error-correction (forward-correction).

        The ISS also supports Packet-Radio in the form of APRS.
        It’s easily possible to send SMS-style message across the world via APRS.

        Back in the 80s/90s, there was a giant Packet-Radio network, across the world. Before the WWW was popular. Before Windows 95. Before Netscape, Social Media and before this LoRa thing.. It allowed internal e-mail exchange, filesharing (7Plus “compression”) et cetera pp.

        Unfortunately, hams didn’t realize what they had.
        Society and family members told them how great WhatsApp, ICQ etc were.

        And so everything fell apart. Sometimes, you don’t realize what you have before it’s gone. *sigh*

        And now, we’re here. Makers telling us what great ideas they have, re-inventing the wheel. Excuse me, I need to go in the cellarnnow, for a bit of sobbing. 😢

        1. You’ve completely missed the point. LoRa is useful because of the high power efficiency and large link budget. AX25 / FX25 on VHF need at least 5 watt, sometimes 50 watt transceivers to work in practical environments.

          HAM radio operators have a generational problem with believing that they invented everything interesting, when they did not.

          SMS style messaging across the world with APRS is not possible without using the internet, or an absurdly long WIDE-N setting. APRS is now fully integrated with the internet, and it’s a mistake to assume otherwise.

          The hacker / maker culture is rapidly overtaking the geriatric ham culture, and it’s a great thing for those of us who love technology. I can’t wait to see what they dream up, without being constrained by 50 year old technology and ideas.

          1. Sigh…
            Sounds like you aren’t a ham or have a small amount of knowledge/experience in the area? In regards to the power needed comment.

            You aware of the mentioned world wide packet network DID send mail and txt world wide only with radio, that APRS is just a mutated remmnant of, today?

            Don’t make me say it…
            (some) YOUNG people have a generational problem thinking only new things have value, old things are worthless and they thought of it better, if not thinking they’ve invented a wheel, ‘cus they didn’t know the history… };‐)

            Progress is great, and usually easier, better, and faster… standing on the shoulders of those before.

  3. Don’t forget the required limitations of LoRA where devices are limited by how much can be sent and how often.

    These data bandwidth limitations for LoRA protocol regulations mean devices can’t be used for much more than sending metrics. eg about 30 bytes per hour.

    So light-weight chat like this is just about ok but you couldn’t run the internet through it.

    1. Just to clarify, the usage limits on the spectrum are not a LoRa limitation, but due to use of unlicensed ISM spectrum (un-licensed, but not un-regulated!). If you could use the LoRa modulation in a licensed / dedicated piece of spectrum, then you çan transmit as much as you like!

  4. [Thomas] said: “Although the testing used for this network was successful and provided an introductory proof-of-concept for a radio based communication in this manner, this will need to be expanded upon in order to produce more genuine results by using more nodes. Future additions to this project will certainly include some of the aforementioned features which may improve the operation and ease-of-use of this network.”

    I think that’s getting the cart before the horse. What needs to come first is simulation and optimization. Network simulation suites abound and many are free open-source.[1] Simulations scale easily and produce results quickly. Teaking simulations is easy. What you want to simulate is the network layers not the physical layer. The behavior of LoRa physical radios is already well known.

    Or just toss the problem to ChatGPT and cross your fingers.

    1. 18 Network Simulation Software Tools for Certification Practice or Research

    https://www.networkstraining.com/network-simulation-software-tools/

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.