mirror of
https://github.com/arnaucube/go-iden3-crypto.git
synced 2026-02-07 11:36:41 +01:00
Remove unnecessary lines
This commit is contained in:
@@ -178,7 +178,6 @@ func (z *Element) IsZero() bool {
|
|||||||
|
|
||||||
// IsUint64 returns true if z[0] >= 0 and all other words are 0
|
// IsUint64 returns true if z[0] >= 0 and all other words are 0
|
||||||
func (z *Element) IsUint64() bool {
|
func (z *Element) IsUint64() bool {
|
||||||
// return () == 0
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,7 +336,6 @@ func _mulGeneric(z, x, y *Element) {
|
|||||||
// if z > q --> z -= q
|
// if z > q --> z -= q
|
||||||
// note: this is NOT constant time
|
// note: this is NOT constant time
|
||||||
if !(z[0] < 18446744069414584321) {
|
if !(z[0] < 18446744069414584321) {
|
||||||
// var b uint64
|
|
||||||
z[0], _ = bits.Sub64(z[0], 18446744069414584321, 0)
|
z[0], _ = bits.Sub64(z[0], 18446744069414584321, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -355,7 +353,6 @@ func _fromMontGeneric(z *Element) {
|
|||||||
// if z > q --> z -= q
|
// if z > q --> z -= q
|
||||||
// note: this is NOT constant time
|
// note: this is NOT constant time
|
||||||
if !(z[0] < 18446744069414584321) {
|
if !(z[0] < 18446744069414584321) {
|
||||||
// var b uint64
|
|
||||||
z[0], _ = bits.Sub64(z[0], 18446744069414584321, 0)
|
z[0], _ = bits.Sub64(z[0], 18446744069414584321, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -375,7 +372,6 @@ func _addGeneric(z, x, y *Element) {
|
|||||||
// if z > q --> z -= q
|
// if z > q --> z -= q
|
||||||
// note: this is NOT constant time
|
// note: this is NOT constant time
|
||||||
if !(z[0] < 18446744069414584321) {
|
if !(z[0] < 18446744069414584321) {
|
||||||
// var b uint64
|
|
||||||
z[0], _ = bits.Sub64(z[0], 18446744069414584321, 0)
|
z[0], _ = bits.Sub64(z[0], 18446744069414584321, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -395,7 +391,6 @@ func _doubleGeneric(z, x *Element) {
|
|||||||
// if z > q --> z -= q
|
// if z > q --> z -= q
|
||||||
// note: this is NOT constant time
|
// note: this is NOT constant time
|
||||||
if !(z[0] < 18446744069414584321) {
|
if !(z[0] < 18446744069414584321) {
|
||||||
// var b uint64
|
|
||||||
z[0], _ = bits.Sub64(z[0], 18446744069414584321, 0)
|
z[0], _ = bits.Sub64(z[0], 18446744069414584321, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -414,7 +409,6 @@ func _negGeneric(z, x *Element) {
|
|||||||
z.SetZero()
|
z.SetZero()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// var borrow uint64
|
|
||||||
z[0], _ = bits.Sub64(18446744069414584321, x[0], 0)
|
z[0], _ = bits.Sub64(18446744069414584321, x[0], 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,7 +417,6 @@ func _reduceGeneric(z *Element) {
|
|||||||
// if z > q --> z -= q
|
// if z > q --> z -= q
|
||||||
// note: this is NOT constant time
|
// note: this is NOT constant time
|
||||||
if !(z[0] < 18446744069414584321) {
|
if !(z[0] < 18446744069414584321) {
|
||||||
// var b uint64
|
|
||||||
z[0], _ = bits.Sub64(z[0], 18446744069414584321, 0)
|
z[0], _ = bits.Sub64(z[0], 18446744069414584321, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user