Category Archives: Data Communications

Keep It Simple Stupid

I wanted to share this excellent article that I read on linkedin recently. It is by Professor Daniel Solove. In the artical he discuss a recent hacking scandal involving a US baseball team. He talks about what can be considered a ‘hack’ and who can be considered a ‘hacker’ then clears up a number of common misconceptions about network security. Not all ‘hacks’ are sophisticated or technical.

I had an interview recently and I was asked about how I would go about exfiltrating data. I launched into a long winded technical answer talking about port scanning, exploiting code and avoiding IDS’s etc etc.

When I got out the interview and was driving home it suddenly hit me that what I should have said was; target the human attack vector by using good old social engineering.

Some hacks may not be sophisticated, but that isn’t always a bad thing. I truly believe the first rule of network security should always be “Keep it simple, stupid!”.

This applies for both offensive and defensive security. That is not to say that simplicity should come at the expense of functionality, all security goals should still be fully achieved, but achieved as simply as possible.

As Einstein succinctly put it “Everything should be made as simple as possible, but not simpler”.

The Cuckoo’s Egg

When rooting (pardon the pun) around YouTube a few days ago looking for some cyber security videos to watch, I discovered this little gem, the 1990 made for TV movie; The KGB, the Computer and Me. It is an adaptation of the astronomer, author and accidental security specialist Clifford Stoll’s 1989 book, The Cuckoo’s Egg.

What makes this the show so great is not only the fact that many of the real people play themselves, resulting in what is often unintentional comedic acting, but it tells a very real story of how one man almost by accident found himself at the heart of the investigation that would bring the notorious hacker and KGB agent Markus Hess to justice!

The full video is available here:

Diffie-Hellman: The Basics

The Diffie-Hellman Key Exchange is a method of securely exchanging cryptographic keys across insecure and untrusted networks. To do this a shared secret between two entities must be created, it does this with a mathematical one way function. A one way function is a problem that is difficult to solve in one direction, but easy in the other. Most major websites use one way function to store password hash digests rather than the users actual password.

A simple to under stand one way function can be explained with mixing paint. If you have three different colours of paint, and mix them together, it would be almost impossible to reverse engineer the mixed paint to discover the original colours.

Below is a simple to understand break down of the mechanism that Diffe-Hellman employs. It is explained both with mathematics and colours for simplicity. Bob and Alice want to create a shared secret and mutually authenticate each other, Eve wants to know what the secret is…how do Alice and Bob Stop her?

Step 1: Alice and Bob agree on of a Prime Modulus ie. 17 and a primitive root ie. 3. This is a number that when raised to any exponent (X) with modulus produces a equiprobable result. 3 is a prime root of 17.


Step 2: Alice and Bob both select random Private Keys. This number will be used as the exponent and is used as the exponent X in the agreed modulus equation. Without the Private Key this is very difficult to reverse. (A large prime modulus must be used, 17 is just for demonstration purposes)


Step 3: The results of this produce Alice and Bob’s Public Keys 6 | PURPLE and 12 | ORANGE These are then shared


Step 4: The Public keys is then shared, allowing Eve to intercept them. The private keys are kept secret so Eve does not know the private key/exponent to allow her reverse the maths to find them.
Now Alice and Bob can use each others Public Keys for the start of their Modulus equation. With their Private Key as the exponent once again.


10 | BLACK is the shared secret. Both sides will always find the same result as their Private Key is obfuscated in the Public Key. So the equations are basically the same. But Alice and Bob can workout each others Private Key. Eve can not work out the Private Keys or the Shared Secret.

This is a very basic explanation of the broad concept. Understanding each step involved here is vital, before endeavouring to learn Diffie-Hell in detail.

If you are struggling to understand this, have a look at Khan Academy’s excellent video on this subject that is presented by Birt Cruise.

Modulation in Radio Transmission

Modulation in Radio Transmission

Earlier this year, I wrote a report identifying two methods of transmitting public broadcast radio in the UK. The report was designed to give a general overview and broad insight into the transmission and modulation techniques used in radio transmission. This Post is based on that report. I removed some of the more complex mathematics, summarised some of the concepts and de-formalised the language somewhat, in order to make this blog post more readable.

There a number of distinct methods and platforms for radio broadcast in the UK. The traditional method of broadcasting commercial or non-commercial radio via the use of broadcast transmitters is still used today. AM is one of the earliest analogue radio broadcast technique used in the UK to this day, you can hear many a debate or sports broadcast ring out through the airwaves on AM radio. Frequency Modulation (FM) is used both by amateur, local and national broadcasters. Some of the nations favourite radio stations can be listened to on FM radio, in fact FM radio is the most widely listened type of radio broadcast in the UK. For this reason this post will talk about FM radio.

While Analogue radio still thrives in the UK, digital radio has made in roads, one common method is streaming via the internet, the station can then be received and listened to via a range of devices such as desktop PC’s, phones and tablets. This post however will discuss modulation methods that can be used with Digital Audio Broadcasting (DAB) and Digital Radio Mondiale.


We will begin our look at broadcast radio with transmitters. In Claude Shannon’s theory of communication he asserts that for communication to occur, there are number of requirements; an information source, a transmitter to send the information, a signal to carry the information, and a receiver to receive and decode the signal. Both FM and DAB radio require a transmitter to process, modulate and amplify the information signal before placing it on a carrier signal. The information signal becomes a component of the carrier signal and is then placed on to the transport media for broadcast. In the case of FM and DAB radio the transport media is the air. When the signal is intercepted by a receiver it is demodulated and the information is retrieved and processed.

Broadcast transmitters can be found across the UK, they form a nationwide broadcast network that deliver both analogue & digital TV as well as radio broadcasts. The transmitters are equipped with verity of antennae including omnidirectional and directional antennae depending on the specific requirements for each location. Also specific to the location is the power at which the FM radio signal is broadcast. Using the The Wenvoe Transmitter in South Wales as an example, shows how power and antennae can change from station to station with some broadcasting with a power of 250 kW and others at 125 kW. All this will have an effect on the range and attention (drop off of power) properties of the broadcast. DAB radio is broadcast on a number of Band III VHF frequency blocks, these are also specific to the location of each tower.


Modulation is modifying one or more of the the three fundamental frequency domain parameters; amplitude (A), frequency (f) and phase (∅). When placing a digital or analogue data baseband signal on an analogue signal, the signal will be analogue carrier wave. the carrier wave is a high frequency signal in the form of a periodic waveform. This post will discuss placing analogue data onto an analogue signal & DAB radio; digital data onto a analogue signal.

Analogue Data on an Analogue Signal: The original signal is converted into an electric signal via the use of a transducer. When broadcasting radio on unguided media a high frequency signal is required in order to achieve effective transmission, this is the carrier signal.

Digital Data on an Analogue Signal: Unguided media will only propagate analogue signals, as such the digital data must first be converted from a digital to analogue.. Digital data is a series of discrete voltage pulses, each pulse represents one bit of data. The digital data is then processed by a modulator-demodulator and transformed into an analogue signal.

FM Broadcasting & Frequency Modulation

FM Radio broadcasting commenced in the UK in 1955, as of 2014 it operates on the licensed Very High Frequency (VHF) band range of 88.0 to 108 Mhz of the radio spectrum. Stations are assigned a portion of range that they use to place a low frequency information signal. The information signals data is music and voice in the range of 20 Hz to 15 kHz, human beings can hear frequencies in the range of 20 hz to 20 kHz, with the spoken voice being in the 1000 Hz to 5000 kHz range. Despite FM radio capping the modulation frequency to 15 kHz, FM is still considered High Fidelity. FM radio is named after Frequency Modulation technique that it uses to process information signals. FM can be used for a number of purposes other than FM radio, including Seismology, Radar, Electroencephalography and telemetry.

The high frequency carrier signal can be defined as a cosine with the following equation. Vc (t) defines the voltage of the carrier wave at a given period of time. Vc and fc define the carrier waves voltage and base frequency respectively. This is a standard cosine or sine wave. A sine wave is curve defined by mathematics to describe oscillation in a smooth and repetitive manner.

Carrier Signal: Vc(t) = Ac sin (2fc t + Ø)

The low frequency information signal can be represented in a similar manner. Although the variable will result in a wave that does not have smooth, repetitive oscillation

Information Signal: Vm(t) = Am sin (2fm t + Ø)

The information signal is placed on to the carrier signal, thus becoming a component of the carrier wave. This wave is now referred to as the modulating wave. Below is a mathematical representation of the modulating wave. In this equation f represents the peak frequency deviation. The peak frequency deviation is the difference between the maximum instantaneous frequency of the information signal and the carrier signal. In the equation below this means that frequency of fc + (f/Am) between fc minus f and fc plus f, this difference is also known as the carrier swing frequency. FM Radio does not have a carrier swing of over of 75 kHz in order to achieve loudness.

Modulating Signal: xM (t) = Ac sin (2 [fc + (f/Am) Am (t) ] t + Ø)

Digital Radio

The UK has the largest network of digital radio transmitters in the world, with a total of 103 transmitters, 2 DAB national ensembles plus an additional 48 regional ensembles as of October 2014. These transmitters cover 90% of the UK population. The map on the right shows the placement of transmitters across the Scottish central belt. They transmit UHF, VHF and MF, DAB is in the VHF range.

For the remaining 10% of the population the Digital Radio Mondiale (DRM) technology is being considered as a possible solution to covering the areas with this population. DRM makes use of the range’s traditionally used by AM radio. By using MPEG-4 codecs for audio compression, DRM can have a higher amount of channels with a higher quality of sound. DRM can make use of a number of bandwidths depending on what situation the broadcasters specific requirements. These range from 4.5 kHz for simulcasts to 100 khz for DRM+. Both DAB and DRM make use of Orthogonal Frequency Division Multiplexing (OFDM) for encoding digital data onto multiple analogue carrier waves, using a variety of modulation techniques.

Quadrature Amplitude Modulation

Quadrature Amplitude Modulation (QAM) is a modulation technique is used along with the OFDM encoding mechanism for digital radio broadcasts. QAM be used as either a digital or analogue modulation method. This report will discuss digital QAM. QAM makes use of two carrier waves, each wave is out of phase with its corresponding wave by 90o, it is this shift if phase that give QAM its name. The carrier waves are keyed to represent digital data. By changing the Amplitude and Phase of the carrier waves, essentially makes QAM a combination of both Amplitude Shift Keying (ASK) and Phase Shift Keying (PSK).

Phase Shift Keying

PSK represents digital data by by modulating the phase of the carrier wave. BPSK is the simplest form of PSK,and thus will be described here to give a general overview. PSK uses two phases that are separated by 180o to represent one of two points, this is why it is also referred to as 2PSK. A BPSK transmitter works by converting a digital information signal representing 0s and 1s with 0 Volts and a positive Voltage Eb(t) (+V), into a signal that that is represented by a negative
Voltage -Eb(t) (-V) and +V by using a Level Converter (LC). This signal is sent to a Balance Modulator (BM). Simultaneously the the carrier signal is being sent to the also being sent to the BM, via a buffer from a Carrier Oscillator (CO). The carrier signal is then combined with the signal from the LC. As the signal is passed through the BM its phase is modulated so +V is represented by +180o or -90o and -V is represented by 0o or -90o. Finally the signal is passed through a Bandpass Modulator. ASK also uses a similar method, but instead of changing the phase of the modulating signal it changes the amplitude. BPSK is represented mathematically with the following equations:

Phase: Binary 0: s0(t)=2Eb/Tbcos(2fct+)=-2Eb/Tbcos(2fct)
Phase: Binary 1: s1(t)=2Eb/Tbcos(2fct)
Signal space: (t)=2/Tbcos(2fct)

What this gives us is a constellation with 2 symbols, each symbol representing 1 bit of information, as a result BPSK has a very low bit rate, it does provided high error tolerance though, as the symbols are clearly defined and are therefore less susceptible to noise interference or any other phenomenon that may degrade the quality of the signal. The bit error rate (BER) of BPSK defined mathematically with the following equation: 1-(1-BER)^bits in transmission

QPSK works in a similar manner to BPSK, but uses two extra phases to represent an additional two symbols, with each of the four symbols encoding 2 bits of information, while using the same amount of bandwidth of BPSK. QPSK can also maintain the same data rate as BPSK but only use half of the bandwidth.

This can be represented mathematically with the following equations;

To yield 4 phases 90o apart: (/4, 3/4,. 5/4, 7/4)
sn(t)=2Es/Tscos(2fct+(2n – 1)/4), n=1,2,3,4.
In phase signal component:
Quadrature component:
This allows the constellation to have 4 single space points:

Round Up

Hopefully this post has given you some insight into the modulation that that is passing through the airwaves, just think about it, the techniques described in this post are happening all around you in the space that you currently exist. If the maths got a bit indecipherable, I have included a round up below with some of the take home points of this post.

Modulation schemes used for radio broadcasting in the UK have remained relatively static. As overall broadcasting technology around them has evolved the actual modulation has not. This post covered FM broadcasting, Frequency Modulation still works using the same basic principles that it used when it first commenced broadcasting. The reason for this is that Frequency Modulation it still highly adequate for delivering high fidelity broadcasts to listeners. Evolving compression, encoding, and error mitigation techniques have allowed for more data to be sent through the same amount of bandwidth, while still using a Frequency Modulation scheme. As of 2014 FM Radio is still the most listened to form of broadcast radio in the UK.

Digital Radio Broadcasting is ever evolving, a relatively new form of broadcasting, it uses a variety of keying techniques to transform digital signals to modulated analogue signals for transmission. This report studied BSPK and then QPSK, it used them as an example of how digital modulation works. It demonstrated via the use of mathematical equations that QPSK is in fact two independent BPSK schemes running in tandem, and how it can make more efficient use of the same amount of bandwidth made available by licensing authorities.