Commit Graph

83 Commits

Author SHA1 Message Date
Stephen Heumann
e32645eaae Correct a comment. 2023-11-30 18:35:23 -06:00
Stephen Heumann
8469c7744c Implement MD4.
This is an old and insecure hash algorithm, but some things of interest still use it.
2023-11-30 18:35:11 -06:00
Stephen Heumann
c1e1caa766 Implement HMAC-MD5, HMAC-SHA1, and HMAC-SHA256. 2023-11-29 20:03:37 -06:00
Stephen Heumann
4f7c6c0eb8 Fix typos in comments. 2017-11-26 09:25:41 -06:00
Stephen Heumann
95acb9f43f Mention sources of AES test vectors. 2017-11-25 21:27:25 -06:00
Stephen Heumann
eaa0d4865c Add README. 2017-11-25 21:26:13 -06:00
Stephen Heumann
ed65d421fc Add all generated programs and libraries to .gitignore. 2017-11-20 14:59:28 -06:00
Stephen Heumann
05ecf65baf Add LICENSE file. 2017-11-20 14:51:00 -06:00
Stephen Heumann
8050c05a7a Don't call srand unless we're actually randomizing read sizes. 2017-11-19 23:47:30 -06:00
Stephen Heumann
e288a7bc83 Allow checksumming multiple files, and print filenames with the checksums. 2017-11-19 23:41:05 -06:00
Stephen Heumann
0475dbf132 Display error messages where appropriate in checksum utilities. 2017-11-19 23:30:13 -06:00
Stephen Heumann
b5b268982a By default, don't randomize read sizes in checksum programs.
This can still be done by adding a #define, if desired.
2017-11-19 22:48:43 -06:00
Stephen Heumann
df0de0d979 Use a common template for all the file checksum programs. 2017-11-19 22:43:31 -06:00
Stephen Heumann
5c9b2f0877 Build libraries containing the crypto and hash codes.
There are separate libraries for crypto and hashing, lib65816crypto and lib65816hash. The test programs are now built by linking to the libraries.
2017-11-19 22:40:09 -06:00
Stephen Heumann
756ff98a6a Revise makefile to generate object files separately from programs. 2017-11-19 21:07:45 -06:00
Stephen Heumann
8dddba4f6e Work around ORCA/C bug that affects lower optimization levels. 2017-07-05 12:24:37 -05:00
Stephen Heumann
4c0265d921 Work around ORCA/C bug. 2017-07-05 11:44:22 -05:00
Stephen Heumann
5b7c832600 One more tweak to MD5 rotate optimizations. 2017-07-04 14:42:01 -05:00
Stephen Heumann
2f34f006ba Force MD5 tables to be page-aligned, which should save a cycle in some cases. 2017-07-04 14:37:17 -05:00
Stephen Heumann
e90af7c1a4 Small optimization to eliminate some unnecessary loads in MD5. 2017-07-04 14:31:04 -05:00
Stephen Heumann
129f371902 Add zero bytes to optimize some rotates in MD5. 2017-07-04 14:17:51 -05:00
Stephen Heumann
1d1d5251f6 Optimize the operations used for various shift sizes in MD5. 2017-07-04 13:57:01 -05:00
Stephen Heumann
748e0b5c24 Small optimizations for MD5. 2017-07-04 12:39:11 -05:00
Stephen Heumann
0f144df99b Add implementation of MD5 hash function. 2017-07-04 12:15:00 -05:00
Stephen Heumann
015ae8559f Add makefile entries for SHA-256 programs. 2017-07-03 23:58:57 -05:00
Stephen Heumann
1f3d51a5c9 Add sha256sum program. 2017-07-03 23:56:36 -05:00
Stephen Heumann
e7aa261e19 Add update and finalize functions for SHA-256. 2017-07-03 23:53:43 -05:00
Stephen Heumann
458e769212 Add initialization function to permit computation of SHA-224 hashes.
SHA-224 uses the exact same computation as SHA-256, just with different initial values.
2017-07-03 23:40:36 -05:00
Stephen Heumann
11148c78d1 Remove unused macros. 2017-07-03 23:05:51 -05:00
Stephen Heumann
bcc0efc327 Add zero bytes around SHA-256 state variables to optimize rotates. 2017-07-03 22:58:58 -05:00
Stephen Heumann
239024c3ce Remove unneeded instruction. 2017-07-03 20:46:26 -05:00
Stephen Heumann
7034be04fb Use more efficient approach for addressing into k array in SHA-256 computation. 2017-07-03 20:41:53 -05:00
Stephen Heumann
f0f034760b Optimize SHA-256 computations to save instructions in various places. 2017-07-03 20:03:45 -05:00
Stephen Heumann
d2bf9a782e Use shifts when called for, rather than more expensive rotates. 2017-07-03 17:12:13 -05:00
Stephen Heumann
011628d3ce More rotate optimizations for SHA-256. 2017-07-03 15:50:20 -05:00
Stephen Heumann
6891b77fbc Additional small rotate optimizations in SHA-256. 2017-07-03 15:30:46 -05:00
Stephen Heumann
6940f1fef4 Use operations on bytes to rotate by multiples of 8 in SHA-256. 2017-07-03 15:15:18 -05:00
Stephen Heumann
64fc1e62bb Do some optimization of the rotates in SHA-256. 2017-07-03 14:46:46 -05:00
Stephen Heumann
61bc8f8b4f Reduce duplicated code in SHA-256 implementation. 2017-07-03 14:33:17 -05:00
Stephen Heumann
91c107eb98 Add initial implementation of the basic block-processing function for SHA-256. 2017-07-03 14:27:19 -05:00
Stephen Heumann
2c34d17925 Typos 2017-07-02 22:54:18 -05:00
Stephen Heumann
58a3945d53 Add basic makefile. 2017-07-02 20:26:20 -05:00
Stephen Heumann
a04d36eb6c Add copyright notices and comments. 2017-07-02 18:41:21 -05:00
Stephen Heumann
cfadee23bb Add implementation and test for AES CTR mode. 2017-07-02 18:25:43 -05:00
Stephen Heumann
924789510b Optimize AES CBC operations a bit. 2017-07-02 16:24:00 -05:00
Stephen Heumann
6532a3abc4 Add timing tests for AES CBC encryption and decryption. 2017-07-02 15:56:22 -05:00
Stephen Heumann
c8b0fb904b Add .gitignore file. 2017-07-02 15:29:51 -05:00
Stephen Heumann
4e0903a708 Add simple toy program for encrypting/decrypting files with AES. 2017-07-02 15:24:49 -05:00
Stephen Heumann
60a7aec49c Add functions for AES CBC mode encryption and decryption. 2017-07-01 23:29:17 -05:00
Stephen Heumann
0386f928ff Add comments and copyright notices, and rename chunk to block. 2017-07-01 17:53:49 -05:00