使用PKCS 7加密 [英] Using PKCS 7 Cryptography
本文介绍了使用PKCS 7加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要使用 PKCS7(CMS)
加密和签名数据。
我使用bouncy城堡提供的api来实现这个使用java。
到现在为止,我明白我需要按照这些步骤
- 需要生成密钥对private&公共密钥使用一些算法
RSA
- 使用
X509
/ li>
- 将其转换为
PKCS7
键格式,如p7b - 使用keytool生成java密钥存储库
*。jks
文件 - 使用keytool生成
证书签名请求命令
*。crt
- 成为自己
CA(Certificate Autority)
- 从之前信息中创建的密钥库导入密钥并加密签名和解密数据
需要找出我需要遵循什么步骤来签名,加密,解密数据。
我的问题是
<
解决方案
加密和签名,但我仍对其中的步骤感到困惑。
您需要的不是 BouncyCastle
。
您需要 OpenSSL
和指南。
或者,使用Java生成和存储RSA密钥:
I need to encrypt and sign data using PKCS7(CMS)
.
I am using bouncy castle provided api to achieve this using java .
Till now what i understood is i need to follow these steps
- Need to generate a key pair private & public key using some algorithm say
RSA
- Certify it with
X509
certificate - Convert it into
PKCS7
key format like p7b - Generate java key store using keytool some
*.jks
file - Generate the
Certificate Signing Request (CSR)
using keytool command*.crt
- Become self
CA(Certificate Autority)
and certify - Import key from keystore created in previous stem and encrypt sign and decrypt data
I still need to figure out what steps i need to follow to sign,encrypt,decrypt data.
My question is
- Is my steps are correct ?
- How do i certify key pair generated by RSA algorithm and convert into PKCS7 key format
- How do i become self CA and certify
- I got this to encrypt and sign, still i am confused with steps to follow and also most of them are deprecated.
解决方案
What you need is not BouncyCastle
.
You need OpenSSL
and a guide.
Alternatively, to generate and store an RSA key using Java:
Generate RSA key pair and encode private as string
这篇关于使用PKCS 7加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文