Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a PKI in Java

I want create certificates to be stored on a database and i dont have any idea about how to do it, if exits an API or library help me do it Thanks

like image 425
user512673 Avatar asked Nov 18 '10 20:11

user512673


People also ask

What is Java PKI?

Public Key Infrastructure (PKI) refers to the setup that enables the secure exchange of information over the network using public-key encryption. This setup relies on trust that is built between the parties involved in the communication.

How are PKI keys generated?

In a PKI system, the client generates a public-private key pair. The public key and information to be imprinted on the certificate are sent to the CA. The CA then creates a digital certificate consisting of the user's public key and certificate attributes. The certificate is signed by the CA with its private key.

How PKI works step by step?

PKI performs encryption directly through the keys that it generates. It works by using two different cryptographic keys: a public key and a private key. Whether these keys are public or private, they encrypt and decrypt secure data.


2 Answers

A public key infrastructure is far more than a database of signed public keys. For instance one of the most important parts of the PKI is the ability to revoke certificates using the OCSP protocol.

In short everything needed to build a PKI in java has been built for you and is open source, you should use EJBCA.

like image 69
rook Avatar answered Oct 20 '22 14:10

rook


Here is the Java PKI programming guide from Sun.

like image 1
Cosmin Cojocar Avatar answered Oct 20 '22 12:10

Cosmin Cojocar