Skip to content

Commit bb688cf

Browse files
committed
tpke: fix Vandermonde method naming
1 parent b91ecb4 commit bb688cf

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

antimev/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func getScaler(size int, threshold int) int {
3434
// searchDLCM tries to find a minimum value of scaler for the given matrix.
3535
func searchDLCM(matrix [][]int, l, pos, offset, size, threshold int) int {
3636
if pos == threshold {
37-
d, coeff := tpke.Feldman(matrix)
37+
d, coeff := tpke.Vandermonde(matrix)
3838
g := d
3939
for i := 0; i < len(coeff); i++ {
4040
g = gcd(g, coeff[i])

crypto/tpke/encryption.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ type workerResult struct {
124124
}
125125

126126
// AggregateAndDecrypt tries to aggregate DecryptionShares and decrypts CipherTexts with verification
127-
// This method takes a batch of ordered CipherTexts, DecryptionShares and a matrix for Feldman
127+
// This method takes a batch of ordered CipherTexts, DecryptionShares and a matrix for Vandermonde
128128
// The size of DecryptionShare array should be len(message)*len(ciphertext)
129129
// Each row of the input matrix should be [1, i, i^2, ..., i^(threshold-1)], i is the dkg key index
130130
// The message amount should be larger than threshold, otherwise the result will be wrong
@@ -139,7 +139,7 @@ func AggregateAndDecrypt(cts []*CipherText, matrix [][]int, shares [][]*Decrypti
139139
}
140140

141141
// Be aware of the integer overflow when the size and threshold of tpke grow big
142-
d, coeff := Feldman(matrix)
142+
d, coeff := Vandermonde(matrix)
143143
d = scaler / d
144144
results := make([]*bls12381.G1Affine, len(cts))
145145
// Compute M=C-d1/d

crypto/tpke/signature.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (s *SignatureShare) Bytes() []byte {
8686
}
8787

8888
// AggregateSigShares tries to aggregate SignatureShare to a BLS signature.
89-
// This method takes a slice of [SignatureShare] and a matrix for Feldman.
89+
// This method takes a slice of [SignatureShare] and a matrix for Vandermonde.
9090
// The size of [SignatureShare] slice should be equal to len(message).
9191
// Each row of the input matrix should be [1, i, i^2, ..., i^(threshold-1)], where i
9292
// is the dkg key index. The message amount should be larger than threshold,
@@ -96,7 +96,7 @@ func AggregateSigShares(matrix [][]int, shares []*SignatureShare, scaler int) (*
9696
return nil, ErrTPKELengthMismatch
9797
}
9898
// Be aware of the integer overflow when the size and threshold grow big
99-
d, coeff := Feldman(matrix)
99+
d, coeff := Vandermonde(matrix)
100100
d = scaler / d
101101
// Compute d1
102102
denominator := big.NewInt(int64(abs(d)))

crypto/tpke/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func polyAdd(p1 []*big.Int, p2 []*big.Int) []*big.Int {
207207
}
208208
}
209209

210-
func Feldman(matrix [][]int) (int, []int) {
210+
func Vandermonde(matrix [][]int) (int, []int) {
211211
// Compute D, D1
212212
d, coeff := determinant(matrix, len(matrix))
213213
g := d

0 commit comments

Comments
 (0)