summaryrefslogtreecommitdiff
path: root/libtac/lib/crypt.c
AgeCommit message (Collapse)Author
2016-10-17Fix regression introduced when doing incremental encryptionPhilip Prindeville
Wrong subscript (subscript of digest should always be modulo digest size [16 bytes]).
2016-10-05Merge pull request #65 from pprindeville/simplify-md5-operationsPaweł Krawczyk
Various cryptography improvements
2016-10-04Make TACDEBUG and TACSYSLOG into varargs macrosPhilip Prindeville
Also, correct the -DTACDEBUG_AT_RUNTIME scenario so that TACDEBUG() binds correct when used in an if-body with an else following it, e.g.: if (test) TACDEBUG(LOG_DEBUG, "test is true"); else return; would previously have ended up as expanding to: if (test) if (tac_debug_enable) logmsg(LOG_DEBUG, "test is true"); else return; with the indent redone to reflect the nesting correctly. This now expands (correctly) to: if (test) do { if (tac_debug_enable) logmsg(LOG_DEBUG, "test is true"); } while (0); else return;
2016-10-04Don't compute pad all at once when we can compute it incrementallyPhilip Prindeville
This saves us having to marshall data and allocate a buffer for the entire pad (bitstream cipher). We only need it in blocks of 16 bytes (the size of the MD5 digest), so let's compute it piecemeal as we need it. This has the added benefit of avoiding any calls to malloc() which might be result in system calls (i.e. sbrk() to extend the heap).
2016-10-04No need to pass in payload length when the header already includes itPhilip Prindeville
Why make copies of the payload length to pass as parameters when it's already present in the header?
2016-10-04Avoid unnecessary marshalling when computing Tacacs padPhilip Prindeville
MD5Update supports incremental digesting, so we can invoke it multiple times to collect data rather than having to marshall it into a contiguous buffer.
2016-05-03use OpenSSL for MD5 and random numbersPaweł Krawczyk
2013-04-28/dev/urandom improvements, thanks Walter. Fixed active_server checkJeroen Nijhof
2012-09-16Rearrange header file include for libtacJeroen Nijhof
2012-06-12Handle attributes which contains no valueJeroen Nijhof
2012-03-18Changed e-mail and improved accountingJeroen Nijhof
2011-08-19Finally got rid of all goto illness!Jeroen
2011-08-19Major contribution by Darren BeslerJeroen
2010-12-22Initial commitJeroen Nijhof