If signal is transmitted with same frequencies they interfers, but why can't we use the technique of encryption and decryption to stop from interfering signals with same frequencies?
3$\begingroup$ Your question is based on a factually inaccurate predicate. Spread spectrum communications uses techniques that could be seen as encryption/decryption to do just that. Time division multiplex schedules everyone's transmit interval so they're always transmitting on a clear, but shared channel. Please edit your question so that it is fact-based. $\endgroup$– TimWescottJan 20, 2022 at 15:46
If signal is transmitted with same frequencies they interfers
The following similar statement is more accurate
If signals are transmitted with the same frequency on the same channel and at the same time then they might interfere.
The first two caveats to this statement are important.
If two signals are transmitted at the same frequency but through different cables or in different geographical areas (for wireless signals), they’re a lot less likely to interfere. For example this is why two radio stations in different cities can transmit on the same frequency and not interfere.
A common technique mentioned in the comments for multiplexing signals on the same channel and frequency is scheduling transmitters. Each transmitter has a time window when it’s allowed to send and all others are required to be quiet. This is called time division multiplexing, and it prevents interference.
Now let’s consider how two signals sent at the same time on the same channel may or may not interfere.
At one extreme, consider the following signals $sin(t)$ and $-sin(t)$. These are two signals that if transmitted together will completely cancel each other out. It doesn’t matter if the data in them is encrypted, these pure sinusoids will interfere.
At the other extreme, you can have $sin(t)$ and $cos(t)$. You can transmit these two signals together and receive them separately without interference even though they are at the same frequency. Why is that? It’s because these two signals are orthogonal.
Without getting too much into signal space theory, let’s just say this is the basis for quadrature modulation schemes. The key is that you can transmit two signals at the same frequency if they are orthogonal.
Now sinusoids are not the only signals that can be orthogonal to each other. You can generate multiple orthogonal digital encryption codes that you mix your signals with. Each signal with an orthogonal code will be effectively orthogonal to the other signals, making it possible to transmit many different signals on the same frequency. These codes have a wide bandwidth and have the effect of spreading the energy of the signal across a wide frequency range, that is why it is called spread spectrum communication.
Spread spectrum communication is used as an actual encryption technique and is how the US military was able to keep GPS private for as long as they did. You cannot reliably receive (or even detect very well) the signal unless you know the code that was used to mix it, and the US government didn’t want to make that public so they could keep the technology to themselves as a tactical advantage.
Another example of spread spectrum communication is the now deprecated 2G cellular network in North America. 2G used a special case of spread spectrum communication called code division multiple access (CDMA). The point here was not necessarily to encrypt, but to be able to send data between multiple devices at the same time in the same cell and on the same frequency without interference. Each cell phone was assigned a code by their nearest tower when they were within the cell, and it used that code to send and receive data without interfering with the other cell phones in the area.
So to answer your question, we can and do use encryption to send signals on the same frequency without interference.