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
533
votes
23 answers

Change key pair for ec2 instance

How do I change the key pair for my ec2 instance in AWS management console? I can stop the instance, I can create new key pair, but I don't see any link to modify the instance's key pair.
Michael Chen
  • 5,438
  • 3
  • 15
  • 9
123
votes
6 answers

How to add a new pair to Map in Dart?

I caught the following errors when adding a new pair to a Map. Variables must be declared using the keywords const, final, var, or a type name Expected to find; the name someMap is already defined I executed the following code. Map
hrsma2i
  • 4,045
  • 6
  • 15
  • 24
22
votes
13 answers

"Server Refused our key" after launching instance from private EBS AMI

I have created my own EBS AMI, shared it with another AWS account, launched NEW instance based on this image with NEW key-pair and now when I am trying to connect to this new instance I am getting error: "Server Refused our key". This is what I did…
Kelvin
  • 8,813
  • 11
  • 38
  • 36
21
votes
3 answers

What are and how do I use OpenSSL BIO pairs?

What exactly is a BIO pair in OpenSSL, and how is it intended to be used? I've already checked the OpenSSL docs, but any details are few and far between.
Brian
  • 3,457
  • 4
  • 31
  • 41
20
votes
2 answers

How to convert PEM file to PPK using PuTTYgen in Ubuntu

I have created an EC2 instance on AWS. I want to connect to the instance using PuTTY, but it requires PPK file. I have PEM file which I want to covert into PPK using PuTTYgen. How do I use PuTTYgen on Ubuntu to convert PEM file to PPK?
Sumit Patil
  • 556
  • 1
  • 5
  • 19
17
votes
3 answers

convert .pem to .ppk on macos

There are lots of SO posts on this topic but most of them are for Windows and use the GUI. All others posts seem to use the CLI. Is there a GUI version of puttygen on MacOS/Linux and if so instructions on how to install/use? The CLI seems to give…
codingknob
  • 11,108
  • 25
  • 89
  • 126
10
votes
2 answers

Generating public ed25519 key with OpenSSL

I'm using this command to generate private ed25519 key: openssl genpkey -algorithm ed25519 -out private.pem and this is the example result: -----BEGIN PRIVATE KEY----- MC4CAQAwBQYDK2VwBCIEIAYIsKL0xkTkAXDhUN6eDheqODEOGyFZ04jsgFNCFxZf -----END…
Szyszka947
  • 473
  • 2
  • 5
  • 21
10
votes
1 answer

Unknown 116-byte ECDSA private key format

iOS 13's CryptoKit framework provides a .rawRepresentation value for ECDSA public and private keys. I've been trying to reverse-engineer the rawRepresentation data type to convert between it and JWK. Judging by the 64-byte length of the public key…
Potassium Ion
  • 2,075
  • 1
  • 22
  • 39
10
votes
2 answers

EC2 Create new Linux user(s) with their OWN Key Pairs?

In EC2, i spinned a CentOS v6.5 instance, and i got a Key Pair as well (of course). But the problem is, i hoped it would be like as usual before that it would creates the ec2-user user, so that i can use the ec2-user name and login with that key…
夏期劇場
  • 17,821
  • 44
  • 135
  • 217
9
votes
2 answers

Spring Cloud Security JWT: Distribute Public Key using Config Server / Key Rotation

How do you manage your Private / Public Keys for signing / validating JWTs in Spring Cloud environment? The "problem": At the moment I generate a Key Pair. Then copy Private + Public Key to my auth-server application. And also copy the Public Key to…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
9
votes
1 answer

Android KeyPairGenerator always generates the same key pair

I am making an application which generates a key pair for a user. But in every device the keys are identical. Here is my code: public KeyPair generateKeys() { KeyPair keyPair = null; try { // get instance of rsa cipher …
M.Veli
  • 519
  • 1
  • 6
  • 15
8
votes
1 answer

How to generate KeyPair in android KeyStore, protected by custom password

I have app which uses Fingerprint and 4 digit pin (which can be set by user in application settings, this is not system pin/pattern/password) authorization. With Fingerprint everything is fine, I have problem with pin. What I'm trying to do is: Let…
Dadroid
  • 1,444
  • 15
  • 16
8
votes
3 answers

How to Get key value pair tuple array in swift?

I have pairs tuple array pickerDataVisitLocation.just I want to know how to return key value pair location from my array using uniqId ex 204 var pickerDataVisitLocation:[(uniqId:Int,location:String)] =…
NinjaDeveloper
  • 1,620
  • 3
  • 19
  • 51
7
votes
1 answer

crypto/ssh ParsePublicKey "short read" error

In a program I am developing I need a way to add public keys into the authorized_keys file during development, so I am using command line arguments to do so. I have omitted most of the code, but if you would like to view all of the code, here is the…
7
votes
1 answer

ssh-keygen and openssl gives two different public keys

Is it possible that ssh-keygen & openssl can generate two different public keys from same private key? Command ssh-keygen -y -f ./my.key gives (contents after ssh-rsa in the same line) different public key to the one generated (contents between…
soupybionics
  • 4,200
  • 6
  • 31
  • 43
1
2 3
19 20