S27: HPKE-Base content wrap + public-key directory; reject xor on send
Routing/error fields stay clear. Content is X25519-HKDF-SHA256-ChaCha20.
This commit is contained in:
parent
9cdc64b185
commit
94919185a9
8 changed files with 364 additions and 13 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue