diff options
author | nsayer <nsayer@FreeBSD.org> | 1999-08-16 11:24:29 +0000 |
---|---|---|
committer | nsayer <nsayer@FreeBSD.org> | 1999-08-16 11:24:29 +0000 |
commit | 189690bcceec94a2b595d9e6d6beca23cd68b5cd (patch) | |
tree | 131b7d42306f643dcbd0094169238875d98500cf /crypto/telnet/libtelnet/encrypt.c | |
parent | 07419aec715eccc813e53ff53f4dd3dfe4c1298a (diff) | |
download | FreeBSD-src-189690bcceec94a2b595d9e6d6beca23cd68b5cd.zip FreeBSD-src-189690bcceec94a2b595d9e6d6beca23cd68b5cd.tar.gz |
Add SRA authentication to src/crypto/telnet.
SRA does a Diffie-Hellmen exchange and then DES-encrypts the
authentication data. If the authentication is successful, it also
sets up a session key for DES encryption.
SRA was originally developed at Texas A&M University.
This code is probably export restricted (despite the fact that I
originally found it at a University in Germany).
SRA is not perfect. It is vulnerable to monkey-in-the-middle attacks
and does not use tremendously large DH constants (and thus an individual
exchange probably could be factored in a few days on modern CPU
horsepower). It does not, however, require any changes in user or
administrative behavior and foils session hijacking and sniffing.
The goal of this commit is that telnet and telnetd end up in the DES
distribution and that therefore an encrypted session telnet becomes
standard issue for FreeBSD.
Diffstat (limited to 'crypto/telnet/libtelnet/encrypt.c')
-rw-r--r-- | crypto/telnet/libtelnet/encrypt.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/crypto/telnet/libtelnet/encrypt.c b/crypto/telnet/libtelnet/encrypt.c index 41dd5cc..e1ac1c4 100644 --- a/crypto/telnet/libtelnet/encrypt.c +++ b/crypto/telnet/libtelnet/encrypt.c @@ -104,10 +104,17 @@ static char *Name = "Noname"; #define typemask(x) ((x) > 0 ? 1 << ((x)-1) : 0) -static long i_support_encrypt = typemask(ENCTYPE_DES_CFB64) - | typemask(ENCTYPE_DES_OFB64); -static long i_support_decrypt = typemask(ENCTYPE_DES_CFB64) - | typemask(ENCTYPE_DES_OFB64); +static long i_support_encrypt = 0 +#ifdef DES_ENCRYPTION + | typemask(ENCTYPE_DES_CFB64) | typemask(ENCTYPE_DES_OFB64) +#endif + |0; +static long i_support_decrypt = 0 +#ifdef DES_ENCRYPTION + | typemask(ENCTYPE_DES_CFB64) | typemask(ENCTYPE_DES_OFB64) +#endif + |0; + static long i_wont_support_encrypt = 0; static long i_wont_support_decrypt = 0; #define I_SUPPORT_ENCRYPT (i_support_encrypt & ~i_wont_support_encrypt) |