Classical ciphers operate on letters. If we consider the frequency attack on classical ciphers it considers the frequency of the letters. Modern ciphers, if we consider only block ciphers, operates on blocks - 64, 128, or more bit blocks. Let see how you can perform a frequency attack on modern ciphers to infer some data.
Example attack on Databases:
Let assume that a sensor network has deployed in a rural area to observe animals by researchers. When an animal's tag is detected, the nodes stores this information on a database table; here for simplicity only the type of the animal and date and time encrypted in ECB mode;
| TYPE | D&Time|
| 0x443 | 0x7FE |
| 0x122 | 0x1E0 |
| 0x443 | 0x651 |
| 0x443 | 0x6AA |
| 0x084 | 0x09C |
| 0x112 | 0xC9F |
| 0x443 | 0x18D |
| 0x112 | 0x76B |
Now, assume that the poachers cannot extract the encryption key from the nodes but they can read the information. What can they learn from this data?
In ECB mode $E_k(x) = E_k(y)$ iff $x=y$ and this can leak information. This mode is used for
count queries on encrypted databases, see the CryptDB paper by Popa et.al. An attacker can calualte the frequency of the ciphertext and infer information from them.
By the Kerckhoffs's principle, we assume that they know everything but the key. The poachers also know the region, so they know how frequently a deer or a wolf appears around this sensor node. Assuming that mostly deer than wolf then bears appears in this region.
If we look at the ciphertext frequencies the
0x443 appears most. So they deduce it actually represents a deer. And similarly
0x122 is a bear data.
Long story short result: Frequency analysis can break deterministic encryption. If you have pre-knowledge on the frequency of the data you can infer information without decryption. So a ninth-century attack of Arab philosopher and mathematician al-Kindi still lives.
The attack Naveed et.al is performed using electronic medical records. Some of the data is also publicly available like the frequency of the illnesses, drug sales, etc. So their experimental result shows that an alarming amount of sensitive information can be recovered
Mitigation: Don't use ECB mode. Then, you cannot have simple equality queries on the encrypted data. The CryptDB designed to execute queries of TPC-C ot measure the capability and performance.
The future may reside using equality under the FHE, however, it may not easily solve all of the problems.
Some further readings on modern frequency analysis;