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
10
votes
8 answers

ssh: connect to host gitlab.com port 22: Network is unreachable

I'm trying to reach the Gitlab server to clone a repo in a Ubuntu 20.10 computer, but I always get the message: ssh: connect to host gitlab.com port 22: Connection timed out fatal: Could not read from remote repository. Please make sure you have…
LuisFelipe
  • 135
  • 1
  • 1
  • 8
10
votes
1 answer

Verify JWT with RS256 (asymmetric) in C#

I have some code like this which I believe is failing because it's using an Asymmetric RS256 but has "SymmetricSecurityKey()". The tokens were hand generated from https://jwt.io/ How do I convert this to use my Asymmetric public key? Also, I'm new…
Charles Thayer
  • 1,678
  • 1
  • 13
  • 17
10
votes
2 answers

public key to string and then back to public key java

So I have this piece of code which I'm trying to do some conversions in so firstly I generate a public key and print it, and then convert in byte, then to string. After then I am converting it back to bytes, but when I convert it back to bytes the…
c5564200
  • 141
  • 1
  • 3
  • 9
10
votes
2 answers

How do you extract N and E from a RSA public key in python?

I have a RSA public key such that it looks like -----BEGIN PUBLIC…
Konstantino Sparakis
  • 2,862
  • 3
  • 18
  • 30
10
votes
8 answers

how does public key cryptography work

What I understand about RSA is that Alice can create a public and a private key combination, and then send the public key over to Bob. And then afterward Bob can encrypt something using the public key and Alice will use the public and private key…
Riz
  • 6,486
  • 19
  • 66
  • 106
10
votes
2 answers

Maven won't use public key to deploy

I'm using SSH to deploy my Java artifacts to a server. I have the keys set up so that I can interactively SSH to the server without requiring a password, but when I try to run the "mvn deploy" or "mvn release:perform" commands, it hangs (at what I…
magneticMonster
  • 2,373
  • 6
  • 30
  • 46
10
votes
3 answers

Embedding key as string in Paramiko application

I'm trying to create a single file executable in Python and using Paramiko for my SSH. I need to eliminate external files such as private key files and try to go for embedded strings. I tried this solution but it's not working for me: Paramiko:…
scottyp
  • 295
  • 1
  • 4
  • 13
10
votes
4 answers

Can you help me get my head around openssl public key encryption with rsa.h in c++?

I am trying to get my head around public key encryption using the openssl implementation of rsa in C++. Can you help? So far these are my thoughts (please do correct if necessary) Alice is connected to Bob over a network Alice and Bob want secure…
Ben J
  • 1,367
  • 2
  • 15
  • 33
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

Make IntelliJ IDEA use public key authentication on Windows

I'm an Eclipse user who's evaluating a switch to IntelliJ IDEA. I'm currently trying out IDEA 10.0.2. My operating system is Windows. When working with Git over SSH, IDEA always asks me for password. I can't find any option in the settings to make…
Vojislav Stojkovic
  • 8,043
  • 4
  • 35
  • 48
9
votes
2 answers

RSA public key created in iOS/Swift and exported as base64 not recognized in Java

TL;DR: RSA public key generated in iOS and stored in the keychain, exported as base64 and sent to a java backend, is not recognized. I'm implementing a chat encryption feature in an iOS app, and I'm using symmetric + asymmetric keys to handle…
Antonio
  • 71,651
  • 11
  • 148
  • 165
9
votes
4 answers

Google/Tink: How use public key to verify signature

We want to use the Tink library in our project to be able to verify some incoming signatures given a public key. What we have are the following: The public key as a string The signature itself The plaintext After going through Tink's…
Alex Ntousias
  • 8,962
  • 8
  • 39
  • 47
9
votes
2 answers

is this a correct way to generate rsa keys?

is this code going to give me correct values for RSA keys (assuming that the other functions are correct)? im having trouble getting my program to decrypt properly, as in certain blocks are not decrypting properly this is in python: import…
calccrypto
  • 91
  • 1
  • 2
9
votes
4 answers

How does Android devices get developers' public keys?

The Android system requires that all installed applications be digitally signed with a certificate whose private key is held by the application's developer. How specifically does the public key be distributed to client Android devices? Is the public…
user3361508
  • 815
  • 3
  • 10
  • 11
9
votes
1 answer

Connect Nitrous.io to Bitbucket Git SSH Public Key

I can't connect my Bitbucket git repos to Nitrous.io. Here is the error I get: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. At first I…
Ryan
  • 3,153
  • 2
  • 23
  • 35