AnotherTest
c9321b4f00
LibCrypto: Make UnsignedBigInteger as fast as architecturally possible
...
This commit attempts to make UnsignedBigInteger as fast as possible
without changing the underlaying architecture.
This effort involves
- Preallocating space for vector operations
- Avoiding calls to computationally expensive functions
- Inlining or flattening functions (sensibly)
2020-05-02 12:24:10 +02:00
AnotherTest
adab43987d
LibCrypto: Rename UnsignedBigInteger APIs to match their actions
2020-05-02 12:24:10 +02:00
AnotherTest
8d20a526e5
LibCrypto: Preallocate 128 words of space for UnsignedBigInteger
...
This shaves off 1 second of runtime
2020-05-02 12:24:10 +02:00
AnotherTest
6b742c69bd
LibCrypto: Add ::import_data() and ::export_data() to UnsignedBigInteger
...
These functions allow conversion to-and-from big-endian buffers
This commit also adds a ""_bigint operator for easy bigint use
2020-05-02 12:24:10 +02:00
Itamar
c52d3e65b9
LibCrypto: Cleanup UnsignedBigInteger a bit
...
- Add missing 'explicit' to the constructor
- Remove unneeded 'AK::' in AK::Vector
- Avoid copying 'words' in constructor
2020-05-02 12:24:10 +02:00
Itamar
2125a4debb
LibCrypto: Add base-10 string de/serialization methods for bigint
2020-05-02 12:24:10 +02:00
Itamar
0d2777752e
LibCrypto: Add UnsignedBigInteger division
...
The division operation returns both the quotient and the remainder.
2020-05-02 12:24:10 +02:00
Itamar
2959c4a5e9
LibCrypto: Add UnsignedBigInteger multiplication
...
Also added documentation for the runtime complexity of some operations.
2020-05-02 12:24:10 +02:00
Itamar
e0cf40518c
LibCrypto: Add UnsignedBigInteger subtraction and comparison
2020-05-02 12:24:10 +02:00
Itamar
6201f741d4
LibCrypto: Add UnsignedBigInteger and implement addition
...
UnsignedBigInteger stores an unsigned ainteger of arbitrary length.
A big integer is represented as a vector of word. Each
word is an unsigned int.
2020-05-02 12:24:10 +02:00