[dovecot-cvs] dovecot/src/lib-ntlm ntlm-des.c,1.1,1.2
cras at dovecot.org
cras at dovecot.org
Fri Jun 16 13:26:03 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-ntlm
In directory talvi:/tmp/cvs-serv2413
Modified Files:
ntlm-des.c
Log Message:
Replaced LGPL licensed DES implementation with MIT licensed one
taken from PuTTY SSH client. Patch by Andrey Panin.
Index: ntlm-des.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-ntlm/ntlm-des.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ntlm-des.c 28 Jul 2004 15:39:30 -0000 1.1
+++ ntlm-des.c 16 Jun 2006 10:26:01 -0000 1.2
@@ -1,604 +1,605 @@
/*
- * Implements DES encryption, but not decryption.
- * DES is used to create LM password hashes and both LM and NTLM Responses.
+ * Implementation of DES encryption for NTLM
*
- * Copyright (C) 2003, 2004 by Christopher R. Hertel <crh at ubiqx.mn.org>
+ * Copyright 1997-2005 Simon Tatham.
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
[...1114 lines suppressed...]
- * and Rn is moved into R ready for the next round.
- */
- for (j = 0; j < 4; j++) {
- L[j] = R[j];
- R[j] = Rn[j];
- }
- }
+ des_cbc_encrypt(dst, src, &ctx);
- /* The encryption is complete.
- * Now reverse-permute the ciphertext to produce the final result.
- * We actually combine two steps here. The penultimate step is to
- * swap the positions of L and R in the result of the 16 rounds,
- * after which the reverse of the Initial Permutation is applied.
- * To save a step, the FinalPermuteMap applies both the L/R swap
- * and the inverse of the Initial Permutation.
- */
- permute(dst, D, FinalPermuteMap, 8);
return dst;
}
More information about the dovecot-cvs
mailing list