7 Creating a certificateContents

Now that you have found out why GnuPG is so secure(Chapter 3), and how a good passphraseprovides protection for your private key (Chapter 4),you are now ready to create your own key pair .

May 10, 2012  By looking at the command line you are building for the encryption you can probably just change the -se to -d for decrypt. The output file is the decrypted file and the input file will be the encrypted file. You would change the cLocalKey to be the key listed for the person encrypting the input file. Key management commands. To generate your own unique public/secret key pair: gpg -gen-key. Command options that can be used in combination with other command options. To produce a ciphertext file in ASCII format, just add the -a option when encrypting or signing a message or extracting a key. Mar 01, 2015  Create your GPG key: To get started with GPG, you first need to generate your key pair. That is, you will generate both a private and a public key with a single command. Enter your name and email address at the prompts, but accept the default options otherwise. Gpg -gen-key. The first key is your private (or secret) key. May 10, 2012 By looking at the command line you are building for the encryption you can probably just change the -se to -d for decrypt. The output file is the decrypted file and the input file will be the encrypted file. You would change the cLocalKey to be the key listed for the person encrypting the input file. Generate a revocation certificate for the complete key. To revoke a subkey or a signature, use the -edit command.export names Either export all keys from all keyrings (default keyrings and those registered via option -keyring), or if at least one name is given, those of the given name. Can you please open the command line (cmd.exe) and check there with 'gpg -K' if the key was created? Or if there are any errors from this output. Afterwards can you do: 'gpg -gen-key' and follow the instructions on the screen to create a key from the command line. One simple method I found working on a linux machine is: 1) import key to gpg:= shell gpg —import privatekey.key. 2) decrypt giving outfile name:= shell gpg —output -d. 2.1) Giving above command will prompt you to enter paraphrase. Enter the paraphrase and it will decrypt the gpg file.

As we saw in Chapter 3, a key pair consists ofa public and a private key. With the addition of ane-mail address, login name etc., which youenter when creating the pair (so-called meta data), you can obtainyour private certificate with the public and private key.

This definition applies to both OpenPGP as well as S/MIME (S/MIMEcertificates correspond with a standard described as'X.509').


It would be nice if I could practice this importantstep of creating a key pair ..

Not to worry, you can do just that - but only with OpenPGP:

If you decide for the OpenPGP method of authentication, the 'Web of Trust', then you can practice theentire process for creating a key pair, encryption and decryption asoften as you like, until you feel very comfortable.

This 'dry run' will strengtthen your trust in Gpg4win, and the 'hotphase' of OpenPGP key pair creation will no longer be a problem foryou.

Your partner in this exercise is Adele . Adele is a testservice which is still derived from the GnuPP predecessorproject and is still in operation. In this compendium wecontinue to recommend the use of this practice robot. We would alsolike to thank the owners of gnupp.de for operating this practicerobot.

Using Adele, you can practice and test the OpenPGP key pairwhich you will be creating shortly, before you start using it in earnest.But more on that later.

Let's go!Open Kleopatra using the Windows start menu:

You will see the main Kleopatra screen -the certificate administration:

At the beginning, this overview will be empty, since you have notcreated or imported any certificates yet.

Click on File -> New Certificate.

In the following dialog you select the format for the certificate. Youcan choose from the following: OpenPGP (PGP/MIME)or X.509 (S/MIME).

The differences and common features of the two formats have already beendiscussed in Chapter 5.


This chapter of the compendium breaks off into twosections for each method at this point. Information is then combinedat the end of the Chapter.

Depending on whether you chose OpenPGP or X.509 (S/MIME), you can nowread either:

  • Section 7.1:Creating an OpenPGP certificate page) or
  • Section 7.2:Creating an X.509 certificateX).

7.1 Creating an OpenPGP certificate

In the certificate option dialog, click on [Createpersonal OpenPGP key pair].

Now enter your e-mail address and your name inthe following window. Name and e-mail addresswill be made publicly visible later.

You also have the option of adding a comment for the key pair. Usuallythis field stays empty, but if you are creating a key for testpurposes, you should enter 'test' so you do not forget it is a testkey. This comment becomes part of your login name, and will becomepublic just like your name and e-mail address.

If you first wish to test your OpenPGP key pair, you cansimply enter any name and fictional e-mail address, e.g.:
Heinrich Heineand heinrich@gpg4win.de

The Advanced settings are only be required in exceptionalcases. For details, see the Kleopatra handbook (viaHelp -> Kleopatra handbook).

Click on [Next].

You will see a list of all of the main entries and settingsfor review purposes. If you are interested in the (default)expert settings, you can view these via the All detailsoption.

If everything is correct, click on [Create key].

Now to the most important part: entering yourpassphrase!

To create a key pair, you must enter your personal passphrase:

If you have read Chapter 4 you should now have aneasy-to-remember but hard to break secret passphrase. Enter it in thedialog displayed at the top.

Please note that this window may have been opened in the backgroundand is not visible at first.

If the passphrase is not secure enough because it is too short or doesnot contain any numbers or special characters, the system will tellyou.

At this point you can also enter a test passphrase or startin earnest; it's up to you.

To make sure that you did not make any typing errors, the system willprompt you to enter your passphrase twice. Always confirm your entrywith [OK].

Now your OpenPGP key pair is being created:

This may take a couple of minutes. You can assist the creation of therequired random numbers by entering information in the lower inputfield. It does not matter what you type, as the characters will not be used, only the time period between each key stroke. You can alsocontinue working with another application on your computer, which willalso slightly increase the quality of the new key pair.

As soon as the key pair creation has been successful, youwill see the following dialog:

The 40-digit 'fingerprint' of your newlygenerated OpenPGP certificate is displayed in the results text field.This fingerprint is unique anywhere in the world, i.e. no other personwill have a certificate with the same fingerprint. Actually, even at8 digits it would already be quite unlikely that the same sequence would occur twice anywhere in world. For this reason, it is often only the last 8 digits of afingerprint which are used or shown, and which are described as thekey ID. This fingerprintidentifies the identity of the certificate as well as the fingerprintof a person.

However, you do not need to remember or write down the fingerprint.You can also display it later in Kleopatra's certificate details.

Next, you can activate one or more of the following three buttons:

Creating a backup copy of your (private) certificate..

Kleopatra Command Line Decrypt

Enter the path under which your full certificate (which containsyour new key pair, hence the private and public key) should be exported:

Kleopatra will automatically select the file type and store yourcertificate as an .asc or.gpg file -depending on whether you activate or deactivate the ASCIIarmor option.

For export, click on [OK].

Important: If you save the file on the hard drive, youshould copy the file to another data carrier (USB stick, disketteor CD-ROM) as soon as possible, and delete the original filewithout a trace, i.e. do not leave it in the Recycle bin! Keepthis data carrier and back-up copy in a safe place.

Apr 03, 2017  The Witcher 2: Assassins of Kings Crack Patch And CD Key Generator for free here! Links always updated and working! Right here in few clicks! Download Now. The Witcher 2: Assassins of Kings Serial Key Download Code Crack key generator Full Game Torrent skidrow Origin Key. Oct 30, 2015  The Witcher 2 Assassins of Kings cd key generator works perfectly and has been tried on more than ten thousand different computers and smartphones! Many people all around the world are taking benefit of this key generator. The witcher 2 download.

You can also create a back-up copy later; to do this, select thefollowing from the Kleopatra main menu:File -> Export private certificate.. (see Chapter19).

Sending a certificate via e-mail ..

Clicking on this button should create a new onee-mail -with your new public certificate in the attachment. Your secretOpen PGP key will of course

Gpg4win Command Line Generate Key Download

not be sent. Enter arecipient e-mail address; you can also addmore text to the prepared text for this e-mail.

Please note: Not alle-mail programs support this function. Of course you can also dothis manually: If you do not see anewe-mail window, shut down thecertificate creation assistant, save your public certificate viaFile -> Export certificate and sent this filevia e-mail tothe people you are corresponding with. For more details seeSection 8.1.

Sending certificates to certificate servers..

Chapter explains howto set up a globally available OpenPGP certificate server in Kleopatra,and how you can publish your public certificate on thisserver 16.

This completes the creation of your OpenPGP certificate. End theKleopatra assistant with [Finish].

Now let's go to Section 7.3 onpage X. Starting at that point,the explanations for OpenPGP and X.509 will again be identical.

7.2 Creating an X.509 certificate

In the certificate format selection dialog on page ,X click on the button
[Create personal X.509 key pair and authenticationrequest].

In the following window, enter your name (CN = common name), youre-mail address (EMAIL), organisation (O) andyour country code (C). Optionally, you can also add your location (L =Locality) and department (OU = Organizational Unit).

If you first wish to test the X.509 key pair creationprocess, you can enter any information for name, organization andcountry code, and can also enter a fictional e-mail address, e.g.:CN=HeinrichHeine,O=Test,C=DE,EMAIL=heinrich@gpg4win.de

The Advanced settings will only be required in exceptionalcases. For details, see the Kleopatra handbook (viaHelp -> Kleopatra handbook).

Click on [Next].

You will see a list of all main entries and settings for reviewpurposes. If you are interested in the (default) expert settings,you can view these via the All details option.

Once everything is correct, click on [Creat key].

Now to the most important part: Entering your passphrase!

In order to create a key pair, you will be asked to enter yourpassphrase:

If you have read Chapter 4 you should now have aneasy-to-remember but hard to break secret passphrase. Enter it in thedialog displayed at the top!

Please note that this window may have been opened in the background,so it may not be visible at first.

If the passphrase is not secure enough because it is too short or doesnot contain any numbers or special characters, the system will let youknow.

At this point you can also enter a test passphrase or startin earnest; it's up to you.

To make sure that you did not make any typing errors, the system willprompt you to enter your passphrase twice. Finally, you will be askedto enter your passphrase a third time: By doing that, you are sendingyour certificate request to theauthenticating instance in charge. Always confirm your entries with[OK].

Now your X.509 key pair is being created:

This may take a couple of minutes. You can assist the creation of therequired random numbers by entering information in the lower inputfield. It does not matter what you type, as the characters will not be used, only the time period between each key stroke. You can alsocontinue working with other applications on your computer, which willslightly increase the quality of the key pair that is being created.

As soon as the key pair has been successfully created, youwill see the following dialog:

The next steps are triggered with the following buttons:

Save request in file..

Here, you enter the path under whichyour X.509 certificate request should be backed up, and confirmyour entry. Kleopatra will automatically add the file ending .p10during the saving process. This file can then besent to an authentication instance (in short CA for CertificateAuthority). Further below, wewill refer you to cacert.org, which is a non-commercialauthentication instance (CA) that issues X.509 certificates freeof charge.
Sending an request by e-mail ..

Thiscreates a new e-mail with the certificate requestwhich has just been created in the attachment. Enter a recippiente-mail address - usually that of yourcertificate authority in charge; you can also add more textto the prepared text of this e-mail.

Please note: Not all e-mail programs support thisfunction. Of course you can also do this manually: If you do notsee a new e-mailwindow, save your request in a file (see above)and send it by e-mail to your certificate authority (CA).

As soon as the CA has processed your request, the CA systemadministrator will send you the completed X.509 certificate, whichhas been signed by the CA. You only need to import the file intoKleopatra (see Chapter 19).

End the Kleopatra assistant with [Finish].

Creating an X509 certificate using www.cacert.org

CAcert is a non-commercial certificate authority whichissues X.509 certificates free of charge. It offers an alternative tocommercial root CAs, some of which charge very high fees for theircertificates.

To create a (client) certificate at CAcert, you first have to registerat www.cacert.org.

Immediately following registration, you can create one or more clientcertificates on cacert.org: please make sure you have sufficient keylength (e.g. 2048 bits). Use the web assistant to define a securepassphrase for your certificate.

Your client certificate is now created.

Afterwards you will receive an e-mail with twolinks to your new X.509 certificate and associated CAcert rootcertificate. Download both certificates.

Follow the instructions to install the certificate on your browser. InFirefox, you can use e.g. Edit -> Settings -> Advanced -> Certificatesto find your installed certificate under the first tab 'Yourcertificates' with the name (CN) CAcert WoT User.

You can now issue a personal X.509 certificate which has your name inthe CN field. To do this, you must have your CAcert accountauthenticated by other members of the CACert Web of Trust. Informationon obtaining such a confirmation can be found on the Internet pages ofCAcert.

Then save a backup copy of your personal X.509 certificate. Theending .p12 will automatically be appliedto the backup copy.

Attention: This .p12 file contains yourpublic and your private key. Please ensure that this file isprotected againt unauthorised access.

Rsa 2048 generate public private key. Mar 03, 2020  The service uses the device public key (uploaded before the JWT is sent) to verify the device's identity. Cloud IoT Core supports the RSA and Elliptic Curve algorithms. For details on key formats, see Public key format. Generating an RSA key. You can generate a 2048-bit RSA key pair with the following commands. You can generate a public and private RSA key pair like this: openssl genrsa -des3 -out private.pem 2048 That generates a 2048-bit RSA key pair, encrypts them with a password you provide and writes them to a file. You need to next extract the public key file. RSA; GnuPG; Generating 2048-bit RSA keys. This document describes how I generate 2048-bit RSA keys. Here is the log to generate signature key and encryption subkey. I make a file for my public key by -export option of GnuPG. $ gpg -armor -output gniibe.asc -export 4CA7BABE.

To find out how to import your personal X.509 certificate inKleopatra, see Chapter 19.


Let's now look at Section 7.3 on thenext page. This is where explanations for OpenPGP and X.509 areidentical again.

7.3 Certificate creation process complete

This completes the creation of your OpenPGP or X.509 key pair.You now have a unique electronic key.

During the course of this compendium, we will always use an OpenPGPcertificate for sample purposes - however, all information will alsoapply accordingly to X509 certificates.

You are now back in the Kleopatra main window. The OpenPGP certificatewhich was just created can be found in the certificate administrationunder the tab My certificates:

Double-click on your new certificate to view all details related tothe certificate:

What do the certificate details mean?

Your certificate is valid indefinitely, i.e. it has no 'built-inexpiry date'. To change its validity at a later point, clickon [Change expiry date].

For more details about the certificate, seeChapter 15.

© 31. August 2010, v3.0.0-beta1 (last minor changes from 21. September 2010)
The Gpg4win Compendium is filed under theGNU Free Documentation License v1.2.


7 Creating a certificateContents