• No se han encontrado resultados

Efecto sobre aspectos ultraestructurales de la planta

2. EFECTO DE LA RADIACIÓN ULTRAVIOLETA (UV-B) SOBRE LA EFICIENCIA

2.2 MARCO TEÓRICO

2.2.1 Efecto sobre aspectos ultraestructurales de la planta

Algorithm)

INPUT p: a positive integer;

OUTPUT YES if p is prime, NO otherwise.

Prime_Test(p)

repeat log2p times:

x U (1, p – 1]; a. if gcd(x, p) > 1 or x(p – 1)/2 ±1 (mod p) return( NO ); b. end_of_repeat; 1.

if ( test in 1.(b) never shows –1 ) return( NO );

2.

return( YES ).

3.

First of all, we know from Fermat's Little Theorem (Theorem 6.10 in §6.4) that if p is prime then for all x < p:

Equation 4.4.8

So if p is prime then Prime_Test(p) will always return YES, that is, we always have (including the case of p being the even prime)

• Table of Contents

Modern Cryptography: Theory and Practice By Wenbo Mao Hewlett-Packard Company

Publisher: Prentice Hall PTR Pub Date: July 25, 2003

ISBN: 0-13-066943-1 Pages: 648

Many cryptographic schemes and protocols, especially those based on public-keycryptography, have basic or so-called "textbook crypto" versions, as these versionsare usually the subjects for many textbooks on cryptography. This book takes adifferent approach to introducing

cryptography: it pays much more attention tofit-for-application aspects of cryptography. It explains why "textbook crypto" isonly good in an ideal world where data are random and bad guys behave nicely.It reveals the general unfitness of "textbook crypto" for the real world by demonstratingnumerous attacks on such schemes, protocols and systems under variousreal- world application scenarios. This book chooses to introduce a set of practicalcryptographic schemes, protocols and systems, many of them standards or de factoones, studies them closely, explains their working principles, discusses their practicalusages, and examines their strong (i.e., fit-for-application) security properties, oftenwith security evidence formally established. The book also includes self-containedtheoretical background material that is the foundation for modern cryptography.

On the other hand, if p is a composite number then congruence (4.4.7) will not hold in general. In fact (a fact in Group Theory, see Example 5.2.3 and Theorem 5.1 (in §5.2.1) if the inequality against congruence (4.4.7) shows for one x < p with gcd(x, p) = 1 then the inequality must show for at least half the numbers of this kind. Thus we conclude that for x U (1, p – 1] with

gcd(x, p) = 1:

Equation 4.4.9

Therefore, if the test passes k times for x chosen at uniformly random (remember that the – 1 case is seen to hold at least once), then the probability that p is not prime is less than 2–k. Here

we have used the "unanimous election criterion": p will be rejected if there is a single failure in log2p tests. Notice that this election criterion is different from the majority election one which we have studied in §4.4.1 (for the general case of two-sided error problems) where failures will be tolerated as long as the number of failures does not exceed half the number of tests. In this "unanimous election" the soundness probability tends to 0 much faster than the majority election case.

We have set k = log2p, and so any input instance p:

In §4.3 we have seen that computing modulo exponentiation and computing the greatest common divisor with log2p -bit long input value have their time complexities bounded by OB((log2p)3). Therefore the time complexity of Prime_Test(p) is bounded by OB((logp)4).

To this end we know that PRIMES – the language of all prime numbers – is in (Monte Carlo).

Nevertheless without invalidating this statement, in August 2002, three Indian computer scientists, Agrawal, Kayal and Saena, find a deterministic polynomial-time primality test algorithm [8]; consequently, PRIMES is in fact in .

4.4.4 Subclass "Probably Fast and Always Correct"

A subclass of which we name (Las Vegas) (stands for "Las Vegas") if the error probability bounds in (4.4.1) and (4.4.2) have the following characterization: for any L (Las Vegas) there exists a randomized algorithm A such that for any instance I

• Table of Contents

Modern Cryptography: Theory and Practice By Wenbo Mao Hewlett-Packard Company

Publisher: Prentice Hall PTR Pub Date: July 25, 2003

ISBN: 0-13-066943-1 Pages: 648

Many cryptographic schemes and protocols, especially those based on public-keycryptography, have basic or so-called "textbook crypto" versions, as these versionsare usually the subjects for many textbooks on cryptography. This book takes adifferent approach to introducing

cryptography: it pays much more attention tofit-for-application aspects of cryptography. It explains why "textbook crypto" isonly good in an ideal world where data are random and bad guys behave nicely.It reveals the general unfitness of "textbook crypto" for the real world by demonstratingnumerous attacks on such schemes, protocols and systems under variousreal- world application scenarios. This book chooses to introduce a set of practicalcryptographic schemes, protocols and systems, many of them standards or de factoones, studies them closely, explains their working principles, discusses their practicalusages, and examines their strong (i.e., fit-for-application) security properties, oftenwith security evidence formally established. The book also includes self-containedtheoretical background material that is the foundation for modern cryptography.

and

here is any constant in the interval ( ,1) Again, as in the case of one-sided-error in the soundness side (§4.4.3), because there is no need to use the majority election criterion in the process of enlarging the completeness probability bound, can actually be any constant in (0, 1).

Also again we should notice 1; otherwise the subclass degenerates to the special case . Randomized algorithms with this error-probability characterization have one-sided error in the completeness side. In other words, such an algorithm may make a mistake in terms of a false non-recognition of an instance. However, if an instance is recognized then no mistake is possible: the instance must be a genuine one. This subclass of algorithms are called Las Vegas algorithms. The term Las Vegas, first introduced in [16], refers to randomized algorithms which either give the correct answer or no answer at all.

From our analysis in §4.4.1.1, we know that the probability for a Las Vegas algorithm to give YES answer to an instance can be enlarged to arbitrarily closing to 1 by independent iterating the algorithm and the iterated algorithm remains in polynomial time. If we say that Monte Carlo algorithms are always fast and probably correct, then Las Vegas algorithms are always correct and probably fast.

Observing the error probability characterizations of , (Monte Carlo) and (Las Vegas), the following equation is obvious

4.4.4.1 An Example of Las Vegas Algorithms

Let p be an odd positive integer and let p – 1 = q1q2 … qk as the complete prime factorization of p – 1 (some of the prime factors may repeat). In Chapter 5 we will establish a fact (5.4.4): p is prime if and only if there exists a positive integer g [2, p – 1] such that

Equation 4.4.10

This fact provides us with an algorithm for proving primality. Inputting an odd number p and the complete prime factorization of p – 1, the algorithm tries to find a number g satisfying (4.4.10).

• Table of Contents

Modern Cryptography: Theory and Practice By Wenbo Mao Hewlett-Packard Company

Publisher: Prentice Hall PTR Pub Date: July 25, 2003

ISBN: 0-13-066943-1 Pages: 648

Many cryptographic schemes and protocols, especially those based on public-keycryptography, have basic or so-called "textbook crypto" versions, as these versionsare usually the subjects for many textbooks on cryptography. This book takes adifferent approach to introducing

cryptography: it pays much more attention tofit-for-application aspects of cryptography. It explains why "textbook crypto" isonly good in an ideal world where data are random and bad guys behave nicely.It reveals the general unfitness of "textbook crypto" for the real world by demonstratingnumerous attacks on such schemes, protocols and systems under variousreal- world application scenarios. This book chooses to introduce a set of practicalcryptographic schemes, protocols and systems, many of them standards or de factoones, studies them closely, explains their working principles, discusses their practicalusages, and examines their strong (i.e., fit-for-application) security properties, oftenwith security evidence formally established. The book also includes self-containedtheoretical background material that is the foundation for modern cryptography.

If such a number is found, the algorithm outputs YES and terminates successfully, and p must be prime. Otherwise, the algorithm will be in an undecided state; this means, it does not know if p is prime or not. The algorithm is specified in Alg 4.6.

First we notice k log2(p – 1), therefore Alg 4.6 terminates in time polynomial in the size of p.

From the fact to be established in Theorem 5.12 (in §5.4.4), we will see that if Alg 4.6 outputs YES, then the input integer p must be prime; no error is possible. Also, if the algorithm outputs NO, the answer is also correct since otherwise Fermat's Little Theorem (4.4.8) will be violated. These two cases reflect the algorithm's "always correct" nature. The error-free property of the algorithm entitles it to be named "Proof of Primality."