bio_ok.c (109998) | bio_ok.c (127128) |
---|---|
1/* crypto/evp/bio_ok.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 88 unchanged lines hidden (view full) --- 97 -- so nobody can rearrange the blocks or remove or replace them. 98 99 2) to detect invalid passwords right at the start BIO_f_reliable 100 adds special prefix to the stream. In order to avoid known plain-text 101 attacks this prefix is generated as follows: 102 103 *) digest is initialized with random seed instead of 104 standardized one. | 1/* crypto/evp/bio_ok.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 88 unchanged lines hidden (view full) --- 97 -- so nobody can rearrange the blocks or remove or replace them. 98 99 2) to detect invalid passwords right at the start BIO_f_reliable 100 adds special prefix to the stream. In order to avoid known plain-text 101 attacks this prefix is generated as follows: 102 103 *) digest is initialized with random seed instead of 104 standardized one. |
105 *) same seed is written to ouput | 105 *) same seed is written to output |
106 *) well-known text is then hashed and the output 107 of the digest is also written to output. 108 109 reader can now read the seed from stream, hash the same string 110 and then compare the digest output. 111 112 Bad things: BIO_f_reliable knows what's going on in EVP_Digest. I 113 initially wrote and tested this code on x86 machine and wrote the --- 462 unchanged lines hidden --- | 106 *) well-known text is then hashed and the output 107 of the digest is also written to output. 108 109 reader can now read the seed from stream, hash the same string 110 and then compare the digest output. 111 112 Bad things: BIO_f_reliable knows what's going on in EVP_Digest. I 113 initially wrote and tested this code on x86 machine and wrote the --- 462 unchanged lines hidden --- |