MCPcopy Create free account
hub / github.com/DOSNetwork/core / Sub

Method Sub

group/mod/int.go:217–223  ·  view source on GitHub ↗

Sub sets the target to a - b mod M. Target receives a's modulus.

(a, b kyber.Scalar)

Source from the content-addressed store, hash-verified

215// Sub sets the target to a - b mod M.
216// Target receives a's modulus.
217func (i *Int) Sub(a, b kyber.Scalar) kyber.Scalar {
218 ai := a.(*Int)
219 bi := b.(*Int)
220 i.M = ai.M
221 i.V.Sub(&ai.V, &bi.V).Mod(&i.V, i.M)
222 return i
223}
224
225// Neg sets the target to -a mod M.
226func (i *Int) Neg(a kyber.Scalar) kyber.Scalar {

Callers 5

NegMethod · 0.45
RecoverSecretFunction · 0.45
RecoverPriPolyFunction · 0.45
RecoverCommitFunction · 0.45
onchainLoopMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected