Andreas Kling
250c3b363d
Revert "Build: Include headers from LibC, LibM, and LibPthread with -isystem"
...
This reverts commit c1eb744ff0
.
2020-05-20 16:24:26 +02:00
Andrew Kaster
c1eb744ff0
Build: Include headers from LibC, LibM, and LibPthread with -isystem
...
Make sure that userspace is always referencing "system" headers in a way
that would build on target :). This means removing the explicit
include_directories of Libraries/LibC in favor of having it export its
headers as SYSTEM. Also remove a redundant include_directories of
Libraries in the 'serenity build' part of the build script. It's already
set at the top.
This causes issues for the Kernel, and for crt0.o. These special cases
are handled individually.
2020-05-20 08:37:50 +02:00
Andreas Kling
9eaf22090f
test-crypto: Don't put TLSv12 in an OwnPtr as it's ref-counted :)
2020-05-18 20:15:56 +02:00
Linus Groh
325513b20d
Userland: Add missing copyright header to test-crypto.cpp
2020-05-09 23:45:16 +02:00
DexesTTP
d008a38f93
LibCrypto: Small fixes in BigInteger & test-crypto
2020-05-03 14:31:26 +02:00
DexesTTP
8ad48cca29
test-crypto: Display execution time for passing tests
2020-05-03 14:31:26 +02:00
AnotherTest
b394543d3c
Userland: Tweak the tests in test-crypto
...
- Clarify the purpose of "AES | Specialised Encrypt"
- Decouple the TLS test from the host machine
- Add a "test" mode to run all available tests
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
75310003e5
Userland test-crypto: Add interactive mode for the tls 'mode'
...
For all your raw TLS testing needs :^)
2020-05-02 12:24:10 +02:00
AnotherTest
bb46e5f608
LibTLS: Switch to Hash::Manager for hashing and add SHA1
...
Now we can talk to google.com
2020-05-02 12:24:10 +02:00
AnotherTest
e997661e26
LibCrypto: Implement SHA1 Hash Function
2020-05-02 12:24:10 +02:00
AnotherTest
7384d58a0a
Userland: Adapt test-crypto to the new AK::Result API
2020-05-02 12:24:10 +02:00
AnotherTest
2247036acf
LibTLS: Implement a preliminary version of the TLS protocol
...
TLS::TLSv12 is a Core::Socket, however, I think splitting that into a
TLS::Socket would probably be beneficial
2020-05-02 12:24:10 +02:00
AnotherTest
f1578d7e9e
LibCrypto: Fix issues in the Crypto stack
...
This commit fixes up the following:
- HMAC should not reuse a single hasher when successively updating
- AES Key should not assume its user key is valid signed char*
- Mode should have a virtual destructor
And adds a RFC5246 padding mode, which is required for TLS
2020-05-02 12:24:10 +02:00
AnotherTest
7adb93ede9
LibCrypto: Implement RSA in terms of UnsignedBigInteger
...
This commit also adds enough ASN.1/DER to parse RSA keys
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
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