Project_Detail
All_Projects

Cipher32

Always Encrypted, Never Clear

View on GitHub
README.md

Cipher32

Always Encrypted. Never Clear.

Cipher32 is an experimental, open-source digital voice project built around encrypted voice over narrowband FM radio. The target is a dedicated Cipher32 radio ecosystem in which encryption is part of the protocol, not an optional channel setting.

Cipher32 is being developed on the Baofeng DM-32UV handheld. The current tree is a working P25 Phase 1 / analog FM firmware base, derived from the P32Firmware work, with a purpose-built instrument UI. Cipher32's own framing, synchronization, mandatory encryption and key management are not implemented yet.

Current status: this is a development base, not a finished Cipher32 protocol. The firmware in this tree still speaks P25 Phase 1 and supports clear P25 voice and P25 ADP. It remains compatible with P25 conventional and trunked systems. The target Cipher32 protocol will not be P25-compatible.

Cipher32 is experimental. Keep a backup, expect incomplete or changing behavior, and do not rely on it for sensitive or mission-critical communications.


The Idea

Encryption should not be an afterthought.

Most conventional radio systems treat encryption as an optional capability, often dependent on proprietary implementations, licensing, or expensive commercial hardware.

Cipher32 explores a different approach:

  • Encryption by default — the target protocol has no clear-voice fallback.
  • Open development — an openly developed protocol and implementation.
  • Dedicated hardware — designed for Cipher32-compatible radios.
  • Key management — a dedicated approach to key generation, distribution and loading.
  • Digital voice — C4FM-based digital voice over narrowband FM.
  • An independent ecosystem — no dependency on existing P25 networks or infrastructure.

The goal is to make modern encrypted digital voice communications accessible through an independently developed radio platform.

Where We Are

The current firmware is useful as a radio and as a development base, but it is not yet a Cipher32 protocol implementation.

Area Today Cipher32 target
Radio Baofeng DM-32UV Cipher32-compatible radios
Physical layer P25 Phase 1 C4FM / 4FSK Cipher32 C4FM framing
Voice P25 IMBE, software codec Cipher32 voice transport
Encryption Optional P25 ADP Mandatory Cipher32 encryption
Clear voice P25 clear voice is supported No clear mode
Interoperability P25 conventional and trunked Cipher32 only
Infrastructure P25 conventional/trunked, direct radio-to-radio Direct radio-to-radio

What already works on the DM-32UV:

  • P25 Phase 1 conventional and trunked receive, including control-channel monitoring.
  • P25 conventional voice transmit.
  • Analog FM with CTCSS/DCS, scan, VFO and dual watch.
  • The 240x320 instrument UI, themes, accessibility options and crash log.
  • A C-SKY firmware build, host tests, UI simulator and radio flashing tools.

What is still missing for the Cipher32 idea:

  • Cipher32 frame format, synchronization and call control.
  • Mandatory encryption integrated into the Cipher32 frame, instead of optional P25 ADP.
  • Cipher32 key generation, distribution, storage and loading.
  • A no-clear-voice mode and removal of P25 interoperability.
  • A final 12.5 kHz / 25 kHz RF and audio plan.
  • Independent security review.

Technology

Cipher32 uses a P25-inspired C4FM modulation approach.

Component Description
Modulation C4FM / 4-level FSK
Channel widths 12.5 kHz and 25 kHz (planned)
Voice Digital voice
Encryption Mandatory in the target protocol
Clear mode Not supported by the target protocol
Network compatibility Cipher32 only
Infrastructure Direct radio-to-radio operation

Although Cipher32 draws inspiration from P25 physical-layer technology, it is intended to implement its own communications protocol.

The target Cipher32 protocol is not interoperable with P25 systems. A conventional P25 radio will not be able to communicate with a Cipher32 radio simply because both use C4FM modulation.

The current development base is different: it is still a P25 implementation. Do not confuse the present P25-compatible firmware with the target Cipher32 protocol.

Cipher32 Radios

The target Cipher32 ecosystem is closed in the interoperability sense: only radios implementing the Cipher32 protocol can participate in Cipher32 communications.

This lets the project control the whole communications stack:

  • Voice encoding and decoding.
  • Digital modulation and demodulation.
  • Packet framing and synchronization.
  • Encryption and authentication.
  • Key management.
  • Radio-to-radio communications.

Cipher32 is not intended to turn existing P25 networks into encrypted networks or to replace public-safety communications infrastructure.

Security Philosophy

Cipher32 follows one central principle:

There is no clear mode.

In the target protocol, encryption is not a menu option or a channel setting. It is a requirement of the protocol.

Security is intended to be based on well-established cryptographic primitives, sound key management and independently reviewable implementations, rather than proprietary secrecy.

Cipher32 is experimental software. Until the cryptographic design, implementation and interoperability testing have undergone independent security review, it must not be considered suitable for protecting sensitive or mission-critical communications. The current P25 ADP support is not the Cipher32 encryption design.

Project Goals

  1. Develop a working encrypted digital voice protocol.
  2. Establish reliable C4FM transmission and reception.
  3. Support both 12.5 kHz and 25 kHz channel configurations.
  4. Implement secure encryption and key management.
  5. Develop dedicated Cipher32 radio firmware.
  6. Build tools for generating, managing and loading encryption keys.
  7. Publish an open, independently implementable specification.
  8. Replace the P25 base with the Cipher32 protocol, rather than layering Cipher32 on top of P25.

Roadmap

  • Bring up the DM-32UV hardware, display, UI, audio path and build.
  • Establish the P25 Phase 1 and analog FM base.
  • Add a repeatable flashing and recovery path.
  • Define the Cipher32 frame, synchronization and call control.
  • Implement mandatory Cipher32 encryption and authentication.
  • Implement Cipher32 key generation, storage, loading and rotation.
  • Remove clear-voice operation and P25 interoperability from the target firmware.
  • Validate 12.5 kHz and 25 kHz RF performance and audio quality.
  • Build hardware-in-the-loop tests for Cipher32-only operation.
  • Complete independent security review.

What Cipher32 Is Not

To avoid confusion, the target Cipher32 protocol is:

  • Not a P25 implementation.
  • Not P25 Phase I or Phase II compatible.
  • Not compatible with existing P25 repeaters or trunking systems.
  • Not a replacement for commercial public-safety radio networks.
  • Not a clear/digital dual-mode radio system.
  • Not intended to communicate with conventional P25 subscriber radios.

The current development base does not satisfy all of those statements yet. It is a P25 Phase 1 implementation used to bring up the hardware, UI and tools while the Cipher32 protocol is designed and implemented.

Building

The DM-32UV uses the C-SKY toolchain. You need make, Python 3.11 or later and csky-elf-gcc on PATH or in ~/toolchains/csky-elf/bin/. Build the compiler with tools/build-csky-toolchain.sh, or use the Docker image in tools/docker/csky-toolchain/.

make BOARD=dm32                 # build/dm32/rfoundry_dm32.bin
make -C tests/host              # host tests
site/tests/run.sh               # web installer tests
JOBS=8 tools/ci.sh              # everything CI checks

The current image is a P25/FM development build. It has no DMR AMBE codec slot; P25 voice uses the software IMBE codec in core/p25/imbe.

Installing

The DM-32UV is flashed through its vendor update mode over the USB-serial programming cable. The bootloader is never written. Update mode erases the codec slot; that is harmless for the current P25/FM build.

The current build has been flashed to hardware and boots into the Cipher32 splash and P32-based UI. It is not yet a release-quality Cipher32 radio.

Hardware

Part DM-32UV
MCU HR_C7000 (C-SKY CK803S)
RF FD6818
Display ST7789, 240x320 color
Programming USB-serial programming cable; the radio has no USB port of its own

Contributing

This is a clean-room, permissively licensed project. Read docs/CLEANROOM.md before contributing. Keep radio-independent code in core/, board wiring in boards/, and anything that adds real flash cost behind a CONFIG_ switch.

New behavior needs a host test. Hardware-in-the-loop tests need a radio and are skipped without one. Run tools/ci.sh before opening a pull request.

License

Cipher32 is MIT licensed; see LICENSE. Third-party components keep their own permissive licenses in LICENSES/.

Philosophy

Open encryption standards should exist for voice communications.

Cipher32 exists to explore what an independently developed, openly documented, encryption-first digital radio system can look like.

Not another proprietary encryption option.

Not another interoperability layer.

A dedicated digital radio platform where encryption is part of the foundation.


Cipher32

Always Encrypted. Never Clear.