From: Joseph Sutton Date: Mon, 13 Nov 2023 04:08:58 +0000 (+1300) Subject: lib:crypto: Add GKDI module with some constants X-Git-Tag: talloc-2.4.2~206 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6369f2cf1bec699296ca2c47b1f9a6a0d60878d0;p=thirdparty%2Fsamba.git lib:crypto: Add GKDI module with some constants Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/lib/crypto/gkdi.c b/lib/crypto/gkdi.c new file mode 100644 index 00000000000..e049cf96bac --- /dev/null +++ b/lib/crypto/gkdi.c @@ -0,0 +1,21 @@ +/* + Unix SMB/CIFS implementation. + Group Key Distribution Protocol functions + + Copyright (C) Catalyst.Net Ltd 2023 + + 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 3 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, see . +*/ + +#include "lib/crypto/gkdi.h" diff --git a/lib/crypto/gkdi.h b/lib/crypto/gkdi.h new file mode 100644 index 00000000000..b6c18a8f6ae --- /dev/null +++ b/lib/crypto/gkdi.h @@ -0,0 +1,32 @@ +/* + Unix SMB/CIFS implementation. + Group Key Distribution Protocol functions + + Copyright (C) Catalyst.Net Ltd 2023 + + 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 3 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, see . +*/ + +#ifndef LIB_CRYPTO_GKDI_H +#define LIB_CRYPTO_GKDI_H + +#include + +static const int gkdi_l1_key_iteration = 32; +static const int gkdi_l2_key_iteration = 32; + +static const int64_t gkdi_key_cycle_duration = 360000000000; +static const int64_t gkdi_max_clock_skew = 3000000000; + +#endif /* LIB_CRYPTO_GKDI_H */ diff --git a/lib/crypto/wscript b/lib/crypto/wscript index 23017fbd637..d39e7cbc8cb 100644 --- a/lib/crypto/wscript +++ b/lib/crypto/wscript @@ -27,6 +27,9 @@ def build(bld): LIBCRYPTO ''') + bld.SAMBA_SUBSYSTEM('gkdi', + source='gkdi.c') + bld.SAMBA_PYTHON('python_crypto', source='py_crypto.c', deps='gnutls talloc LIBCLI_AUTH',