You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading the crypto related package in vocdoni-node repository, I realized that in the file saltedkey.go is using deprecated Curve methods described as low-level unsafe API :
ScalarBaseMult : Deprecated
Used in:
// SaltBlindPubKey returns the salted blind public key of pubKey applying the salt.funcSaltBlindPubKey(pubKey*blind.PublicKey, salt []byte) (*blind.PublicKey, error) {
iflen(salt) <SaltSize {
returnnil, fmt.Errorf("provided salt is not large enough (need %d bytes)", SaltSize)
}
ifpubKey==nil {
returnnil, fmt.Errorf("public key is nil")
}
varsalt2 [SaltSize]bytecopy(salt2[:], salt[:SaltSize])
x, y:=ethcrypto.S256().ScalarBaseMult(salt2[:])
s:= blind.Point{
X: x,
Y: y,
}
return (*blind.PublicKey)(pubKey.Point().Add(&s)), nil
}
// SaltECDSAPubKey returns the salted plain public key of pubKey applying the salt.funcSaltECDSAPubKey(pubKey*ecdsa.PublicKey, salt []byte) (*ecdsa.PublicKey, error) {
iflen(salt) <SaltSize {
returnnil, fmt.Errorf("provided salt is not large enough (need %d bytes)", SaltSize)
}
ifpubKey==nil {
returnnil, fmt.Errorf("public key is nil")
}
varsalt2 [SaltSize]bytecopy(salt2[:], salt[:SaltSize])
x, y:=pubKey.Curve.ScalarBaseMult(salt2[:])
pubKey.X, pubKey.Y=pubKey.Curve.Add(pubKey.X, pubKey.Y, x, y)
returnpubKey, nil
}
Also, the Curve method Add is Deprecated and this is a low-level unsafe API.
I assume that this could be a breaking change.
The text was updated successfully, but these errors were encountered:
Reading the crypto related package in vocdoni-node repository, I realized that in the file
saltedkey.go
is using deprecated Curve methods described as low-level unsafe API :ScalarBaseMult
: DeprecatedUsed in:
Also, the Curve method
Add
is Deprecated and this is a low-level unsafe API.I assume that this could be a breaking change.
The text was updated successfully, but these errors were encountered: