diff options
author | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 10:56:39 +0000 |
---|---|---|
committer | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 10:56:39 +0000 |
commit | 58964a492275ca9a59a0cd9c8155cb2491b4b909 (patch) | |
tree | c7b16876a5789463bbbb468ef4829c8129b3d718 /doc | |
parent | d02b48c63a58ea4367a0e905979f140b7d090f86 (diff) | |
download | openssl-58964a492275ca9a59a0cd9c8155cb2491b4b909.tar.gz |
Import of old SSLeay release: SSLeay 0.9.0b
Diffstat (limited to 'doc')
-rw-r--r-- | doc/blowfish.doc | 15 | ||||
-rw-r--r-- | doc/bn.doc | 16 | ||||
-rw-r--r-- | doc/des.doc | 2 | ||||
-rw-r--r-- | doc/rsa.doc | 10 |
4 files changed, 22 insertions, 21 deletions
diff --git a/doc/blowfish.doc b/doc/blowfish.doc index 3a7291f371..8a7f425b32 100644 --- a/doc/blowfish.doc +++ b/doc/blowfish.doc @@ -54,20 +54,17 @@ unsigned char *key; 72 bytes. As a warning, blowfish has a very very slow set_key function, it actually runs BF_encrypt 521 times. -void BF_encrypt( -unsigned long *data, -BF_KEY *key, -int encrypt); - This is the Blowfish encryption function that gets called by just about - every other Blowfish routine in the library. You should not use this - function except to implement 'modes' of Blowfish. +void BF_encrypt(unsigned long *data, BF_KEY *key); +void BF_decrypt(unsigned long *data, BF_KEY *key); + These are the Blowfish encryption function that gets called by just + about every other Blowfish routine in the library. You should not + use this function except to implement 'modes' of Blowfish. I say this because the functions that call this routine do the conversion from 'char *' to long, and this needs to be done to make sure 'non-aligned' memory access do not occur. Data is a pointer to 2 unsigned long's and key is the - BF_KEY to use. Encryption or decryption is indicated by 'encrypt'. - which can have the values BF_ENCRYPT or BF_DECRYPT. + BF_KEY to use. void BF_ecb_encrypt( unsigned char *in, diff --git a/doc/bn.doc b/doc/bn.doc index 2358c20f45..47be23b6ea 100644 --- a/doc/bn.doc +++ b/doc/bn.doc @@ -246,8 +246,8 @@ int BN_is_bit_set(BIGNUM *a, int n); This function return 1 if bit 'n' is set in 'a' else 0. int BN_set_bit(BIGNUM *a, int n); - This function sets bit 'n' to 1 in 'a'. Return 0 if less than - 'n' bits in 'a', else 1. This is a&= ~(1<<n); + This function sets bit 'n' to 1 in 'a'. + This is a&= ~(1<<n); int BN_clear_bit(BIGNUM *a, int n); This function sets bit 'n' to zero in 'a'. Return 0 if less @@ -334,7 +334,8 @@ int BN_gcd(BIGNUM *r,BIGNUM *a,BIGNUM *b,BN_CTX *ctx); 'r' has the greatest common divisor of 'a' and 'b'. 'ctx' is used for temporary variables and 0 is returned on error. -int BN_is_prime(BIGNUM *p,int nchecks,void (*callback)(),BN_CTX *ctx); +int BN_is_prime(BIGNUM *p,int nchecks,void (*callback)(),BN_CTX *ctx, + char *cb_arg); This function is used to check if a BIGNUM ('p') is prime. It performs this test by using the Miller-Rabin randomised primality test. This is a probalistic test that requires a @@ -342,7 +343,7 @@ int BN_is_prime(BIGNUM *p,int nchecks,void (*callback)(),BN_CTX *ctx); degree of probability. Since this can take quite some time, a callback function can be passed and it will be called each time 'p' passes a round of the prime testing. 'callback' will - be called as follows, callback(1,n) where n is the number of + be called as follows, callback(1,n,cb_arg) where n is the number of the round, just passed. As per usual 'ctx' contains temporary variables used. If ctx is NULL, it does not matter, a local version will be malloced. This parameter is present to save some mallocing @@ -357,6 +358,7 @@ int strong, BIGNUM *a, BIGNUM *rems, void (*callback)()); +char *cb_arg This function is used to generate prime numbers. It returns a new BIGNUM that has a high probability of being a prime. 'bits' is the number of bits that @@ -373,7 +375,7 @@ void (*callback)()); can take quite some time, if callback is not NULL, it is called in the following situations. We have a suspected prime (from a quick sieve), - callback(0,sus_prime++). Each item to be passed to BN_is_prime(). - callback(1,round++). Each successful 'round' in BN_is_prime(). - callback(2,round). For each successful BN_is_prime() test. + callback(0,sus_prime++,cb_arg). Each item to be passed to BN_is_prime(). + callback(1,round++,cb_arg). Each successful 'round' in BN_is_prime(). + callback(2,round,cb_arg). For each successful BN_is_prime() test. diff --git a/doc/des.doc b/doc/des.doc index 1e30158129..5879d968f3 100644 --- a/doc/des.doc +++ b/doc/des.doc @@ -186,7 +186,7 @@ des_key_schedule ks2, des_key_schedule ks3, des_cblock *ivec, int enc); - This function implements inner triple CBC DES encryption with 3 + This function implements outer triple CBC DES encryption with 3 keys. What this means is that each 'DES' operation inside the cbc mode is really an C=E(ks3,D(ks2,E(ks1,M))). Again, this is cbc mode so an ivec is requires. diff --git a/doc/rsa.doc b/doc/rsa.doc index f899a39bb8..f260452bc6 100644 --- a/doc/rsa.doc +++ b/doc/rsa.doc @@ -113,6 +113,7 @@ RSA *RSA_generate_key( int bits; unsigned long e; void (*callback)(); +char *cb_arg; This routine is used to generate RSA private keys. It takes quite a period of time to run and should only be used to generate initial private keys that should then be stored @@ -126,8 +127,9 @@ void (*callback)(); The callback function (if not NULL) is called in the following situations. when we have generated a suspected prime number to test, - callback(0,num1++). When it passes a prime number test, - callback(1,num2++). When it is rejected as one of + callback(0,num1++,cb_arg). When it passes a prime number test, + callback(1,num2++,cb_arg). When it is rejected as one of the 2 primes required due to gcd(prime,e value) != 0, - callback(2,num3++). When finally accepted as one of the 2 primes, - callback(3,num4++). + callback(2,num3++,cb_arg). When finally accepted as one + of the 2 primes, callback(3,num4++,cb_arg). + |