diff --git a/internal/age/scrypt.go b/internal/age/scrypt.go index 41ac483e..89789b4a 100644 --- a/internal/age/scrypt.go +++ b/internal/age/scrypt.go @@ -17,6 +17,8 @@ import ( "golang.org/x/crypto/scrypt" ) +const scryptLabel = "age-encryption.org/v1/scrypt" + type ScryptRecipient struct { password []byte workFactor int @@ -59,6 +61,7 @@ func (r *ScryptRecipient) Wrap(fileKey []byte) (*format.Recipient, error) { Args: []string{format.EncodeToString(salt), strconv.Itoa(logN)}, } + salt = append([]byte(scryptLabel), salt...) k, err := scrypt.Key(r.password, salt, 1<