Questions tagged [public-key]

Public-key (or asymmetric) cryptography is a form of cryptography that does not require common secrets between the communicating partners.

Public-key cryptography or asymmetric cryptography is a form of cryptography that does not require common secrets between the communicating partners. It thus solves the problem of key-exchange. In many modern cryptosystems, public-key cryptography is used to establish a secret key, and the faster symmetric key crypto is used to actually encrypt and decrypt data.

Public-key cryptography is generally based on "one-way" mathematical functions - operations that are easy to perform, but difficult to undo. An example (on which RSA is based) is multiplication vs. factoring. Given two enormous primes p and q, it is simple (for a computer) to multiply them together to get p*q = n, but it turns out it is very difficult (even for a computer) to factor n in a reasonable amount of time.

1163 questions
109
votes
23 answers

git push: permission denied (public key)

I'm trying to push a file to a git repo of a friend but errors on public key. git push origin testbranch Permission denied (publickey). fatal: Could not read from remote repository. Where and how do we define public / private keys? git remote -v…
Wyguf Seak
  • 1,153
  • 2
  • 9
  • 8
107
votes
9 answers

Verify host key with pysftp

I am writing a program using pysftp, and it wants to verify the SSH host Key against C:\Users\JohnCalvin\.ssh\known_hosts. Using PuTTY, the terminal program is saving it to the Registry [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys]. How…
Gabriel Theodoulos
  • 1,189
  • 2
  • 8
  • 5
107
votes
13 answers

How do I add my own public key to Vagrant VM?

I got a problem with adding an ssh key to a Vagrant VM. Basically the setup that I have here works fine. Once the VMs are created, I can access them via vagrant ssh, the user "vagrant" exists and there's an ssh key for this user in the…
tehK
  • 2,265
  • 4
  • 17
  • 16
95
votes
5 answers

What is the public URL for the Github public keys

I heard that there was a public URL for all users on github where you can access their public keys or they can supply that URL of all their public keys. Is this true? If so what is that URL. Does it exist for bitbucket as well?
frazras
  • 5,928
  • 4
  • 30
  • 40
79
votes
3 answers

Permission denied (publickey,keyboard-interactive)

I tried to connect to planetlab node using ssh. It throws me error like Permission denied (publickey,keyboard-interactive). What does this mean? Here is the verbose of the exception. > OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL > 0.9.8g 19 Oct 2007…
Progress Programmer
  • 7,076
  • 14
  • 49
  • 54
76
votes
4 answers

How to ssh connect through Python Paramiko with ppk public key

I'm using Paramiko to connect through SSH to a server. Basic authentication works well, but I can't understand how to connect with public key. When I connect with PuTTY, the server tell me this: Using username "root". Authenticating with public key…
apelliciari
  • 8,241
  • 9
  • 57
  • 92
70
votes
7 answers

RSA: Get exponent and modulus given a public key

I need to encrypt some data using RSA in JavaScript. All of the libraries around ask for an exponent and a modulus, yet I get a single public.key file from my opponent. How do you retrieve the public exponent and modulus part from an RSA file?
Pierre Spring
  • 10,525
  • 13
  • 49
  • 44
63
votes
2 answers

How do I setup Public-Key Authentication?

How do I setup Public-Key Authentication for SSH?
Eldila
  • 15,426
  • 23
  • 58
  • 62
61
votes
7 answers

Android In App Billing: securing application public key

From Android In App Billing version 3 (TrivialDrive)sample application coming with sdk MainActivity.java /* base64EncodedPublicKey should be YOUR APPLICATION'S PUBLIC KEY * (that you got from the Google Play developer console). This is not your *…
Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167
57
votes
6 answers

How to append authorized_keys on the remote server with id_rsa.pub key

How to append authorized_keys on the remote server with id_rsa.pub key from the local machine with a single command?
shilovk
  • 11,718
  • 17
  • 75
  • 74
55
votes
2 answers

How to let TortoiseHg (Mercurial) on Windows use the Private Key file generated (by Puttygen)?

I have used Puttygen to create a public and a private key, and then is ready to let TortoiseHg on Windows 7 do a clone by going to ssh://somebody@code.somewhere.com/somecode but there seems to be no where to add the private key to TortoiseHg? (or…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
52
votes
4 answers

How do I send someone my SSH public key?

I need to send my SSH Public Key to one of my customers, but I am not quite sure how to do this. I have already created a SSH key pair on my computer, but now I am stuck.
CJ Hill
  • 521
  • 1
  • 4
  • 8
47
votes
6 answers

Why is a cap deploy giving Permission denied (publickey)?

Ok, I'm confused about something... I am able to commit to my github repository just fine, but when I try to do a cap deploy from my local folder to my staging server I get Permission denied (publickey). If I run ssh git@github.com I actually get an…
GiH
  • 14,006
  • 13
  • 43
  • 56
47
votes
3 answers

X.509: Private / Public Key

We're trying to implement some functionality of a Web-Service from one of our partners. Now, the content which is beeing transmitted, should be encrypted with a public key, which we have to provide. The security-specification says that the…
Ahatius
  • 4,777
  • 11
  • 49
  • 79
46
votes
2 answers

How to load public certificate from pem file?

I was trying to extract RES public key from the file below -----BEGIN…
surendhar_s
  • 824
  • 2
  • 12
  • 20
1
2
3
77 78