Chapter 1: Q14E (page 49)
Suppose you want to compute the nth Fibonacci number , modulo an integer . Can you find an efficient way to do this?
Short Answer
The final running time after computing each step of is
/*! 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}
Learning Materials
Features
Discover
Chapter 1: Q14E (page 49)
Suppose you want to compute the nth Fibonacci number , modulo an integer . Can you find an efficient way to do this?
The final running time after computing each step of is
All the tools & learning materials you need for study success - in one app.
Get started for free
Digital signatures, continued.Consider the signature scheme of Exercise .
(a) Signing involves decryption, and is therefore risky. Show that if Bob agrees to sign anything he is asked to, Eve can take advantage of this and decrypt any message sent by Alice to Bob.
(b) Suppose that Bob is more careful, and refuses to sign messages if their signatures look suspiciously like text. (We assume that a randomly chosen messagethat is, a random number in the range is very unlikely to look like text.) Describe a way in which Eve can nevertheless still decrypt messages from Alice to Bob, by getting Bob to sign messages whose signatures look random.
Letdenote the set. For each of the following families of hash functions, say whether or not it is universal, and determine how many random bits are needed to choose a function from the family.
(a) , whereis a fixed prime and
Notice that each of these functions has signaturethat is, it maps a pair of integers into a single integer in.
(b) is as before, except that nowis some fixed power of.
(c) is the set of all functions.
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 , 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, where d is a secret key and N is part of the public key . Show that anyone who knows the public key can perform verify , 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 . Specify any mapping you like. Give the mapping from your name to numbers then sign the first number by giving the value , and finally show that .
(d) Alice wants to write a message that looks like it was digitally signed by Bob. She notices that Bob鈥檚 public RSA key is . To what exponent should she raise her message?
If p is prime, how many elements of have an inverse modulo ?
Consider the problem of computing x y for given integers x and y: we want the whole answer, not modulo a third integer. We know two algorithms for doing this: the iterative algorithm which performs y 鈭 1 multiplications by x; and the recursive algorithm based on the binary expansion of y. Compare the time requirements of these two algorithms, assuming that the time to multiply an n-bit number by an m-bit number is O(mn).
What do you think about this solution?
We value your feedback to improve our textbook solutions.