08 ‐ Homogeneous Key Pair vs. Heterogeneous Key Pair - SanjeevOCI/Ocidocs GitHub Wiki
1. Homogeneous Key Pair
A homogeneous key pair refers to a pair of keys that are of the same type and used within the same cryptographic system. Typically, this means both keys are either symmetric or asymmetric and are used consistently within the same cryptographic algorithm.
Examples of Homogeneous Key Pairs
1. Symmetric Key Pair:
Description: In symmetric encryption, the same key is used for both encryption and decryption. This is a single key system, so technically, it is not a "pair" but a single key used in a homogeneous manner.
Example: AES (Advanced Encryption Standard) key used to encrypt and decrypt data.
2. Asymmetric Key Pair:
Description: In asymmetric encryption, a pair of keys (public and private) is used. Both keys are part of the same cryptographic system (e.g., RSA, ECC) and are used together to perform encryption and decryption.
Example: RSA key pair used for secure communication. The public key encrypts data, and the private key decrypts it.
Practical Application in OCI SSH Key Pair for Instance Access:
- Public Key: Stored in the authorized_keys file on the OCI instance.
- Private Key: Used by the user to authenticate and access the instance.
- Both keys are part of the same RSA or ECDSA key pair used for SSH access.
2. Heterogeneous Key Pair
A heterogeneous key pair refers to a pair of keys that are of different types or used across different cryptographic systems. This typically involves using different algorithms or key types in conjunction to achieve a specific security goal.
Examples of Heterogeneous Key Pairs
1. Different Key Pairs for Different Services:
Description: Using different key pairs for different purposes or services. Example: Using an RSA key pair for digital signatures and an ECC key pair for encryption. Here, the keys are heterogeneous because they belong to different cryptographic systems (RSA and ECC).
2. Hybrid Encryption:
Description: Combining asymmetric and symmetric encryption to leverage the strengths of both.
Example: Using an RSA key pair to encrypt an AES symmetric key, which is then used to encrypt the actual data. This approach combines the strengths of both asymmetric and symmetric encryption, making it a heterogeneous key pair system.
Practical Application in OCI Combining SSH and KMS: SSH Key Pair: Used for secure access to instances. KMS Key Pair: Used for encrypting sensitive data stored on those instances or in OCI storage services.
Summary
Homogeneous Key Pair: Keys of the same type used within the same cryptographic system (e.g., RSA key pair for SSH).
Heterogeneous Key Pair: Keys of different types or used across different cryptographic systems (e.g., RSA for signatures and ECC for encryption).