Skip to content

Commit 2479067

Browse files
committed
randomizing two bits on the client see PR #39 and issue #38
1 parent 9cad01b commit 2479067

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

tapdance/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,6 @@ func generateEligatorTransformedKey(stationPubkey []byte) ([]byte, []byte, error
206206
if err != nil {
207207
return nil, nil, err
208208
}
209-
representative[31] |= (0x80 & randByte[0])
209+
representative[31] |= (0xC0 & randByte[0])
210210
return sharedSecret[:], representative[:], nil
211211
}

tapdance/utils_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,6 @@ func (rt *randomnessChecker) testInRange(min, max int) error {
163163
numSamples := rt.getNumSamples()
164164
for i := 0; i < numSamples; i++ {
165165

166-
if i == 254 {
167-
continue
168-
}
169-
170166
if rt.bitCounts[i] < min || rt.bitCounts[i] > max {
171167
return errors.New(fmt.Sprintf("Expected: bit #%v is set %v - %v times"+
172168
" out of %v samples. Got: bit is set %v times.",

0 commit comments

Comments
 (0)