Authentication with HMAC SHA256 (or MD5) hash
See original GitHub issueIs your feature request related to a problem? Please describe. I want a shortcut to make some very personal stuff, so it has to be guaranteed secure. The only way I see how to implement it is to use HMAC SHA256 (or MD5) hash based authentication procedure, like most of crypto-exchanges do. The goal is to have a at least one secret key which is never-ever-ever sent but affects any outgoing request. So it will make requests invulnerable to attack MITM.
Describe the solution you’d like Example implementation:
- user provides a pair of keys, f.e.
{ api_key, passphrase }
API-KEY
header is set withapi_key
valueAPI-EXPIRES
header is set on request, f.e. 10 seconds from now in some format. request would be rejected if it will be processed after that time.API-SIGNATURE
header is set with kindahex(HMAC(passphrase).SHA256(api_key + expires + request.method + request.path + data))
Describe alternatives you’ve considered
The alternative solution is to add MD5
and/or SHA256
hashing methods to the scripting engine.
Additional context HMAC on Wikipedia Detailed description of this method
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
What Is HMAC And How Does It Secure File Transfers?
HMAC stands for Keyed-Hashing for Message Authentication. ... hash function (like MD5, SHA1, and SHA256) over the data (to be authenticated) ...
Read more >HMAC
In cryptography, an HMAC is a specific type of message authentication code (MAC) involving a cryptographic hash function and a secret cryptographic key....
Read more >HMAC (Hash-Based Message Authentication Codes) ...
Hash -based message authentication code (or HMAC) is a cryptographic authentication technique that uses a hash function and a secret key.
Read more >HMAC explained | keyed hash message authentication code
Keyed- Hash Message Authentication Code ( HMAC ). Vidder, Inc. Vidder, Inc. •.
Read more >API HMAC Authentication
HMAC (hash-based message authentication code) is used to verify that a request is coming from an expected source and that the request has...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In the upcoming version 2.3.0, I’m adding the
hmac
function, which can be used to compute the HMAC of a given message through scripting, e.g.hmac('sha-256', 'my-key', 'my message')
That is awesome! Thank you!