You are on page 1of 93

P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A2 LEVEL- Computer Science - 9618 – CAIE - SYLLABUS


PAPER 3: ADVANCED THEORY

“Artificial Intelligence”
SIR AAQIB KHAN
Content Details
A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

“AI”
Golden Words By Sir Aaqib Khan
A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

KEYPOINTS BY SIR AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

“Machine Learning and Deep Learning”


Golden Words By Sir Aaqib Khan
A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

Exam Style Question


A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

Exam Style Question # 1


Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

Exam Style Question # 2


Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

Exam Style Question # 3


Sir Aaqib Khan
A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

Exam Style Question # 4


Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Artificial Intelligence Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

A2 LEVEL- Computer Science - 9618 – CAIE - SYLLABUS


PAPER 3: ADVANCED THEORY

“Encryption, Protocols and


Digital Certificates”

SIR AAQIB KHAN


Content Details
A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Encryption
Golden words by Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Encryption
“A process of turning plain text into cipher text”
“Encryption is a process of turning plain text into cipher text”

Plain Text:
Data before encryption
The original data to be transmitted as a message

Cipher Text:
The result of applying an encryption algorithm to data
Encrypted text which is not understandable
A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Encryption Golden Words


Concept by Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Encryption Keys
by Sir Aaqib Khan

Public key:
1. A key widely available that can be used to encrypt message that only owner
of private key can decrypt
2. A key that can be used to decrypt a message thereby confirming originator of
message
3. An encryption method produced by a trusted authority that can be used by anyone

Private key:
1. A key only known to owner that can be used to encrypt message to confirm
author of message
2. A key can be used by owner to decrypt a message thereby ensuring only
owner can read message
3. Key needed to decrypt data that has been encrypted by a public key
A

4. A Key needed to encrypt data so that it that can be decrypted by a public key
5. A key used in asymmetric encryption which is not shared
A

Important Points By Sir AAQIB KHAN


Q

Asymmetric encryption uses different keys for encrypting and decrypting data.
IB

When Sender sends a message to Receiver, the message is encrypted into


cipher text using receiver’s public key.
K

When the Receiver receives the message, it is decrypted using sender private
key.
H
A

When the Receiver replies, the message is encrypted using Sender’s public
key, and when Sender receives the message, it is decrypted into plain text
N

using receiver’s private key.

Symmetric key encryption:


“One private key is held by both sender and receiver and is used for
both encryption and decryption”

Asymmetric key encryption:


“There is a public key and a private key one of which is used for encryption
and the other for decryption”
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Exam Style Question


By Sir Aaqib Khan
Katarina works for a company specialising in the sale of computer parts and
accessories.
She works in the London office and her colleague Lucy works in the Hong Kong
office.
Katarina emails confidential information to Lucy so that only Lucy can read the
information
Explain how public and private keys are used to ensure that only Lucy has a
readable copy of the confidential information
Answer
1. Katarina’s computer/software encrypts the email before she sends it using Lucy’s
public key
2. Lucy’s computer/software decrypts the email when it is received using Lucy’s
private key
3. As the private key is known only to Lucy, only she can understand the email
A

Exam Style Question


A

By Sir Aaqib Khan


Q

Sanjeet is a member of the public, and he wants to send a private message


IB

to a government department.
Explain how asymmetric encryption is used to ensure that the message
remains private.
K

Answer
User’s computer/software encrypts the message with the government department’s
H

public key
A

The government department’s computer/software decrypts the message


with their private key
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Exam Style Question


By Sir Aaqib Khan
When the government department replies to Sanjeet,
it needs to send a verified message.
Explain how asymmetric encryption can be used to ensure that it is a
verified message.
Answer:
The government department’s computer/software creates the message digest
Sanjeet’s computer/software recreates this message digest
If both copies of the message digest match the message has been verified

Explain how the use of asymmetric key cryptography ensures that


only Mariah can read the email.

Answer:
A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Quantum Cryptography
Golden Words by Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Protocols
Golden Words by Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Protocol

Secure Socket Layer (SSL)


A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

The sequence of steps 1 to 7 describes what happens when setting


up a secure connection using Secure Socket Layer (SSL).

1. Browser requests that the server identifies itself.

2. Server sends a copy of its SSL Certificate and its public key.

3. Browser checks the certificate against a list of trusted Certificate Authorities.

4. If the browser trusts the certificate, it creates, encrypts and sends the server a
symmetric session key using the server’s public key.

5. Server decrypts the symmetric session key using its private key.

6. Server sends the browser an acknowledgement, encrypted with the session key.
A

7. Server and browser now encrypt all transmitted data with the session key.
A

Exam Style Question


Q

By Sir Aaqib Khan


IB

When customers pay for their travel booking online, a secure connection is
established using Secure Socket Layer (SSL).
Explain how the customer’s browser and the server used to collect the
payment will establish a secure connection.
K
H

Browser requests that the server identifies itself


A

Server sends a copy of its (Digital) Certificate containing its public key

Browser checks the certificate against a list of trusted Certificate Authorities


N

If the browser trusts the certificate a symmetric session key is created. This is (by the
browser) encrypted using the server’s public key and sent to the server

Server decrypts the symmetric session key using its private key

Server and browser now encrypt all transmitted data with the session key
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Exam Style Question


By Sir Aaqib Khan
When customers pay for their travel booking online, a secure connection
is established using Secure Socket Layer (SSL).

Explain how the customer’s browser and the server used to collect the
payment will establish a secure connection.

1. Browser requests that the server identifies itself

2. Server sends a copy of its (Digital) Certificate containing its public key

3. Browser checks the certificate against a list of trusted Certificate Authorities

4. If the browser trusts the certificate a symmetric session key is created. This is (by the
browser) encrypted using the server’s public key and sent to the server
A

5. Server decrypts the symmetric session key, using its private key
A

6. Server and browser now encrypt all transmitted data with the session key
Q
IB

TLS protocol
“TLS is to provide for secure communication (over a network) maintain data
integrity and additional layer of security”
K

Explain the Purpose of the TLS protocol


H
A
N

Applications of TLS
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Handshake Protocol
A handshake process has to take place before any
exchange of data using the TLS protocol.

The handshake process establishes details about how the exchange of data
will occur. Digital certificates and keys are used.

The handshake process starts with:


1. The client sending some communication data to the server
2. The client asking the server to identify itself
3. The server sending its digital certificate including the public key.

Describe, in outline, the other steps


in the Handshake process.
A
A
Q
IB
K
H
A

Before any application data is transferred between the client and the server,
A handshake process takes place.
N

Part of this process is to agree the security parameters to be used.

Security parameters are as follows


P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Exam Style Question


By Sir Aaqib Khan
Both clients and servers use the Secure Socket Layer (SSL) protocol
and its successor, the Transport Layer Security (TLS) protocol.

Name the client application used in this context.


Answer: (Web) browser / email client
Name the server used in this context.
Answer: Web server / email server

Identify two problems that the SSL and TLS protocols can help to
overcome.

Answer:
A

1. Security:
For example, alteration of transmitted messages
A

2. Privacy
For example, only intended receiver can view data
Q

3. Authentication
IB

For example, trust in other party

Exam Style Question


K

By Sir Aaqib Khan


H

Julio is buying items from the online shop.


A

He already has an account with the shop.


Explain how the use of Secure Socket Layer (SSL) or Transport Layer
N

Security (TLS) helps to keep Julio’s confidential information secure.

Answer:
Computer/software checks the digital certificate of the online shop’s
website/Computer
If digital certificate is invalid his computer/software rejects website
If valid a session is created/the transaction can continue
The encryption algorithms to be used are agreed
The session keys to be used are generated
The (session) key is used to encrypt the data sent
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Digital Signatures and Digital Certificates


Golden words by Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Digital Signatures and Digital Certificates


Digital Certificate
“An electronic document from a trusted authority that ensures authentication”
OR
“Electronic document used to prove the ownership of a public key”
OR
“Electronic document used to prove that the data is from a trusted Source”

Following “Data items” present in a Digital certificate:


1. Serial number
2. Identification of Certificate Authority (that issued the certificate)
3. Version (number)
4. Valid from // start date
5. Valid to // end date
A

6. Subject name (name of user/owner/computer/network device)


7. Subject's public key
8. Hashing algorithm
A

9. Algorithm used to create signature


10. Algorithm used to hash certificate
Q

11. Hashed certificate


12. Certificate Authority that issued certificate
13. CA digital signature
IB

14. Name of company/organisation/individual/subject/owner owning


15. Certificate
16. ‘Subject’ public key
17. Period during which Certificate is valid
K

Figure shows how a user can apply for a digital certificate


H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Digital Signatures

A
A
Q
IB
K
H
A
N
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

A
A
Q
IB

Exam Style Question


By Sir Aaqib Khan
K

Question:
H

A user downloads software from the Internet.


(i) State what should be part of the download to provide proof that the
A

software is authentic.
Answer:
N

Digital Signature

Question:
Describe the process for ensuring that the software is both authentic and
has not been altered.
Answer:
• Software is put through hashing algorithm
• Hash total is encrypted with private key (digital signature)
• Software + encrypted hash / digital signature are sent
• Receiver is in possession of sender’s public key
• The received hash total / digital signature is decrypted with public key
(SH)
• The receiver hashes received software (RH)
• If SH matches RH then software is authentic and has not been altered
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Purpose of a Digital signature


1. To ensure a document is authentic or came from a trusted source
2. To ensure a document has not been altered during transmission
3. Non repudiation

How a Digital signature is produced


for transmission with the message.
1. The message is hashed with the agreed hashing algorithm to produce a
message digest

2. The message digest is encrypted with the sender’s private key so the digital
signature can be decrypted with sender’s public key
A
A

Describe the process for ensuring that the software


is both authentic and has not been altered.
Q

1. Software is put through hashing algorithm


IB

2. Hash total is encrypted with private key (digital signature)


3. Software + encrypted hash / digital signature are sent
4. Receiver is in possession of sender’s public key
5. The received hash total / digital signature is decrypted with public key (SH)
K

6. The receiver hashes received software (RH)


7. If SH matches RH then software is authentic and has not been altered
H
A

Uses where encrypted message digests are advisable.


For Example
N

1. Financial transaction
2. Legal document
3. Software distribution
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

The Method of Issuing a Digital Certificate is as follows:


1. A user starts an application for a digital certificate using their computer. On
this computer a key pair is generated. This key pair consists of a public key
and an associated private key.

2. The user submits the application to the CA. The generated PUBLIC key and
other application data are sent. The key and data are encrypted using the
CA’s PUBLIC key.

3. The CA creates a digital document containing all necessary data items and
signs it using the CA’s PRIVATE key.

4. The CA sends the digital certificate to the individual.

Asymmetric or Public key


The type of cryptography where different keys are used, one for
A

encryption and one for decryption.


A
Q

A hashing algorithm is used to generate a message


digest from the plain text message.
IB

The message digest is encrypted with the sender’s private key.


K

Exam Style Question


H

By Sir Aaqib Khan


A

Martha wants to send a private message to Joshua over the Internet.


Martha and Joshua’s computers have already exchanged digital certificates.
N

Identify items that could be contained in a digital certificate.

1. A hashing algorithm
2. public key
3. Serial number
4. Dates valid
P3-A2 Level- Encryption, Protocols and Digital certificates Sir AAQIB KHAN

Joshua and Martha’s digital certificates are used to ensure that Martha’s
message has not been altered during transmission.
Explain how asymmetric encryption uses the contents of the digital
certificates to ensure that the message has not been altered during
transmission.

• Martha’s message is encrypted using Joshua’s public key (provided by Joshua’s


digital certificate).
• Martha’s hashing algorithm is used on the message to produce the message
digest.
• The message digest is then encrypted with Martha’s private key to provide a digital
signature.
• Both the encrypted message and the digital signature are sent.
• The message is decrypted with Joshua’s private key.
A

• Martha’s digital signature is decrypted with Martha’s public key (provided by the
Martha’s digital certificate) to obtain the message digest.
A

• Martha’s hashing algorithm (provided by the Martha’s digital certificate) recreates


Q

the message digest from the decrypted message.


• The two message digests are compared, if they are the same then the message
IB

should be authentic/has not been tampered.

Wiktor is an employee of a travel agent. He uses asymmetric


encryption to send confidential information to his manager
K
H

1. Keys
2. Cipher text
A

3. Manager’s public and private keys in correct spaces


4. Wiktor’s public and private keys in correct spaces
5. Plain text
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A2 LEVEL- Computer Science - 9618 – CAIE - SYLLABUS


PAPER 3: ADVANCED THEORY

“Translation Software”
SIR AAQIB KHAN
Content Details
A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

“Translation Software”
Golden Words By Sir Aaqib Khan
A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

KEYPOINTS BY SIR AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

How an Interpreter differs from a compiler

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

Compiler Stages

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

Syntax diagrams and Backus-Naur form

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

Backus-Naur form (BNF)


Golden Words By Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

Backus-Naur form (BNF)


Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

Reverse Polish notation (RPN)


Golden Words By Sir Aaqib Khan

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

Reverse Polish notation (RPN)

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N
P3-9618-A2 Level- Translation Software Sir AAQIB KHAN

A
A
Q
IB
K
H
A
N

You might also like