0% found this document useful (0 votes)
5 views3 pages

Cryptography Assignment: Euler's Totient and GCD

The document outlines an assignment on cryptography, covering topics such as Euler's Totient Function, modular arithmetic, GCD calculations, and the Extended Euclidean Algorithm. It provides specific examples and calculations for various integers and their properties in modular systems. Additionally, it includes a system of congruences to solve using the Chinese Remainder Theorem (CRT).

Uploaded by

Harshit Tripathi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Cryptography Assignment: Euler's Totient and GCD

The document outlines an assignment on cryptography, covering topics such as Euler's Totient Function, modular arithmetic, GCD calculations, and the Extended Euclidean Algorithm. It provides specific examples and calculations for various integers and their properties in modular systems. Additionally, it includes a system of congruences to solve using the Chinese Remainder Theorem (CRT).

Uploaded by

Harshit Tripathi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Cryptography - Assignment 2

1. Eulers Totient Function:

For a given number N, (N) is the count of integers from 1 to N-1 that are coprime to N.

N = 17: Since 17 is prime, (17) = 17 - 1 = 16

N = 42: 42 = 2 3 7 (42) = 42 (1 - 1/2) (1 - 1/3) (1 - 1/7) = 12

N = 25: 25 = 5^2 (25) = 25 (1 - 1/5) = 20

2.

a) In Z:

Additive inverse of 27 = 100 - 27 = 73

Multiplicative inverse: (27 x) mod 100 = 1 x = 63

b) (101) = 100, (102) = 34, (500) = 200

3.

Eulers theorem (a^(n) 1 mod n) gives:

Z* has (9) = 6

Inverses: 11, 25, 47, 52, 74, 88

4.

a) 6 mod 7 = 6

b) 7 mod 15 = 13

c) 19 mod 101 = 64

d) 97 mod 100 = 97

5.
a) 4100 mod 7 = 2 x = 2

b) 9x 13 mod 17 x = 3

c) 5x 13 mod 17 x = 11

d) 7x 11 mod 13 x = 2

6.

Operations in GF(2) with irreducible polynomial f(x) = x + x + 1.

(Solutions need field arithmetic using polynomial division.)

7. GCD:

a) GCD(726, 1144) = 22

b) GCD(2184, 16170) = 6

c) GCD(113, 13) = 1

8.

Using Extended Euclidean Algorithm:

GCD(654, 123) = 3

Find u, v: 654u + 123v = 3 u = -7, v = 37

9.

a) 13 mod 31 = 12

b) 111 mod 4111 = 3535

10.

a) y 3 mod 143 y = 25, 118

b) y 421 mod 693 y = 127, 566


11. CRT:

System:

x 3 mod 5

x 1 mod 7

x 6 mod 8

x 103 mod 280

Common questions

Powered by AI

Euler's Totient Function, denoted 𝜙(N), represents the count of integers up to a given integer N that are coprime to N. For any prime number p, 𝜙(p) equals p-1 because all numbers less than p are coprime with it . For a composite number, such as 42, which factors as 2, 3, and 7, the function 𝜙(42) is calculated using the formula 𝜙(n) = n * (1 - 1/p1) * (1 - 1/p2) * ... for its prime factors, resulting in 𝜙(42) = 12 . This function is central to number theory and cryptography, particularly in algorithms like RSA, where the security relies on properties of coprime numbers and modular arithmetic.

To find the multiplicative inverse of a number x modulo n, one must find an integer y such that (x*y) mod n = 1. Using this method, the multiplicative inverse of 27 under modulo 100 is solved by finding a y that satisfies (27*y) mod 100 = 1, which yields y = 63 . The existence of this inverse implies that 27 and 100 are coprime, which is a necessary condition for inverses in modular arithmetic.

Modular inverses are critical in cryptography, especially in key exchange and signature algorithms. An inverse is used to revert an encrypted number to its original form. For instance, the multiplicative inverse of 27 in modulo 100 is 63, which when multiplied together under modulo 100 yields 1, demonstrating that this inverse can decrypt what has been encrypted . Such computations underpin systems like RSA where encryption and decryption keys are inverses under modulo exponentiation.

The Chinese Remainder Theorem states that if you have several congruences with pairwise coprime moduli, there exists a unique integer solution modulo the product of these moduli. Given the system: x ≡ 3 (mod 5), x ≡ 1 (mod 7), x ≡ 6 (mod 8), and x ≡ 103 (mod 280), CRT facilitates finding a congruence for a common x satisfying all these conditions . By sequentially solving pairwise and augmenting the solution set, such a system can be resolved, demonstrating its value in cryptographic protocols where efficiency in computing with large integers is crucial.

Euler’s Theorem states that if a and n are coprime, then a raised to the power of 𝜙(n) is congruent to 1 modulo n, i.e., a^(𝜙(n)) ≡ 1 (mod n). For instance, in the set Z* presented, where the function 𝜙(9) equals 6, the theorem ensures that numbers such as 11, 25, 47, etc., understand certain modular inverses and exponentiation properties . This principle underlies the RSA cryptosystem, where public and private keys are calculated using Euler’s Totient function to ensure secure communication based on modular arithmetic properties.

The Extended Euclidean Algorithm not only finds the greatest common divisor (GCD) of two numbers but also computes integers u and v that satisfy Bézout’s identity: 654u + 123v = GCD(654, 123). In this case, the identity is satisfied with u = -7 and v = 37 . This formulation proves essential in algorithms addressing integer linear combinations, such as in RSA key generation where such computations contribute to establishing linkages between private keys and public keys in cryptography.

In Z, an additive group requires each element to have an additive inverse, e.g., for 27, the inverse modulo 100 is 73 . Similarly, the multiplicative group properties demand a multiplicative inverse such as 27’s inverse being 63 under modulo 100, ensuring that all products and sums remain closed within the group . These inverses ensure the structure maintains closure, identity, and inverse properties essential in cryptographic algorithms for enciphering and deciphering.

The GCD determines the divisibility and common factors of integers, which is crucial in many cryptographic protocols. For instance, the calculation of GCD(726, 1144) = 22 highlights the direct application of GCD in deciding coprime conditions . Many cryptographic systems rely on the coprimality of numbers, such as in RSA encryption, where the security of encryption is based on the difficulty of factoring large numbers whose GCD properties are controlled.

In a finite field like GF(2), arithmetic is carried out with coefficients reduced modulo 2. For example, to divide a polynomial by an irreducible polynomial such as f(x) = x^2 + x + 1, one would perform polynomial division where additions and subtractions are performed modulo 2. The use of irreducible polynomials ensures that the field defined is 'closed', meaning all operations yield elements within the same finite field . This process is pivotal in error detection and correction algorithms that rely on field arithmetic, such as in coding theory and error-correcting codes.

Solving modular equations illuminates properties such as periodicity and symmetry within integer sets. For example, 4100 mod 7 = 2 reveals that despite large computations, modular reductions simplify outcomes to predictable periodic results . In cryptography, this characteristic is utilized in creating repeatable yet secure transformations of data, forming a backbone for hash functions and encryption algorithms where repeatable outputs ensure consistency while obscuring the globally original input.

You might also like