Questions tagged [private-key]

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].

1626 questions
8
votes
2 answers

Setting private key in certificate hangs windows service

I have application and I have to use a certificate which requires a pin from prompt window. I have following code. SecureString password = GetPassword(); X509Certificate2 certificate = GetCertificate(); var cspParameters = new CspParameters(1, …
Degusto
  • 291
  • 2
  • 10
8
votes
1 answer

Using ColdFusion to sign data for single sign-on

I apologize in advance for the length of this post. I don't really know enough about this issue to properly identify what the specific problem may actually be! But at any rate, we've been making calls against our membership API to query info about…
daltec
  • 447
  • 1
  • 5
  • 15
8
votes
3 answers

Vagrant SSH default key passphrase?

I think I messed up something simple, normally you should be able to instantly connect to your Vagrant VM using vagrant ssh. However, it's currently different for me. C:\Users\Sem\Documents\timeline>vagrant ssh Enter passphrase for key…
Sem
  • 4,477
  • 4
  • 33
  • 52
8
votes
1 answer

EC private key recovery from PEM format with BouncyCastle

My application stores private keys in PEM format, the existing code works for RSA keys but I am trying to switch to EC keys and there is a problem. The key recovery seems to work, and the equals method on the recovered key returns true for the…
Bruce Skingle
  • 93
  • 1
  • 3
8
votes
3 answers

How to store key using Android Key Store Provider

I am trying to use the Android Key Store Provider that became available in Android 4.3 to securely save a Private Key and to then use this private key to encrypt and decode data. I think I have implemented the correct approach and code for this so…
Donal Rafferty
  • 19,707
  • 39
  • 114
  • 191
8
votes
6 answers

Read Private Key from PFX-file

I know, there are many posts about this, but still I cannot find a solution to get this to work. I have generated a PFX-file with openssl on my machine like this: openssl x509 -req -days 365 -in "myReqest.csr" -signkey "myPrivateKey.pem" -out…
marsze
  • 15,079
  • 5
  • 45
  • 61
8
votes
1 answer

Manage Keys with Puppet for puppet-vcsrepo

I'm setting up some server configuration in my company and we have some internal repositories that run over ssh through bzr that I need to get. I wanted to use puppet-vcsrepo to pull these in and I saw that it has a way we can use a keyfile to get…
Allen
  • 794
  • 1
  • 6
  • 19
8
votes
1 answer

Flash SecureSocket and RSA private key

I am trying to communicate to a server through SSL. The PEM client file is consisted of a certificate and an rsa private key. I managed to convert both the certificate and key to binary DER. I load the DER certificate to SecureSocket succesfully…
Bill Kotsias
  • 3,258
  • 6
  • 33
  • 60
7
votes
2 answers

How to get the base 64 encoded value of a certificate with private key?

Follow up to a previous question, I have some code that needs to get an X509 certificate with a private key. As noted in the answers, in production this will happen using X509Store. What is the best way to unit test this? I want to develop and test…
danludwig
  • 46,965
  • 25
  • 159
  • 237
7
votes
2 answers

Read private key in DER format java

I have the following code to read a private key in PKCS#8 format public void encryptHash(String hashToEncrypt, String pathOfKey, String Algorithm) { FileInputStream fis = null; byte[] encodedKey = null; try { File f = new…
BRabbit27
  • 6,333
  • 17
  • 90
  • 161
7
votes
1 answer

SSH to EC2 but get Permission denied (publickey)

I generated the key-pair by EC2-Console, and then store it in ~/.ssh/iForests_ABetADay.pem. After that, chmod 400 iForests_ABetADay.pem, and ssh -i iForests_ABetADay.pem ubuntu@46.51.244.48 -v. I did login yesterday, but now the error message I got…
iForests
  • 6,757
  • 10
  • 42
  • 75
7
votes
1 answer

Cryptography : Generation of RSA Private Key Using Modulus & Exponent

I am new to cryptographic world. I need to generate a corresponding RSA private key from the data provided below. Modulus…
Amit
  • 71
  • 1
  • 3
7
votes
4 answers

IntelliJ: Setting private key as environment variable doesn't work (Spring boot project)

I have a spring boot project in which if I use private key (multiline text) it works perfectly fine (which means no issue with the key) but when I am trying to set it as environment variable in intellij it shows Reason: Property…
Shashank
  • 712
  • 15
  • 33
7
votes
0 answers

What is the best practice to store SSH keys in database?

I am building rest APIs for an application in node.js, where user needs to upload their server details like, HostName UserName PrivateKey Once the user uploads all the details I am retrieving permissions from the server and display them in table…
Aditya Raval
  • 590
  • 4
  • 20
7
votes
2 answers

Get a PrivateKey from a RSA .pem file

Given this .pem file (generated with openssl and encrypted with a password): -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,AC009672952033EB 2wegzxf3MtncXS1CY3c..... .... .... -----END RSA PRIVATE KEY----- How do I…
dipanda
  • 760
  • 1
  • 11
  • 24