Linked Questions

125
votes
6answers
88k views

Should we sign-then-encrypt, or encrypt-then-sign?

Frequently, we want to send messages that are (a) encrypted, so passive attackers can't discover the plaintext of the message, and (b) signed with a private-key digital signature, so active attackers ...
10
votes
2answers
2k views

Random data CBC padding scheme?

When using AES in CBC mode, padding is required when the last plaintext block has not the length required by the cipher. Let's say $k$ mode bytes would be required to fill the block. My idea was to ...
2
votes
2answers
2k views

Some questions about encrypting (AES) a file with password

I'm relatively new to encrypting, and I have some questions. I intend to write a standalone C# program that will write and read an encrypted file with sensitive data using a password entered by the ...
0
votes
0answers
28 views

How Mac-then-encrypt provide security in nonce-misuse setting?

From this, it is clear that Encrypt-then-Mac provides more complete security than Mac-then-Encrypt but some schemes use Mac-then-encrypt to provide nonce-misuse resistance such as SIV (AES-GCM-SIV, ...
0
votes
0answers
50 views

How secure is Encrypt-And-MAC?

From this popular Crypto.SE thread, the general feeling is that Encrypt-Then-MAC is the most secure. From the first answer, the poster says that Encrypt-And-MAC provides integrity of the plaintext. If ...
2
votes
2answers
296 views

Is E_k(M)||H(m) form of MAC secure?

Would this encryption and signing scenario be considered tamper-proof? ...
4
votes
2answers
173 views

MAC-then-encrypt in SIGMA protocol for authenticated key exchange

The SIGMA protocol proposed in 2003 and used in TLS 1.3 and IKE stands for "SIGn-and-MAc" and can optionally protect identity using encryption. The SIGMA-I variant illustrated below ...
1
vote
3answers
2k views

Counter based cipher using HMAC-SHA-256

After trying to invent my own AES mode, I decided to just implement something that's known to work, namely CTR mode with HMAC-SHA-256. From what I understand, I can use the IV as a counter, and the ...
2
votes
2answers
2k views

Encrypt-then-MAC paradigm

I read that the Encrypt-then-MAC paradigm is provably secure. From what I understand, when using for example AES for encryption and HMAC_SHA256 for MAC generation (and the keys $K_1 \neq K_2$), this ...
0
votes
2answers
169 views

Is CTR more secure than CBC?

In cryptography, a block cipher mode of operation is an algorithm that uses a block cipher to provide information security such as confidentiality or authenticity. A block cipher by itself is only ...
1
vote
1answer
63 views

CBC mode works well for input greater than “b” bits. What is that “b” bits?

This post on geeksforgeeks.org about block cipher modes of operation, says that one of the advantages of the CBC is that it works well for input greater than b bits. I also saw that in the book "...
13
votes
1answer
4k views

Why do we encrypt-then mac but sign-then-encrypt?

This question was asked in comments on my answer to should we sign then encrypt or encrypt then sign. I think posing the question as a separate entity is best, so: The general advice for applying ...
0
votes
0answers
39 views

authentication by keyed hash function

assume i have: One-key cipher: E. Hash: H My application is authentication. I have a shared secret key with Bob for the One-key cipher. So, when I send an message to Bob, I also send an authentication ...
0
votes
1answer
573 views

What is the advantage of Encrypt-then-MAC over Encrypt & MAC separately the plaintext [duplicate]

For secrecy, authentication & integrity, you can either use CipherText = Encrypt(PlainText) Signature = Hash(PlainText) CipherText = Encrypt(PlainText) Signature = Hash(CipherText) Either ...
5
votes
2answers
2k views

During padding oracle attack (CBC), how is first byte of plaintext block is obtained?

Imagine conducting a padding oracle attack against CBC mode with 16-byte length blocks, and PKCS#5 used for padding. You start, as always, revealing the last byte of plaintext. Then you iteratively ...

15 30 50 per page
1
2 3 4 5
7