mirror of
https://github.com/status-im/constantine.git
synced 2025-02-23 17:38:09 +00:00
Remove specialization for static big int. They will be stored in the binary bss section and passed as ptr + length to save on codesize anyway.
This commit is contained in:
parent
5dc97927c5
commit
8229bf384b
@ -94,11 +94,6 @@ func add*[bits](a: var BigInt[bits], b: BigInt[bits], ctl: CTBool[Word]): CTBool
|
||||
## Returns the "carry flag"
|
||||
result.addImpl(a, b, ctl)
|
||||
|
||||
func add*[bits](a: var BigInt[bits], b: static BigInt[bits], ctl: CTBool[Word]): CTBool[Word] =
|
||||
## Constant-time big integer in-place addition
|
||||
## Returns the "carry flag". Specialization for B being a compile-time constant (usually a modulus).
|
||||
result.addImpl(a, b, ctl)
|
||||
|
||||
template subImpl[bits](result: CTBool[Word], a: var BigInt[bits], b: BigInt[bits], ctl: CTBool[Word]) =
|
||||
## Constant-time big integer in-place substraction
|
||||
## Returns the "borrow flag"
|
||||
@ -111,8 +106,3 @@ func sub*[bits](a: var BigInt[bits], b: BigInt[bits], ctl: CTBool[Word]): CTBool
|
||||
## Constant-time big integer in-place addition
|
||||
## Returns the "carry flag"
|
||||
result.subImpl(a, b, ctl)
|
||||
|
||||
func sub*[bits](a: var BigInt[bits], b: static BigInt[bits], ctl: CTBool[Word]): CTBool[Word] =
|
||||
## Constant-time big integer in-place addition
|
||||
## Returns the "carry flag". Specialization for B being a compile-time constant (usually a modulus).
|
||||
result.subImpl(a, b, ctl)
|
||||
|
Loading…
x
Reference in New Issue
Block a user