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

Permission denied publickey when git push from computer to vps server

I'm trying to git push my app's files, from my computer, to a VPS server running on Ubuntu. On my computer(windows 10) I did: git init git add -A git commit -m "......" On the server(in the app's directory): git init --bare next did on my…
ishchai
  • 26
  • 3
-1
votes
1 answer

public key issue on installing google-cloud-sdk on ec2

I'm installing google-cloud-sdk on an AWS ec2. As first step I'd updated YUM with Cloud SDK repo information as reported on GCP official doc. But when I try to install gcp sdk by: sudo yum install google-cloud-sdk i got: Public key for…
Stefano G.
  • 143
  • 2
  • 14
-1
votes
2 answers

create java PrivateKey and PublicKey from a String of file

Good day, There is another third party that need my web application to send them some data in encrypt format. Thus they send me some guide to do so, however, I am not familiar with it, I am trying to google around but looks like I am google wrong…
Panadol Chong
  • 1,793
  • 13
  • 54
  • 119
-1
votes
1 answer

Ansible copy ssh public key from file, use in uri call

I need to copy the SSH public key from a local file, then use it in a uri task in my playbook. Keep in mind, I cannot use "authorized_key" module as this is a system I must use the API to configure public keys for users. Code below keeps failing, I…
Dave
  • 727
  • 1
  • 9
  • 20
-1
votes
1 answer

EC Public key from public key bytes extracted from azure keyvault

how to get public key from bytes? for example, I have public key (generated with EC algorithm, curve "secp256r1") and its encoded bytes on java, How can I create public key from these bytes in c#?
-1
votes
1 answer

Why format bitcoin public key?

I have some questions. Why we format public key -> uncompressed key and compressed key. And When we use uncompressed key vs compressed key? I think uncompressed key is too long...
Danpatpang
  • 93
  • 1
  • 1
  • 6
-1
votes
1 answer

Github multiple repositories defaulting to old username

I have all the settings configured in a way that appears correct, but git is still defaulting to an incorrect username. I have the following set in git config: alias.hist=log --pretty=format:"%h %ad | %s%d [%an]" --graph…
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
-1
votes
1 answer

generating fake public key fingerprint

I need to implement functions to test the deletion of a ssh key given a fingerprint, and one scenario is to delete a "non-existing" key by providing it with a fake public key fingerprint. The public keys are generated randomly, how do I come up…
Chen Xie
  • 3,849
  • 8
  • 27
  • 46
-1
votes
1 answer

BouncyCastle validating modified timestamp

I noticed BouncyCastle v1.60 does not throw an error during validation after modifying (pseudo) random bits of the response. In the two responses below, you'll notice all the a's have been swapped with b's. BouncyCastle returns the Unix epoch as the…
user8897013
  • 443
  • 4
  • 15
-1
votes
2 answers

Problem with decryption of merged (rsaCipher +String)

msg = string + rsa_encryped_result rsa_encrypt(msg) failed to decrypt when we connect string with rsaResult include code we tried to change to base64 instead of String, also use PAD , class Crypto(): def __init__(self): …
Merry
  • 1
-1
votes
1 answer

Get Public Key byte array from .cer file - C#

I'm trying to get the public key byte[] from a certificate. My colleague used the command : openssl x509 -inform der -in certificate.cer -text -noout, which dumped the key on the console and then he copied it into a binary file. My task is to do…
-1
votes
1 answer

How to Calculate Fingerprint From SSH DSA Public Key in Java?

Similar to question How to Calculate Fingerprint From SSH RSA Public Key in Java? , I would like to know how to Calculate Fingerprint for a DSA Public Key. I've got the dsaPublicKey object. DSAPublicKey dsaPublicKey = (DSAPublicKey) publicKey;
linc01n
  • 418
  • 2
  • 6
  • 17
-1
votes
1 answer

.Net SFTP Public/Private Key Authentication

Looking for some insight into how I could implement my own public key authentication method in .Net. I'm using CompleteFTP Server which does handle this type of authentication but requires manual intervention. I'm extending an API to handle the…
gt5193
  • 19
  • 3
-1
votes
1 answer

Asymmetric cryptography with public key and private key

I am a beginner with asymmetric cryptography. I am understand something about basic asymmetric cryptography on public key and private key but I want to implement its with java programming for do authentication like login username and password. I…
-1
votes
2 answers

Lost bytes in input stream?

I'm writing a program where I send bytes of a key from a keypair that I created over an output socket and use them to recreate the key on the other side. Server: KeyPairGenerator dsaKeyPairGenerator = KeyPairGenerator.getInstance("DSA"); …