Open-source project
OpenNHP/opennhp avatar
OpenNHP/opennhp

OpenNHP: a signed UDP knock, three daemons, and two addons

A lightweight, cryptography-powered, open-source toolkit built to enforce Zero Trust security for infrastructure, applications, and data in the AI-driven world.

13,956 stars2,480 forksGoApache-2.0

At a glance

What is it?
A Go toolkit that hides ports, IPs, and hostnames until a cryptographically signed knock is authorized out of band, built as the CSA Network-infrastructure Hiding Protocol reference implementation. The network half ships as three daemons plus two addons; the Data-content Hiding Protocol is announced beside it in one line of the README's opening.
Who is it for?
Adopt it if you want your services to be undiscoverable by default and you can afford three daemons, a UDP path through your network, and a decision about which cipher suite your fleet will run for years. For the data half of the pitch, check the documentation before relying on it, since the README describes DHP in one line, and for your own authenticator, start from the example under examples/server_plugin/authenticator.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • OpenNHP/opennhp13,956 ★ · +26
Star history
Repository2026-09-222026-11-15
OpenNHP/opennhp13.9k14k

26 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Three daemons answer in order, and only one of them opens the port

NHP-Agent, NHP-Server, and NHP-AC split the job three ways, and the split is what makes this more than a knock script. The agent sends an encrypted knock, NHP_KNK, to the server. The server validates that knock and sends an operation request, NHP_AOP, to the access controller. The AC, the component that manages firewall rules on the protected server, opens the firewall and replies with NHP_ART back to the server. The server then returns an acknowledgment, NHP_ACK, carrying access info to the agent, and only after that does the agent reach the protected resource through the AC. Two choices here matter more than the rest. The server runs separately and is architecturally decoupled from the protected host, so the server that authorizes knocks is not the machine you are defending. And the exchange is stateless, which the project credits as the reason it scales horizontally, in contrast to generation 2 designs such as Single Packet Authorization that it describes as shared secret and one-way and as hiding ports only.

Data-content Hiding has a protocol name and no daemon

The opening claim is that OpenNHP features two core protocols, and the second one is described as ensuring data security and privacy through encryption and confidential computing, leaving data usable but not visible. The README's architecture section does not describe it. The architecture table names three core components and two addons, and every one of them serves NHP: the agent, the server, the AC, the relay, and the KGC. The build offers targets for agentd, serverd, acd, db, relayd and kgc, and the test section exercises the nhp and endpoints modules. The one build target the architecture tables do not cover is make db, labelled NHP-DB. For protocol details the README points to docs.opennhp.org.

Curve25519 and SM2 are not the same switch

Two cipher suites ship and the project calls them interchangeable. CIPHER_SCHEME_CURVE is Curve25519 plus AES-256-GCM plus BLAKE2s. CIPHER_SCHEME_GMSM is SM2 plus SM4-GCM plus SM3. Both are driven by the Noise Protocol Framework, and an Identity-Based Cryptography mode is reached through the Key Generation Center, NHP-KGC. Interchangeable holds at the handshake layer, where a Noise exchange can carry either set, and misleads at the deployment layer, because every primitive changes: key agreement, symmetric cipher, and hash. The KGC decision carries its own weight. Identity-based cryptography derives keys from identities and issues them from the KGC, so choosing it adds a service whose only job is handing out key material, and that service lands inside your trust boundary whether or not a second operator stands in front of it. The README keeps both choices brief and sends you to the documentation for cryptographic design.

Browser clients need NHP-Relay, because a page cannot open a UDP socket

The addon list has two entries and one of them exists to solve a browser problem. NHP-Relay is described as an HTTP-to-UDP bridge that enables browser-based agents to send NHP knocks via HTTPS. Knocks travel as UDP, a page in a browser has no way to open a raw UDP socket, so a browser client cannot speak NHP on its own; the relay forwards each packet inside an authenticated NHP_RLY envelope. The relay is the translation layer, and it arrives with a bill attached. Every browser-based user now depends on an extra always-on process that must be reachable over HTTP, and that process sits in the trusted path for every knock it forwards. The side effect is that a component hidden by design becomes something with an ordinary web address in front of it, which is the exact shape of exposure the protocol exists to remove.

The binary version is a file read plus a timestamp, not a git tag

Version identity is manufactured during the build. The Makefile turns GO111MODULE on, names the module github.com/OpenNHP/opennhp/nhp, reads the base version from nhp/version/VERSION and appends a timestamp captured with date +%y%m%d%H%M%S, then writes the result into the binary through linker flags on version.Version, version.CommitId, version.CommitTime and version.BuildTime, packaging opennhp-$(VERSION).tar.gz. Two consequences follow. The version a running daemon reports is not the tag you cut, so two builds of the same commit report different versions and CommitId is the only field that identifies the source. And COMMIT_ID is defined with a fallback to unknown for when .git is absent, with a comment naming a Docker build whose context excludes .git through .dockerignore. That fallback is deliberate and it means a containerized daemon reports unknown unless git metadata is carried into the build context. For tempo: the last push was 2026-11-02, v1.0.2 shipped 2026-09-11 one day after v1.0.1 on 2026-09-10, and .release-please-manifest.json at the top level indicates the tags are generated rather than cut by hand.

Two plugin variables point at two example paths, and one of them is where identity should plug in

Extension runs through two Makefile variables, both pointing into the same example tree: NHP_SERVER_PLUGINS is set to ./examples/server_plugin/basic and NHP_AUTHENTICATOR_PLUGINS to ./examples/server_plugin/authenticator. The core library carries a plugins/ directory described as plugin handler interfaces, so the extension point exists in the architecture, and the repository ships two example directories, examples/client_sdk/ and examples/server_plugin/. The README's registration flow names one job for the Server's auth plugin: delivering the one-time password NHP_OTP to the user, for example by email. For the interface itself, the starting points are nhp/plugins/ and the example under examples/server_plugin/authenticator. The project does say NHP slots in alongside existing IAM, DNS, FIDO and Zero Trust policy engines rather than replacing them.

Six build targets, three documented directories, and a Go 1.26 floor

Prerequisites are Go 1.26+, make, and Docker with Docker Compose for the full-stack demo. The build entry point is a plain make, and there are per-daemon targets:

bash
# Build all components
make

# Build individual daemons
make agentd    # NHP-Agent
make serverd   # NHP-Server
make acd       # NHP-AC
make db        # NHP-DB
make relayd    # NHP-Relay
make kgc       # NHP-KGC

Tests are two module-level runs, and each line changes directory, so they belong in separate shells:

bash
cd nhp && go test ./...
cd endpoints && go test ./...

The whole stack comes up with:

bash
cd docker && docker-compose up --build

Windows developers get build.bat at the top level, and terraform/, deploy/, demoapp/ and scripts/ exist for provisioning and demos.

Editorial conclusion

Adopt it if you want your services to be undiscoverable by default and you can afford three daemons, a UDP path through your network, and a decision about which cipher suite your fleet will run for years. For the data half of the pitch, check the documentation before relying on it, since the README describes DHP in one line, and for your own authenticator, start from the example under examples/server_plugin/authenticator. Before deploying, verify what your clients actually speak, since browser users need NHP-Relay standing in front, check that your build context carries .git if you care about a commit id in the binary, and read docs.opennhp.org rather than assuming the repo is the specification.

Frequently asked questions

Why does zero trust fail?

OpenNHP's own answer is that traditional defenses authenticate users after the network lets them in, which leaves exposed ports, IPs, and domains as a permanent attack surface while attackers scan and fingerprint at machine speed. Its response is the slogan that visibility equals vulnerability, and the design rule of invisible until trusted behind a default-deny gate.

What is zero trust networking?

In OpenNHP's framing it means your ports, IPs, and hostnames are concealed until a cryptographically signed knock is authenticated and authorized out of band. The agent, server, and access controller exchange NHP_KNK, NHP_AOP, NHP_ART and NHP_ACK, and the access controller opens the firewall and then replies to the server.

What are the 7 pillars of zero trust?

OpenNHP never enumerates seven pillars. It says its modular design is inspired by the NIST Zero Trust Architecture, then names three core components (NHP-Agent, NHP-Server, NHP-AC) and two addons (NHP-Relay, NHP-KGC), and points to the Cloud Security Alliance NHP specification for the rest.

What are the 5 basic tenets of zero trust?

There is no list of five tenets in this project either. What it commits to is that NHP extends existing IAM, DNS, FIDO and Zero Trust policy engines rather than replacing them, and that the server is architecturally decoupled from the protected host while the access controller is the only component that opens the firewall.

Official sources

  1. License: Apache-2.0
  2. OpenNHP/opennhp on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/opennhp-opennhp.svg)](https://hysenlabs.com/projects/opennhp-opennhp)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/opennhp-opennhp.svg)](https://hysenlabs.com/projects/opennhp-opennhp)

Was this useful?