summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/des/des.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/des/des.c')
-rw-r--r--src/lib/libcrypto/des/des.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/libcrypto/des/des.c b/src/lib/libcrypto/des/des.c
index b2d7f0da78..91d7153b34 100644
--- a/src/lib/libcrypto/des/des.c
+++ b/src/lib/libcrypto/des/des.c
@@ -325,25 +325,25 @@ void usage(void)
325"des <options> [input-file [output-file]]", 325"des <options> [input-file [output-file]]",
326"options:", 326"options:",
327"-v : des(1) version number", 327"-v : des(1) version number",
328"-e : encrypt using sunOS compatible user key to DES key conversion.", 328"-e : encrypt using SunOS compatible user key to DES key conversion.",
329"-E : encrypt ", 329"-E : encrypt ",
330"-d : decrypt using sunOS compatible user key to DES key conversion.", 330"-d : decrypt using SunOS compatible user key to DES key conversion.",
331"-D : decrypt ", 331"-D : decrypt ",
332"-c[ckname] : generate a cbc_cksum using sunOS compatible user key to", 332"-c[ckname] : generate a cbc_cksum using SunOS compatible user key to",
333" DES key conversion and output to ckname (stdout default,", 333" DES key conversion and output to ckname (stdout default,",
334" stderr if data being output on stdout). The checksum is", 334" stderr if data being output on stdout). The checksum is",
335" generated before encryption and after decryption if used", 335" generated before encryption and after decryption if used",
336" in conjunction with -[eEdD].", 336" in conjunction with -[eEdD].",
337"-C[ckname] : generate a cbc_cksum as for -c but compatible with -[ED].", 337"-C[ckname] : generate a cbc_cksum as for -c but compatible with -[ED].",
338"-k key : use key 'key'", 338"-k key : use key 'key'",
339"-h : the key that is entered will be a hexidecimal number", 339"-h : the key that is entered will be a hexadecimal number",
340" that is used directly as the des key", 340" that is used directly as the des key",
341"-u[uuname] : input file is uudecoded if -[dD] or output uuencoded data if -[eE]", 341"-u[uuname] : input file is uudecoded if -[dD] or output uuencoded data if -[eE]",
342" (uuname is the filename to put in the uuencode header).", 342" (uuname is the filename to put in the uuencode header).",
343"-b : encrypt using DES in ecb encryption mode, the defaut is cbc mode.", 343"-b : encrypt using DES in ecb encryption mode, the default is cbc mode.",
344"-3 : encrypt using tripple DES encryption. This uses 2 keys", 344"-3 : encrypt using triple DES encryption. This uses 2 keys",
345" generated from the input key. If the input key is less", 345" generated from the input key. If the input key is less",
346" than 8 characters long, this is equivelent to normal", 346" than 8 characters long, this is equivalent to normal",
347" encryption. Default is triple cbc, -b makes it triple ecb.", 347" encryption. Default is triple cbc, -b makes it triple ecb.",
348NULL 348NULL
349}; 349};
@@ -425,7 +425,7 @@ void doencryption(void)
425 else 425 else
426 k2[i-8]=k; 426 k2[i-8]=k;
427 } 427 }
428 des_set_key(&k2,ks2); 428 des_set_key_unchecked(&k2,ks2);
429 memset(k2,0,sizeof(k2)); 429 memset(k2,0,sizeof(k2));
430 } 430 }
431 else if (longk || flag3) 431 else if (longk || flag3)
@@ -433,7 +433,7 @@ void doencryption(void)
433 if (flag3) 433 if (flag3)
434 { 434 {
435 des_string_to_2keys(key,&kk,&k2); 435 des_string_to_2keys(key,&kk,&k2);
436 des_set_key(&k2,ks2); 436 des_set_key_unchecked(&k2,ks2);
437 memset(k2,0,sizeof(k2)); 437 memset(k2,0,sizeof(k2));
438 } 438 }
439 else 439 else
@@ -455,7 +455,7 @@ void doencryption(void)
455 kk[i]=key[i]|0x80; 455 kk[i]=key[i]|0x80;
456 } 456 }
457 457
458 des_set_key(&kk,ks); 458 des_set_key_unchecked(&kk,ks);
459 memset(key,0,sizeof(key)); 459 memset(key,0,sizeof(key));
460 memset(kk,0,sizeof(kk)); 460 memset(kk,0,sizeof(kk));
461 /* woops - A bug that does not showup under unix :-( */ 461 /* woops - A bug that does not showup under unix :-( */
@@ -484,7 +484,7 @@ void doencryption(void)
484 if (feof(DES_IN)) 484 if (feof(DES_IN))
485 { 485 {
486 for (i=7-rem; i>0; i--) 486 for (i=7-rem; i>0; i--)
487 RAND_bytes(buf + l++, 1); 487 RAND_pseudo_bytes(buf + l++, 1);
488 buf[l++]=rem; 488 buf[l++]=rem;
489 ex=1; 489 ex=1;
490 len+=rem; 490 len+=rem;