Lecture 7

Symmetric key

Has been around a long time (Caesar cipher).

alt text

Asymmetric key

Theory evolved in late 70s, the first major change in cryptography in a long time.

alt text

Difference Between Hashing and Encryption

alt text

Apply RSA Cryptography

  1. Goto https://tinyurl.com/UQEncryptionKey (https://www.devglan.com/online-tools/rsa-encryption-decryption)
  2. Create a public/private key pair† with the default number of bits.
  3. Have a look at n, e of your public key https://report-uri.com/home/pem_decoder How many hex digits in n? How many bits in n?
  4. Create a secret message using your private key (keep this secret!)
  5. Goto https://tinyurl.com/UQCyberSecurity (https://docs.google.com/document/d/1zqlYZrOUyh-oYaE2cMQFGRf9U5rxMxy8ZND4ytsvGIM/edit?usp=sharing)
  6. Enter your secret message and your public key into the table
  7. Decode the message of another student using their public key and enter the decoded message into the table
  8. Try decoding a message with a different public key
  9. Confidentiality or Authentication and Integrity?

alt text

Third-Party Trust (Simplified)

alt text

Public key infrastructures (PKI)

Certificate authorities (CA’s)

Certificate authorities (CA’s)

Digital certificates

alt text

Digital certificates #4

alt text

Certificate created

Digital certificates #5

alt text

alt text

Root and user-level certificates

Digital certificates (continued)

alt text

Security Topic – Cryptography (2)

SSL/TLS (web), S/MIME (for email)

Firstly, communication protocols – some important characteristics

Communication protocols – consider ‘snail-mail’ addressing alt text

Internet

alt text

OSI vs. TCP/IP Model 7 vs 5 layers

alt text

Some abbreviations: OSI: Open Systems Interconnection TCP: Transmission Control Protocol IP: Internet Protocol UDP: User Datagram Protocol.

alt text

alt text

Conceptual data flow in a simple network topology of two hosts (A and B) connected by a link between their respective routers. The application on each host executes read and write operations as if the processes were directly connected to each other by some kind of data pipe. After establishment of this pipe, most details of the communication are hidden from each process, as the underlying principles of communication are implemented in the lower protocol layers. In analogy, at the transport layer the communication appears as host-to-host, without knowledge of the application data structures and the connecting routers, while at the internetworking layer, individual network boundaries are traversed at each router.

Communication protocols – a series of ‘layers’

We have (from the ISO) a ‘layered’ communication model. This will be very helpful for our work with other security topics (e.g. firewalls). We show an adapted version of this below.

alt text

alt text

Network & computer address (IP Addresses)

Application address (Port Address or simply: port)

Communication protocols in action – email (SMTP)

alt text

Communication protocols in action – web (HTTP)

alt text

Security protocols – important characteristics

Web is online – therefore TLS is online

(communicating with each other in ‘real-time’)

alt text

Email is offline – therefor S/MIME is offline

(not communicating in ‘real-time’)

alt text

The web requires an online security protocol

alt text

HTTP is the communication protocol between a web browser and a web server – it is a very simple ‘language’designed to enable a ‘discussion’between the two entities – this defines the Web. Originally, the Web had NO SECURITY – it has now been added – we shall now discuss this security protocol!

Web security – historically via Secure Sockets Layer (SSL)

alt text

Web secure communication: TLS

alt text

Transport Layer Security (TLS)

alt text

TLS – How it works – (a business conceptual view)

alt text

Does TLS do everything? NO!

Now let's look at:

TLS: Levels of authentication – server (always) – client (rarely)

alt text

  1. Validate server’s certificate: signature via root certificate, URL matches name on certificate, validity from-to current. If not valid, user is warned. Generate symmetric session key

  2. Server uses its private key to decrypt session key. Now both sides use this session key to exchange secured data. Session key typically 128 bits long. Server’s public key typically 1024 bits long.

Email secure communication

Email is offline – therefor S/MIME is offline (not communicating in ‘real-time’)

alt text

alt text

So if we want a digitally signed email, an authenticated and integrity-controlled email, all we need is our own certificate. If we want to send an email controlled for confidentiality, we need the receiver‘s certificate.

Receiver:

Secure Email options for our use (1)

Standard Gmail uses TLS for securing email. TLS is an open security protocol (very good) and it is the successor to SSL. But TLS only secures data between the sending client (usually a browser) and the receiving server (we stressed this in our course – TLS is very secure it is totally a ‘transmission’ security protocol). The data (in our case, an email) is not stored securely on the sending client – and it is not secured whilst on the receiving server. You could call this ‘point to point’. It is certainly not ‘end to end’. It does not, for example, guarantee that the message will remain private or available only to the intended recipient once it reaches the destination mail server. Google itself can see messages associated with your account, which is what allows it to scan your email for potential spam and phishing attacks (and show you related ads). Beyond that basic form of encryption, Gmail supports an enhanced standard known as S/MIME — or Secure/Multipurpose Internet Mail Extensions (explained next paragraph). You have to supply a certificate that may cost money. S/MIME allows emails to be encrypted with user-specific keys so that they remain protected during delivery and can be decrypted only by the intended recipient. This is the meaning of ‘end to end’ – the sender (e.g. you/me) is one end. The receiver (i.e. the person – not the email server) is the other end.

S/MIME is very secure – it actually ‘triple wraps’ email data. When we use S/MIME we have the option to secure our email for integrity/authentication (digital signing) or for confidentiality (via encryption) OR BOTH. If we want to secure our email for confidentiality, we do the following: (1) compose the email; (2) our email agent (e.g. Outlook) then generates a symmetric session (one time) key and uses this key to encrypt our email; (3) our email agent then uses the public key of the intended recipient to encrypt the session key – and this encrypted result is added to the email. This is then sent to the recipient who will then use her/his private key to decrypt the session key – and then use the session key to decrypt the actual email. This ‘end to end’ encryption ensures nobody (in transit) can view the actual email content. (Actually the ‘triple wrap’ does a little more – but that is not important here). S/MIME is now very popular within corporates and government departments. However S/MIME does present ‘key management’ challenges (because nobody – other that sender/receiver) can access the emails – and because the sender needs the public key (via the digital certificate) of the intended receiver.

PGP has been around since the early 1990s and it has always been highly respected. At a high level of analysis, it is similar to S/MIME (or probably better to say S/MIME is similar to PGP). The message is encrypted via a symmetric (session) key generated by the sender. The message and its session key are sent to the receiver. The session key is protected during transmission because it is encrypted with the receiver's public key. PGP is an excellent email security system – however it seems to have ‘lost out’ to S/MIME (especially when Microsoft adopted S/MIME for its email system Outlook).

ProtonMail is a relative newcomer. It is very well designed at many levels to achieve high security. It also uses ‘end to end’ security for its email content – achieved via a combination of public and symmetric key crypto (like S/MIME and PGP). It also offers high level of security for user authentication (i.e. logging onto email accounts). Possibly the only area of criticism of ProtonMail is that it has (in the past years) been subject to concentrated distributed denial of service attacks that have been designed to ‘complicate’ user access to email and accounts.