S27: HPKE-Base content wrap + public-key directory; reject xor on send
Some checks are pending
ci / python (push) Waiting to run
ci / go (push) Waiting to run

Routing/error fields stay clear. Content is X25519-HKDF-SHA256-ChaCha20.
This commit is contained in:
George Lambert 2026-09-15 23:43:01 -04:00
parent 9cdc64b185
commit 94919185a9
8 changed files with 364 additions and 13 deletions

View file

@ -7,6 +7,7 @@ import (
"log"
"net/http"
"net/url"
"os"
"strings"
"time"
@ -113,7 +114,8 @@ func (n *Node) handleSend(msg *nats.Msg) {
n.fail(msg, "SM-MISSING-TO", "mailbox", lid)
return
}
if alg != "" && alg != "npe" && alg != "lab-xor" && alg != "plain-lab" {
allowLab := os.Getenv("SM_ALLOW_LAB") == "1"
if alg != "npe" && !(allowLab && (alg == "lab-xor" || alg == "plain-lab")) {
n.fail(msg, "SM-BAD-ALG", "mailbox", lid)
return
}