I'd like to make an encryption in PKCS#7 format using BouncyCastle, by using the org.bouncycastle.cms package. I need to define the padding and the initial value for encryption, but the classes of cms package don't allow to define this informations,how can i do that?
我想使用org.bouncycastle.cms包使用BouncyCastle对PKCS#7格式进行加密。我需要定义填充和加密的初始值,但cms包的类不允许定义这些信息,我该怎么做?
1 个解决方案
#1
1
RFC 5652 Cryptographic Message Syntax (CMS), Section 14, page 54 states:
RFC 5652加密消息语法(CMS),第14节,第54页指出:
Implementations must randomly generate content-encryption keys, message-authentication keys, initialization vectors (IVs), and padding.
实现必须随机生成内容加密密钥,消息验证密钥,初始化向量(IV)和填充。
Thus, BouncyCastle implementation follows CMS standard.
因此,BouncyCastle实现遵循CMS标准。
#1
1
RFC 5652 Cryptographic Message Syntax (CMS), Section 14, page 54 states:
RFC 5652加密消息语法(CMS),第14节,第54页指出:
Implementations must randomly generate content-encryption keys, message-authentication keys, initialization vectors (IVs), and padding.
实现必须随机生成内容加密密钥,消息验证密钥,初始化向量(IV)和填充。
Thus, BouncyCastle implementation follows CMS standard.
因此,BouncyCastle实现遵循CMS标准。