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
2125a4debb
LibCrypto: Add base-10 string de/serialization methods for bigint
2020-05-02 12:24:10 +02:00
Itamar
709c691f38
LibCrypto: Fix bug in big int subtraction
...
A regression test was added to the suite.
This commit also generally simplifies the subtraction method.
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
2843dce498
LibCrypto: Fix a bug in big int addition
...
There was a bug when dealing with a carry when the addition
result for the current word was UINT32_MAX.
This commit also adds a regression test for the bug.
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
AnotherTest
8c645916b4
LibCrypto: Add SHA512
...
There is quite a bit of avoidable duplication, however, I could not get
the compiler to be happy about SHA2<Size> (see FIXMEs)
2020-05-02 12:24:10 +02:00
AnotherTest
ca097b093b
LibCrypto: Add SHA256 hash function
2020-05-02 12:24:10 +02:00
AnotherTest
f2cd004d11
LibCrypto: Implement HMAC
2020-05-02 12:24:10 +02:00
AnotherTest
4f89a377a4
LibCrypto: Move each subsection into its own namespace
2020-05-02 12:24:10 +02:00
AnotherTest
96dd7c2996
Userland: Add MD5 tests to test-crypto
...
This commit also reworks the test program to have a better interface:
`test-crypto <mode> [options]`
where each mode has its own default suite
2020-05-02 12:24:10 +02:00
AnotherTest
899ca245ae
LibCrypto: Implement Cipher and AES_CBC
...
Also adds a test program to userland
2020-05-02 12:24:10 +02:00