// TODO: the naming is not OK because it also sets committer.committedValue and committer.r
the naming is not OK because it also sets committer.committedValue and committer.r
// TODO : the naming is not OK because it also sets committer . committedValue and committer . r
func (committer *DamgardFujisakiCommitter) GetCommitMsg(a *big.Int) (*big.Int, error) {
	abs := new(big.Int).Abs(a)
	if abs.Cmp(committer.T) != -1 {
		return nil, fmt.Errorf("committed value needs to be in (-T, T)")
	}
	exp := big.NewInt(int64(committer.B + committer.K))
	boundary := new(big.Int).Exp(big.NewInt(2), exp, nil)
	r := common.GetRandomInt(boundary)
	c := committer.ComputeCommit(a, r)
	committer.committedValue = a
	committer.r = r
	return c, nil
}
func ( committer * DamgardFujisakiCommitter ) GetCommitMsg ( a * big . Int ) ( * big . Int , error ) { abs := new ( big . Int ) . Abs ( a ) if abs . Cmp ( committer . T ) != - 1 { return nil , fmt . Errorf ( " " ) } exp := big . NewInt ( int64 ( committer . B + committer . K ) ) boundary := new ( big . Int ) . Exp ( big . NewInt ( 2 ) , exp , nil ) r := common . GetRandomInt ( boundary ) c := committer . ComputeCommit ( a , r ) committer . committedValue = a committer . r = r return c , nil }
the naming is not OK because it also sets committer.committedValue and committer.r
the naming is not OK because it also sets committer . committedValue and committer . r
// c = G^a * H^r % group.N // choose r from 2^(B + k)