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

learn more… | top users | synonyms

-1
votes
0answers
64 views

HMAC Signature Based authentication for REST APIs

We are building publicly available RESTful APIs for eCommerce where clients can place logistics requests with us. We want stateless authentication on these APIs. While on-boarding, every client will ...
0
votes
1answer
45 views

Why is CBC-MAC insecure for variable length input?

Can anyone explain why CBC-MAC is not secure for variable length message? I read many books, but there are still some confusion. Like the highlighted parts in following pictures Slide 32: Slide 33:...
0
votes
2answers
100 views

Is encrypting a CRC with the plaintext ok?

We're using encrypt-then-mac for authenticated encryption, and recently added a CRC32 to the plaintext. Are there any security problems with using a non-authenticated hash mechanism (for example, ...
0
votes
0answers
65 views

Data integrity and authentication of an Arduino using JSON Web Tokens and HMACs

I have a school project involving an Arduino-based sensor that needs to send sensor readings to a server via HTTP. The sensor readings do not need to be encrypted (it's okay that people know what they ...
0
votes
0answers
40 views

SQLCipher and PRAGMA key on iOS

I'm a bit confused as to how SQLCipher handles the PRAGMA key provided for encrypting the SQLite database For background: I'm looking at options for encrypting application data at rest. From the ...
3
votes
2answers
78 views

FIPS Compliance with HMACSHA1 vs HMACSHA256 / HMACSHA512

My organization has a group policy that is applied to servers enforcing FIPS compliance (Windows AD policy). In .NET, HMACSHA1 is one of the encryption/hash algorithms that is FIPS compliant. I don't ...
1
vote
0answers
11 views

Is my current implementation of message signing on AVR sufficient and correct?

I am currently implementing a fairly simple signing library (for my personal use) to verify the identity of packets sent with the RF24Mesh library (using NRF24L01+) radios. Never made a flowchart but ...
3
votes
1answer
27 views

Is it necessary to sanitize data being passed into the hash_hmac in php?

I have a page that takes in arguments that could possibly be changed by a malicious user. I am checking to make sure that the contents have not been unexpectedly changed by using HMAC. In php, there ...
1
vote
0answers
41 views

Securing ASP.net web api (REST)

I am developing a middle-ware web service app(REST) using asp.net mvc-4 web api. The rest services are consumed by android,ios,angularjs client apps.Same user is able to use multiple platforms at the ...
0
votes
0answers
142 views

HMAC Token - Check Logic

I have a situation where I need a token that provides authentication. The common HMAC procedure I found is: Get Some key using login credentials Create Message, append key and other message data (...
0
votes
0answers
11 views

What integrity does the TLS Record Protocol actually provide?

In TLS the "base" protocol is the "TLS Resource Protocol". This protocol is responsible for: securing application data and verifying its integrity and origin. It also uses a HMAC. However this ...
1
vote
1answer
62 views

How can an attacker downgrade/modify the cipher suites when they are MACed? (Freak, Logjam use downgrade attacks)

In the Finished handshake of TLS all previous messages exchanged are sent from the client to the server (and reverse) and protected by a MAC. This is what also "prevents" TLS_FALLBACK_SCSV from being ...
0
votes
0answers
120 views

C# app and ASP.NET api: validating requests/responses

So I have one C# WPF desktop app (client), which communicates with my web api to login for the user, get info, etc. The C# WPF app will communicate with a hardware device as well. However, there is a ...
0
votes
0answers
46 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
105 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
49 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 HMAC-MD5-96,...
6
votes
2answers
106 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 ...
3
votes
1answer
59 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
75 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 ...
-1
votes
2answers
174 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
39 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
40 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
59 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
64 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 ...
0
votes
2answers
139 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 $...
0
votes
3answers
82 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 ...
3
votes
3answers
247 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 ...
1
vote
0answers
53 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 ...
7
votes
0answers
89 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 (http://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-...
8
votes
4answers
430 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 ...
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 ...
1
vote
1answer
112 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 ...
3
votes
1answer
145 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 ...
0
votes
3answers
816 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 ...
0
votes
1answer
190 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 ...
5
votes
0answers
167 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 ...
16
votes
3answers
5k 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
229 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 ...
4
votes
1answer
192 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
364 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: ...
2
votes
1answer
287 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 ...
4
votes
2answers
347 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
90 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
781 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
345 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. ...
8
votes
1answer
1k 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 ...
1
vote
1answer
70 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. ...
1
vote
0answers
93 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
58 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. ...
1
vote
1answer
318 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 ...