Extend libdes crypt routine to "illegal" salts.
Use crypt(passwd, salt) from libdes instead of system crypt. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@180 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -34,13 +34,13 @@ SOURCES = cbc_cksm.c cbc_enc.c ecb_enc.c pcbc_enc.c \
|
||||
qud_cksm.c read_pwd.c set_key.c str2key.c \
|
||||
cfb_enc.c \
|
||||
3ecb_enc.c ofb_enc.c 3cbc_enc.c rnd_keys.c key_par.c \
|
||||
enc_read.c enc_writ.c gethostid.c
|
||||
enc_read.c enc_writ.c gethostid.c fcrypt.c
|
||||
|
||||
OBJECTS = cbc_cksm.o cbc_enc.o ecb_enc.o pcbc_enc.o \
|
||||
qud_cksm.o read_pwd.o set_key.o str2key.o \
|
||||
cfb_enc.o \
|
||||
3ecb_enc.o ofb_enc.o 3cbc_enc.o rnd_keys.o key_par.o \
|
||||
enc_read.o enc_writ.o gethostid.o
|
||||
enc_read.o enc_writ.o gethostid.o fcrypt.o
|
||||
|
||||
all: $(LIB)
|
||||
|
||||
|
@@ -1,7 +1,10 @@
|
||||
/* fcrypt.c */
|
||||
/* Copyright (C) 1993 Eric Young - see README for more details */
|
||||
#include <sys/bitypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static char *rcsid[] = { (char *) rcsid, "@(#)$Header$" };
|
||||
|
||||
/* Eric Young.
|
||||
* This version of crypt has been developed from my MIT compatable
|
||||
* DES library.
|
||||
@@ -326,7 +329,7 @@ static u_int32_t skb[8][64]={
|
||||
|
||||
static char shifts2[16]={0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0};
|
||||
|
||||
static int body(u_int32_t *out0, u_int32_t *out1, des_key_schedule (*ks), u_int32_t Eswap0, u_int_32t Eswap1);
|
||||
static int body(u_int32_t *out0, u_int32_t *out1, des_key_schedule (*ks), u_int32_t Eswap0, u_int32_t Eswap1);
|
||||
static int des_set_key(des_cblock (*key), struct des_ks_struct *schedule);
|
||||
|
||||
static int des_set_key(des_cblock (*key), struct des_ks_struct *schedule)
|
||||
@@ -430,12 +433,12 @@ SPtrans[3][(t>> 8)&0x3f]| \
|
||||
#endif
|
||||
|
||||
unsigned char con_salt[128]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
|
||||
0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,
|
||||
0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1,
|
||||
0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,
|
||||
0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,
|
||||
0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,
|
||||
0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,0x00,0x01,
|
||||
0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
|
||||
0x0A,0x0B,0x05,0x06,0x07,0x08,0x09,0x0A,
|
||||
0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,
|
||||
@@ -445,7 +448,7 @@ unsigned char con_salt[128]={
|
||||
0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,
|
||||
0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,
|
||||
0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,
|
||||
0x3D,0x3E,0x3F,0x00,0x00,0x00,0x00,0x00,
|
||||
0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44
|
||||
};
|
||||
|
||||
unsigned char cov_2char[64]={
|
||||
|
Reference in New Issue
Block a user