/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q16E The algorithm for computing abmo... [FREE SOLUTION] | 91影视

91影视

The algorithm for computing abmodCby repeated squaring does not necessarily lead to the minimum number of multiplications. Give an example of b>10where the exponentiation can be performed using fewer multiplications, by some other method.

Short Answer

Expert verified

The new method is performed by using fewer multiplications than the given algorithm.

Step by step solution

01

Introduction 

Example for exponentiation:

Consider the value of b is 15

The repeated squaring algorithm calculates the value b15 by following method:

a15=a*a2*a4*a8

In the above calculation,

a2鈥 is having one multiplication (i.e.a2=aa ).

a4鈥 is having one multiplication (i.e.a4=a2a2).

a8鈥 is having one multiplication (i.e. a8=a4a4).

The expression 鈥aa2a4a8鈥 has three multiplications.

Therefore, the above method takes totally 6 multiplications.

02

Data step

Other method for exponentiation:

Consider the value 鈥渂 鈥 is 鈥15 鈥.

Split the value 鈥 15 鈥 into 鈥 3 6 , and 12 鈥.

Initially, find 鈥a3=a*a*a 鈥.

This step contains two multiplications process.

Find 鈥a6=a3*a3 鈥.

This step contains one multiplication process.

And find 鈥a12=a6*a6 鈥.

This step contains one multiplication process.

Then finally, 鈥a15鈥 can be calculated by the following:

a15=a12*a3

The above step contains one multiplication process.

Thus, the above method takes a totally5 multiplications.

Therefore, the new method is performed by using fewer multiplications than the given algorithm.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with 91影视!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Give an efficient algorithm to compute the least common multiple of two n-bit numbers x and y, that is, the smallest number divisible by bothx and y. What is the running time of your algorithm as a function of n?

A d-ary tree is a rooted tree in which each node has at most dchildren. Show that any d-ary tree with n nodes must have a depth of(lognlogd) .Can you give a precise formula for the minimum depth it could possibly have?

In an RSA cryptosystem, p = 7and q = 11(as in Figure 1.9). Find appropriate exponents and .

Consider an RSA key set with p = 17 , q = 23, N = 23 and e = 3 (as in Figure 1.9). What value of d should be used for the secret key? What is the encryption of the message M = 41 ?

RSA and digital signatures. Recall that in the RSA public-key cryptosystem, each user has a public key P=(N,e) and a secret key d. In a digital signature scheme, there are two algorithms, sign and verify. The sign procedure takes a message and a secret key, then outputs a signature . The verify procedure takes a public key (N,e), a signature , and a message M, then returns 鈥渢rue鈥 if could have been created by sign (when called with message M and the secret key (N, e) corresponding to the public key ); 鈥渇alse鈥 otherwise.

(a)Why would we want digital signatures?

(b) An RSA signature consists of sign, (M,d)=Md(modN)where d is a secret key and N is part of the public key . Show that anyone who knows the public key (N,e)can perform verify ((N,e),Md,M), i.e., they can check that a signature really was created by the private key. Give an implementation and prove its correctness.

(c) Generate your own RSA modulus, N=pq public key e, and private key d (you don鈥檛 need to use a computer). Pick p and q so you have a 4-digit modulus and work by hand. Now sign your name using the private exponent of this RSA modulus. To do this you will need to specify some one-to-one mapping from strings to integers in [0,N-1]. Specify any mapping you like. Give the mapping from your name to numbers m1,m2,...mk,then sign the first number by giving the value md1(modN), and finally show that .

(md1)e=m1(modN)

(d) Alice wants to write a message that looks like it was digitally signed by Bob. She notices that Bob鈥檚 public RSA key is (17,391). To what exponent should she raise her message?

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.