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
1053
votes
64 answers

Git: How to solve Permission denied (publickey) error when using Git?

I'm on Mac Snow Leopard and I just installed git. I just tried git clone git@thechaw.com:cakebook.git but that gives me this error: Initialized empty Git repository in `/Users/username/Documents/cakebook/.git/` Permission denied…
teepusink
  • 27,444
  • 37
  • 107
  • 147
856
votes
34 answers

Permission denied (publickey) when deploying heroku code. fatal: The remote end hung up unexpectedly

I'm attempting to deploy my code to heroku with the following command line: git push heroku master but get the following error: Permission denied (publickey). fatal: The remote end hung up unexpectedly I have already uploaded my public SSH key,…
vich
  • 11,836
  • 13
  • 49
  • 66
525
votes
32 answers

Adding a public key to ~/.ssh/authorized_keys does not log me in automatically

I added the public SSH key to the authorized_keys file. ssh localhost should log me in without asking for the password. I did that and tried typing ssh localhost, but it still asks me to type in the password. Is there another setting that I have to…
user482594
  • 16,878
  • 21
  • 72
  • 108
328
votes
10 answers

How does a public key verify a signature?

I am trying to get a better grapple on how public/private keys work. I understand that a sender may add a digital signature to a document using his/her private key to essentially obtain a hash of the document, but what I do not understand is how the…
277
votes
18 answers

Using scp to copy a file to Amazon EC2 instance?

I am trying to use my Mac Terminal to scp a file from Downloads (phpMyAdmin I downloaded online) to my Amazon EC2 instance. The command I used was: scp -i myAmazonKey.pem phpMyAdmin-3.4.5-all-languages.tar.gz …
HoKy22
  • 4,057
  • 8
  • 33
  • 54
259
votes
17 answers

Github permission denied: ssh add agent has no identities

This is my first time accessing GitHub and I'm not experienced using a console. I am on a MacBook using Bash. When I try to access GitHub, I get this: git clone git@github.com:dhulihan/league-of-legends-data-scraper.git Cloning into…
Dark
  • 2,709
  • 2
  • 11
  • 4
241
votes
4 answers

What is the difference between a cer, pvk, and pfx file?

What is the difference between a cer, pvk, and pfx file? Also, which files do I keep and which am I expected to give to my counter-parties?
Jonathan Allen
  • 68,373
  • 70
  • 259
  • 447
201
votes
22 answers

GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly

I have followed these instructions below to upload a project. Global setup: Download and install Git git config --global user.name "Your Name" git config --global user.email tirenga@gmail.com Add your public key Next steps: mkdir…
tirenweb
  • 30,963
  • 73
  • 183
  • 303
192
votes
13 answers

Getting the PublicKeyToken of .Net assemblies

What is the simplest way to find the Public-Key-Token of an assembly? The simplest way I can think of would be a simple right-click, get public key, but this functionality isn't there, maybe there is a Visual Studio Extension for that? I'm using…
moi_meme
  • 9,180
  • 4
  • 44
  • 63
157
votes
4 answers

Github: readonly access to a private repo

I am developing some private projects on Github, and I would like to add nightly cronjobs to my deployments servers to pull the latest version from github. I am currently doing this by generating keypairs on every deployment server and adding the…
Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
155
votes
5 answers

How can I transform between the two styles of public key format, one "BEGIN RSA PUBLIC KEY", the other is "BEGIN PUBLIC KEY"

How can I transform between the two styles of public key format, one format is: -----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY----- the other format is: -----BEGIN RSA PUBLIC KEY----- ... -----END RSA PUBLIC KEY----- for example I generated…
welkinwalker
  • 2,062
  • 3
  • 18
  • 21
148
votes
14 answers

Heroku 'Permission denied (publickey) fatal: Could not read from remote repository' woes

I've searched around for many hours on end looking to a solution to my seemingly easy-to-fix problem. It's not that my search turned up nothing, it's that my search turned up so many different solutions -none of which have worked. Anyways, I am…
thebradbain
  • 3,139
  • 4
  • 16
  • 17
145
votes
15 answers

key_load_public: invalid format

I used PuTTY Key Generator to generate a 4096 bit RSA-2 key with a passphrase. I save the .ppk and an openSSL format public key. The putty format public key doesn't work. In any case, my error is as follows: $ ssh -T git@github.com key_load_public:…
JordanGS
  • 3,966
  • 5
  • 16
  • 21
121
votes
13 answers

Setting up OpenSSH for Windows using public key authentication

I am having issues setting up OpenSSH for Windows, using public key authentication. I have this working on my local desktop and can ssh with a key from Unix machines or other OpenSSH for Windows machines. I have replicated the build onto a server, I…
Cambolie
  • 1,415
  • 2
  • 12
  • 14
111
votes
9 answers

GitHub Error: Key already in use

I have created two GitHub accounts. One for my work user and one for my personal self. I needed to do catch up on some work and as such cloned my work repo onto my personal PC. In order to do simple "git push origin master" commits without…
John Crawford
  • 9,656
  • 9
  • 31
  • 42
1
2 3
77 78