From 7731466c8ca2b41958b964ae269c835a9c38dad8 Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Sun, 20 Apr 2025 11:10:06 -0700 Subject: [PATCH] Fixed rekey selection of HMAC algs (was always using alg 0, SHA256) --- Makefile | 2 +- xsnet/chan.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b176316..46166bb 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION := 0.9.13 +VERSION := 0.9.14 .PHONY: lint vis clean common client server passwd\ subpkgs install uninstall reinstall scc diff --git a/xsnet/chan.go b/xsnet/chan.go index 5847372..8618ccb 100755 --- a/xsnet/chan.go +++ b/xsnet/chan.go @@ -24,9 +24,10 @@ import ( "blitter.com/go/hopscotch" "blitter.com/go/xs/logger" "github.com/aead/chacha20/chacha" + whirlpool "github.com/jzelinskie/whirlpool" "golang.org/x/crypto/blowfish" "golang.org/x/crypto/twofish" - whirlpool "github.com/jzelinskie/whirlpool" + // hash algos must be manually imported thusly: // (Would be nice if the golang pkg docs were more clear // on this...) @@ -64,8 +65,8 @@ func getNewStreamAlgs(cb uint8, hb uint8) (config uint32) { // the input rekeying data c := (cb % CAlgNoneDisallowed) h := (hb % HmacNoneDisallowed) - config = uint32(h<<8) | uint32(c) - logger.LogDebug(fmt.Sprintf("[Chose new algs [%d:%d]", h, c)) + config = uint32(h)<<8 | uint32(c) + //logger.LogDebug(fmt.Sprintf("[Chose new algs [%d:%d config:%d]", h, c, config)) return }