Linked Questions

3 votes
2 answers
6k views

AES + CBC encryption for a stream of UDP packets

I am developing an application that is based on UDP, and I need to send a stream of packets. As you can imagine, packets can get lost or corrupted. I need to make sure that the content of those ...
Matteo Monti's user avatar
  • 1,407
6 votes
2 answers
4k views

HMAC versus encrypted hash

When encrypting a message with a symmetric key, it seems like the best practice is to first encrypt the message, then run the cipher text and key through HMAC, appending the result to the cipher text. ...
Niko Carpenter's user avatar
6 votes
1 answer
640 views

Non-cryptographic hash function as MAC for stream ciphers

I understand that for a stream cipher to be useful, there must be a way to verify that the message was not tampered with (bits were flipped by an attacker). So, instead of using some cryptographic ...
lvella's user avatar
  • 277
4 votes
3 answers
600 views

Do I need to use AE/AEAD in my particular scenario? Or is it redundant?

This is my scenario: A small structured text message (1-2kB) is to be sent over an insecure channel. Everything except for the header portion (which contains a title, timestamp, category and tags) ...
P.T.'s user avatar
  • 43
5 votes
1 answer
2k views

Is appending the hash of the plaintext to the end of an encrypted message sufficient to ensure integrity?

Is appending the hash of the plaintext to the end of an encrypted message sufficient to ensure integrity? My reasoning is that the attacker doesn't know all the plaintext, so by having a hash, the ...
flaviut's user avatar
  • 153
1 vote
1 answer
2k views

How do unkeyed hash functions (for MDCs) provide security?

Unkeyed hash functions are, by definition, hash functions computed without a key. SHA-1 is an example. MDCs (message digest codes) are a subclass of unkeyed hash functions. How are unkeyed hash ...
user avatar
3 votes
2 answers
206 views

Strange MAC algorithm

I'm working with a payment provider which uses the following algorithm for signing messages: The merchant is securely given a secret key k, known to them and the ...
Lachezar Balev's user avatar
1 vote
1 answer
690 views

How simple hash provide message authentication?

This structure provides message authentication. My question is if someone finds the key he can simply change the message and compute new hash according new message and send it to the receiver. If so, ...
Utsav Patel's user avatar
2 votes
1 answer
436 views

Could this alternative hash based MAC construction be as, or even more secure than an HMAC?

Begin hashing (Key||Message) Encrypt the hash state (or some part of it, such as the first 128 or 256 bits), with the key. Add the encrypted hash state to the hash ...
Anon2000's user avatar
  • 341
-2 votes
3 answers
429 views

Would this method deliver a perfectly non-malleable encryption for at least two blocks? [closed]

Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto algorithms, (and might also be of interest for other curious people), not ...
Anon2000's user avatar
  • 341
-3 votes
1 answer
174 views

cipherText = aes-ctr(key, iv+1, (plainText)); & authTag= aes-ctr(key, iv, aes-ecb(key, sha-1(cipherText+authData+key+iv))); is it secure? [closed]

Proposed Cipher suite (using aes-ecb): ...
NKaran's user avatar
  • 5
-3 votes
1 answer
169 views

Which is more secure? $\operatorname{AES-ECB}(key,\operatorname{SHA1}(data+key))$ vs $\operatorname{HMAC-SHA1}(key, data)$ [closed]

$\operatorname{AES-ECB}(key,\operatorname{SHA1}(data+key))$ vs $\operatorname{HMAC-SHA1}(key, data)$ Which is more secure? Which is faster? There is a similar comparison here; HMAC-SHA1(key, data) ...
Nayan Karan's user avatar
3 votes
0 answers
237 views

Design requirements for a keyed hash function? [closed]

I am actually preparing for a cryptography exam, and I found a question asked by the professor in the class, below are the lines that I copied from the slide : Example: Let $Ek$ be the encryption ...
b_mery's user avatar
  • 31
0 votes
0 answers
57 views

Compare two protocols of keyed hash functions

Authentication protocol using a keyed hash function: Alice and Bob share a secret key for a keyed hash function. The protocol is: Alice $\Rightarrow$ $m||h_{k}(m)$ $\Rightarrow$ Bob. There are the ...
Bella's user avatar
  • 21
0 votes
0 answers
45 views

AES mode scheme feedback [duplicate]

I've been studying encryption on a hobby basis, and wanted to know if I got this basic cypher construction right (this is another experiment, see the AES ECB experiment thread earlier). Encryption: ...
Thorham's user avatar
  • 223