diff --git a/cmd/anchor/main.go b/cmd/anchor/main.go index 89dbfa4..9136d2a 100644 --- a/cmd/anchor/main.go +++ b/cmd/anchor/main.go @@ -155,8 +155,8 @@ func (a *anchor) handleWS(w http.ResponseWriter, r *http.Request) { ctx, cancel := context.WithCancel(r.Context()) defer cancel() - // Send a challenge nonce immediately. - nonce := make([]byte, 16) + // Send a challenge nonce immediately. ยง5.1 requires 32 bytes. + nonce := make([]byte, 32) rand.Read(nonce) nonceHex := hex.EncodeToString(nonce) if err := wsjson.Write(ctx, conn, proto.AnchorMessage{