summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/des/enc_read.c19
-rw-r--r--crypto/des/enc_writ.c14
2 files changed, 33 insertions, 0 deletions
diff --git a/crypto/des/enc_read.c b/crypto/des/enc_read.c
index 265e9ca36f..3e5ac09875 100644
--- a/crypto/des/enc_read.c
+++ b/crypto/des/enc_read.c
@@ -65,6 +65,25 @@
/*extern int errno;*/
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 fd;
char *buf;
diff --git a/crypto/des/enc_writ.c b/crypto/des/enc_writ.c
index 96537ef584..d40dc273c0 100644
--- a/crypto/des/enc_writ.c
+++ b/crypto/des/enc_writ.c
@@ -62,6 +62,20 @@
#include "cryptlib.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 fd;
const char *buf;