Steps to Reproduce:
$ gpgsm --version gpgsm (GnuPG) 2.4.3 libgcrypt 1.10.2 libksba 1.6.4 $ gpgsm -vv --import credential_private_encrypted_AES256.p12 gpgsm: enabled compatibility flags: gpgsm: processing bag.encryptedData gpgsm: DBG: cipher algo: 2a864886f70d0209 gpgsm: parse_bag_encrypted_data(pkcs5PBES2-params): offset 14.10 (tlv_expect_object_id): Sukces - Niepoprawny algorytm szyfru gpgsm: p12_parse(bag.encryptedData): offset 14.10 (tlv_expect_object_id): Sukces - Niepoprawny algorytm szyfru gpgsm: error parsing or decrypting the PKCS#12 file gpgsm: całkowita liczba przetworzonych: 0 $ gpgsm -vv --import credential_private_encrypted_3DES.p12 → OK! $ openssl pkcs12 -info -nokeys -noout -in credential_private_encrypted_AES256.p12 Enter Import Password: MAC: sha256, Iteration 2048 MAC length: 32, salt length: 8 PKCS7 Encrypted data: PBES2, PBKDF2, AES-256-CBC, Iteration 2048, PRF hmacWithSHA256 Certificate bag Certificate bag PKCS7 Data Shrouded Keybag: PBES2, PBKDF2, AES-256-CBC, Iteration 2048, PRF hmacWithSHA256
• export certificate via Windows10 "certmgr.msc"
• or convert _3DES.p12 via "Export-PfxCertificate" [PowerShell]:
$Oldpwd = ConvertTo-SecureString -String "qeFGds84/Sf0eKkJwcp6" -Force -AsPlainText $NewPwd = ConvertTo-SecureString -String "password" -Force -AsPlainText $mypfx = Get-PfxData -FilePath R:\credential_private_encrypted_3DES.p12 -Password $Oldpwd Export-PfxCertificate -PFXData $mypfx -FilePath R:\windows10_AES256.pfx -Password $NewPwd -ChainOption PfxDataOnly -CryptoAlgorithmOption AES256_SHA256
$ openssl pkcs12 -info -nokeys -noout -in windows10_AES256.pfx Enter Import Password: MAC: sha256, Iteration 2000 MAC length: 32, salt length: 20 PKCS7 Data Shrouded Keybag: PBES2, PBKDF2, AES-256-CBC, Iteration 2000, PRF hmacWithSHA256 PKCS7 Encrypted data: PBES2, PBKDF2, AES-256-CBC, Iteration 2000, PRF hmacWithSHA256 Certificate bag Certificate bag
Hi,
I'm testing S/MIME support in various programs (gpgsm is great btw.) with different certs configurations etc. I will report some bugs/feature requests if you guys don't mind. All the steps are in the bash script in the .tar package (keys, certificates, configuration files, dumps).
gpgsm/Kleopatra does not support AES-256 encryption in .p12 files (from openssl and windows).
the benefits of introducing this:
0) interoperability
- openssl 3.0 uses this encryption by default now
- "certmgr.msc" export has 2 available algorithms: "TripleDES-SHA1" and "AES256-SHA256"
- other certificate creation software supports this encryption
0) other
- NIST 800-131A disallowed three-key TDEA after 2023 (some recommendations)
- other standards also mention this encryption
Similar bugs (this one is duplicate?)
https://dev.gnupg.org/T1321
https://dev.gnupg.org/T3927
https://dev.gnupg.org/T6752
https://dev.gnupg.org/T6536
thank you