Browse Source

Tampered amount sending bug fix.

master
Captain Dero 1 year ago
parent
commit
29880ae0a1
2 changed files with 10 additions and 3 deletions
  1. +1
    -1
      config/version.go
  2. +9
    -2
      crypto/ringct/ringct_simple.go

+ 1
- 1
config/version.go View File

@@ -20,4 +20,4 @@ import "github.com/blang/semver"

// right now it has to be manually changed
// do we need to include git commitsha??
var Version = semver.MustParse("3.0.2-0.Testnet.Stargate+05012019")
var Version = semver.MustParse("3.0.3-0.Testnet.Stargate+17012019")

+ 9
- 2
crypto/ringct/ringct_simple.go View File

@@ -202,8 +202,15 @@ func (r *RctSig) Gen_RingCT_Simple_BulletProof(Message crypto.Hash, inputs []Inp

// create tuple and encrypt it, then add it the signature
tuple := ECdhTuple{Mask: secret_mask, Amount: *d2h(outputs[i].Amount)}
ecdhEncode(&tuple, outputs[i].Scalar_Key)

var zero crypto.Key
if outputs[i].Public_View_Key == zero && outputs[i].Public_Spend_Key == zero {
// NOTE: we do NOT encrypt secret_mask and amount, if the amount it go to SC_TX
}else{
ecdhEncode(&tuple, outputs[i].Scalar_Key)
}

r.ECdhInfo = append(r.ECdhInfo, tuple) // add encrypted tuple to signature
}



Loading…
Cancel
Save