a method for constructing a message authentication code based on a cryptographic hash function.

learn more… | top users | synonyms

0
votes
0answers
23 views

Data Model for a Tokenizing Data Storage System

Hashing Strategy for a Tokenizing Data Storage System We are designing the data model (storage at rest, in a database) for a PCI compliant data storage system using Amazon Web Services (AWS) and ...
3
votes
1answer
52 views

Is secret key for HMAC in form of UTF8 characters good enough?

There is a popular JWT library on nuget. I am analyzing an application that uses that library and it stores a secret key as a string. In the code of the library I see that it uses the MS HMACSHA256 ...
0
votes
1answer
25 views

Why is HMAC truncated in IPsec?

I'm having a look at IPsec standard and I realized that integrity and data authentication check is based on 96-bit truncated version of HMAC algorithms. For example, in IPsec v3 we can use ...
2
votes
1answer
46 views

Why include the host in the signature of the Amazon HMAC scheme?

The Amazon's HMAC schemes includes the hash of the canonical request in the string to sign in order to create the signature, and the canonical request in turn includes the host. What is the security ...
6
votes
2answers
69 views

HMAC with or without data encryption?

I'm in the process of developing a system that periodically transmits a small amount of data (16/18 bytes), where the only part that will change is a 4 byte counter that will increment for each ...
8
votes
3answers
1k views

What are requirements for HMAC secret key?

I'm creating HTTP REST service which will be available over tls only. For authentication purposes I plan to generate JWT token for every user using HMAC HS256. I need a secret key for HMAC. What are ...
3
votes
1answer
53 views

Proper secret key management

Right now, I'm thinking that for all incoming requests, my server will check the token of the request against the token constructed from my app's global secret key for authenticity. The only way for ...
3
votes
1answer
43 views

How and when is a MAC sent across during a TLS connection?

I have been trying to get my head around the MAC part of the TLS connection as both the key exchange and cipher seem to make sense. As far as I understand the MAC is used to ensure that the ...
16
votes
1answer
1k views

FIDO, U2F Compatibility

I've been following the FIDO standard (a consumer-friendly public-key system similar to SSH key pairs) and it appears that it's close to being complete: both Google and PayPal have been testing it ...
-3
votes
2answers
74 views

Client certificate vs HMAC

My team is working on web API project for one customer which will call this API. Now we are thinking about authentication. We've stopped on two options HMAC and client certificates HMAC: pros - no ...
3
votes
0answers
23 views

how to create TPM_AUTHDATA as input in tpm commands ?

I'm writing my first program which use tpm (version 1.2) services in Windows 7 using TBS, in this program I'm trying to execute the TPM_CreateWrapKey command. I noticed that many commands like the ...
1
vote
1answer
31 views

Is D parameter of the RSA strong enough to be used as secret for HMAC calculation?

Short question: Is the D parameter of the RSA alghorithm crypthographically strong enough to be used as a secret key for generating SHA-256 hash value? Long question: I'm working on windows platform. ...
2
votes
0answers
32 views

cracking krb5 passwords (des3-hmac-sha1 and des-cbc-crc )

I'm trying to audit kerberos passwords. The available formats are des3-hmac-sha1 and des-cbc-crc but I cannot find a possibility/a tool to crack them. For other hash-types I used John the Ripper, but ...
2
votes
1answer
867 views

What is a AUTH-KEY in the security of the computers?

I'm studying security in computers and in particular the URL Spoofing. I understand that a form of URL spoofing is phishing. Then I read that a countermeasure against phishing is the authentication ...
108
votes
6answers
42k views

Password Hashing add salt + pepper or is salt enough?

Please Note: I'm aware that the proper method for secure password storage hashing is either scrypt or bcrypt. This question isn't for implementation in actual software, it's for my own understanding. ...
0
votes
2answers
90 views

should I add a sha256 signature to an AES_256_CBC encrypted token?

currently I generate a token for an mobile app the way below. I decrypt the token to process the request and assess the user is logged in. I'm on TLS RSA 2048 bits connection. I was wondering if ...
1
vote
2answers
53 views

does validating MAC of individual packets validates the integrity of whole file?

When transferring a large file over network, its likely that the file is broken into packets and then transferred. The underlying network protocol, lets consider the case of TLS/SSL, it generates MACs ...
2
votes
3answers
3k views

Proper hash_hmac key creation

I'm looking for, but unable to find, some definitive information on how long to make the secret and what characters are useable in creating a HMAC signature in PHP using SHA256. I found some ...
5
votes
2answers
815 views

HOTP with as HMAC hashing algoritme a hash from the SHA-2 family

I'm looking into using a OTP solution. HOTP is a OTP solution that is based on a HMAC with as hashing algorithm SHA-1. The standards defines it this way. But... SHA1 (as we know) has been a ...
4
votes
3answers
239 views

Question regarding MAC and encryption

I was reading the chosen answer to the following question - "MAC vs Encryption" They say that just using encryption, "an attacker could alter the ciphertext to make it say something else when ...
6
votes
4answers
418 views

Major industry password leaks using salted HMAC but without eg PBKDF2, scrypt

I'm trying to convince higher-ups on a project to use an iterative strengthening function to secure password-storage for a new system. The current proposal would store something like an HMAC of a ...
1
vote
0answers
51 views

Purpose of MAC when encrypting? [duplicate]

Really basic question, but what is the purpose of using a MAC/HMAC when you are encrypting using a symmetric key algorithm? It is my understanding that the purpose of a MAC is to authenticate the ...
2
votes
0answers
30 views

Protect secret key on sender [duplicate]

Context In our game company we're choosing between different leaderboard service providers and I'm trying to decide if using one of them with a set structure will be "safe-enough". I understand that ...
5
votes
0answers
50 views

How the AWS signature works in depth

I'm trying to understand how the AWS signature 4 works. I read the docs and I found the Python example where a signature is computed ...
1
vote
1answer
69 views

HMAC password reset link and replay attacks

I like the look of this technique for sending password reset links: https://neosmart.net/blog/2015/using-hmac-signatures-to-avoid-database-writes/ (TLDR: don't store token in database. Send password ...
0
votes
2answers
213 views

Node's createHmac function

for the node.js crypto command: crypto.createHmac('this is a test', key); What is node expecting for key's encoding? utf8? a binary buffer?
7
votes
2answers
471 views

Why does node.js scrypt function use HMAC this way?

According to the documentation, the scrypt hash function works like so: The hash function does the following: Adds random salt. Creates a HMAC to protect against active attack. Uses ...
2
votes
1answer
107 views

MasterSecret expansion into keys

I'm trying to deeply understand the steps during a TLS handshake. I've read this answer (which is btw pretty complete), but I stil got a question about the utilisation of the MasterSecret, in the ...
1
vote
3answers
696 views

Securing REST API with HMAC and basic auth

I was wondering if giving users choice of a method for securing their access to API would be a good idea. Background: We are creating and deploying applications for our customers, which help them do ...
3
votes
1answer
205 views

Writing your own John the Ripper module

I have a script in C, which is able to determine the password of certain data. It uses HMAC and RC4 algorithms to encrypt the given password and then compares that later to the given data. If they ...
0
votes
1answer
126 views

Understanding the HMAC Algorithm (SHA-256)

I've posted a related question on Stack Overflow, but I have a more general question about HMAC and SHA256. Let's say I want to generate an HMAC hash for a blank key and a blank message. The ...
4
votes
0answers
132 views

Secure backup encryption with OpenSSL

I know, the general advice is "keep your hands off crypto stuff". And the standard way to encrypt backup data securely would be using GnuPG. However, for a rather academic exercise, I would like to ...
9
votes
1answer
1k views

Using HMAC to generate secret keys

I am developing a platform that uses several secret keys for several usages: key1 for hashing passwords (using pbkdf2-hmac-sha256), key2 to generate non-repeating unpredictable uuids (using aes-128 ...
3
votes
1answer
148 views

What's the weakness of keyed-MD5 for message authentication?

I've seen public web API's using keyed-MD5 to generate message authentication code rather than adopting the HMAC algorithm. People wouldn't just invent HMAC for fun, so it must have some advantages ...
4
votes
1answer
270 views

Sending Encrypted Messages with Hybrid RSA, AES and HMAC SHA-256

Is this a Secure strategy for sending a large Encrypted Message using Hybrid RSA 2048, AES 256 and authenticated with HMAC SHA-256: Given the Alice already has Bob's RSA Public Key, Alice: ...
7
votes
1answer
638 views

Using RSA-SHA as/instead HMAC in OpenVPN?

While reading the manual of OpenVPN 2.3, I came across the --auth alg option. The manual says: Authenticate packets with HMAC using message digest algorithm alg. (The default is SHA1 ). HMAC is a ...
2
votes
1answer
190 views

Securing REST API without sending or storing clear credentials

We are currently designing a REST API, and thinking about securing it. Going through a lot of documentation, it has become clear that 2 options are available. HMAC Authentication By hashing with ...
1
vote
1answer
51 views

Detect if AES and hmac keys are invalid

I have a server which has a configured value of AES and HMAC key. The client also should have the same keys. When the client sends a request, the server interprets this request and reads the message. ...
4
votes
2answers
166 views

Determining strength of truncated HMAC

I have data stored on a device which I must guarantee integrity, for ease of explanation the data is like numerical field representing 'credit balance available'. The device only ever interacts with ...
2
votes
0answers
77 views

A simple HMAC question

Suppose I use a key (and IV) to encrypt a piece of binary data with AES-256-CBC to produce the corresponding encrypted data. Suppose I then throw this encrypted data into HMAC-SHA512 using the same ...
5
votes
1answer
500 views

Is Django's approach to password reset tokens secure?

I am implementing a password reset feature for a web application and am contemplating adopting an implementation similar to Django. In a nutshell, Django creates a token who is comprised of a ...
1
vote
1answer
233 views

Check HMAC after completing decryption or before?

I have written a piece of software that symmetrically encrypts big files (multi-megabyte). Plaintext is encrypted, after the encryption the HMAC is calculated and written into the header of the file. ...
10
votes
4answers
7k views

HMACSHA512 versus Rfc2898DeriveBytes for password hash

We are currently using HMACSHA512 in .net, with a 128Char (64byte) validation key The salt is 64 char randomly generated string. We allocated 2048 length on the database for the hashed base64 string ...
1
vote
0answers
79 views

How can I use session salt for encrypting data using AES in CTR mode?

I have to implement a crypto-plugin in Java. The approach followed is conceptually similar to that used for SRTP. The algorithm used for data confidentiality is AES in CTR mode (I'm following a ...
0
votes
1answer
55 views

Should I stretch the secret key in a secure cookie protocol implementation?

I'm building an api authentication layer that basically works like the secure cookie protocol, where instead of a cookie I give the api client a token which they must provide on subsequent requests. ...
63
votes
5answers
46k views

How and when do I use HMAC?

I was reading HMAC on wikipedia and I was confused about a few points. Where do I use HMAC? Why is the key part of the hash? Even if someone successfully used a "length-extension attack", how would ...
1
vote
1answer
222 views

Request signing for REST API

I am building a REST API that will receive requests like: GET /api/entities GET /api/entities?filter=X&sort=Y This seems straight forward: have the client HMAC(path + query, key), send me a key ...
0
votes
1answer
118 views

Signing (HMAC) cookie identifier

Related to this other question about sharing the secret to sign the cookies, my question is more trivial: how really secure is to sign a simple cookie identifier? In example, expressjs#session ...
0
votes
0answers
70 views

Understanding the application of hashes, HMACs, and KDFs

I think that I understand the right application cases for the following crypto functions, but I'd like to confirm my understanding and also propagate the safe use of crypto throughout the intertubes. ...
0
votes
0answers
83 views

Securing REST API with HMAC and SPA

I'm developing a JS based SPA and the backend is a rest api which uses HMAC. The site/app doesn't have the concept of registered users but it has the concept of session. How do i make sure that the ...