Keys get compromised or lost and they are revoked. Keys are signed by more people, building a Web of Trust. Users change the encryption algorithms they prefer. (See the Using Stronger Algorithms section for more about this.) Updates to keys can be published to public key servers, including new signatures. PGP has a bad habit of using truncated fingerprints as key ids, organizing keys in its database by short key id and dealing keys with the same short key id as probably being the same, although it isn't so hard to make a new key pair that resolves to the same key id as an existing one.
Symptom
- What is PGP and how does it work in SuccessFactors?
- Customer wants to encrypt their Data
- Customer requests public key
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
A Means Of Generating Predictable Pgp Session Keys Is Needed To Buy
Resolution
What is PGP?
PGP is a key based encryption/authentication process. It allows users to publicly share keys that are used to sign and/or encrypt messages and data. At SuccessFactors, we only use the encryption function.
How does PGP work?
A user or his company needs to install PGP software. They can also use the compatible GPG (Open Source) software. After the install, the user can create their own keys and install keys provided by business partners. Every key comes in two parts. The Public key that can be shared with partners or even posted publicly somewhere for anyone to access. The Private key that should be kept secure on the system where it was created.
The two keys are used for two different purposes.
- The Public key is used to Encrypt data you are sending.
- The Private key is used to Decrypt data you receive.
So any of your business partners can use your Public key to encrypt data they send you. They can safely send the file over a public network. Only you are able to decrypt it.
Working with PGP Keys at SuccessFactors
SuccessFactors has included the Managing PGP Keys screen in Provisioning. This screen has two sections that relate to the two keys discussed earlier.
Generate Key
The top half of the screen allows us to generate (a private/public key pair) and export the Public key our customer will use to encrypt data before sending it to us.
- Generate Key creates a new key. We offer two key options. The DSA option creates a 512 bit key. The RSA option creates a 2048 bit key;
- Choose the RSA key when creating a new one. The smaller DSA key only exists for backwards compatibility. The few customers who require DSA will actually ask for it;
- Do not generate a new key if one is already listed in the Generated Key Section;
- The Generated Key area list the key type, key fingerprint and creation date. The last two items can be used to validate that our customer has installed our key properly;
- Use Remove Key with caution. There is normally never any reason to do this. Once the key is removed, there is no way to recover it. Any customer data encrypted with it won’t be able to be decrypted;
- Export Key button creates a Public key file you can save and send to the customer. This can be sent in plain email;
- The Export Key button does not create a key that we can import into another instance;
- NOTE: After a key has been generated, we can only export the public key from Provisioning however Support has no access to the Private Key or the Passphrase. This is to safeguard your data.
As a result this screen is NOT suitable for generating keys to use with LMS; - To generate a Private / Public Key pair for LMS, it can be done manually by the customer or via a paid engagement (Professional services or customer consultant)
Import Key
The bottom half allows us to import Public Keys sent by our customers. We will use these to encrypt data we send to them.
Note: Multiple keys can be installed here. They will ALL be used to encrypt data we send. However ANY ONE of them can be used to decrypt the data.
- Browse on your PC for the Public key file the customer sent you;
- Select Import Key to install it in provisioning;
- The key will appear in the list. We can share the UserName, Creation Date and Fingerprint info with a customer questioning if we have the correct key installed;
- As noted earlier, it’s OK to install multiple keys here;
- There is no way to export these keys. We can install customer provided keys in multiple instances only if we still have their original key file;
- It’s OK to remove unused keys. Please be sure they are truly not needed. There is no way to recover them. To remove, select the checkbox and hit Remove Key;
- We no longer provide or install the old SF PGP key. While it’s still in use for many of our existing customers there is never a reason to use it for a new one;
- For LMS, this is where the public key generated will be imported so that the BizX scheduled jobs encrypt the file with the right key (LMS connector will then decrypt the file using the private key setup on LMS). For more information on LMS encryption setup please check the references section of this KBA.
How to request a key or to import a key on SuccessFactors?
Please engage your Implementation Partner or Customer Support under the component LOD-SF-PLT. To request the generation, please inform:
- The Company ID of the instance;
- The type of the key (DSA/RSA).
To request the import of the key, please inform:
- The Company ID of the instance;
- Attach the key file in the ticket.
See Also
2361997 - How to use PGP encryption in LMS connectors
Keywords
PGP, Encryption, Securing Data, Scheduled Jobs, Decrypt, Data, Public Key, Private Key , KBA , LOD-SF-PLT , Platform Foundational Capabilities , LOD-SF-PLT-SFTP , LOD-SF-PLT-SFTP , LOD-SF-PLT-SEC , Security & Permissions , How To
Product
Updated by LinodeWritten by Linode
Report an Issue |View File |Edit File
What is GnuPG?
GNU Privacy Guard (GnuPG), also known as GPG, is a tool for secure communication that was created by Werner Koch as Free Software under the GNU Project. GnuPG follows the OpenPGP protocol, which defines and standardizes all the necessary components involved in sending encrypted messages–signatures, private keys, and public key certificates. This piece of free software is notably used by journalists around the world to ensure that their sensitive email communication is kept secure and private.
GPG uses a combination of symmetric-key cryptography and public-key cryptography. Public key cryptography is likely already familiar to you since it is the recommended way to authenticate when SSHing in to your Linode. Public-key cryptography uses a key-pair system where any single user has a private and public key pair. The public key can be shared with anyone, while the private key should be protected and secret to maintain the integrity of the system.
This asymmetric cryptographic system is ideal for secure communication, because all it requires is that the sender of the message have a copy of the receiver’s public key before encrypting and sending the message. The recipient can then use their private key to decrypt the message. This means anyone can send you a secure message if they have a copy of your public key.
This guide shows how to create your own keypair, distribute the public key to a receiver, and encrypt and decrypt a message on Ubuntu 16.04 and 18.04.
Create GPG Keys
Download and install the most recent version of the GPG command line tools for Ubuntu:
Create a new primary keypair:
Several prompts will appear before the keypair is generated:
- Select
(1) RSA and RSA (default)
for the type of key. - Enter
4096
for the key size. - Specify the duration the key should be valid in days, weeks, months, or years. For example,
1y
will set an expiration date of one year from the time of keypair creation. - Enter a name, email address, and comment to associate with the key pair. Any one of these three values can be used to identify the keypair for future use. Enter the desired information for each value and confirm when prompted.
- Provide a passphrase. The passphrase is used to unlock the private key, so it is important to ensure the passphrase is strong. Use a mix of alphanumeric characters.
Once you have responded to all prompts, the keypair will be generated. This may take a few minutes to generate depending on the key size that was chosen.
If your system seems to hang at the following message:
The system may require more entropy to generate the keypair, in a new shell session, install the
rng-utils
package:Check and feed random data from an entropy source (e.g. hardware RNG device) to an entropy sink (e.g. kernel entropy pool) to provide the needed entropy for a secure keypair to be generated:
Check the amount of entropy available on your Linode. The value should be somewhere near 3000 for keypair generation.
- Select
Verify the keys on your public keyring:
The example output contains two public keys:
Each value in the list represents the following information:
- Public key:
pub
- Key size and type:
4096R
- Short key ID:
A11C0F78
- Creation date:
2018-08-02
- Expiration date:
[expires: 2018-09-01]
- User IDs:
exampleName2 (example comment) <[email protected]>
- Subkey:
sub
- Public key:
Throughout the remainder of this guide, the first public key will be used to encrypt our message. The output may vary slightly depending on the version of Ubuntu you are using.
Generate a Revocation Certificate
A revocation certificate is useful if you forget your passphrase or if your private key is somehow compromised. It is used to notify others that the public key is no longer valid. Create the revocation certificate immediately after generating your public key.
Generate a revocation certificate. Replace [email protected]
with the email address associated with the public key:
A Means Of Generating Predictable Pgp Session Keys Is Needed Time
- A prompt will ask you to select a reason for the revocation and provide an optional description. The default reason is recommended.
- The revocation certificate will be saved to the current directory as a file named
revoke.asc
. Save the certificate to a safe location on a different system so that you can access it in case your key is compromised in the future.
Once you’ve revoked a public key it cannot be used to encrypt future messages to you. It can still be used to verify signatures that you made in the past and to decrypt past messages sent to you.
Exchange Public Keys
You will need to exchange public keys with someone in order to securely communicate with them. If you do not want to make your key available on a key server, you can exchange keys with someone directly by exporting your public key and sending them directly to the recipient.
Export Your Public Key
Export the public key. Replace
public-key.gpg
with a desired name for the file and[email protected]
with the email address associated with your key’s user id:The file will save to the current directory.
Send the
public-key.gpg
file to the recipient in an email or copy and paste the contents of thepublic-key.gpg
file.The recipient should import the public key and validate it in order to use it to decrypt a message sent by you.
Import and Validate a Public Key
You can add someone else’s public key to your public keyring by importing it. The user’s public key must first be sent to you, by email or some other format, before you can import it to your public key ring. When the key is imported you should verify the key by checking its fingerprint and then signing it.
Once you’ve received the user’s public key and the
.gpg
file is saved to your Linode, import it to your public key ring. Replacepublic-key.gpg
with the file name of the public key you will import. If your file is saved somewhere other than the current directory, make sure you use the full path to the file:Verify that the public key has been added to your public key ring:
Check the key’s fingerprint:
The output will resemble the following
Ask the owner of the public key to send you their public key’s fingerprint and verify that the fingerprint values match. If they match, you can be confident that the key you have added is a valid copy of the owner’s public key.
When you have verified the public key’s fingerprint, sign the public key with your own key to officially validate it. Replace
[email protected]
with the associated email for the key you are validating:Enter your passphrase when prompted.
View the public key’s signatures to verify that your signature has been added:
You can export the signature to the public key and then send the signed copy back to the owner of the public key to boost the key’s level of confidence for future users:
Send the signed key to the public key owner via email so they can import the signature to their GPG database.
Submit Your Public Key to a Key Server
You can submit your public key to a GPG server to make it available to the general public. The GnuPG configuration file ~/.gnupg/gpg.conf
by default sets the key server as hkp://keys.gnupg.net
and provides examples of other key servers that can be used in the file’s comments. Since key servers around the globe synchronize their keys to each other it should not be necessary to change the default value set in the configuration file.
Find the long key ID for the public key you would like to send to the key server:
You will see an output similar to the example. The long key ID is the value after the key size
4096R
in thepub
row. In the example the long key ID isC7277DE1A11C0F78
:To send your public key to the default key server use the following command and replace
keyid
with your public key’s long key ID:Anyone can request your public key from the key server with the following command:
The public key will be added to the user’s trust database using the
trustdb.gpg
file.
Encrypt a Message
After you have obtained someone’s public keys, you can send them encrypted messages. When you are encrypting a message to send to someone, you are using their public key to encrypt the message. Only the holder of the corresponding private key will be able to decrypt the message.
To encrypt a message:
Replace encrypted-doc.gpg
with a name for the encrypted version of your document, [email protected]
with the email associated with the public key of the encrypted message’s recipient, [email protected]
with your own public key’s associated email and doc-to-encrypt.txt
with the name of the document you will encrypt. If the document is not in the current directory, include the full path to the document.
The extension .gpg
is used for encrypted/binary data and .asc
or .sig
is used for detached or clearsign signatures. Including the --armor
flag will encrypt the message in plain text.
A Means Of Generating Predictable Pgp Session Keys Is Needed Life
Decrypt a Message
A message will need to have been encrypted with your public key for you to able to decrypt it with your private key. Ensure that anyone that will be sending you an encrypted message has a copy of your public key.
To decrypt a message:
Replace decrypted-doc
with the name you want to assign to the decrypted message and doc-to-decrypt.gpg
with the name of the encrypted document. If the document is not in the current directory, include the full path to the document.
More Information
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
Join our Community
This guide is published under a CC BY-ND 4.0 license.