[英]What algorithm does java.security.KeyStore use to encrypt the privateKey in KeyStore.setKeyEntry() and KeyStore.store()?
setKeyEntry() allows a password to protect a single private key, and store() allows a password to encrypt the entire keyStore. setKeyEntry()允许密码保护单个私钥,而store()允许密码加密整个密钥库。 I'm using pkcs12 keystore type with the BC as the provider, and I can't figure out what it's using for encryption.
我正在使用pkcs12密钥库类型,BC作为提供商,我无法弄清楚它用于加密的内容。
Am I able to specify the kind of encryption used in these methods? 我可以指定这些方法中使用的加密类型吗?
The KeyStore
implementation depends on the type you request, and for some types, will depend on the provider as well. KeyStore
实现取决于您请求的类型,对于某些类型,也取决于提供者。
If you are talking about the "JKS" type, you can find a description of the format and algorithms used here. 如果您正在谈论“JKS”类型,您可以找到此处使用的格式和算法的描述。
With a JKS key store, you cannot specify an encryption algorithm for private keys. 使用JKS密钥库时,无法为私钥指定加密算法。
It depends on which KeyStore provider you are using. 这取决于您使用的KeyStore提供程序 。
The JCEKS provider uses PBEWithMD5AndTripleDES password-based encryption algorithm. JCEKS提供程序使用PBEWithMD5AndTripleDES基于密码的加密算法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.