Bith212 Unit 1 Integers
Bith212 Unit 1 Integers
Bith212 Unit 1 Integers
OBJECTIVES
Normally, there are four usual types of operation for integers such
as:
ADDITION AND MULTIPLICATION
a < b, a = b or a > b.
(i) a + c ≤ b + c
(ii)ac ≤ bc when c > 0, but bc ≤ ac when c<0
ABSOLUTE VALUE
|a| = a, if a > 0
OR 0, if a = 0
OR -a, if a < 0
Example:
1. Evaluate
(i) |-6|
(iii) |-4| + |3 - 2|
Example:
(a) 6 mod 2 = 0
(b) 5 mod 1 = 0
(c) 8 mod 12 = 8
(b) 100, 45
(f) 4252, 50
2. Determine whether the mod operation below is true or false. If it is false, give
the correct answer.
(a) 18 mod 2 = 0
Definition 1.3b: Let m and n be integers where m and n are not both zero. A
common divisor of m and n is an integer that divides both m and n.
Example:
The positive divisors of 30 are 1, 2, 3, 5, 6, 10, 15, 30 and the positive divisor of
105 are 1, 3, 5, 7, 15, 21, 35, 105 thus the positive common divisors of 30 and
105 are 1, 3, 5, 15
c| (m + n)
c| (m - n)
(c) if c | m, then c| mn
GREATEST COMMON DIVISOR
Example:
The greatest common divisor of 30 and 105, gcd (30, 105) is 15.
EUCLIDEAN ALGORITHM
Example:
This theorem states that any number n > 1 can be expressed uniquely in the form.
Example:
Theorem 1.4b: There is no largest prime number, that is, there exists an infinite
number of primes.
Definition 1.4b: Two integers a and b are said to be relatively prime if gcd(a,b) =
1.
Example 1.4c
9 = 3.3
25 = 5.5
If a key is defined as
Character: F P S
A B C D E G H I J K L M N O Q R T U V W X Y Z
Replaced P
by: E I J F U A X V H W G S R K O B T Q Y D M L Z N C
The S E N D M O R E M O N E Y
message:
Would be Q A R U S K T A S K R A N
encrypted
as:
By using the same key, the receiver will be able to decrypt the message.
PUBLIC KEY (RSA) ENCRYPTION TECHNIQUE
RSA is the initials of its inventors, Ronald L. Rivest, Adi Shamir, Leonard M.
Adleman. In the RSA system, each participant makes public an encryption key
and hides a decryption key.
To send a message, all one needs to do is look up the recipient’s encryption key in
a publicly distributed table. The recipient then decrypts the message using the
hidden decryption key.
Exercise:
1. Now, e = 569 since e (29) mod 660 = 1 . The pair (e , n ) = ( 569, 713 ) is
made publicly available. The private key is (d,n) = (29,713). Encrypt the
message WEAREALIVE using the key as shown in Example
1.5a.
2. Decrypt the message UTWR ENKDTEKMIGYWRA using the
key as shown in Example 1.5a.
3. Decrypt 411 using e = 569 as in Example 1.5b.
REFERENCE