diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-12-19 19:13:00 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-12-20 18:29:36 +0100 |
commit | 2f512aaa6c39390a5a0eb1d1e37f070127d068a4 (patch) | |
tree | 0e479309d04bf400ef7118168e37eff509f9da00 /package/inc/ZipPackageEntry.hxx | |
parent | 70ef230aae4f961c8197cc11a7ff5feaf1d96c20 (diff) |
tdf#105844 offapi,package,sfx2: use Argon2 for wholesome ODF encryption
https://www.rfc-editor.org/rfc/rfc9106.html
* add css::xml::crypto::KDFID constant group
* add "KeyDerivationFunction" to setEncryptionAlgorithms sequence
* Argon2 is used by default for wholesome ODF encryption, but
$LO_ARGON2_DISABLE can be set to use PBKDF2
* extend various structs in package
* use 3 new ODF attributes "loext:argon2-iterations" "loext:argon2-memory"
"loext:argon2-lanes" to store the arguments
* use this URL for now:
"urn:org:documentfoundation:names:experimental:office:manifest:argon2id"
* use default arguments according to second recommendation from "7.4.
Recommendations" of RFC9106; 64 MiB RAM should hopefully not be too
much even for 32 bit builds
Change-Id: I683118cc5e0706bd6544db6fb909096768ac9920
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161009
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'package/inc/ZipPackageEntry.hxx')
-rw-r--r-- | package/inc/ZipPackageEntry.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/inc/ZipPackageEntry.hxx b/package/inc/ZipPackageEntry.hxx index 27ad017aa859..f25cdc19bdc9 100644 --- a/package/inc/ZipPackageEntry.hxx +++ b/package/inc/ZipPackageEntry.hxx @@ -29,6 +29,8 @@ #include <cppuhelper/implbase.hxx> #include <vector> +#include <optional> +#include <tuple> typedef void* rtlRandomPool; class ZipOutputStream; @@ -66,7 +68,8 @@ public: std::vector < css::uno::Sequence < css::beans::PropertyValue > > &rManList, ZipOutputStream & rZipOut, const css::uno::Sequence < sal_Int8 >& rEncryptionKey, - sal_Int32 nPBKDF2IterationCount, + ::std::optional<sal_Int32> oPBKDF2IterationCount, + ::std::optional<::std::tuple<sal_Int32, sal_Int32, sal_Int32>> oArgon2Args, const rtlRandomPool &rRandomPool ) = 0; void clearParent() |