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
9
votes
1 answer

Cheap SSL vs Expensive SSL

I was wondering what is the different between SSL certificate from verisign, http://www.verisign.com/ssl/buy-ssl-certificates/compare-ssl-certificates/index.html which is expensive , and a certificate from godady which is cheap…
Jau L
  • 904
  • 2
  • 8
  • 20
9
votes
2 answers

Reading encrypted private key in PKCS#8 format through bouncycastle, Java failing in docker container

I am trying to read a PKCS#8 private key which looks like following: key.k8 --> (Sample key. Passphrase - 123456): -----BEGIN ENCRYPTED PRIVATE…
Sukhmeet Sethi
  • 616
  • 5
  • 14
9
votes
3 answers

URL Signing with HMAC or OpenSSL

I'm interested in url signing (e.g. http://.../?somearg=value&anotherarg=anothervalue&sig=aSKS9F3KL5xc), but I have a few requirements which have left me without a solution yet. I'll be using either PHP or Python for pages, so I'll need to be able…
Josh
  • 145
  • 1
  • 2
  • 5
9
votes
4 answers

Casting private key to RSACryptoServiceProvider not working

I have a X509Certificate2 variable and I'm trying to cast the private key of the variable to a RSACryptoServiceProvider RSACryptoServiceProvider pkey = (RSACryptoServiceProvider)cert.PrivateKey; However I get this…
Vins
  • 291
  • 1
  • 5
  • 19
9
votes
1 answer

Decrypt passphrase protected PEM containing private key

I have the following method that creates an Encrypted Private Key using Bouncy Castle for C#: public string GetPrivateKey(AsymmetricCipherKeyPair keyPair, string password) { var generator = new Pkcs8Generator(keyPair.Private,…
blgrnboy
  • 4,877
  • 10
  • 43
  • 94
9
votes
1 answer

Only RSAPrivate (Crt) KeySpec and PKCS8EncodedKeySpec supported for RSA private keys

I following the steps from the link : How to read .pem file to get private and public key. I executed the following three commands: 1. $openssl genrsa -out mykey.pem 2048 2. $openssl pkcs8 -topk8 -inform PEM -outform PEM -in mykey.pem -out…
user5707585
9
votes
1 answer

PuTTY - Unable to use key file (not a private key)

I have a PPK file and I am trying to have PuTTY use it, when I am connecting to a remote server. But I keep getting this error below, and then I am just asked for my username (while I should be directly allowed in as root). I don't understand…
peter.petrov
  • 38,363
  • 16
  • 94
  • 159
9
votes
3 answers

I can't transfer files using pscp to amazon AWS ec2 instances. Key refused

I can connect to the server command line using Putty using the same private key. But when I try to use the same key to transfer a file from my PC over to the server": pscp -i C:\xxx.ppk "C:\xx\somefile.yy"…
Theoden
  • 297
  • 1
  • 2
  • 11
9
votes
4 answers

Generating an RSA Key Pair with Erlang?

Erlang has a crypto function which generates public private keys (documentation copied below). However the documentation seems vague and I can't find any example code that describes how to generate the shared prime number or the generator. Can…
Nuvious
  • 1,469
  • 2
  • 12
  • 21
9
votes
1 answer

RSA - bouncycastle PEMReader returning PEMKeyPair instead of AsymmetricCipherKeyPair for reading private key

I have a function that successfully reads a openssl formatted private key: static AsymmetricKeyParameter readPrivateKey(string privateKeyFileName) { AsymmetricCipherKeyPair keyPair; using (var reader = File.OpenText(privateKeyFileName)) …
C0D3
  • 6,440
  • 8
  • 43
  • 67
9
votes
3 answers

How to communicate AES initialization Vector to client for hybrid cryptosystem

I need to implemented security for client-server communication. I have implemented the following hybrid cryptosystem To encrypt a message addressed to Alice in a hybrid cryptosystem, Bob does the following: Obtains Alice's public key. Generates a…
Faisal Mansoor
  • 2,041
  • 1
  • 21
  • 25
9
votes
4 answers

Two private key asymmetric encryption - possible?

I am wondering if there exists some asymmetric encryption algorithm that would work with two different private keys, so that the encrypted message can be decrypted by either one of such private keys?
8
votes
4 answers

Sign data using private key on client-side (javascript)

I know, it looks strange, but I need to sign some data on client-side using javascript only, no ajax backdoor to server-side openssl available. Could someone suggest some client-side solution to sign data using private key? Is it possible? Thanks.
Anatoliy
  • 29,485
  • 5
  • 46
  • 45
8
votes
1 answer

Provide private key passhprase (password) for Posh-SSH New-SSHSession

With Posh-SSH, is there a way to provide the passphrase/password to use with an encrypted private key? (Password for the key file, not credentials for the SSH server connection) I'm having no luck finding information on how to do it, or if it's even…
techie007
  • 737
  • 1
  • 10
  • 30
8
votes
1 answer

How to generate a key from CRT file?

I am trying to generate a key from a CRT file. I have installed OpenSSL on Windows and tried to get a random key using I have the CRT file but I'm unsure how to get keys from it. Inside the CRT file it shows -----BEGIN CERTIFICATE-----.
Sam
  • 1,207
  • 4
  • 26
  • 50