diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-12-08 21:16:31 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-12-12 10:40:42 +0100 |
commit | 1fbad81c1e28fae31c655c637a513405c3e62317 (patch) | |
tree | 90bb529b9408c5a422c76cd2fe5dbe49f608c67f /offapi | |
parent | 1345eba186501f75d9bc814875d7946a36679796 (diff) |
tdf#105844 offapi,package,sfx2,xmlsecurity: add AEAD w/ AES GCM
... and use it in the new experimental ODF encryption mode.
https://www.w3.org/TR/xmlenc-core1/#sec-AES-GCM
Unfortunately it turned out that NSS PK11_CipherOp() does not work with
CKM_AES_GCM because it is initialized with "context->multi = PR_FALSE"
in sftk_CryptInit(), so the one-step functions PK11_Encrypt() and
PK11_Decrypt() have to be used.
NSS 3.52 also changed a parameter struct definition - see
https://fedoraproject.org/wiki/Changes/NssGCMParams - which is not a
problem for RHEL or SUSE system NSS since those are rebased, but it
is likely a problem for less well maintained Ubuntu LTS, so use
the old struct definition which evidently still works with NSS 3.94.
NSS 3.52 also added a new PK11_AEADOp() API but it looks like this
doesn't support incremental encryption either.
Change-Id: Ibd4a672db74b65b1218926ba35ff8d2f70444c7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160505
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit f0fda7ad2236f478fea396a23d4f982e5fc37e68)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160581
Diffstat (limited to 'offapi')
-rw-r--r-- | offapi/com/sun/star/xml/crypto/CipherID.idl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/offapi/com/sun/star/xml/crypto/CipherID.idl b/offapi/com/sun/star/xml/crypto/CipherID.idl index 80d64a995a93..c1ecd297a741 100644 --- a/offapi/com/sun/star/xml/crypto/CipherID.idl +++ b/offapi/com/sun/star/xml/crypto/CipherID.idl @@ -30,12 +30,25 @@ module com { module sun { module star { module xml { module crypto { constants CipherID { /** identifier of AES algorithm in CBC mode with W3C padding + + @see https://www.w3.org/TR/xmlenc-core1/#sec-Padding + @see https://www.w3.org/TR/xmlenc-core1/#sec-AES */ const long AES_CBC_W3C_PADDING = 1; /** identifier of the Blowfish algorithm in 8-bit CFB mode */ const long BLOWFISH_CFB_8 = 2; + + /** identifier of AES algorithm in GCM mode with 96-bit IV prefixed, + 128 bit authentication tag, and no padding, as specified in + [XMLENC-CORE1] 5.2.4 AES-GCM. + + @see https://www.w3.org/TR/xmlenc-core1/#sec-AES-GCM + + @since LO 24.2 + */ + const long AES_GCM_W3C = 3; }; |