Used to initialize the crypto library at runtime.
Used to initialize the crypto library at runtime. The version is checked and all functions are mapped.
Used for debugging object loading
NOTE: this is a single, global shared library for the entire server's crypto needs
NOTE: this is a single, global shared library for the entire server's crypto needs
Unfortunately, access to this object didn't used to be synchronized. I noticed that
tests for this module were hanging ("arrive at a shared secret" & "must fail to agree on
a secret..."). This heisenbug was responsible for failed Travis test runs and developer
issues as well. Using Windows minidumps, I tracked the issue to a single thread deep in
pscrypto.dll. It appeared to be executing an EB FE instruction (on Intel x86 this is
jmp $-2
or jump to self), which is an infinite loop. The stack trace made little to no
sense and after banging my head on the wall for many hours, I assumed that something deep
in CryptoPP, the libgcc libraries, or MSVC++ was the cause (or myself). Now all access to
pscrypto functions that allocate and deallocate memory (DH_Start, RC5_Init) are synchronized.
This *appears* to have fixed the problem.
Checks if two Message Authentication Codes are the same in constant time, preventing a timing attack for MAC forgery
Checks if two Message Authentication Codes are the same in constant time, preventing a timing attack for MAC forgery
A MAC value
Another MAC value