Electromigration: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Woohookitty
m WPCleaner v1.14 - Repaired 1 link to disambiguation page - (You can help) - Passivation, 1 to be fixed - Open circuit
 
en>Monkbot
Line 1: Line 1:
He got back late, and looked so tired I said I�d order a Rasa curry, which I did. So, on Friday, I emailed him in the morning to say that I�d been worried by the fact that he�d read the address of my London flat on the internet. They wanted to phone us back, so I reminded David I�d lost my BlackBerry, and have no idea what the number of the Bat Phone is.<br><br>I keep conjuring up images of him in 1983, trying to reignite the passion. <br>I told him, before he started wriggling, that I think that memorable evening, when after our game of squash he had asked me to take his racquet home for him because he had a date, he had already started seeing the woman he would marry.<br><br>He bought me a bottle of prosecco, and some shopping. On Sunday, we went to the Matisse exhibition at the Tate Modern (walking round the exhibit, talking, made me feel as though we were in a Woody Allen movie), and again his car had a parking ticket on it when we returned to it. This time, though, he didn�t hand it to me, although it�s sitting, accusingly, on my desk.<br><br>The whole phone, in fact, is a gleaming object of desire but it lacks standout new features other than the cameras, so you�ll miss out on gizmos such as the Samsung S5�s fingerprint scanner, or LG G3�s frankly frightening Quad HD screen.<br><br>99                  &#9733;&#9733;&#9733;&#9733;&#9733;Most of us who can be considered vaguely literate felt a faint anger when the term �selfie� passed from geek-speak into common parlance, especially after this year�s famous examples at the Oscars and Nelson Mandela�s funeral, where Barack Obama snuggled up to David Cameron. Huawei Ascend P7 �329.<br><br>And don�t say, �Don�t give me a hard time� when it�s you giving me a hard time. I did nothing today other than work hard and order dinner. 'Have a great life together, just leave me out of it. �You know I have no interest in her. I didn�t realise you had taken my keys back. I hope that was just a fit of pique. �<br>This came back the next morning, when he�d arrived at work. I love you and no one else. I have to work now, but I�ll see you tonight, as usual. My life is an open book to you.<br><br>Isobel and Dawn are in situ already, chilling the wine. Lots of books on Kindle. My Accessorize pink bikini. Wow, are we going to whip up some copy! What about the wedding proposal on the Pampelonne beach and me and Dawn can scatter white rose petals. Xxx� <br>The thing is, I�m not even sure David is still coming� Packing in tissue paper tonight: The Row sunglasses. My Dries negligee dress. Isobel has just sent me a message�<br>�The cast of Liz Jones�s Diary are off to the South of France. Let�s get this show on the road!<br><br>She had written to him three times, about him giving her his car (His reply: �I will send you the log book�), and having found his bow tie (His reply: �I spent �75 on one last week.<br><br>The famous Oscars �selfie� taken by Bradley Cooper and featuring Angelina Jolie, Brad Pitt, Meryl Streep, Julia Roberts, Ellen DeGeneres, Jennifer Lawrence, Lupita Nyong�o, her brother Peter, Kevin Spacey, Jared Leto and Channing Tatum<br>But Huawei (pronounced like the reverse of a jubilant �Whahey�) needed to add to the language to sum up the purpose of its new Ascend P7�s stand-out feature - a forward-facing eight-megapixel camera, with the option for panoramic shots. By law, this is the only phone you�ll be taking �groufies� on - although as yet, the trademark doesn�[https://www.Google.com/search?hl=en&gl=us&tbm=nws&q=t+apply t apply] in the UK, so users of other phones can still use it for their own work. Unless you�re the size of a Weight Watchers �before� picture, there�s only one reason for this to exist - a �group selfie� (ie, a group shot where one of you holds the camera) - hence �groufie�. Huawei is so proud of the word the company trademarked it in several countries to mark the launch of the P7.<br><br>In case you�re wondering what Huawei is, it�s one of those Chinese companies that only recently began hawking smartphones in the West, and shifts so many phones in the Far East it�s the third biggest phone company on Earth.<br><br>Upstage selfie-toting friends by turning you and your pals into a real 3D-model (warning: there�s a fair bit of work involved), ready to print off. The app �walks� you round anything to capture it in 3D - now all you need is a few hundred quid for a 3D printer.<br><br>Huawei�s invention of the g-word, and the [http://Www.alexa.com/search?q=panoramic+software&r=topsites_index&p=bigtop panoramic software] to make it a reality, is down to a feeling that the endless Twitter parade of selfies (both celebrity and human), might be improved with a bit of context. And in action, it�s impressive too.<br><br>WOLFENSTEIN: THE NEW ORDER�40, PC, CONSOLES<br>The biggest surprise in Wolfensteing: The New Order is that it's the tense plotting that lifts this violent tale above its beige rivals <br>With an alternate-history plot hewn from the finest codswallop - a Nazi general uses high technology to summon an army of robots and zombies - the biggest surprise here is that it�s the tense plotting that lifts this violent tale above its beige rivals. &#9733;&#9733;&#9733;&#9733;&#9733;<br><br>If you have any questions about where by and how to use [http://nouveauclashofclanstriche.blogspot.com/ http://nouveauclashofclanstriche.blogspot.com/], you can make contact with us at the web page.
In [[group theory]], a branch of mathematics, the '''baby-step giant-step''' is a [[Meet-in-the-middle attack|meet-in-the-middle]] [[algorithm]] computing the [[discrete logarithm]]. The discrete log problem is of fundamental importance to the area of [[public key cryptography]]. Many of the most commonly used cryptography systems are based on the assumption that the discrete log is extremely difficult to compute; the more difficult it is, the more security it provides a data transfer. One way to increase the difficulty of the discrete log problem is to base the cryptosystem on a larger group.
 
==Theory==
The algorithm is based on a [[space-time tradeoff]]. It is a fairly simple modification of [[trial multiplication]], the naive method of finding discrete logarithms.
 
Given a [[cyclic group]] <math>G</math> of order <math>n</math>, a [[Generating set of a group|generator]] <math>\alpha</math> of the group and a group element <math>\beta</math>, the problem is to find an integer <math>x</math> such that
: <math>\alpha^x = \beta\,.</math>
The baby-step giant-step algorithm is based on rewriting <math>x</math> as <math>x = im + j</math>, with <math>m = \left\lceil \sqrt{n} \right\rceil </math> and <math>0 \leq i < m</math> and <math>0 \leq j < m</math>. Therefore, we have:
:<math>\beta(\alpha^{-m})^i=\alpha^j\,.</math>
 
The algorithm precomputes <math>\alpha^j</math> for several values of <math>j</math>. Then it fixes an <math>m</math> and tries values of <math>i</math> in the left-hand side of the congruence above, in the manner of trial multiplication. It tests to see if the congruence is satisfied for any value of <math>j</math>, using the precomputed values of <math>\alpha^j</math>.
 
==The algorithm==
'''Input''': A cyclic group ''G'' of order ''n'', having a generator α and an element β.
 
'''Output''': A value ''x'' satisfying <math>\alpha^{x}=\beta</math>.
 
# ''m'' ← Ceiling(√''n'')
# For all ''j'' where 0 ≤ ''j'' &lt; ''m'':
## Compute α<sup>''j''</sup> and store the pair (''j'', α<sup>''j''</sup>) in a table. (See section "In practice")
# Compute α<sup>&minus;''m''</sup>.
# γ ← β. (set γ = β)
# For ''i'' = 0 to (''m'' &minus; 1):
## Check to see if γ is the second component (α<sup>''j''</sup>) of any pair in the table.
## If so, return ''im'' + ''j''.
## If not, γ ← γ • α<sup>&minus;''m''</sup>.
 
 
=== C algorithm with the [[GNU MP]] lib ===
<source lang = "c">
void baby_step_giant_step (mpz_t g, mpz_t h, mpz_t p, mpz_t n, mpz_t x ){
  unsigned long int i;
  long int j = 0;
  mpz_t N;
  mpz_t* gr ; /* list g^r */
  unsigned long int* indices; /* indice[ i ] = k <=> gr[ i ] = g^k */
  mpz_t hgNq ; /* hg^(Nq) */
  mpz_t inv ; /* inverse of g^(N) */
  mpz_init (N) ;
  mpz_sqrt (N, n ) ;
  mpz_add ui (N, N, 1 ) ;
 
  gr = malloc (mpz_get_ui (N) * sizeof (mpz t) ) ;
  indices = malloc ( mpz_get_ui (N) * sizeof (long int ) ) ;
  mpz_init_set_ui (gr[ 0 ], 1);
 
  /* find the sequence {g^r} r = 1 ,.. ,N (Baby step ) */
  for ( i = 1 ; i <= mpz get ui (N) ; i++) {
      indices[i - 1] = i - 1 ;
      mpz_init (gr[ i ]) ;
      mpz_mul (gr[ i ], gr[ i - 1 ], g ); /* multiply gr[i - 1] for g */
      mpz_mod (gr[ i ], gr[ i ], p );
  }
  /* sort the values (k , g^k) with respect to g^k */
  quicksort ( gr, indices, 0, mpz_get_ui (N) ) ;
  /* on calcule g^(-Nq)  (Giant step) */
  mpz_init_set (inv, g);
  mpz_powm (inv, inv, N, p);  /* inv <- inv ^ N (mod p)  */
  inverse (inv, p, inv) ;
 
  mpz_init_set (hgNq, h);
 
  /* find the elements in the two sequences */
  for ( i = 0 ; i <= mpz get ui (N) ; i++){
      /* find hgNq in the sequence gr ) */
      j = binary_search (gr, hgNq, 0, mpz_get_ui (N) ) ;
      if ( j >= 0 ){
        mpz_mul_ui (N, N, i);
        mpz_add_ui (N, N, indices [j]);
        mpz_set (x, N) ;
        return;
      }
      /* if j < 0, find the next value of g^(Nq) */
      mpz_mul (hgNq, hgNq, inv);
      mpz_mod (hgNq, hgNq, p);
  }
}
 
</source>
 
==In practice==
The best way to speed up the baby-step giant-step algorithm is to use an efficient table lookup scheme. The best in this case is a [[hash table]]. The hashing is done on the second component, and to perform the check in step 1 of the main loop, γ is hashed and the resulting memory address checked. Since hash tables can retrieve and add elements in [[Big O notation|O]](1) time (constant time), this does not slow down the overall baby-step giant-step algorithm.
 
The running time of the algorithm and the space complexity is [[Big O notation|O]](<math>\sqrt n</math>), much better than the [[Big O notation|O]](n) running time of the naive brute force calculation.
 
== Notes ==
* The baby-step giant-step algorithm is a generic algorithm. It works for every finite cyclic group.
* It is not necessary to know the order of the group ''G'' in advance. The algorithm still works if ''n'' is merely an upper bound on the group order.
* Usually the baby-step giant-step algorithm is used for groups whose order is prime. If the order of the group is composite then the [[Pohlig-Hellman algorithm]] is more efficient.
* The algorithm requires [[Big O notation|O]](''m'') memory. It is possible to use less memory by choosing a smaller ''m'' in the first step of the algorithm. Doing so increases the running time, which then is [[Big O notation|O]](''n''/''m''). Alternatively one can use [[Pollard's rho algorithm for logarithms]], which has about the same running time as the baby-step giant-step algorithm, but only a small memory requirement.
* The algorithm was originally developed by [[Daniel Shanks]].
 
==References==
{{reflist}}
 
*H. Cohen, A course in computational algebraic number theory, Springer, 1996.
*D. Shanks. Class number, a theory of factorization and genera. In Proc. Symp. Pure Math. 20, pages 415—440. AMS, Providence, R.I., 1971.
*A. Stein and E. Teske, Optimized baby step-giant step methods, Journal of the Ramanujan Mathematical Society 20 (2005), no. 1, 1–32.
*A. V. Sutherland, [http://groups.csail.mit.edu/cis/theses/sutherland-phd.pdf Order computations in generic groups], PhD thesis, M.I.T., 2007.
*D. C. Terr, A modification of Shanks’ baby-step giant-step algorithm, Mathematics of Computation 69 (2000), 767–773.
 
{{Number-theoretic algorithms}}
 
[[Category:Group theory]]
[[Category:Number theoretic algorithms]]

Revision as of 22:33, 17 January 2014

In group theory, a branch of mathematics, the baby-step giant-step is a meet-in-the-middle algorithm computing the discrete logarithm. The discrete log problem is of fundamental importance to the area of public key cryptography. Many of the most commonly used cryptography systems are based on the assumption that the discrete log is extremely difficult to compute; the more difficult it is, the more security it provides a data transfer. One way to increase the difficulty of the discrete log problem is to base the cryptosystem on a larger group.

Theory

The algorithm is based on a space-time tradeoff. It is a fairly simple modification of trial multiplication, the naive method of finding discrete logarithms.

Given a cyclic group G of order n, a generator α of the group and a group element β, the problem is to find an integer x such that

αx=β.

The baby-step giant-step algorithm is based on rewriting x as x=im+j, with m=n and 0i<m and 0j<m. Therefore, we have:

β(αm)i=αj.

The algorithm precomputes αj for several values of j. Then it fixes an m and tries values of i in the left-hand side of the congruence above, in the manner of trial multiplication. It tests to see if the congruence is satisfied for any value of j, using the precomputed values of αj.

The algorithm

Input: A cyclic group G of order n, having a generator α and an element β.

Output: A value x satisfying αx=β.

  1. m ← Ceiling(√n)
  2. For all j where 0 ≤ j < m:
    1. Compute αj and store the pair (j, αj) in a table. (See section "In practice")
  3. Compute αm.
  4. γ ← β. (set γ = β)
  5. For i = 0 to (m − 1):
    1. Check to see if γ is the second component (αj) of any pair in the table.
    2. If so, return im + j.
    3. If not, γ ← γ • αm.


C algorithm with the GNU MP lib

void baby_step_giant_step (mpz_t g, mpz_t h, mpz_t p, mpz_t n, mpz_t x ){
   unsigned long int i;
   long int j = 0;
   mpz_t N;
   mpz_t* gr ; /* list g^r */
   unsigned long int* indices; /* indice[ i ] = k <=> gr[ i ] = g^k */
   mpz_t hgNq ; /* hg^(Nq) */
   mpz_t inv ; /* inverse of g^(N) */
   mpz_init (N) ;
   mpz_sqrt (N, n ) ;
   mpz_add ui (N, N, 1 ) ;

   gr = malloc (mpz_get_ui (N) * sizeof (mpz t) ) ;
   indices = malloc ( mpz_get_ui (N) * sizeof (long int ) ) ;
   mpz_init_set_ui (gr[ 0 ], 1);

   /* find the sequence {g^r} r = 1 ,.. ,N (Baby step ) */
   for ( i = 1 ; i <= mpz get ui (N) ; i++) {
      indices[i - 1] = i - 1 ;
      mpz_init (gr[ i ]) ;
      mpz_mul (gr[ i ], gr[ i - 1 ], g ); /* multiply gr[i - 1] for g */
      mpz_mod (gr[ i ], gr[ i ], p );
   }
   /* sort the values (k , g^k) with respect to g^k */
   quicksort ( gr, indices, 0, mpz_get_ui (N) ) ;
   /* on calcule g^(-Nq)   (Giant step) */
   mpz_init_set (inv, g);
   mpz_powm (inv, inv, N, p);  /* inv <- inv ^ N (mod p)  */
   inverse (inv, p, inv) ;

   mpz_init_set (hgNq, h);

   /* find the elements in the two sequences */
   for ( i = 0 ; i <= mpz get ui (N) ; i++){
      /* find hgNq in the sequence gr ) */
      j = binary_search (gr, hgNq, 0, mpz_get_ui (N) ) ;
      if ( j >= 0 ){
         mpz_mul_ui (N, N, i);
         mpz_add_ui (N, N, indices [j]);
         mpz_set (x, N) ;
         return;
      }
      /* if j < 0, find the next value of g^(Nq) */
      mpz_mul (hgNq, hgNq, inv);
      mpz_mod (hgNq, hgNq, p);
   }
}

In practice

The best way to speed up the baby-step giant-step algorithm is to use an efficient table lookup scheme. The best in this case is a hash table. The hashing is done on the second component, and to perform the check in step 1 of the main loop, γ is hashed and the resulting memory address checked. Since hash tables can retrieve and add elements in O(1) time (constant time), this does not slow down the overall baby-step giant-step algorithm.

The running time of the algorithm and the space complexity is O(n), much better than the O(n) running time of the naive brute force calculation.

Notes

  • The baby-step giant-step algorithm is a generic algorithm. It works for every finite cyclic group.
  • It is not necessary to know the order of the group G in advance. The algorithm still works if n is merely an upper bound on the group order.
  • Usually the baby-step giant-step algorithm is used for groups whose order is prime. If the order of the group is composite then the Pohlig-Hellman algorithm is more efficient.
  • The algorithm requires O(m) memory. It is possible to use less memory by choosing a smaller m in the first step of the algorithm. Doing so increases the running time, which then is O(n/m). Alternatively one can use Pollard's rho algorithm for logarithms, which has about the same running time as the baby-step giant-step algorithm, but only a small memory requirement.
  • The algorithm was originally developed by Daniel Shanks.

References

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.

  • H. Cohen, A course in computational algebraic number theory, Springer, 1996.
  • D. Shanks. Class number, a theory of factorization and genera. In Proc. Symp. Pure Math. 20, pages 415—440. AMS, Providence, R.I., 1971.
  • A. Stein and E. Teske, Optimized baby step-giant step methods, Journal of the Ramanujan Mathematical Society 20 (2005), no. 1, 1–32.
  • A. V. Sutherland, Order computations in generic groups, PhD thesis, M.I.T., 2007.
  • D. C. Terr, A modification of Shanks’ baby-step giant-step algorithm, Mathematics of Computation 69 (2000), 767–773.

Template:Number-theoretic algorithms