comparison libtommath/demo/demo.c @ 511:582cb38e4eb5 insecure-nocrypto

propagate from branch 'au.asn.ucc.matt.dropbear' (head cdcc3c729e29544e8b98a408e2dc60e4483dfd2a) to branch 'au.asn.ucc.matt.dropbear.insecure-nocrypto' (head 0ca38a1cf349f7426ac9de34ebe4c3e3735effab)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 06 Nov 2008 13:16:55 +0000
parents 5ff8218bcee9
children 60fc6476e044
comparison
equal deleted inserted replaced
361:461c4b1fb35f 511:582cb38e4eb5
387 div2_n = mul2_n = inv_n = expt_n = lcm_n = gcd_n = add_n = 387 div2_n = mul2_n = inv_n = expt_n = lcm_n = gcd_n = add_n =
388 sub_n = mul_n = div_n = sqr_n = mul2d_n = div2d_n = cnt = add_d_n = 388 sub_n = mul_n = div_n = sqr_n = mul2d_n = div2d_n = cnt = add_d_n =
389 sub_d_n = 0; 389 sub_d_n = 0;
390 390
391 /* force KARA and TOOM to enable despite cutoffs */ 391 /* force KARA and TOOM to enable despite cutoffs */
392 KARATSUBA_SQR_CUTOFF = KARATSUBA_MUL_CUTOFF = 110; 392 KARATSUBA_SQR_CUTOFF = KARATSUBA_MUL_CUTOFF = 8;
393 TOOM_SQR_CUTOFF = TOOM_MUL_CUTOFF = 150; 393 TOOM_SQR_CUTOFF = TOOM_MUL_CUTOFF = 16;
394 394
395 for (;;) { 395 for (;;) {
396 /* randomly clear and re-init one variable, this has the affect of triming the alloc space */ 396 /* randomly clear and re-init one variable, this has the affect of triming the alloc space */
397 switch (abs(rand()) % 7) { 397 switch (abs(rand()) % 7) {
398 case 0: 398 case 0:
732 } 732 }
733 } 733 }
734 } 734 }
735 return 0; 735 return 0;
736 } 736 }
737
738 /* $Source: /cvs/libtom/libtommath/demo/demo.c,v $ */
739 /* $Revision: 1.3 $ */
740 /* $Date: 2005/06/24 11:32:07 $ */