Linked Questions

26
votes
2answers
28k views

How does a chosen ciphertext attack work, with a simple example?

Can someone please explain - using a simple example - how a chosen ciphertext attack works?
12
votes
4answers
10k views

How do I detect a failed AES-256 decryption programmatically?

I have implemented a simple encryption/decryption program based on AES-256 in CBC mode1. Actually, it is more precise to describe it as a compression+encryption / decryption+decompression program. ...
7
votes
4answers
4k views

One Time Pads and "Bit Flip" Attacks

One Time Pads and Vulnerability to "Bit-Flip" Attacks: I've seen it in this group, and apparently there are a (small) number of voices on the 'net opining that those relying on OTP are essentially "...
20
votes
1answer
2k views

Why choose an authenticated encryption mode instead of a separate MAC?

What are cryptographic reasons to choose an authenticated-encryption mode of operation (such as GCM) over a traditional encryption mode plus an independent MAC, or vice versa? Assume there is no ...
6
votes
1answer
2k views

Why is asymmetric encryption IND-CPA?

According to Wikipedia, the IND-CPA game is: The challenger generates a key pair PK, SK based on some security parameter k (e.g., a key size in bits), and publishes PK to the adversary. The ...
4
votes
1answer
1k views

SHA-256-based stream cipher

Can anyone comment if the stream cipher described here is safe? The author claims it to be unbreakable, but does not provide any evidence or proof to support this. For completeness, I have reproduced ...
4
votes
3answers
2k views

Reusing IV in AES for encrypting file

Everyone says that you shouldn't use the same IV and Key. Is it safe to use the same IV and Key on only one file. EDIT: I will be using CBC or CFB encryption modes so the IV will be updated based on ...
3
votes
2answers
700 views

How to provide integrity even though using Authenticated Encryption?

Gilles made the following comment here: using authenticated encryption does not guarantee integrity, only authenticity. You can't detect a rollback. From what I gathered: Authenticated Encryption ...
5
votes
3answers
398 views

What are the benefits of using AEAD algorithms as MAC

I've seen in 2 places where NIST acknowledge the possibility of using AEAD algorithm for MAC (e.g. page 7 section 5.2 of GCM spec, summary for LAEM on page 6 of LWC status report). And I see 2 ...
2
votes
1answer
2k views

Is it possible to split a large AES encrypted string and decrypt the parts one by one?

Due to some platform restrictions our decryption algorithm can only handle up to 1 million bytes. The string we receive is larger, having been generated by AES in cipher block chaining (CBC) mode, ...
3
votes
2answers
907 views

When, where, and how to use HMAC

This question may seem like a duplicate of some others, namely this one, but even though that question asked when and how to use HMAC, the answers only addressed what HMAC was and why/how it worked. ...
0
votes
3answers
990 views

Can data over a very low bandwidth channel still be encrypted?

If you have a very low bandwidth channel, can encryption still be used? Another way of putting this might be, does encrypting well increase the size of the data significantly? Are there good ...
1
vote
1answer
898 views

Why use PBKDF2 over SHA-512 to derive AES encryption key? [duplicate]

Suppose I am using user passwords to derive AES-128-CBC encryption key. This key will be used to encrypt some sensitive data for the user so that even the website owner / operator can not decrypt it. ...
2
votes
2answers
540 views

Is there an encryption scheme that is url-safe AND compact?

I want to be able to encrypt some data like JohnSmith@domain.com|1234|A in a form that I can send to a user as a clickable link like: ...
3
votes
3answers
183 views

Is TEA suitable for encrypting/authenticating many short messages?

I know that TEA has its weaknesses, but is easy to implement. My question is whether it would be suitable for my use case: The main reason for using encryption is not so much secrecy, but ...

15 30 50 per page