Commit graph

24 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
93af184693 Remove unused struct member. 2017-03-21 13:24:46 +01:00
Dag-Erling Smørgrav
c32bf05135 Assert that the cipher mode and key length are valid. 2017-03-19 15:20:32 +01:00
Dag-Erling Smørgrav
bf0016a888 Implement double- and triple-DES.
Single-DES is now a special case of triple-DES with all three keys being the same.  This is significantly slower than a pure single-DES implementation, but that's fine since nobody should be using it anyway.
2017-03-19 14:32:12 +01:00
Dag-Erling Smørgrav
0d5f51697e Slight cleanup of the DES code. 2017-03-19 13:12:20 +01:00
Dag-Erling Smørgrav
548bf31631 Implement DES (single-key ECB only for now). 2017-03-18 17:12:16 +01:00
Dag-Erling Smørgrav
371d519169 Implement the Salsa family of stream ciphers.
Note that we only have unit tests for Salsa20.
2017-03-18 14:42:26 +01:00
Dag-Erling Smørgrav
b67f0dbf00 Implement the ChaCha family of stream ciphers. 2017-03-16 18:02:56 +01:00
Dag-Erling Smørgrav
1ca9e1928e Misc cleanup after API change. 2017-03-16 18:00:09 +01:00
Dag-Erling Smørgrav
1073dceed9 Second iteration of the cryb-cipher API.
We now have separate encryption and decryption methods, and can process an arbitrary amount of plaintext or ciphertext per call, rounded down to the block size (if applicable).  For stream ciphers, we also have a keystream method which fills the provided buffer with an arbitrary amount of keystream (once again, rounded down if applicable).
2017-03-16 15:09:34 +01:00
Dag-Erling Smørgrav
fbf69f31cb Start using pkg-config / pkgconf. 2017-03-07 00:54:46 +01:00
Dag-Erling Smørgrav
d419d7388a Remove an unnecessary pointer from struct aes_ctx.
The rk pointer in struct aes_ctx always pointed to the context's buffer and served no purpose whatsoever, but the compiler had no way of knowing that and could therefore not optimize away assignments to and from it.

Note that the removal of rk breaks the ABI, since it changes the size of struct aes_ctx, but we allow ourselves that because neither the API nor the ABI have been fixed yet.
2017-03-03 23:49:00 +01:00
Dag-Erling Smørgrav
f70dac496f Mechanically bump copyright dates to the date of the latest commit. 2017-02-19 20:07:43 +01:00
Dag-Erling Smørgrav
f612ea1b14 Add dependencies on libcryb-core to all other libraries, as already enforced in the configure script. 2016-11-14 12:59:13 +01:00
Dag-Erling Smørgrav
dc43296a47 Centralize most of .gitignore. 2016-09-17 21:38:54 +02:00
Dag-Erling Smørgrav
06a757e878 Big reorganization and cleanup 2016-09-04 14:56:39 +02:00
Dag-Erling Smørgrav
4d7893004c Prepare for moving to Github 2015-12-14 15:55:38 +01:00
Dag-Erling Smørgrav
f8ebdbc14d Move the test framework into its own subdirectory 2015-10-04 07:49:48 +00:00
Dag-Erling Smørgrav
ab8f712584 Correctly register AES192 and AES256 2015-10-04 07:19:52 +00:00
Dag-Erling Smørgrav
476c9f27f7 Use our own endianness conversion macros. 2015-10-04 07:07:53 +00:00
Dag-Erling Smørgrav
03bd9ea902 Code cleanup 2015-10-03 15:33:47 +00:00
Dag-Erling Smørgrav
dd466ab29b Move some code around 2015-10-03 14:47:59 +00:00
Dag-Erling Smørgrav
023ec74be2 Implement cipher algorithm list and rename some files. 2015-10-03 14:44:59 +00:00
Dag-Erling Smørgrav
a9e733f0ca Use an enum for encrypt / decrypt + minor cleanup 2015-10-03 14:43:33 +00:00
Dag-Erling Smørgrav
dd18cd2995 Kick off libcryb-cipher with AES (from XySSL) and RC4 (my own). 2015-10-03 14:24:59 +00:00