breaking: increase keysize

This change increases the pre-shared key size, and requires regenerating any existing keys.
This commit is contained in:
Steven Polley 2024-04-07 21:15:34 -06:00
parent 27c2f28429
commit b95f764fc9

View File

@ -52,7 +52,7 @@ func GeneratePorts(sharedSecret string, t time.Time) (ports [4]uint16, err error
// 2. Save the secret to a file // 2. Save the secret to a file
// 3. Distribute the secret to a client // 3. Distribute the secret to a client
func GenerateSecret() (sharedSecret string, err error) { func GenerateSecret() (sharedSecret string, err error) {
sharedSecretBytes := make([]byte, 20) sharedSecretBytes := make([]byte, 500)
r := rand.Reader r := rand.Reader
_, err = r.Read([]byte(sharedSecretBytes)) _, err = r.Read([]byte(sharedSecretBytes))
if err != nil { if err != nil {