Topic: how to encrypt ecc private key with password?
i make ecc key pair.
and encode to pkcs#8 der format using wc_EccKeyToDer function.
but i want to encrypt my private key with pkcs#5.
how can i do this?
You are not logged in. Please login or register.
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferenceswolfSSL - Embedded SSL Library → wolfCrypt → how to encrypt ecc private key with password?
i make ecc key pair.
and encode to pkcs#8 der format using wc_EccKeyToDer function.
but i want to encrypt my private key with pkcs#5.
how can i do this?
i want to like PKCS8_encrypt function in openssl.
Hi Hyunbum83,
Have a look at this article we posted a while back:
https://www.wolfssl.com/wolfSSL/Blog/En … ation.html
We support this using "wc_PKCS12_PBKDF". Enabled using ./configure --enable-pwdbased or making sure NO_PWDBASED is not defined.
Let me know if this doesn't answer your question.
Thanks, David Garske, wolfSSL
wc_PKCS12_PBKDF is only PKCS#5 password based key derivation methode...
i need to convert methode PKCS#8 private Key -> PKCS#8 Encrypted private Key.
Hi Hyunbum83,
It looks like we support encrypting an ECC private key using the API "wolfSSL_PEM_write_mem_ECPrivateKey". However this is an openssl compatibility API layer, so you'll have to setup a "WOLFSSL_EC_KEY" object using "wolfSSL_EC_KEY_new()" and load it using "wolfSSL_EC_KEY_LoadDer".
I'm going to add a feature request to expose this without opensslextra. Curious what you are working on that requires this? It will help us prioritize this feature if we have some background on what you are working on.
Note: Using "wolfSSL_PEM_write_mem_ECPrivateKey" requires having --enable-keygen --enable-opensslextra (or WOLFSSL_KEY_GEN and OPENSSL_EXTRA defined).
Thanks,
David Garske, wolfSSL
wolfSSL - Embedded SSL Library → wolfCrypt → how to encrypt ecc private key with password?
Powered by PunBB, supported by Informer Technologies, Inc.
Generated in 0.017 seconds (92% PHP - 8% DB) with 11 queries