VYPR
Moderate severityNVD Advisory· Published Jan 7, 2023· Updated Aug 6, 2024

agnivade easy-scrypt scrypt.go VerifyPassphrase timing discrepancy

CVE-2014-125055

Description

A vulnerability, which was classified as problematic, was found in agnivade easy-scrypt. Affected is the function VerifyPassphrase of the file scrypt.go. The manipulation leads to observable timing discrepancy. The complexity of an attack is rather high. The exploitability is told to be difficult. Upgrading to version 1.0.0 is able to address this issue. The name of the patch is 477c10cf3b144ddf96526aa09f5fdea613f21812. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-217596.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/agnivade/easy-scryptGo
< 1.0.01.0.0

Affected products

1

Patches

1
477c10cf3b14

Preventing timing attacks

https://github.com/agnivade/easy-scryptAgniva De SarkerOct 7, 2014via ghsa
1 file changed · +7 2
  • scrypt.go+7 2 modified
    @@ -4,6 +4,7 @@ import (
     	"bytes"
     	"crypto/rand"
     	"crypto/sha256"
    +	"crypto/subtle"
     	"encoding/binary"
     	"log"
     
    @@ -117,8 +118,12 @@ func VerifyPassphrase(passphrase string, keylen_bytes int, target_key []byte) (r
     	}
     	source_hash := hash_digest.Sum(nil)
     
    -	result = bytes.Equal(source_master_key, target_master_key) &&
    -		bytes.Equal(target_hash, source_hash)
    +	// ConstantTimeCompare returns ints. Converting it to bool
    +	key_comp := subtle.ConstantTimeCompare(source_master_key,
    +		target_master_key) != 0
    +	hash_comp := subtle.ConstantTimeCompare(target_hash,
    +		source_hash) != 0
    +	result = key_comp && hash_comp
     	return
     }
     
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

6

News mentions

0

No linked articles in our index yet.