Cyber Security

Luke Hally

Secrets

July 19, 2021

The problems with secrets

Secrets are interesting. People want to keep secrets, people want to find secrets, people want to share them. They are important because they break the symmetry of access – they restrict access to authorised people or systems. There are different types of secrets, information can be a secret (eg: a secret recipe, data) and the way of accessing information can be a secret (eg: password, key) – secrets to access secrets! But secrets have a number of problems, these include:

  • Once a secret it shared, control of the secret is lost, and tracking who knows a secret is very difficult
  • You can’t take them back once someone knows it (access secrets can be invalidated, eg passwords)
  • Using the secret can give it away, both the secret itself and the fact that the secret exists
  • Secrets can be lost, stolen or leaked
  • Secrets are hard to create, store and share
  • Secrets are hard to destroy 
  • Reusing access secrets is risky. For example reusing passwords, if one system is breached and your password is discovered. You are potentially at risk in other systems via a credential stuffing attack. This is known as a single point of failure, and can compromise multiple systems.

How do we balance secret management (for example multiple passwords to multiple systems) with the risk of creating a single point of failure? Reusing passwords is out. Perhaps a pattern? But if a few of your passwords are discovered, then an attacker may deduce the pattern and while not discovering your secret, it is now easier for them to work out. What about password managers/keychain? That makes it easy for us, but it means that all of your secrets are protected by one secret – one big secret that could be as tempting to an attacker as a beehive is to Winnie the Pooh.

ALWAYS BE SCEPTICAL THAT A SECRET IS ACTUALLY A SECRET.

Communicating secrets: confidentiality

Keeping messages that we send a secret is a challenge. Once a message is out of our hands, we have no control over it. It can be intercepted, read, stolen or altered. This has been a problem faced through the ages and it’s one we face today, even with electronic communications. 

Steganography

An early solution was steganography, basically hiding the message so people didn’t know about it. Some examples include:

  • The Romans would shave the head of a slave, tattoo the message to their head and let the hair grow back to cover the message.
  • Invisible ink
  • Microdots
  • Pin pricks in newspaper letters, so the recipient can hold it up to the light to see which letters to read.

Steganography isn’t used much anymore, especially not at scale because it is not secure. Once someone knows the method, it is broken for all future and past communication.

Codes

This brings us to codes. Codes are similar to a translation, where a word is substituted with something else, say a number or symbol. The people sending the messages would have a code book and use it to replace words in their message. The uncoded message is called the plain text, while the coed message is called the cipher text. They can also be broken if an eavesdropper has the plain text and coded text, this is known as a ‘known plain text attack’. They can also be broken with frequency analysis. Of course once a code is broken, it is useless and it can be used to read past., present and future messages.

Ciphers

Ciphers involve substitution and a key. A simple example is a Caesar Cipher. The message is enciphered and sent with a password, which is a number between 1 and 26. For example a Caesar Cipher with a password of 2 applied to ‘hello’ would be ‘jgnnq’. 

Plain textHELLO
Number85121215
+2107141417
Cipher textJGNNQ

The Caesar Cipher is an example of a mono-alphabetic substitution cipher – there is one alphabet in use. 

Transposition (jumbling) and substitution are the basis for modern ciphers

Reflection

This is a new area for me. I have created codes and even ciphers unwittingly so I am enjoying actually learning about them. It’s interesting to understand the weaknesses of secrets, I’m sure it will help us to design ways of keeping them safe. Although we are looking at old ciphers, which are no match against computers, I’ve enjoyed seeing how they work.

Recent posts