Please Support SilentVector:

Monday, August 31, 2015

Electronic Education - Part II - RF Continuation, and the Languages of Machines


In my last article, we discussed some fundamental terms we will use to define electromagnetic concepts in the coming columns.  As I have studied over the years, I've felt how exciting it is when the concepts sink a little bit.  When you formulate questions about the world around you (why do cellphone towers look like that?  What do each of those little wires do in a LAN cable?) and learn about them, more advanced concepts will come together more easily in your head.

Before we dive into the fascinating, complex, sometimes frustrating world cryptography, we are going to discuss a few more electromagnetic and computer language concepts.




Important Influences on EM Energy

Just like sound and light waves, electromagnetic waves have similar properties such a reflection (like an echo or a reflection in a mirror), dimming (or fading via signal loss), resonance (similar to tuning a stringed instrument), and refraction (similar to reflection, but not quite).

In the previous chapter we talked a little bit about antenna propagation patterns (bi-directional, omni-directional) and how the way the antenna is designed causes these patterns to change.  Through the use of reflectors and directors, antenna can be made to transmit (and receive) signal in a single direction (sometimes called a "beam" propagation pattern, or uni-directional).

Reflection - When we're talking about EM, this is when the signal "bounces" or glances off a surface, or the turning back of a radio wave from an object or the surface of the Earth.  Substances that reflect electromagnetic waves more efficiently are usually conductive (metal surfaces, pipes, wires, etc.).  This is useful for reflecting a more powerful signal in a single direction or around obstacles, but it's terrible when trying to get a weak WiFi signal in the basement corner in a house.


Image courtesy of kke.co.jp

There are a couple of important considerations regarding reflection and WiFi protection and exploitation, and the antennas that may be used to attempt to intercept your signal.  If at all possible, install your router in the room furthest from the street.  A common practice for kids learning how to break into WiFi is called wardriving.  Wardriving is the act of searching for WiFi wireless networks by a person in a moving vehicle, using a portable computer, smartphone, or personal digital assistant (PDA).(1)

If it's difficult to get a WiFi signal in the corner of your basement, try swapping rooms if you have a cable hookup in the back.  Not only will you transmit a WiFi signal that is as weak as possible before it enters the street outside your house, you may improve the signal connection in that pesky basement corner.  The more obstacles you put between your signal and a possible point of exploitation the better.

Antenna Gain - If you're especially interested in mathematics, you can look up the definition for this one and go to town with your mathy self.  In layman's terms, if antenna transmits and receives in only one direction, it is said to "have significant antenna gain" in the specific direction it is transmitting (this can also be loosely associated with an antenna's "takeoff angle").  Gain is measured in decibels (dB).  This definition will become important in further discussions about why that basement corner is so bad for WiFi reception and what we use to quantify those measurements.

Resistance - This is the property of a material or substance, to oppose the passage of electric current through it, thus causing electrical energy to be converted into heat.  Resistance lost as heat is (mostly) what causes electronics to warm up when they circulating electricity.  Resistance is also the reason why copper is better than steel at conducting electricity; copper has less electrical resistance than steel.  When constructing antennas, you want to select materials that have the lowest possible resistance.  To learn more about electrical resistance and conductance, follow the link provided at the bottom of the column.(2)

Resonance - When speaking about electromagnetism, resonance is the electrical state or frequency in which forces that impede signal propagation are at a minimum.

When I tune a guitar by twisting its tuning pegs, I am changing the physical and mechanical length of its strings so it resonates at the correct frequency, bring it in tune with its corresponding note.  When I adjust the mouthpiece on a woodwind instrument, I am changing the physical length of the instrument, changing the pitch at which the instrument resonates.


Image by Scott Thistlethwait - courtesy of images.fineartamerica.com

The concept is similar when adjusting the length of an antenna; higher frequencies usually utilize smaller antennas, while larger antennas are used to propagate lower frequencies.  This is why modern cellphone antennas don't stick a foot up in the air; those types of antennas aren't necessary to transmit and receive on such high frequencies.

Thus, when I design and construct WiFi antennas, or HF antennas, I cut them to a specific length and test them to determine whether they are resonant on their intended frequencies.  If they are not resonant, I adjust their length by shortening them, adding material to them, or more carefully cutting them to specification.




Links at the bottom of this article will take you to an especially useful webpage that will help you determine the length of any antenna you want to construct.(3)  We will discuss specific lengths of cantenna and double bi-quad WiFi antennas in a future column.

Refraction - Refraction is the bending of a wave when it enters a different medium (such as glass, the ionosphere, water, etc.).  This is why light looks the way it does at the bottom of a swimming pool, or when a beam of light is famously refracted through a prism:


Image courtesy of www.allmusic.com

Radio waves act similarly when they pass through different mediums.  The next section is on High Frequency (HF) propagation, specifically what happens when it is refracted in the ionosphere.    While this phenomenon is not required to learn about WiFi protection or exploitation techniques, I will tell you that when studying things in the macro-scale, it becomes easier to understand fundamental concepts in the micro-scale.  A little side-note reading never hurt anyone, and I'll litter the section with pretty pictures.


Riding the Skywaves

Hopefully, everyone reading this is aware that Earth has an atmosphere.  Thank goodness the atmosphere happens to be there, or life would not be possible on Earth.  The atmosphere is divided into sections based on how far away from the Earth's surface the sections are.  The section that we are going to focus on in this section is named the ionosphere.


Image courtesy of nasa.gov

The ionosphere is a portion of the Earth's atmosphere at which ionization of gases will effect the transmission of radio waves.  Ionization is the separating of molecules into positive and negative charges, or ions, by adding or subtracting electrons from atoms.  Be thankful the ionosphere persistently lingers above our heads, because if it suddenly disappeared we would all be cooked by the sun's radiation.

In the words of Elon Musk, "the sun, we have this handy fusion reactor in the sky called the sun.  You don't have to do anything, it just works.  It shows up every day and produces ridiculous amounts of power."(4)

A ridiculous amount of this power travels outward into space in what is called solar wind, and some of it strikes the ionosphere.  Because the ionosphere is electrically charged, this solar wind glides across its surface like oil on water.  This happens much more on the side of the planet where it is currently daylight, and less during the evening hours, thus changing the properties of the ionosphere.

This is where the HF radio mantra "sun up frequency up, sun down frequency down" comes from.  If the wrong frequencies are used at the wrong time of day, those HF radio signals will either be absorbed into the ionosphere or ejected into the vacuum of space.  If the transmitting frequency is within a certain tolerance, it will be refracted (or bent) back toward the surface of the Earth and can be received great distances away.



This is a source of nerd joy for people like me, and people that post elaborate radio antenna construction videos on YouTube.  Skilled HAM and military radio operators use the ionosphere to their advantage when transmitting long distances.  Some are so skilled, that they see the discipline as an art form in bridling the sometimes chaotic electromagnetic environment that is HF.

Sunspots are temporary phenomena on the Sun that appear visibly as dark spots.  They correspond to concentrations of magnetic field flux.  A Coronal Mass Ejection (CME) is a massive burst of gas and magnetic field arising from the Sun and being released into space as solar wind.


Image courtesy of nasa.gov

These CME events can have interesting and unintended effects on the ionosphere, which can sometimes be experienced on the surface of the Earth.  Often, large CME events coincide with brilliant displays of Northern Lights or Aurora Borealis, as the solar wind collides with the ionosphere.  The glowing patterns displayed are caused by electronics streaking down the gaseous surface of the ionosphere.


Image courtesy of 14jbella - Wikipedia.org

Ionospheric disturbances cause by CME's can either cause HF transmissions to "duct" or propagate through the ionosphere and carry transmissions much further than usual, or they can interfere with satellite communications and the functions of electronics on the planet's surface.


Image courtesy of grazinspace.oeaw.ac.at

An interesting side note about Maxwell's Equations we talked about in the previous column is the Carrington Event of 1859.  A CME hit the Earth's magnetosphere and created one of the largest geomagnetic storms on record.  The CME took 17.6 hours to make the 93 million mile trip to Earth.  The Aurora Borealis was able to be seen around the world and lit up the night sky, so much so that people that it was morning and began preparing for their day.

Because of phenomena explained by Maxwell's Equations, there was such a severe amount of electrical charge in the atmosphere that it created electrical current on the wires connecting telegraphs that it manifested itself as fires, sparks, and the ability to transmit telegraphs even when power supplies were disconnected.

A similar event occurred in 2012, but Earth was not aligned with the trajectory of the CME and it missed our planet.  It's a good thing it did, because our heavy reliance on electronic components destroyed by the event would have us all banging stones together trying to remember how to make fire.

You can learn more about the Carrington Event by clicking the link at the bottom of the column.(5)

While that story isn't completely relevant to communication security, hopefully it spawns some further thought about the nature of modern society.  Skills and knowledge would quickly become more important than "things" in that kind of situation.  To whom would people address their questions if Google was no more?



The Languages of Machines

Since (what I imagine) the beginning of consciousness, humans have used tools to express and control their needs, wants, and desires.  When written languages were created, humans needed a way to create records to pass on after their creators were gone.  From chisels to paint, the technology we've created has evolved into the modern computer and the Internet.  As machines progressed from the simplest of ideas, to mechanical, to electrical, to digital information, humans have always needed a "language" to communicate with their creations.

In modern times we don't pull levers or turn dials as much as we used to when communicating with out machines.  Our technology has gotten to the point where computers will operate mechanical machines for us, while we interact with a software user interface (UI).    But what are some of the most basic building blocks we use to communicate with our devices?

You might have heard the joke stating "there are 10 kinds of people: those who understand binary and those who don't."  You might have heard the statement "it's all zeros and ones to me."  If you don't understand yet, let me explain.

When rudimentary modem technologies were first developed, it was easiest to display either an "on" or an "off" position to convey information.  The first smoke signals, some military flag or torch displays, transmit information via visual cues.  Morse Code is another visual (and also electronic) method of transmitting information, using similar principles of "off" and "on" or silence interrupted by "dits" and "dahs".




Rhey T. Snodgrass & Victor F. Camp, 1922 - Wikipedia.org

The most basic of electronic modem technologies incorporated this simple on or off idea; it is simple to derive information from simple "current on" and "current off" states on a transmission medium.  From this simple idea, binary code was born.

Most of us learned the decimal system in school; it is the "ten" based numbering system that shows 10 sets of 10 equals 100.  Binary is a "two based" numbering system.  When speaking about computers, we say the "on" position is equal to 1 and the "off" position is equal to a "zero".

The first time I heard that, my brain exploded.  So how do I express the number 25?  How do I show the letter "A" on a computer screen if it's "all just zeros and ones."

Simple: 25 = 11001 and A = 1000001.  That still didn't make any sense to me.

It wasn't until it was explained to me in a visual form:



Displayed above is a blank byte (or eight bits of information).  Each one of those boxes can contain either a "0" or a "1" (or an "off" or "on") in each position.  If any of the bit spaces have a one in them, add the corresponding numbers below them up for its decimal equivalent.

When I initially teach anyone how to read binary, I usually truncate the first four positions off to create a "nibble", or four bits so it's easier to grasp.  So, below I've done that and displayed the number 1 in binary code:



Notice how the 1 position is turned "on" because of the number "1" in that slot.  Without all the boxes and identifying numbers it would simply look like 0001.  Now let's take a look at two and three:



Notice how adding up the numbers highlighted by green, below the "switched on" boxes produces its corresponding decimal equivalent.  Now take a look at the number 4:



It isn't usually necessary to memorize a large number of binary numbers, as long as you know how the system works and know where to find references in case you forget.  Now that you understand the concept of basic binary code, you've been opened up to a whole new genre of annoying tee shirts.

What if we want to encode really large numbers?  If we look at the whole byte again and add up each of the bits, we get the number 255.



If I want to make the number 256, the computer will string bytes together like this:



To display other characters besides numbers, your computer uses a system called American Standard Code for Information Interchange (ASCII), which is part of (and backward compatible with) the UTF-8 character encoding standard.  For simplicity's sake, we'll focus on ASCII for now.  The following diagram is an ASCII chart from a 1972 printer manual that I color coded a little bit:



Original image courtesy of Namazu-tron - Wikipedia.org

ASCII was originally developed from English telegraphic codes, contains 128 specified characters in seven-bit binary integers.(6)  The light blue characters on the left are known as "control characters" (there are 33 of them) that are non-printing characters, which perform functions such as line spacing, acknowledgements, and can be used to emit warnings.  I have included the DEL character in the light blue control characters (I didn't count it as one of the 33 control characters though).

Green characters are printable punctuation, symbols, and operators.  Yellow characters are the decimal numbers.  Red characters are capitalized and lower-case letters of the English alphabet.

If you find the capitalized letter "A" on the chart and match up its corresponding binary bit codes (b1, b2, etc.) you'll see we come up with 1000001.

So every time you write an email, or a text, or interact with machines that display text and characters, you are probably using ASCII codes.  In fact, when you entered this website, everything displayed on this page zipped across network lines and the air as "zeros and ones" and was reconstructed as text by your web browser.

This is important, because now that you can explain binary code, we can grasp an understanding of how information is passed via wired and wireless communications protocols.  You now have the framework in your head to discern how other such machine languages might work.  


Image courtesy of skyscrapercity.com

Before we continue, let's talk about a simple example of wireless transmission via an Xbox controller.  Every time I hit the green "A" button, the controller transmits a modulated (made of zeros and ones) signal on the 2.4 GHz frequency, which is interpreted by the software running on your console as "jump" (for example) depending on which game you're playing.

The process is nearly similar for television remote controls, car key fobs, and garage door openers.  You press a button and a corresponding code is transmitted, and (hopefully) the corresponding action programmed into the machine takes place.  If you want to know what frequencies your devices are talking on, find the FCC label on the device, or just Google it.  You will be surprised to see the diversity of frequencies and types of modulation your devices communicate with.


A huge amount of information about a device can be learned by searching for the FCC ID and part numbers.
Image courtesy of overheaddooronline.com

Back to our discussion about other machine languages, we should have a firm understanding of how text and simple commands are transmitted.  What about images and color?  Maybe you've been asking yourself how all of this information is stored?

Color is encoded using hexadecimal codes.  Just like binary is a base 2 machine language, hexadecimal is know as a base 16 language.  That means it uses a combination of numbers (0 - 9) and letters (A, B, C, D, E, F) to tell your computer how to display color information on your screen.  The following is a chart of hexadecimal color codes:


Click here for a larger version of this image. Courtesy of pagetutor.com

Now you should be able to understand this joke:


Image courtesy of 9gag.com

Most pictures you view on a computer are constructed as a grid of pixels which are physical points, described by an address and color information.(7)  When you email a picture, all of that pixel address and corresponding hexadecimal color information is broken down into binary code, transmitted as zeros and ones, and reconstructed on other devices based on the encoding standards we've discussed.  Movies are simply a series of high definition pictures, reconstructed on your screen extremely quickly.

All of these types of digital information can be stored.  One of the most common methods is on a magnetic hard disk drive (HDD).  Inside a hard drive, magnetic platters are encoded by actuator arms, which can detect (and write) changes in magnetic fields.  These microscopic magnetic fields represent either a 0 or a 1.


Image courtesy of engadget.com

Disc technologies are similar, but instead of magnetic fields, optical lasers are used to encode and read the data on the surface of a disc.  Tiny "pits" and "lands" are used to store data, but the encoding process is different than simple binary.(8)



Locard's Exchange Principle

There has been a lot of talk about "missing data" on the news lately.  It is true, data on hard disk drives and removable media can be overwritten with random information.  It can be overwritten several times to make it more difficult to pull old data off a drive, but it is still technically possible.  With enough time, money, and a good enough reason, data can be recoverable under even the most extreme of circumstances.

Even if a criminal takes an email server and dumps the whole rig in a vat of molten steel and incinerates it, the data may still not be completely gone because of Locard's Exchange Principle.  With digital communications in mind, consider the following paragraph from Paul Kirk's Crime Investigation:

"Wherever he steps, wherever he touches, whatever he leaves, even without consciousness, will serve as a silent witness against him.  His fingerprints or his footprints, but his hair, the fibers from his clothes, the glass he breaks, the tool mark he leaves, the paint he scratches, the blood or semen he deposits or collects.  All of these and more bear mute witness against him.  This is evidence that does not forget.  It is not confused by the excitement of the moment.  It is not absent because human witnesses are.  It is factual evidence.  Physical evidence cannot be wrong, it cannot perjure itself, it cannot be wholly absent.  Only human failure to find it, study and understand it, can diminish its value."(9)(10)


Image courtesy of gamefront.com

Every time you text, send a picture, make a phone call, and send an email, the system you use to do those things interacts with other systems you may be completely unaware of.  Each time information is transmitted, it bounces between several systems where it is sometimes recorded, creates a log entry, or changes some digital detail somewhere on one of those systems.

Even if the original device is incinerated and completely melted down, a careful analysis of the systems the device has interacted with can reveal information about the originally transmitted information.  This is why "wipe it with a cloth" and "I don't understand how it works digitally at all" doesn't fly, when people are taking a digital forensic investigation seriously.  Locard's Exchange Principle says the information, or evidence of the information and how it was lost, is somewhere.  Think about that when you step to the ballot in 2016.


Read my blog, then you'll understand how it work digitally, Mrs. Clinton
Image courtesy of frontpagemag.com

How is Information Kept Private?

In the next column we will build on what we have learned about electromagnetism and the different languages of machines and talk about methods of encryption.  Encryption is used to "scramble" the contents of a transmission so it is unintelligible if it is intercepted.  All data is encoded in some way and it is very easy to ascertain information that is encoded according to an industry standard.  It is much more difficult to read the contents of a transmission if it is encrypted.

We will discuss how encryption works, look at some examples of important or famous encryption algorithms, and learn about common methods used to break encryption algorithms.


References

(1) Wardriving - Wikipedia - https://en.wikipedia.org/wiki/Wardriving

(2) Electrical Resistance and Conductance - Wikipedia - https://en.wikipedia.org/wiki/Electrical_resistance_and_conductance

(3) List of Useful Antenna Length Guides and more information on wavelength:

- Wavelength Frequency Calculator - This is my favorite wavelength to frequency conversion calculator I've found online.  It's great because it allows you to calculate in hertz (Hz) all the way up to gigahertz (GHz), and allows quick conversion between the imperial and metric systems.  There is also a short, elegant description of the Wavelength Frequency Formula on the page - http://www.wavelengthcalculator.com/

- For more information on Wavelength, visit https://en.wikipedia.org/wiki/Wavelength

(4) Elon Musk Debuts the Tesla Powerwall - Youtube - https://youtu.be/yKORsrlN-2k

(5) The Solar Storm of 1859 - Wikipedia - https://en.wikipedia.org/wiki/Solar_storm_of_1859

(6) ASCII - Wikipedia - https://en.wikipedia.org/wiki/ASCII

(7) Pixel - Wikipedia - https://en.wikipedia.org/wiki/Pixel

(8) Compact Disc - Wikipedia - https://en.wikipedia.org/wiki/Compact_disc

(9) Crime Investigation - Paul Kirk

(10) Computer Hacking Forensic Investigator Certification Exam Guide - Charles L. Brooks (page 17)

Notes: if my insistence on using Wikipedia is offensive to you, or somehow undermines the integrity of my writing, you can purchase a complete set of Encyclopedia Britannica here for $1738.02 USD.  Information is free.

Also, if an image is not credited correctly anywhere on this site, it's because I cannot find the original source to mention.  If you have created or own any of the images on this site, please email me at admin@silentvector.org and I will attribute the image to you immediately.

No comments:

Post a Comment