Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A new protocol for packet radio including ECDSA and compression (github.com/brannondorsey)
224 points by braxxox on Sept 24, 2018 | hide | past | favorite | 90 comments



Maybe messages should include a coarse timestamp to prevent replay of old messages by some adversary.

Someone could resend a month old "yes" with your valid signature to a question someone asks now.

Also it might be beneficial to include sequence numbers or message IDs and for example echo the last 4 ids in following messages so recipients can detect holes. - The chat could insert some placeholder to notify recipients of missing previous messages.


Fantastic idea! I intend to implement this in an upcoming release of the protocol and have opened an RFC to discuss this addition here: https://github.com/brannondorsey/chattervox/issues/19


This is a really great idea. Might be a good github issue to open?


I've opened one lest it gets forgotten: https://github.com/brannondorsey/chattervox/issues/10


I've opened an RFC for this issue and welcome comments here: https://github.com/brannondorsey/chattervox/issues/19


A rolling code might be another similar solution to the counter.


Or a nonce?


Does this do any sort of FEC? One of the things that makes stuff like this tricky(and APRS in general) is that one flipped bit throws off the whole decode.

From what I've seen out there would be a 40% improvement[1] in just base APRS if there was some form of basic FEC built into the protocol. Sadly most of "state of the art" is stuck back in the 80s.

[1] http://eludium.stensat.org/mcguire/projects/FX-25/FX-25_perf...



AX.25 has no FEC but there is FX.25 which is an encapsulation of the AX.25 packet with a preamble at the front and reed soloman at the end. But the issue is the speed of AX.25, 1200baud is dreadfully slow to be adding much onto the packet. The FX.25 protocol is a neat idea that allows for old TNC hardware to still be on the air. However, TNCs can be built with the cheapest of the raspberry pi clones so there really is no good reason as to why things can't progress to something like FX.25. There are certainly limitation to using 1200 baud AFSK but moving outside of the audio band, you could get some higher data rate but maybe loose some dB.


The stagnation of packet radio is due to FCC legal restrictions on data rate that are divorced from the reality of bandwidth usage in modern protocols.

You need to get to UHF before doing anything reasonable (if you call 56k reasonable) and by then, your range is toast unless your friend is on top of a mountain.


Does AFSK imply the use more than two frequencies? Using 4 or 8 frequencies and trellis modulating should get significant gain (i.e. using 4 frequencies and trellis modulating 1 bit per chip should be more robust than using just 2 frequencies).


AFSK, as used in amateur radio modems today, uses the Bell 202 modem standard, which is 2-ary FSK https://en.wikipedia.org/wiki/Bell_202_modem

Unfortunately, most folks on the VHF/UHF bands use FM radios with pre-emphasis and de-emphasis circuitry, so you would need to design a waveform that deals with those challenges.


Also known as binary frequency shift keying (BFSK).


Nope, just two pairs of bell tones on the same frequency.

Simple FEC just works pretty well with parity bits, just needs to be supported on all encoder/decoders.


Could FEC be considered a form of encryption?


No, just like speaking in phonetics isn't encryption. It doesn't hide the content of the message, it just adds extra data to make it easier to recover in the case of noise.

FEC could be mistaken for encryption if the algorithm wasn't published, but the same could be said for pretty much any other digital mode. Even Morse...


An AX.25 packet radio chat protocol with support for digital signatures and binary compression. Like IRC over radio waves

I just wanted to say thank you for such a concise, clear summary. So many projects get posted with cryptic descriptions full of insider terms.


Thanks mate! I appreciate that. I was looking for a way to describe it that seemed as down to earth as possible. Actually I was trying to go for that with most of the documentation so far (and what will be coming). It's not always so easy with stuff this technical but it's good to hear it's working for some people.


Cool project! I have always been interested in the amateur radio scene.

So encrypting amateur radio comms is illegal in the US? Is there a particular reason for this?


The amateur public radio bands are supposed to be open and useful to everyone so the broadcasts in those spectra are supposed to be readable by everyone as part of the accessible part. On top of that encrypted transmissions would be basically noise pumped into the system making the open uses more difficult and harder to police.


> The amateur public radio bands are supposed to be open and useful to everyone so the broadcasts in those spectra are supposed to be readable by everyone as part of the accessible part.

Except that proprietary voice codices are allowed :(


To a certain extent yes. This is only true on frequencies allowing digital voice encoding and they technically are still required to publish the working of the codec and how to identify them even if they are patent encumbered and you can't legally resell or distribute something to decode them.

These protections are to ensure the FCC / government are always able to decode amateur transmissions. These aren't protections for the operators themselves.

I completely agree with your sentiments though, the amateur bands should not allow proprietary commercialization.


Yeah it's a bit of a compromise there it looks like. At the time the only reasonable codecs that existed were proprietary and allowing them with the stipulation that the patents be available on a 'reasonable and non-discriminatory' basis so anyone could make a commercial radio based on the codecs.

At least with a proprietary codec with that patent restriction anyone can still go out and buy a compatible radio and jump right on. And if the improvement to capabilities is large enough the trade off is worth it. It's not ideal but it's much better than allowing encryption where the transmissions aren't accessible to anyone by design.


Been wondering why some of the radios cost way too much and now I am left wondering how much cheaper they would be if those patented codecs were banned or forced to be open for implementation.


The AMBE-3000 vocoder chip (used for pretty much all of the digital modes, including D-STAR and DMR) retails for about $50, before volume discount.

Which is not a small mount of money, but isn't that bad given that most amateur radios (excluding the recent Chinese models) retail for ~$500, and commercial radios retail for $1,000+.

That said, I'm pretty sure everyone would prefer to move to Codec2, but the lack of hardware offerings is a problem. I'm looking forward to the day the first real SDR handheld transceiver comes out so this can be implemented by the open source radio community. It's clear that none of the radio manufacturers are interested in interoperability, much less adopting community standards.


At least there's open source implementations of AMBE nowadays.


This is a dead horse but it isn't encryption.


Yeah there's a big difference between encryption and a codec. Anyone can decode and use the proprietary digital voice codec with appropriate equipment which the licensing board has at least assured won't become a monopoly for one radio equipment company.


While I think this touches on a big part of it, I think the bigger thing is the need for identifying stations for accountability. If there was a protocol that emitted an encrypted blob followed by cleartext/phone callsign, it would probably be more acceptable.


No. It's obscuring the content or meaning and it's not controlling a space station:

§97.113 Prohibited transmissions. (a) no amateur shall transmit (4) Music using a phone emission except as specifically provided elsewhere in this section; communications intended to facilitate a criminal act; messages encoded for the purpose of obscuring their meaning, except as otherwise provided herein; obscene or indecent words or language; or false or deceptive messages, signals or identification.

(§97.207 outlines the space station exception)


what about steganography?


Section 97.113 of FCC rules describes prohibited amateur radio transmissions: https://www.w5yi.org/page.php?id=121

While it doesn't call out encryption by name it more broadly prohibits "messages encoded for the purpose of obscuring their meaning." I take that to include both encryption and obfuscation methods like steganography.


See: Direct Sequence Spread Spectrum. It is possible to communicate below the perceived noise floor of a narrowband signal using much more bandwidth than is actually required for the transmission and intended channel conditions. You can basically encode your data across a much wider range of code points which directly modulate the broadband signal. This generates in RF terms what any unawares outside observer would describe as "broadband noise". E.g. WiFi communicates in 20MHz channels, a DSSS solution could use 100-1000 MHz channels (albeit at a MUCH lower baud). Most use/scanning/jamming/licensing of the airwaves is done in a narrowband context, so this is a sort of strategic way to get around these constraints.

If done properly and using a sequence that only you understand, it is possible to become completely invisible to interception for most practical situations. Someone with RF monitoring equipment could determine the source of broadband emissions, but without actually investigating the design of the physical transmitter they wouldn't ever know conclusively what is happening. This is why the FCC requires you publish the algorithm of the PRNG which modulates the data into the final DSSS signal. If you never do this and take decent measures to ensure your sequence appears as pure noise (simply encrypting your payload would do this), there is little anyone could hope to do to discover your presence if they were listening in the middle.


While I have heard of its use, it seems making a convincing 'carrier' may be more difficult than it seems with the limited bandwidth, and monitoring. But I may be wrong. In relation to the law it seems to violate the 'open public use' provision, but I am ignorant of the fine print. I do know the fcc is unreasonably good at finding and prosecuting illegal transmissions, but will stop short of incriminating myself or others.


someone has to figure out there's a hidden message first. much like using a 'non-type-accepted' radio. on the internet no one knows you're a dog.


> So encrypting amateur radio comms is illegal in the US? Is there a particular reason for this?

Encrypting amateur radio is illegal practically world-wide — every ITU member state bans it.


Notable exceptions: emergency communications in .AU and with publication of key in .CA.


A notable exception in the US being for the telecommand of space stations (97.211b).

There's also some grey area around encryption for telecommand of terrestrial craft --- you aren't allowed to "obscure the meaning of the communication" (97.215b), but other sections of Part 97 require preventing access to telecommand stations by unlicensed operators. This has raised questions over whether disallowing encryption is more important than risking telecommand stations being maliciously hijacked.


FWIW there's no conflict there in terms of the cryptography.

A replay-protected, keyed authenticator of plaintext commands (HMAC, etc) is not encryption; it is authentication. In a similar sense you are allowed to put a rolling log-in password on a packet radio BBS, so that passive monitoring will see the password, but as soon as it's revealed, it's no longer useful for additional logins.


Another notable exception: uplink control of certain aircrafts and spacecrafts


It's also illegal in Canada.

With amateur radio "dying" as an interesting hobby (my opinion, but widely held) it is often speculated that if encryption was permitted in amateur radio communications, there would be quite a resurgence in interest. I predict a new generation would start to pick up the hobby and find untold uses (and abuses) for it.


There are more hams in the US, and more active hams, than ever before. That's a funny sort of dying!

Joe Taylor's work on below-the-noise signal extraction has revitalized shortwave: https://physics.princeton.edu/pulsar/k1jt/wsjtx.html , particularly at the nadir of the sunspot cycle. That's a funny sort of dying!

Amateur satellites are accessible for $100 in parts: https://www.n2yo.com/satellites/?c=18 ; with the same parts and some practice and luck you can talk to the space station. That's cool for anyone but especially cool for students; NASA will do more amateur radio work in 2018 than in any previous year. That's a funny sort of dying!

If encryption were permitted on amateur bands, I'd expect to see commercialization right quick—along the same lines as the PACTOR modems embraced by the long-duration recreational sailing community: https://www.cruisingworld.com/staying-connected-at-sea


I've actually seen my young amateur radio communities die off during this new solar minimum, and a lot of my friends sold their expensive equipment. You really need money and space right now unless you want to sit at your desk and do some of the new low SNR "can talk to the mars rover with a wet sock as an antenna" modes that a lot of people don't like because it's too easy and poses no challenge. There's also VHF/UHF, but that's mostly older clique's.

It's definitely a slowly dying hobby.


You should be able to talk to anyone in the USA with 100W and a wire antenna.

I think the bigger issue is noise in urban areas. The FCC does a shit job of regulating noisy equipment. I had to go through my house and dispose of certain Ethernet switches, an audio device, notebook power supply, etc.


Is there a good description of what those $100 in parts for satellite work are? Or better yet, something purchasable that's likely to work? I've been wanting to get into it, but I've never found a really accessible guide to getting started in satellite communication.


Sure! To talk to a satellite you need an antenna, a receiver, a transmitter, and maybe a computer—not for voice, but for text modes.

Arrow will sell you a great antenna: http://www.arrowantennas.com/arrowii/146-437.html , or you can google "tape measure yagi" and build an okay antenna.

Then you can get the transmitter and receiver together, in a package like the regrettable BaoFeng UV-5R: https://www.amazon.com/BaoFeng-UV-5R-Dual-Radio-Black/dp/B00... . This is a terrible radio. Their quality control is so bad that you sometimes commit a federal offense by pressing the transmit button—and for $100, you can't afford the test equipment to tell! So maybe use it as the receiver in a two-radio setup, and transmit with something like a Wouxun KG-UV9D.

A Kenwood TH-D72A is an excellent choice to do the transmitter and receiver jobs, but hundreds of dollars. A Yaesu FT-60 is a great choice too, but it won't have full duplex—so you can't be sure your signal is getting out without help.

To listen to a satellite you need even less: a crappy antenna and an RTL2832 USB software-designed radio: https://www.adafruit.com/product/1497

For all of these, you'll end up wanting miscellaneous coaxial cable and a bunch of ends. Hams tend to build up a library of crimpers and spare ends and such, so look to borrow from a friend or a club as you get started. The 75 Ω cable that's ubiquitous for television signals will totally work, but you'll have much less loss and much much less stress on components if you buy 50 Ω cable.

Why not try the tutorial at https://www.rtl-sdr.com/rtl-sdr-tutorial-receiving-noaa-weat... ? If that works, you can expand from there: the tutorial teaches you a huge amount about aiming at satellites and the physical work necessary to capture signals from space.


Thank you! This really comprehensive. I'll probably start with the NOAA weather tutorial, and go from there.


In addition to the resources others have posted, I recommend picking up a copy of the AMSAT Getting Started book: https://www.amsat.org/product/2018-edition-of-getting-starte...


I haven't looked into satellite work in fifteen years or so, but back then it was definitely possible to work the LEO FM repeater satellites using a handheld and a small yagi - typically two elements 144MHz, five on 432MHz if memory serves.

With handhelds being dirt cheap and a yagi cut from a measuring tape being an option, I don't think getting on satellite for $100 sounds undoable.


You could make a good tape measure yagi and use it with a cheap radio like the UV-5R. It needs to be dual-band (440mhz and 2m); AMSATs are usually duplex.

http://theleggios.net/wb2hol/projects/rdf/tape_bm.htm


> There are more hams in the US, and more active hams, than ever before

I apologize for repeating the doom and gloom then, because I know it can be self-fulfilling.

The AARL has optimism but it also tells us net licenses are up <1% per year and "the large number of Baby Boomers will soon be aging off the licensee rolls", predicting "a significant decline in the number of hams, unless we take steps to reverse it." Source: http://www.arrl.org/news/more-than-30-000-new-ham-licensees-...

A decentralized, no-carrier/ISP, disaster-tolerant medium for private communication would be amazing.

I am not a licensed ham so this question is naive: If the major concern of allowing private communication over amateur bands is an influx of private commercial communication, then could bandwidth limits, protocols, signatures (amateur-vs-commercial), and enforcement be worth at least a trial? Perhaps on a new or limited existing band?

A government-run experiment to address demand for this limited public resource seems reasonable.


If you want that, there are plenty of ISM bands and loads of cheap equipment you can use to build such "decentralized, no-carrier/ISP, disaster-tolerant medium for private communication" (aka internet ...)

HAM radio bands are meant for R&D work, learning and basically hobby stuff, not to replace internet or phone services - in fact, the regulations explicitly forbid such use.


Then why is it the hams from whom we hear about such feats as "ionosphere skipping", and not any makers of 2.4GHz equipment?


Well, in part because the maximum usable frequency of the ionosphere tops out around 30-60 MHz?


Got it, so a meshnet using ISM bands is limited by the radio horizon, meaning that unless the equipment is produced in very high numbers, the links won't be close enough to connect at all, outside urban areas or perhaps a few towns.



> A decentralized, no-carrier/ISP, disaster-tolerant medium for private communication would be amazing.

That can be done without encryption, though.

Take a look at Broadband-HamNet. It's exactly all these things.


Anyone else get a certificate error on the princeton website?


If encryption was allowed, all that would happen is that people would start to use HAM bands as a cheap way to wirelessly connect to the internet or to build private communication links. Totally negating their purpose.

If you are after this (why would otherwise the lack of encryption be a problem for you?) there are both better bands and cheap hw to serve such commercial traffic needs (and, in fact, regulations in many countries explicitly outlaw use of HAM bands for traffic that can be better carried by other services - including the FCC in the USA - so even if crypto was legal, it would still be illegal).

And re amateur radio "dying" - that you don't hear anyone apart from a few old geezers chit chatting on a local repeater doesn't mean it is dying. There is a lot more to HAM radio than this - e.g. stuff like amateur radio satellites, APRS, all that SDR stuff, building digital networks, experiments with radar or even good old HF contesting. Or people simply enjoy building stuff and having the ticket lets them do it legally (some countries don't allow you to own HAM radio equipment without license).

HAM radio is far from dying, just it may not be what you imagine as a HAM radio - a bearded guy in his 60s ragchewing on HF ...

(I am a HAM operator myself)


Yes, if encryption was permitted, there would be a ton of interest...by commercial companies. Non-licensed users would out number licensed ones by huge amounts. It would put an end to amateur radio.


Requiring messages be signed by and for keys belonging to licensed amateurs might be sufficient to discourage abuse.


That's what this project does. It does signing, just not encryption. I would argue that this is OK legally.


I understand. I’m suggesting we could allow actual encryption if the messages were also signed such that the sender and recipient (but not the content) were known.

Abuse would require two licensed amateurs to cooperate to break the law and use the bands for commercial purposes. It would be easier to investigate suspected abuse (compared to unsigned encrypted messages, but not cleartext messages, of course)


And how would you distinguish licensed users from unlicensed ones if the messages are encrypted?

Heck, the authorities have problems policing the bands even without having to deal with crypto.


Licensed amateurs would be required to register the public keys (not private keys, of course) they want to to sign messages on amateur bands.


I prefer the other idea.. open up more frequencies to amateur radio with different restrictions. When I scan the frequencies, there is SO much that isn't being used.


This project seems to just implement signatures + verifiability to clear text messages, which I think(I am not a HAM), is allowed under the rules.


AFAIK it dates back to the 1930’s when spy networks were HF Morse code. Clandestine ops used HF morse well into the 1970’s, perhaps later.

Pretending to be a ham was a form of cover.

Sadly, being a cracker-jack Morse code operstor doesn’t get you a job with the NSA any more :) Technology has moved on.


Well, not the NSA, no—but the same skills that help with Morse are still helpful for radio listening.

The prohibition on scrambled meaning long pre-dates WW2, and goes back to old analogies about fencing a commons.


I believe the motivation is that the Amateur service is largely self-policed. If communications are encrypted, it becomes harder to encourage such self-enforcement.


This one is not encrypted. Its plaintext or compressed (gzip I think). Crypto is only for digital signatures.


What if you used a nonstandard proprietary compression algorithm? Does non-encrypted have to mean “widely documented/implemented compression”?


Another reason. If encryption was allowed then you would have a lot of commercial use on public bands but you couldn't enforce it, etc. It would ruin the public bands for everyone.


because they can't intercept your keys so cleverly as when on the internet ;)


> With amateur packet radio anyone can pretend to be anyone else. With Chattervox, you can be sure you're chatting with the person you intend to.

This is a great idea, for both the community and as a hobby project. Has there been any other attempts at similar protocols for amateur radio?


You can run just about anything over AX.25 since it's just the data link layer in the OSI model. You could run HTTP on top of IP on top of AX.25 with TLS/SSL message encryption turned off so you don't run afoul of FCC rules. The authentication would still be there but everything would be in the clear. You could also run IPsec with just the authentication field in the header, no encryption. Even if you didn't want to get that deep into the layers, you can always just pgp sign your messages on packet radio. Depending on the signature length, it could take several extra seconds to send the pgp signature at the typical 1.2Kb/s!

Decreasing the complexity of the stack is a good move forward. The speeds of packet radio require a custom protocol that limits overhead but leaves options for authentication and message signing. Some hams have been using packet radio at wifi frequencies which basically creates a wireless WAN with much higher data rates, making any of the authentication methods much quicker.


I owe my understanding of TCP/IP to running at 1200 bauds, half duplex, with poor collision detection.

http://www.ka9q.net/code/ka9qnos/


Wouldn't they need to significantly decrease the transmission power in order to use the ISM bands, making that application more LAN than WAN? And if the result is both legal and technologically superior to existing WiFi hardware then why hasn't the IEEE picked up on it?


Oh, it's not better than normal wifi. It's just better than 1200 baud over VHF or even 300 baud over HF. It's just typical wifi hardware hooked up to high power amps and high gain antennas to get greater distance. People are adjust the frequencies to the ham band and then running mesh networks. Part 97 allows you to modify part 15 (normal wifi hardware) to put up to 10W out. 10W frequency hopping spread spectrum links can go pretty far at GHz frequencies.


That merely transforms my previous question into a question of why WiFi routers+adapters with discrete antennae, don't also ship with 10W output and a suitably-beefy electrical system to match.


Never thought about that. Very cool! Thank you!


I would love to another version of this using gnuradio and lime sdr mini (or similar)


That's a great idea! The protocol can be implemented entirely separate from this first TypeScript client application. If anyone out there has gnuradio experience, I'd love to chat with them / offer support. I'd imagine the more folks use it the more we'd learn what modifications to v1 of the protocol would be useful.


This looks like it implements the packet processing only, and suggests using Direwolf as a software AX.25 modem. Direwolf can decode audio piped from rtl_fm or gqrx, so using a SDR is likely already possible for receive; not sure about transmit.


Maybe the Direwolf source code can work via the python calls from gnuradio itself.


If you every want to listen to ham packet radio in the US, tune your radio to 144.390 MHZ and it sounds like a modem :)


This is pretty neat, and its nice that I already have all the pre-reqs :-). Although I'm wondering if I have to use the analog cable for the radio as I've got the USB one, that will be a bit of investigation.


After a bit of prodding I caved and bought an aux cable, but I've wondered the same about the audio -> USB cable. It think it's FTDI so I think a clever person might be able to figure it out. If you get anywhere with this let me know!


Pretty neat. I like the ECDSA for remote control.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: