Lifecycle of A Certificate: Generate CSR
Lifecycle of A Certificate: Generate CSR
Lifecycle of A Certificate: Generate CSR
1. Lifecycle of a certificate
1. Client generates Certificate Signing Request (CSR) in his secure computer or server
where application will be used. Now client has two files a CSR file (usually with CSR
extension but it can be also with PEM) and a Private Key file (usually with KEY file,
but it can also be with PEM extension). To be precise, Private Key is used to sign CSR
file.
Generate CSR
Private
Key file
CSR file
2. CSR file is being sent to Registry i.e. CA, for example Sertifitseerimiskeskus AS
(www.sk.ee) and Private Key will be stored securely in clients computer. It should never
be revealed or shared with anyone even not with Bank.
Generate CSR
CSR file
Private
Key file
Stored securely
in client server
3. SK will issue certificate which will be instantly available in their LDAP and OCSP
services. When SK is issuing certificate they will always provide it as a file, too.
Generate CSR
CSR file
Private
Key file
Stored securely
in client server
Public key is
sent to client
CA will issue
Certificate
OCSP service
LDAP service
Public Key
file
4. Every certificate has its fixed lifetime B4B certificates for example 3 years this is
useful for security purposes, since it can be cracked with computing power with brutal
force with that time (3 years) in case the key length is not so long (currently we have
2048 bits).
5. Once certificate is issued and valid, everyone can download public certificate from LDAP
service and check certificate data name, owner, expiration, etc. It is useful to check
certificate status whether it is stolen or not. Everyone can also check this certificate
against OCSP service to see if the certificate is valid or not.
While certificate is used for signing purposes, OCSP service is used to add a timestamp to the signature that confirms the validity of a signature (that it was valid in
specific time) that will add legal power to it every given signature is also stored in
Sertifitseerimiskeskus AS log files that means, the security is very high.
3
Private key is the only
identifier of Certificate
Owner i.e. Private
key is your Digital
Identity keep it
secure!
Certificate
Authority (SK)
OCSP service
Private
Key file
Certificate
Owner
LDAP service
Is certificate
valid (active)?
Public Key
file
Check adressee
to send
encrypted file
In Swedbank Gateway we
enable clients to
authenticate with B4B
certificates
Can sign
documents
Can decrypt
documents sent
only to him
DDOC: Signed
container
CDOC: Encrypted
container
Any file
Any file
Authenticate
Any file
Anyone
6. When certificate is stolen or compromised, the owner can close it. In case of Swedbank
B4B certificates, clients should call to bank and bank will close it from
Sertifitseerimiskeskus.
7. When certificate expires, new certificate should be ordered process starts from the
beginning from making new CSR. The same data can be used in CSR but it will be
DIFFERENT certificate. Both parties have to update their info-systems with new
certificate then.
2. PKI in a nutshell
Why do we need PKI?
One of the main challenges in the Internet is how to identify other persons. Identity thefts.
Computer viruses, man in the middle attacks and phishing attempts are becoming more and
more common and threatening, therefore additional security measures are required, when
confidential information is being exchanged. Currently the best solution to this problem is using
Public Key Infrastructure (PKI).
How can I
believe you?
Hi, Im Bob.
Internet
PKI will add neutral and trustworthy third party to the picture and the main goal is to help
identifying persons. It is quite similar to State ID system where state officer identifies a person
4
and the issues a passport.
Thank you. Now I can
believe that you are Bob.
Passport
Issued by state
Public Key
file
Certificate
Private
Key file
Issued by CA
The term Certificate can mean different things generally a certificate has two parts
Public.Key and Private Key.
Public Key can be shared with everyone - it can be used for following purposes:
Grant authentication permissions (allow access for someone)
Check who has Signed a document
Encrypt messages that are addressed only to certificate owner
Public Key can be accessed and downloaded from LDAP services at any time it acts as a
white pages for certificates
Private Key should be kept in secret and by no means shared or revealed to anyone (even not
to Bank) - it can be used to identify that the certificate owner is really you in following
occasions:
Authenticate yourself (prove that you are really you, get access somewhere)
Sign a document in order to do that, OCSP confirmation of signatures validity at
certain time will be also added into document.
Decrypt messages sent to you by other people
Certificate
Authority (SK)
Is certificate
valid (active)?
Who is owner?
OCSP service
Encrypt
document to
adressee
Grant some
permissions to
owner of this
certificate
LDAP service
DDOC: Signed
container
Any file
Public Key
file
OCSP confirmation of
signatures validity is
stored in document and
also to OCSP log files
Give Signature
CDOC: Encrypted
container
Any file
Any system
Open encrypted
containers
Private
Key file
Authenticate
himself (access
systems)