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.