diff options
Diffstat (limited to 'crypto/bn')
-rw-r--r-- | crypto/bn/bn.h | 10 | ||||
-rw-r--r-- | crypto/bn/bn_exp2.c | 2 | ||||
-rw-r--r-- | crypto/bn/bn_lib.c | 4 | ||||
-rw-r--r-- | crypto/bn/bn_mul.c | 14 | ||||
-rw-r--r-- | crypto/bn/bn_opts.c | 4 | ||||
-rw-r--r-- | crypto/bn/bn_prime.c | 4 | ||||
-rw-r--r-- | crypto/bn/bn_print.c | 10 | ||||
-rw-r--r-- | crypto/bn/bn_sqr.c | 2 |
8 files changed, 25 insertions, 25 deletions
diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index 417f3706fb..63606e1ac5 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -83,12 +83,12 @@ extern "C" { * The reason for this flag is that when the particular C compiler * library routine is used, and the library is linked with a different * compiler, the library is missing. This mostly happens when the - * library is built with gcc and then linked using nornal cc. This would - * be a common occurance because gcc normally produces code that is + * library is built with gcc and then linked using normal cc. This would + * be a common occurrence because gcc normally produces code that is * 2 times faster than system compilers for the big number stuff. * For machines with only one compiler (or shared libraries), this should * be on. Again this in only really a problem on machines - * using "long long's", are 32bit, and are not using my assember code. */ + * using "long long's", are 32bit, and are not using my assembler code. */ #if defined(MSDOS) || defined(WINDOWS) || defined(linux) #define BN_DIV2W #endif @@ -118,8 +118,8 @@ extern "C" { /* This is where the long long data type is 64 bits, but long is 32. * For machines where there are 64bit registers, this is the mode to use. - * IRIX, on R4000 and above should use this mode, along with the relevent - * assember code :-). Do NOT define BN_LLONG. + * IRIX, on R4000 and above should use this mode, along with the relevant + * assembler code :-). Do NOT define BN_LLONG. */ #ifdef SIXTY_FOUR_BIT #undef BN_LLONG diff --git a/crypto/bn/bn_exp2.c b/crypto/bn/bn_exp2.c index 1132d53365..2d7bf8997d 100644 --- a/crypto/bn/bn_exp2.c +++ b/crypto/bn/bn_exp2.c @@ -9,7 +9,7 @@ * bits=1 75.4% 79.4% * bits=2 61.2% 62.4% * bits=3 61.3% 59.3% - * The lack of speed improvment is also a function of the pre-calculation + * The lack of speed improvement is also a function of the pre-calculation * which could be removed. */ #define EXP2_TABLE_BITS 2 /* 1 2 3 4 5 */ diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index df79d6e338..e734909968 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -394,7 +394,7 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) * if A and B happen to share same cache line such code is going to * cause severe cache trashing. Both factors have severe impact on * performance of modern CPUs and this is the reason why this - * particulare piece of code is #ifdefed away and replaced by more + * particular piece of code is #ifdefed away and replaced by more * "friendly" version found in #else section below. This comment * also applies to BN_copy function. * @@ -425,7 +425,7 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) A[0]=B[0]; case 0: /* I need the 'case 0' entry for utrix cc. - * If the optimiser is turned on, it does the + * If the optimizer is turned on, it does the * switch table by doing * a=top&7 * a--; diff --git a/crypto/bn/bn_mul.c b/crypto/bn/bn_mul.c index 38c47f3d1f..54414993db 100644 --- a/crypto/bn/bn_mul.c +++ b/crypto/bn/bn_mul.c @@ -66,7 +66,7 @@ * n2 must be a power of 2. * We multiply and return the result. * t must be 2*n2 words in size - * We calulate + * We calculate * a[0]*b[0] * a[0]*b[0]+a[1]*b[1]+(a[0]-a[1])*(b[1]-b[0]) * a[1]*b[1] @@ -620,7 +620,7 @@ printf("BN_mul %d * %d\n",a->top,b->top); goto end; } # ifdef BN_RECURSION - goto symetric; + goto symmetric; # endif } #endif @@ -640,19 +640,19 @@ printf("BN_mul %d * %d\n",a->top,b->top); bn_wexpand(b,al); b->d[bl]=0; bl++; - goto symetric; + goto symmetric; } else if ((i == -1) && !BN_get_flags(a,BN_FLG_STATIC_DATA)) { bn_wexpand(a,bl); a->d[al]=0; al++; - goto symetric; + goto symmetric; } } #endif - /* asymetric and >= 4 */ + /* asymmetric and >= 4 */ if (bn_wexpand(rr,top) == NULL) return(0); rr->top=top; bn_mul_normal(rr->d,a->d,al,b->d,bl); @@ -660,8 +660,8 @@ printf("BN_mul %d * %d\n",a->top,b->top); #ifdef BN_RECURSION if (0) { -symetric: - /* symetric and > 4 */ +symmetric: + /* symmetric and > 4 */ /* 16 or larger */ j=BN_num_bits_word((BN_ULONG)al); j=1<<(j-1); diff --git a/crypto/bn/bn_opts.c b/crypto/bn/bn_opts.c index d09cd6ccf5..4485143ab5 100644 --- a/crypto/bn/bn_opts.c +++ b/crypto/bn/bn_opts.c @@ -254,7 +254,7 @@ int time_it(int sec, PARMS *p) for (;;) { if (verbose) - printf("timing %s for %d interations\n",p->name,i); + printf("timing %s for %d interactions\n",p->name,i); ms_time_get(start); p->func(i,p); @@ -271,7 +271,7 @@ int time_it(int sec, PARMS *p) } } if (verbose) - printf("using %d interations\n",i); + printf("using %d interactions\n",i); return(i); } diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c index 0f07c222fa..25bafd1f9c 100644 --- a/crypto/bn/bn_prime.c +++ b/crypto/bn/bn_prime.c @@ -223,7 +223,7 @@ int BN_is_prime_fasttest(const BIGNUM *a, int checks, BN_CTX *ctx = NULL; BIGNUM *A1, *A1_odd, *check; /* taken from ctx */ BN_MONT_CTX *mont = NULL; - const BIGNUM *A; + const BIGNUM *A = NULL; if (checks == BN_prime_checks) checks = BN_prime_checks_for_size(BN_num_bits(a)); @@ -364,7 +364,7 @@ again: d=delta; delta+=2; /* perhaps need to check for overflow of - * delta (but delta can be upto 2^32) + * delta (but delta can be up to 2^32) * 21-May-98 eay - added overflow check */ if (delta < d) goto again; goto loop; diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index 92eba4574c..80de7ea500 100644 --- a/crypto/bn/bn_print.c +++ b/crypto/bn/bn_print.c @@ -137,7 +137,7 @@ char *BN_bn2dec(const BIGNUM *a) } lp--; /* We now have a series of blocks, BN_DEC_NUM chars - * in length, where the last one needs trucation. + * in length, where the last one needs truncation. * The blocks need to be reversed in order. */ sprintf(p,BN_DEC_FMT1,*lp); while (*p) p++; @@ -171,7 +171,7 @@ int BN_hex2bn(BIGNUM **bn, const char *a) num=i+neg; if (bn == NULL) return(num); - /* a is the start of the hex digets, and it is 'i' long */ + /* a is the start of the hex digits, and it is 'i' long */ if (*bn == NULL) { if ((ret=BN_new()) == NULL) return(0); @@ -185,7 +185,7 @@ int BN_hex2bn(BIGNUM **bn, const char *a) /* i is the number of hex digests; */ if (bn_expand(ret,i*4) == NULL) goto err; - j=i; /* least significate 'hex' */ + j=i; /* least significant 'hex' */ m=0; h=0; while (j > 0) @@ -236,8 +236,8 @@ int BN_dec2bn(BIGNUM **bn, const char *a) num=i+neg; if (bn == NULL) return(num); - /* a is the start of the digets, and it is 'i' long. - * We chop it into BN_DEC_NUM digets at a time */ + /* a is the start of the digits, and it is 'i' long. + * We chop it into BN_DEC_NUM digits at a time */ if (*bn == NULL) { if ((ret=BN_new()) == NULL) return(0); diff --git a/crypto/bn/bn_sqr.c b/crypto/bn/bn_sqr.c index 12cce4d7ce..1874c14628 100644 --- a/crypto/bn/bn_sqr.c +++ b/crypto/bn/bn_sqr.c @@ -185,7 +185,7 @@ void bn_sqr_normal(BN_ULONG *r, BN_ULONG *a, int n, BN_ULONG *tmp) * n must be a power of 2. * We multiply and return the result. * t must be 2*n words in size - * We calulate + * We calculate * a[0]*b[0] * a[0]*b[0]+a[1]*b[1]+(a[0]-a[1])*(b[1]-b[0]) * a[1]*b[1] |