Mar 24, 2018 Each person’s Public Key is generated by multiplying their Secret Key by 5. Again, in real life, the math in that calculation is sliiiiightly more complicated, but suspend your disbelief with me. Public-key cryptography, or asymmetric cryptography, is a cryptographic system that uses pairs of keys: public keys, which may be disseminated widely, and private keys,which are known only to the owner. The generation of such keys depends on cryptographic algorithms based on mathematical problems to produce one-way functions.
- Cryptography Where Are Keys Generated Made
- Cryptography Where Are Keys Generated Key
- Cryptography Where Are Keys Generated Found
- What Is Public Key Cryptography
Creating and managing keys is an important part of the cryptographic process. Symmetric algorithms require the creation of a key and an initialization vector (IV). The key must be kept secret from anyone who should not decrypt your data. The IV does not have to be secret, but should be changed for each session. Asymmetric algorithms require the creation of a public key and a private key. The public key can be made public to anyone, while the private key must known only by the party who will decrypt the data encrypted with the public key. This section describes how to generate and manage keys for both symmetric and asymmetric algorithms.
The all-in-one ultimate online toolbox that generates all kind of keys! Every coder needs All Keys Generator in its favorites! It is provided for free and only supported by ads and donations.
Symmetric Keys
The symmetric encryption classes supplied by the .NET Framework require a key and a new initialization vector (IV) to encrypt and decrypt data. Whenever you create a new instance of one of the managed symmetric cryptographic classes using the parameterless constructor, a new key and IV are automatically created. Anyone that you allow to decrypt your data must possess the same key and IV and use the same algorithm. Generally, a new key and IV should be created for every session, and neither the key nor IV should be stored for use in a later session.
To communicate a symmetric key and IV to a remote party, you would usually encrypt the symmetric key by using asymmetric encryption. Sending the key across an insecure network without encrypting it is unsafe, because anyone who intercepts the key and IV can then decrypt your data. For more information about exchanging data by using encryption, see Creating a Cryptographic Scheme.
The following example shows the creation of a new instance of the TripleDESCryptoServiceProvider class that implements the TripleDES algorithm.
When the previous code is executed, a new key and IV are generated and placed in the Key and IV properties, respectively.
Sometimes you might need to generate multiple keys. In this situation, you can create a new instance of a class that implements a symmetric algorithm and then create a new key and IV by calling the GenerateKey and GenerateIV methods. The following code example illustrates how to create new keys and IVs after a new instance of the symmetric cryptographic class has been made.
When the previous code is executed, a key and IV are generated when the new instance of TripleDESCryptoServiceProvider is made. Another key and IV are created when the GenerateKey and GenerateIV methods are called.
Cryptography Where Are Keys Generated Made
Asymmetric Keys
The .NET Framework provides the RSACryptoServiceProvider and DSACryptoServiceProvider classes for asymmetric encryption. These classes create a public/private key pair when you use the parameterless constructor to create a new instance. Asymmetric keys can be either stored for use in multiple sessions or generated for one session only. While the public key can be made generally available, the private key should be closely guarded.
A public/private key pair is generated whenever a new instance of an asymmetric algorithm class is created. After a new instance of the class is created, the key information can be extracted using one of two methods:
- The ToXmlString method, which returns an XML representation of the key information.
- The ExportParameters method, which returns an RSAParameters structure that holds the key information.
Both methods accept a Boolean value that indicates whether to return only the public key information or to return both the public-key and the private-key information. An RSACryptoServiceProvider class can be initialized to the value of an RSAParameters structure by using the ImportParameters method.
Asymmetric private keys should never be stored verbatim or in plain text on the local computer. If you need to store a private key, you should use a key container. For more on how to store a private key in a key container, see How to: Store Asymmetric Keys in a Key Container.
The following code example creates a new instance of the RSACryptoServiceProvider class, creating a public/private key pair, and saves the public key information to an RSAParameters structure.
See also
This chapter contains the following:
Setting up Encryption for File Transfer: Procedure
You use encryption keys to encrypt files for secure transfer between Oracle HCM Cloud and your own servers through the Oracle WebCenter Content server. This PGP-based encryption support is available for secure file transfer using HCM Data Loader, payroll batch loader, and HCM Extracts.
The process for inbound files (into Oracle HCM Cloud) is:
- You encrypt files using the Oracle HCM Cloud public key.
- The>Encryption ModeEncryption KeyDecryption KeySigning KeyVerification KeyOutbound PGP Signedcustomer-key_pubcustomer-key_privfusion-key_privfusion-key_pubOutbound PGP Unsignedcustomer-key_pubcustomer-key_privN/AN/AInbound PGP Signedfusion-key_pubfusion-key_privcustomer-key_privcustomer-key_pubInbound PGP Unsignedfusion-key_pubfusion-key_privN/AN/A
Cryptography Where Are Keys Generated Key
Importing Your Public Key
Cryptography Where Are Keys Generated Found
Your public key (customer-key_pub) is used for encryption of outbound files. You can decrypt the files using your private key (customer-key_priv). If you also want outbound files to be signed, then the HCM Cloud private key (fusion-key_priv) is used for signing. You can verify signed outbound files using the HCM Cloud public key (fusion-key_pub).
To import the customer public key:
- Sign in to Oracle HCM Cloud with the IT Security Manager job role or privileges.
- Select Navigator > Tools > Security Console to open the Security Console.
- Click the Certificates tab to open the Certificates page.
- Click Import to open the Import page.
- Set Certificate Type to PGP.
- In the Alias field, enter customer-key.Note: You must enter customer-key in this field. Otherwise, the encryption APIs can't use this key for encrypting outbound files.
- Click Browse to identify the location of the customer public key.
- Click Import and Close to import the public key into the Oracle HCM Cloud keystore.
Your public key now appears on the Security Console Certificates page.
Generating the PGP Encryption Key Pair
You generate the PGP key pair on the Security Console. You download the public key to encrypt files that are inbound into HCM Cloud (for example, input data files for HCM Data Loader). To sign these inbound files, you can use your private key (customer-key_priv), which is verified using your public key (customer-key_pub) in Oracle HCM Cloud. You must have imported the customer public key.
To generate the PGP Encryption Key Pair:
- Sign in to Oracle HCM Cloud with the IT Security Manager job role or privileges.
- Select Navigator > Tools > Security Console to open the Security Console.
- Click the Certificates tab to open the Certificates page.
- Click Generate to open the Generate dialog box.
- In the Generate dialog box, set Certificate Type to PGP.
- In the Alias field, enter fusion-key.Note: You must enter fusion-key in this field. Otherwise, the encryption APIs can't use this key to decrypt all encrypted inbound files.
- In the Passphrase field, enter a passphrase for the private key. This passphrase is needed when you edit, delete, or download the private key.Note: If you forget the passphrase, then you may have to raise a service request for help to delete the private key. Once the old key is deleted, you can generate a new key using the process described here.
- In the Key Algorithm field, select RSA.
- In the Key Length field, select either 1024 or 2048.
- Click Save and Close. The fusion-key pair is generated and ready for download. You can see the fusion-key pair on the Certificates page of the Security Console.
- In the Status actions for the fusion-key pair on the Certificates page, select Export > Public key. Save the HCM Cloud public key (fusion-key_pub.asc) to your desktop. Use the downloaded key to encrypt files that are inbound to Oracle HCM Cloud.
Encrypting and Uploading Files Automatically: Procedure
Encrypt files of data with PGP encryption and transfer them automatically between your servers and Oracle WebCenter Content using APIs and web services. For example, you can encrypt and decrypt files that contain sensitive employee data or confidential documents. You write programs to collect the encrypted files from your file server. You then place them on the Oracle WebCenter Content server and call a data loader to decrypt and load the data to Oracle HCM Cloud.
Note: You must set up your encryption keys before you perform these tasks.
Supported Encryption Algorithms
Oracle HCM Cloud supports the following encryption algorithms. You must ensure that you use only supported encryption algorithms.
- Cipher: AES-128, Blowfish, CAST5, 3DESNote: These cipher algorithms aren't supported: Twofish, IDEA, AES-192, and AES-256
- Compression: bzip2, zlib, .zip, uncompressed
- Hash: SHA-1, SHA-256, SHA-224, SHA-512, MD5, SHA-384, RIPEMD-160
Encrypting Files
This section provides the commands to encrypt files in Microsoft Windows and Linux environments using the GnuPG encryption tool. For other tools and platforms, work with your suppliers to find the necessary commands for setting the cipher algorithm.
- Gpg4win, the official GnuPG distribution for Microsoft Windows, provides both a command-line interface and a graphical user interface for encryption, decryption, signing, and verification. For encryption, use the command-line interface. You can find Gpg4win here:
https://www.gpg4win.org/about.html
. - You can download GnuPG for Linux from various sources, depending on the Linux distribution that you're using. Commonly used GnuPG versions can be found here:
https://www.gnupg.org/index.html
.
After installing the Gpg4win or GnuPG tool, follow these steps to encrypt or encrypt and sign a file:
- Import the HCM Cloud public key (downloaded from the Security Console) using this command at the command prompt:
- Perform one of these steps.
- To encrypt a file without signing, use this command:
- To both encrypt and sign a file, use this command:Note: When signing files, ensure that your private key is imported into the keystore that's used for signing.
Loading Encrypted Files
Perform the following steps to load encrypted files to Oracle HCM Cloud from the Oracle WebCenter Content server.
- Write programs to send your encrypted files to Oracle WebCenter Content, using the Oracle WebCenter Content Web Services. If your home page is: https://Hostname/homePage/faces/AtkHomePageWelcome, then the Oracle WebCenterContent Server WSDL is: https://Hostname/idcws/GenericSoap?wsdl.
- Call the loader program to pass the encryption parameter with other required parameters. The loaderIntegrationService uses the submitEncryptedBatch method, which has an additional parameter named encryptType. This parameter has the following values, which are defined in the ORA_HRC_FILE_ENCRYPT_TYPE lookup type:
- NONE
- PGPSIGNED
- PGPUNSIGNED
Transferring Files Automatically from HCM Extracts with PGP Encryption: Procedure
Transfer encrypted files to Oracle WebCenter Content using HCM Extracts and your encryption key. HCM Extracts can generate encrypted output and store it on the WebCenter Content server. For example, you can encrypt and decrypt files that contain sensitive employee data or confidential documents. Use HCM Extracts to generate encrypted files and deliver them to the WebCenter Content server. You write your own programs to collect the files.
Note: You must set up your encryption keys before you try to encrypt or decrypt data.
Outbound Integrations
Set up the following information to use HCM Extracts with your outbound integrations:
- In the Data Exchange work area, select the Manage Extract Definitions task.
- Select the WebCenter Content delivery type on the Deliver page.
- Enter an Integration Name. The application uses this name to create the title of the entry in WebCenter Content.
- Select an Encryption Mode. The encryption mode is one of the values from the ORA_HRC_FILE_ENCRYPT_TYPE lookup type. It determines how the application encrypts the file before loading it to WebCenter Content. When HCM Extracts transfers the file to WebCenter Content it generates a content ID automatically with the following format: UCMFAnnnnnn.The file includes the following properties:
Field Name Value AuthorFUSION_APPS_HCM_ESS_APPIDSecurity GroupFAFusionImportExportAccounthcm/dataloader/exportTitleHEXTV1CON_{Integration Name}_{Encryption Type}_{Date Time Stamp}For example: HEXTV1CON_ExtractConn1_PGPUNSIGNED_17-11-2014 14-16-44 - Configure the HCM Extract delivery option to output an XML (data) file directly to WebCenter Content without formatting it in BI Publisher. You can achieve this by selecting Data as the output format, omitting a template name, and selecting the WebCenter Content Delivery Type.
- Download the encrypted files from WebCenter Content using client command-line tools or a web service call.
What Is Public Key Cryptography
Decryption of Outbound Files
Using your private key, you can decrypt encrypted files that are generated from Oracle HCM Cloud. To verify signed files, you use the Oracle HCM Cloud public key. Ensure that these two keys are imported into the keystore. For both Microsoft Windows and Linux, use this command to decrypt both signed and unsigned files:
Related Topics