Private key that occurs in asymmetric cryptography algorithms such as RSA and Diffie-Hellman as the counterpart to a public key. The private key must never be divulged while the public key can be made available to everyone. If your question is not pertaining specifically to the private key (usage/encoding/etc.), you should use more appropriate tags such as [public-key-encryption], [digital-signature], [diffie-hellman] or even [cryptography].
Questions tagged [private-key]
1626 questions
20
votes
2 answers
Connect to Host with VSCode using the private key
I want to connect to a remote server, I know the username and hostname, and I also have the private_key.pem file. How can I connect to this virtual machine using VSCode?
I get this error with the solutions on the internet, and that's reasonable…

K.N
- 871
- 2
- 10
- 30
20
votes
1 answer
RSA: Private key calculation with Extended Euclidean Algorithm
I'm a high school student writing a paper on RSA, and I'm doing an example with some very small prime numbers. I understand how the system works, but I can't for the life of me calculate the private key using the extended euclidean algorithm.
Here's…

mads
- 225
- 1
- 2
- 8
20
votes
2 answers
Android Fingerprint API and Private/Public keys
When I enrol first and only fingerprint and generate KeyPair the PrivateKey gets invalidated when I use it for the second time. This happens only once. Am I the only one having this issue? Is there something wrong with my code?
I cannot use any…

Toochka
- 894
- 1
- 9
- 25
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
20
votes
3 answers
Paramiko -- using encrypted private key file on OS X
I'm trying to use Paramiko to connect to an SSH server from Python. This is what I tried so far:
>>> import paramiko
>>> import os
>>> privatekeyfile = os.path.expanduser('~/.ssh/id_rsa')
>>> mykey =…

houbysoft
- 32,532
- 24
- 103
- 156
20
votes
2 answers
Adding private key into iOS Keychain
I am trying to add a private key into the iOS keychain. The certificate (public key) works fine but the private key refuses... I am totally confused why the following code does not work.
First I am checking if the current key (=key in case of that…

Chris
- 3,057
- 5
- 37
- 63
20
votes
1 answer
Amazon EC2 lost private key, how to get access to the server?
My computer was stolen the day before yesterday, and I put one of my servers private key in that, the key is password protected, so it should be OK. But the problem is that now I can not access the server.
The server is Ubuntu, Amazon EC2, Root…

Jason
- 814
- 1
- 6
- 15
19
votes
4 answers
Is it possible to have encryption with multiple private keys (PHP)?
Or: How to store encrypted data for a bunch of users?
I admit, it's a silly question, a private key is limited to only one person as the term already implies. But I have the following scenario:
User Tom enters data that needs to be stored encrypted…

acme
- 14,654
- 7
- 75
- 109
19
votes
3 answers
Openssl "data greater than mod len"
What does the "data is greater than mod len" error message mean? I have encountered this while trying to decrypt data using php's openssl_private_decrypt. How does one go about solving this issue? Been searching hours online, not getting anywhere.

automaton
- 1,091
- 1
- 9
- 23
19
votes
1 answer
SharpSSH invalid privatekey
I use SharpSSH to connect to a stfp-server.
This for I need to add a privatekey-file like this:
sftp.AddIdentityFile(KeyFilePath);
But this throws an exception:
invaid privatekey: C:\KeyFile\privatekey_2.ppk
The file was created with puttygen and…

abc
- 2,285
- 5
- 29
- 64
18
votes
7 answers
Mac Terminal Keeps Asking for Password When Using PPK with SSH
I am attempting to connect to an Amazon EC2 Server via Mac Terminal. I have a PPK file that does not have a password attached to it, but when I try to connect I get a popup box that says "Enter the password for the SSH Private Key."
So we tried…

Chris
- 5,485
- 15
- 68
- 130
18
votes
2 answers
Create X509Certificate2 from PEM file in .NET Core
I want to create a X509Certificate2 object based on a PEM file. The problem is setting the PrivateKey property of X509Certificate2. I read X509Certificate2.CreateFromCertFile() on .NET Core
and then used
var rsa = new…

heydy
- 273
- 2
- 3
- 10
18
votes
5 answers
Please create a master key in the database or open the master key in the session before performing this operation
I get the following error on secondary replicas when trying to restore an encrypted backup even though the replica has the master key (dmk), service master key, certificates and private keys restored from the originating/primary server that…

Hiram
- 409
- 1
- 4
- 13
18
votes
2 answers
KeyVault generated certificate with exportable private key
I'm attempting to create a self signed certificate in KeyVault using the "Self" issuer.
$policy = New-AzureKeyVaultCertificatePolicy -SubjectName "CN=$($certificateName)" -IssuerName "Self" -ValidityInMonths 12
$policy.Exportable =…

Alex KeySmith
- 16,657
- 11
- 74
- 152
18
votes
1 answer
SSH Public Key Authentication with Libssh2 C++
I am working on a project where I am doing port forwarding to MySQL using libssh2 in C++. I've got it working for username/password authentication but I now want do it using public/private key authentication. The documentation for libssh2 is pretty…

Boardy
- 35,417
- 104
- 256
- 447