Questions tagged [key-pair]

Public-key cryptography, or asymmetric cryptography, is any cryptographic system that uses pairs of keys: public keys that may be disseminated widely paired with private keys which are known only to the owner.

Public-key cryptography, or asymmetric cryptography, is any cryptographic system that uses pairs of keys: public keys that may be disseminated widely paired with private keys which are known only to the owner. There are two functions that can be achieved: using a public key to authenticate that a message originated with a holder of the paired private key; or encrypting a message with a public key to ensure that only the holder of the paired private key can decrypt it.

In a public-key encryption system, any person can encrypt a message using the public key of the receiver, but such a message can be decrypted only with the receiver's private key. For this to work it must be computationally easy for a user to generate a public and private key-pair to be used for encryption and decryption. The strength of a public-key cryptography system relies on the degree of difficulty (computational impracticality) for a properly generated private key to be determined from its corresponding public key. Security then depends only on keeping the private key private, and the public key may be published without compromising security.


Source: Wikipedia

287 questions
4
votes
1 answer

Why is KeyPairGeneratorSpec throwing InvalidAlgorithmParameterException on API < 24

When I'm using this KeyPairGeneratorSpec object in API 24, my class works. KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(this) .setAlias(KEY_ALIAS) .setSubject(new X500Principal("CN=" +…
Greg
  • 689
  • 2
  • 8
  • 23
4
votes
1 answer

Didn't find class on path: DexPathList for KeyGenParameterSpec$Builder

I am using KeyGenParameterSpec to define my key specification. When I run the application I get the below error in logs: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.security.keystore.KeyGenParameterSpec$Builder" on…
Sid
  • 1,224
  • 3
  • 23
  • 48
3
votes
1 answer

How to find a free TPM handle for saving a new key pair object?

I am new to TPM and currently working on a project that involves generating and storing serveral key pairs using tpm. I would like to know how to find an available TPM handle that can be used to save a new key pair object. I have searched for…
3
votes
1 answer

Why can I not ssh into github?

I cannot ssh into github no matter what I do. All attempts appear to decline my key pair. I am able to ssh into my home server just fine, so I assume that this issue is with github specifically. This is what I've tried so far. All of these methods…
Tyler
  • 398
  • 1
  • 11
3
votes
1 answer

Unable to access AWS machine since no key-pair is available

Unable to access AWS machine since no key-pair is available. Would it be possible to create a snapshot of the volume attached with this instance and atleast get access what is there in the machine?
klee
  • 1,554
  • 2
  • 19
  • 31
3
votes
1 answer

terraform V12: Error import KeyPair: MissingParameter: The request must contain the parameter PublicKeyMaterial

getting error "import KeyPair: MissingParameter: The request must contain the parameter PublicKeyMaterial " when I run "terraform apply". what does this error mean. resource "aws_instance" "ec2_test_instance" { ami =…
Anu
  • 101
  • 2
  • 8
3
votes
0 answers

How many Android 6+ devices have a TEE/SE?

Android 6 and onwards allow you to query if a key is stored using secure hardware (either a TEE or SE). Based on the distribution dashboard I see that currently 71% of the devices are running Android 6 or newer. However, I would like to know how…
Niels Mouthaan
  • 1,010
  • 8
  • 19
3
votes
1 answer

ssh between two EC2 instances

I've got two EC2 instances and I'm trying to see if I can ssh from one to another. If I try from my Windows instance to PuTTY each of them it works( by providing the .ppk file). Now, both instances were associated to the same key-pair and if I…
A.Piz
  • 31
  • 1
  • 3
3
votes
2 answers

java.lang.IllegalArgumentException: string curve25519 not an OID bouncycastle 1.52

I'm trying to generate a key pair using the /java bouncy castle 1.52 implementation for curve 25519 what gives me java.lang.IllegalArgumentException: string curve25519 not an OID Here is my code: public KeyPair generateKeys() throws…
Vitaly
  • 43
  • 1
  • 6
3
votes
1 answer

Convert .pem key file to .ppk in Windows automatically/script/command line

I'm using Vagrant to create VMs on a Windows host, to which I would like to connect with PuTTY. Vagrant creates an RSA private key in the .pem format. PuTTY needs a key in the .ppk format to create a connection. I would like to convert the .pem to…
laffoyb
  • 1,540
  • 3
  • 22
  • 35
3
votes
1 answer

java encrypt and decrypt using key pair?

does anyone know how to encrypt and decrypt a string object using RSA public and private keys? i have created private and public keys below using KeyPair generator but i now want to use the public key to encrypt data, and a private key to decrypt…
Jono
  • 17,341
  • 48
  • 135
  • 217
3
votes
0 answers

Certificate not bound to the private key using keygen

We are using html5 tag to generate keypair in google chrome. We get the P10 which we pass to the CA and get the signed cert back . Then we import the certificate to the CAPI store . After importing the certificate ,we noticed that the certificate…
Somnath
  • 83
  • 6
2
votes
0 answers

How to save a Pair of Keys from Strings in the KeyStore? (Java)

Hello I generated a pair of keys with the following code KeyPairGenerator generator = KeyPairGenerator.getInstance(RSA); generator.initialize(1024); KeyPair pair = generator.generateKeyPair(); privateKey= pair.getPrivate(); …
2
votes
0 answers

How can I generate an ed25519 key pair in OpenSSH format with swift?

I tried to generate the keys with different approaches, get the raw data but I can't find any library that transform these bytes into OpenSSH compatible public and private keys. Approach 1: let privateKeyParams: [String: Any] = [ …
Ettore Gallina
  • 435
  • 1
  • 3
  • 16
2
votes
1 answer

AWS Key Pair Replacement

I am looking to replace my lost AWS Key Pair. I have searched near and far, youtube clips, resources articles on AWS, and others. Yet I am nowhere near where I need to be. Please can someone steer me in the proper direction? I would appreciate your…
1 2
3
19 20