func (s *secret) Neg(x abstract.Secret) abstract.Secret { xs := x.(*secret) if C.BN_mod_sub(s.bignum.bn, s.c.n.bn, xs.bignum.bn, s.c.n.bn, s.c.ctx) == 0 { panic("BN_mod_sub: " + getErrString()) } return s }
func (s *scalar) Sub(x, y abstract.Scalar) abstract.Scalar { xs := x.(*scalar) ys := y.(*scalar) if C.BN_mod_sub(s.bignum.bn, xs.bignum.bn, ys.bignum.bn, s.c.n.bn, s.c.ctx) == 0 { panic("BN_mod_sub: " + getErrString()) } return s }