Skip to content

Commit 8146a64

Browse files
committed
Fix format
1 parent 9751c3a commit 8146a64

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

common/constant_time.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ func IsConstantTimeEnabled() bool {
5151
// 2. The same code used internally by crypto/rsa and crypto/ecdsa
5252
// 3. Highly optimized with architecture-specific assembly
5353
type CTModInt struct {
54-
mod *bigmod.Modulus
55-
modBigInt *big.Int
54+
mod *bigmod.Modulus
55+
modBigInt *big.Int
5656
inverseExp []byte // Exponent for modular inverse: p-2 (prime) or phi(n)-1 (composite)
57-
byteLen int
58-
bytePool sync.Pool
57+
byteLen int
58+
bytePool sync.Pool
5959
}
6060

6161
// NewCTModInt creates a constant-time modular context using bigmod.
@@ -76,7 +76,7 @@ func NewCTModInt(mod *big.Int) *CTModInt {
7676
mod: m,
7777
modBigInt: new(big.Int).Set(mod),
7878
inverseExp: modMinusTwo.Bytes(),
79-
byteLen: byteLen,
79+
byteLen: byteLen,
8080
bytePool: sync.Pool{
8181
New: func() interface{} {
8282
return make([]byte, byteLen)
@@ -206,10 +206,10 @@ func NewCTModIntWithPhi(mod, phiN *big.Int) *CTModInt {
206206

207207
byteLen := len(modBytes)
208208
return &CTModInt{
209-
mod: m,
210-
modBigInt: new(big.Int).Set(mod),
209+
mod: m,
210+
modBigInt: new(big.Int).Set(mod),
211211
inverseExp: phiMinusOne.Bytes(), // Use phi(n)-1 instead of n-2
212-
byteLen: byteLen,
212+
byteLen: byteLen,
213213
bytePool: sync.Pool{
214214
New: func() interface{} {
215215
return make([]byte, byteLen)

crypto/paillier/paillier.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type (
5050
P, Q *big.Int
5151

5252
// cached M = N^(-1) mod PhiN, lazily computed
53-
m *big.Int
53+
m *big.Int
5454
mOnce sync.Once
5555
}
5656

0 commit comments

Comments
 (0)