mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
Added comments to des_enc_{read,write} functions warning about their
cryptographic weakness (IV reuse).
This commit is contained in:
parent
67d5ac039f
commit
7c0f3d09b3
@ -65,6 +65,25 @@
|
|||||||
/*extern int errno;*/
|
/*extern int errno;*/
|
||||||
int des_rw_mode=DES_PCBC_MODE;
|
int des_rw_mode=DES_PCBC_MODE;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* WARNINGS:
|
||||||
|
*
|
||||||
|
* - The data format used by des_enc_write() and des_enc_read()
|
||||||
|
* has a cryptographic weakness: When asked to write more
|
||||||
|
* than MAXWRITE bytes, des_enc_write will split the data
|
||||||
|
* into several chunks that are all encrypted
|
||||||
|
* using the same IV. So don't use these functions unless you
|
||||||
|
* are sure you know what you do (in which case you might
|
||||||
|
* not want to use them anyway).
|
||||||
|
*
|
||||||
|
* - This code cannot handle non-blocking sockets.
|
||||||
|
*
|
||||||
|
* - This function uses an internal state and thus cannot be
|
||||||
|
* used on multiple files.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
int des_enc_read(fd, buf, len, sched, iv)
|
int des_enc_read(fd, buf, len, sched, iv)
|
||||||
int fd;
|
int fd;
|
||||||
char *buf;
|
char *buf;
|
||||||
|
@ -62,6 +62,20 @@
|
|||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include "des_locl.h"
|
#include "des_locl.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* WARNINGS:
|
||||||
|
*
|
||||||
|
* - The data format used by des_enc_write() and des_enc_read()
|
||||||
|
* has a cryptographic weakness: When asked to write more
|
||||||
|
* than MAXWRITE bytes, des_enc_write will split the data
|
||||||
|
* into several chunks that are all encrypted
|
||||||
|
* using the same IV. So don't use these functions unless you
|
||||||
|
* are sure you know what you do (in which case you might
|
||||||
|
* not want to use them anyway).
|
||||||
|
*
|
||||||
|
* - This code cannot handle non-blocking sockets.
|
||||||
|
*/
|
||||||
|
|
||||||
int des_enc_write(fd, buf, len, sched, iv)
|
int des_enc_write(fd, buf, len, sched, iv)
|
||||||
int fd;
|
int fd;
|
||||||
const char *buf;
|
const char *buf;
|
||||||
|
Loading…
Reference in New Issue
Block a user