-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpcserver: Hash auth using random-keyed MAC
This commit replaces the SHA256 hash of the HTTP Basic Authorization header with HMAC-SHA256. The MAC is performed using a random key read from the cryptographically random source at server creation. Storing the authentication details with a MAC unique to each startup hardens the server against certain classes of memory dumping attacks. While here, a server field that must be accessed atomically was moved to the top of the structure, to reduce the likelihood of misaligned access on architectures where that is forbidden.
- Loading branch information
Showing
1 changed file
with
32 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters