From a1d0b97ed40fe6985bb45b1715309638e7faaffc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 06:14:15 +0000 Subject: r3462: separate out the crypto includes (This used to be commit 3f75117db921e493bb77a5dc14b8ce91a6288f30) --- source4/lib/crypto/crypto.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 source4/lib/crypto/crypto.h (limited to 'source4/lib/crypto/crypto.h') diff --git a/source4/lib/crypto/crypto.h b/source4/lib/crypto/crypto.h new file mode 100644 index 0000000000..e7a0c290a5 --- /dev/null +++ b/source4/lib/crypto/crypto.h @@ -0,0 +1,24 @@ +/* + Unix SMB/CIFS implementation. + + Copyright (C) Andrew Tridgell 2004 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "lib/crypto/md5.h" +#include "lib/crypto/md4.h" +#include "lib/crypto/hmacmd5.h" +#include "lib/crypto/crc32.h" -- cgit From 0501a440bedde5e867e461d266aafe666be53e54 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 25 Apr 2005 08:26:53 +0000 Subject: r6462: Move the arcfour sbox state into it's own structure, and allocate it with talloc() for the NTLMSSP system. Andrew Bartlett (This used to be commit 7a93ac49c28d433ccf0f077294f473fe728b9995) --- source4/lib/crypto/crypto.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/lib/crypto/crypto.h') diff --git a/source4/lib/crypto/crypto.h b/source4/lib/crypto/crypto.h index e7a0c290a5..8cf4b21aae 100644 --- a/source4/lib/crypto/crypto.h +++ b/source4/lib/crypto/crypto.h @@ -22,3 +22,9 @@ #include "lib/crypto/md4.h" #include "lib/crypto/hmacmd5.h" #include "lib/crypto/crc32.h" + +struct arcfour_state { + uint8_t sbox[256]; + uint8_t index_i; + uint8_t index_j; +}; -- cgit From 684c824e9ac51ee2d6b748973757697a8ead2634 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Aug 2005 07:59:00 +0000 Subject: r9421: Move arcfour code into it's own file, in lib/crypto. Andrew Bartlett (This used to be commit ca6cf462708810637544d4b4bef0f404fb89a002) --- source4/lib/crypto/crypto.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/lib/crypto/crypto.h') diff --git a/source4/lib/crypto/crypto.h b/source4/lib/crypto/crypto.h index 8cf4b21aae..19457f60dc 100644 --- a/source4/lib/crypto/crypto.h +++ b/source4/lib/crypto/crypto.h @@ -28,3 +28,9 @@ struct arcfour_state { uint8_t index_i; uint8_t index_j; }; + +void arcfour_init(struct arcfour_state *state, const DATA_BLOB *key); +void arcfour_crypt_sbox(struct arcfour_state *state, uint8_t *data, int len); +void arcfour_crypt_blob(uint8_t *data, int len, const DATA_BLOB *key); +void arcfour_crypt(uint8_t *data, const uint8_t keystr[16], int len); + -- cgit From 0d235919fbb1430d52913df11da1f011a65ff319 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 11 Aug 2006 08:02:43 +0000 Subject: r17488: - add SHA1 and HMACSHA1 functions, based on rfc 2104,2202,3174 - and add torture tests also based on the rfc's metze (This used to be commit d48930a02f9560640697fd57e4bba03dc0abe284) --- source4/lib/crypto/crypto.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/lib/crypto/crypto.h') diff --git a/source4/lib/crypto/crypto.h b/source4/lib/crypto/crypto.h index 19457f60dc..ca6386e28c 100644 --- a/source4/lib/crypto/crypto.h +++ b/source4/lib/crypto/crypto.h @@ -18,10 +18,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "lib/crypto/md5.h" +#include "lib/crypto/crc32.h" #include "lib/crypto/md4.h" +#include "lib/crypto/md5.h" #include "lib/crypto/hmacmd5.h" -#include "lib/crypto/crc32.h" +#include "lib/crypto/sha1.h" +#include "lib/crypto/hmacsha1.h" struct arcfour_state { uint8_t sbox[256]; -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/lib/crypto/crypto.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/lib/crypto/crypto.h') diff --git a/source4/lib/crypto/crypto.h b/source4/lib/crypto/crypto.h index ca6386e28c..10e2258fa7 100644 --- a/source4/lib/crypto/crypto.h +++ b/source4/lib/crypto/crypto.h @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include "lib/crypto/crc32.h" -- cgit From 7c926ff1150133127c73b9b46d82524f57b3c616 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 3 Jun 2008 14:29:27 +1000 Subject: SMB2 signing now works. The spec was wrong (and will be fixed in the next version) (This used to be commit 436cb17b869e2d6cc57936ccc5e81680fb992341) --- source4/lib/crypto/crypto.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/lib/crypto/crypto.h') diff --git a/source4/lib/crypto/crypto.h b/source4/lib/crypto/crypto.h index 10e2258fa7..03a233ec98 100644 --- a/source4/lib/crypto/crypto.h +++ b/source4/lib/crypto/crypto.h @@ -23,6 +23,8 @@ #include "lib/crypto/hmacmd5.h" #include "lib/crypto/sha1.h" #include "lib/crypto/hmacsha1.h" +#include "heimdal/lib/hcrypto/sha.h" +#include "lib/crypto/hmacsha256.h" struct arcfour_state { uint8_t sbox[256]; -- cgit From 869991385827d14f4e55729e4d56a80eccf9fdec Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 4 Jun 2008 08:54:42 +0200 Subject: lib/crypto: remove unused sha1 and hmac-sha1 code metze (This used to be commit 2c8904be3bac2c696712cc3160fe95d62afde43a) --- source4/lib/crypto/crypto.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/lib/crypto/crypto.h') diff --git a/source4/lib/crypto/crypto.h b/source4/lib/crypto/crypto.h index 10e2258fa7..513ae788de 100644 --- a/source4/lib/crypto/crypto.h +++ b/source4/lib/crypto/crypto.h @@ -21,8 +21,6 @@ #include "lib/crypto/md4.h" #include "lib/crypto/md5.h" #include "lib/crypto/hmacmd5.h" -#include "lib/crypto/sha1.h" -#include "lib/crypto/hmacsha1.h" struct arcfour_state { uint8_t sbox[256]; -- cgit From 9cf72946aaf32d4335c8e59eb805844cadea76a8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 4 Jun 2008 09:42:55 -0700 Subject: copied the Heimdal sha256 functions into lib/crypto to avoid a link error Hopefully we can remove this again later (This used to be commit fa2ecfea7a1acc388a86e8fba5b42df7925c9045) --- source4/lib/crypto/crypto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/crypto/crypto.h') diff --git a/source4/lib/crypto/crypto.h b/source4/lib/crypto/crypto.h index 54a4482325..fc283f72ba 100644 --- a/source4/lib/crypto/crypto.h +++ b/source4/lib/crypto/crypto.h @@ -21,7 +21,7 @@ #include "lib/crypto/md4.h" #include "lib/crypto/md5.h" #include "lib/crypto/hmacmd5.h" -#include "heimdal/lib/hcrypto/sha.h" +#include "lib/crypto/sha256.h" #include "lib/crypto/hmacsha256.h" struct arcfour_state { -- cgit