Skip to content

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

Open

Description

@arvanauk

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.

Activity

  1. jonproch117 commented on Feb 14, 2023

    @jonproch117

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions