Skip to content

[Question] Creating a PKCS #12 File using AES #234

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
arvanauk opened this issue Mar 28, 2020 · 1 comment
Open

[Question] Creating a PKCS #12 File using AES #234

arvanauk opened this issue Mar 28, 2020 · 1 comment

Comments

@arvanauk
Copy link

I am trying to create a PKCS #12 file using AES 128. When I create a PKCS #12 file from OpenSSL using AES and print out the structure, I get:
PKCS7 PBES2, PBKDF2, AES-128-CDC, Iteration 4096, PRF HMACwithSHA1.

I get errors when I try to set the key and certificate algorithm in the PKCS12StoreBuilder. There are no examples using the PKCS12Store and PKCS12StoreBuilder classes.

I am using version 1.8.6.

@jonproch117
Copy link

I was able to set the key algorithm on the PKCS12StoreBuilder using .SetKeyAlgorithm(NistObjectIdentifiers.IdAes128Cbc, PkcsObjectIdentifiers.IdHmacWithSha1).

The certificate algorithm does not appear to currently support PBES2-based encryption schemes, just the legacy PKCS12 ones.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants