Added rekeying (-r secs) client/server

This commit is contained in:
Russ Magee 2023-11-15 00:32:50 -08:00
parent c569a5a3c9
commit 032baf63d6
6 changed files with 80 additions and 30 deletions

View file

@ -57,9 +57,9 @@ func expandKeyMat(keymat []byte, blocksize int) []byte {
return keymat
}
/* Support functionality to set up encryption after a channel has
been negotiated via xsnet.go
*/
/* (Re-)initialize the keystream and hmac state for an xsnet.Conn, returning
a cipherStream and hash
*/
func (hc *Conn) getStream(keymat []byte) (rc cipher.Stream, mc hash.Hash, err error) {
var key []byte
var block cipher.Block