Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [public-key-encryption]

Public-key cryptography (encryption is a misnomer) is the process of creating two keys during the encryption of plain text, one private and one public.

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

do subkeys on other devices needs to be re-issued and imported again after changing secret passphrase?

I need to change the passphrase initially set for my gpg key to a new one. I have three devices/hosts that each have their own signing subkey issued from the master, and a shared encrypt subkey used ...
naphelge's user avatar
1 vote
1 answer
190 views

In the Bitvise Client Software, Host Key Verification window shows public key information not generated by me

The Problem(s): After hitting the login button, Host Key Verification window shows up with host key info. (Not generated by me. Should this be happening by default.) For Public Key Authentication, I ...
Jerry Fleurival's user avatar
0 votes
0 answers
42 views

Why doesn't windows 10 ssh-keygen honor the -m option?

Windows 10 command line ssh-keygen -b 2048 -mPKCS8 doesn't change the .pub file created to PKCS8 (it's always the one-liner). I can do this to get the actual format output to the screen: ssh-keygen -...
user3161924's user avatar
0 votes
1 answer
248 views

GnuPG: Updated gpg setpref for 2024

Using Ubuntu 22.04.3 LTS with GnuPG 2.2.27 and libgcrypt 1.9.4. Would someone in the know please suggest what the gpg --edit-key, setpref input should look like for 2024? Or a current gpg.conf file? ...
faszikam's user avatar
0 votes
0 answers
314 views

How do I tell pass to update my key if `pass init` isn't working?

I am trying to use pass again after a longish lull, and it was (reasonably) complaining that my gpg key was expired. I used the instructions at Can you extend the expiration date of an already expired ...
Amanda's user avatar
  • 282
0 votes
2 answers
257 views

Is it possible for P2P software to find a partner by public key without using IP address?

Some P2P software (e.g. Tox, Briar, etc.) uses public key encryption instead of IP addresses. to exchange messages with other people. Is this possible and how?
nitchan's user avatar
1 vote
0 answers
422 views

Convert Tor keypair to hex or base64 format

I just generated a Tor key with mkp224o, and I ended up with this (example) output file: == ed25519v1-secret: type0 ==∏ — ¯£«• UJ’Î˙Ù¬ §π¯_˚ÑÆE Œ«ß˝†òyflsk¸¬ì–Ôâm ù≤Ü(~”ö}Ù I want to get a ...
Ben Zelnick's user avatar
0 votes
1 answer
778 views

passwd: Authentication token manipulation error using ssh and public key

I'm using ssh and public key (saved in my local computer) to connect to a HPC cluster as follows: $ ssh -i ~/narvi_key/xenial-narvi-key [email protected] Enter passphrase for key '/home/xenial/...
doplano's user avatar
  • 103
2 votes
3 answers
3k views

Can I get certificates for other recipients of an encrypted email?

I run into this problem fairly often at work using Outlook. There is an email thread going and someone decides to encrypt their response to the group (sometimes justified, sometimes not). Now I want ...
David K's user avatar
  • 341
13 votes
2 answers
70k views

How do I use the openssl command to decode a certificate/public key .PEM file?

I have my localhost TSL/SSL certificate from Chrome stored to a .PEM file. Was wondering how do I use the oppenssl command to decode it into a list of human-readable fields. Googling this only ...
HighAsAKiteOnMath's user avatar
2 votes
1 answer
155 views

Why Use Deffie Hellmen(Key Exchange) instead of encrypting the symmetric session key with the servers's or client's public key?

If the client generates the symmetric session key and then encrypts in with the server's public key and send it to the server, then only the server can decrypt the encrypted session key with it's ...
Hans Xeng's user avatar
0 votes
1 answer
200 views

What happens to a message encrypted with an asymmetric key if it arrives corrupted?

I have a theoretical doubt about encryption that I couldn’t find clarified in any of the resources I have. I’d really appreciate anyone clarifying this little doubt for me. I’m studying Asymmetric ...
Antonio23249's user avatar
  • 1,001
3 votes
1 answer
3k views

Why does gpg's secret and public key have the same keyid?

On my Windows machine running Cygwin, When I run gpg --list-keys --keyid-format LONG gpg --list-secret-keys --keyid-format LONG Both the pub and sec keys have the same value. sub and ssb have the ...
Monke's user avatar
  • 57
5 votes
1 answer
967 views

GPG imported and exported public keys do not match

At keyserver.ubuntu.com I look up a public key, say this one, using quux foo as the search string, which when you click on any of the hyperlinks there, say the first one, you get this, the first and ...
Rando's user avatar
  • 53
1 vote
1 answer
3k views

Can I perform ECC encryption (like ECIES) with openssl?

I would like to use Elliptic Curve Cryptography to asymmetrically encrypt data. That is encrypt data using a public ECC key, so that only someone with the corresponding private key can decrypt it. I'm ...
RocketNuts's user avatar
  • 1,152
0 votes
1 answer
428 views

How to un-encrypt a single encrypted field from a file in Linux (openssl, rsa key)

I have a csv file that I receive every day on Linux. The file itself is NOT encrypted as a whole, but one of the fields is, so it looks something like this: data, data, data, encrypted_data, data, ...
user3379608's user avatar
0 votes
1 answer
187 views

SSH authentication methods questions

These days i look at the SSH protocol and iam trying to figure out how the password and public key authentication methods really work. In password authentication, i know that the client encrypts the ...
user1145488's user avatar
0 votes
1 answer
2k views

How to encrypt a message by using a .pub file?

I received a file named id_rsa1.pub from a company so I can send them an ecrypted message. But I can't import it to my program "Kleopatra", because the file format is not supported. Unfortunately ...
Black's user avatar
  • 8,051
2 votes
1 answer
497 views

Why does an EFS-encrypted file get decrypted when it gets uploaded to the Internet?

Why is an EFS-encrypted file decrypted when it gets uploaded to the Internet?
user avatar
1 vote
1 answer
379 views

Will the contents of an encrypted file from a local disk be visible to others when uploaded to the Internet?

If I encrypt the contents of a file through File Explorer in Windows 10 (Properties -> Attributes -> Advanced) and upload it to the internet (cloud, attachment in an email, etc.), will I still be the ...
user avatar
0 votes
1 answer
140 views

Is the role of public key/private key determined arbitrarily or mathematically?

I have read about conflicting information about the roles of public/private keys. In one article(Asymmetrical-key algorithms), it says: Simply put each party, say Alice, picks a private random ...
北美38fule's user avatar
2 votes
1 answer
1k views

What's the fundamental principle regarding who should hold which key (public vs. private)?

In a SSH logging scenario, the client keeps the private key while the server stores the public key under its ./ssh directory. In a different scenario, such as SSL, it's the server that keeps the ...
北美38fule's user avatar
0 votes
0 answers
650 views

I want to port forward my ssh connection to my docker container, where I run gitlab

I can ssh to my docker container by giving specific port number like this: ssh -p 8080 [email protected] This works fine, and I am getting this: Welcome to GitLab, @malinda! Connection to 192.168.0....
Malinda Peiris's user avatar
5 votes
1 answer
3k views

Extend the expiration date of a GPG key non-interactively

I need to extend the expiration date of a GPG key, but all the answers or articles I can find do it interactively, for example. I need to embed the logic in a shell script, so wondering how can I do ...
Dagang's user avatar
  • 207
1 vote
1 answer
1k views

Should 'username@hostname' in a public key be distributed together?

Usually, at the end of an RSA public key, you find something like 'username@hostname' by default or something else otherwise you specified. It is said that it is just a comment and doesn't matter at ...
xiaohuamao's user avatar
1 vote
1 answer
10k views

Unable to load Key pair from p12 certificate - OPENSSL error

I try to extract public and private keys from PKCS#12 certificate with openssl and always have the same error, even i just want to see it without output file (with flag -info) after the certificate ...
Alex Vartanov's user avatar
0 votes
0 answers
70 views

How to create a portable gpgme directory for C/C++ projects

This question is probably quite basic knowledge but here it is. I want to integrate public key encryption, preferably using gpgme, in my projects but the computers running it will not always have ...
George Sp's user avatar
  • 101
1 vote
1 answer
499 views

Can OpenSSH on Windows Server 2019 employ client certificates created via PowerShell as opposed to ssh-keygen?

I'm really not sure of the core differences between each, but can OpenSSH on Windows Server 2019 employ client certificates created via PowerShell (*.pfx, .cer) as opposed to using public/private key ...
ShieldOfSalvation's user avatar
0 votes
0 answers
145 views

Is there a maximum number of subkeys in GnuPG?

The GnuPG documentation describes a process to generate subkeys for a gpg-master-key with the option to have different validity settings for subkeys. This works perfectly for a small amount of subkeys,...
Drayom's user avatar
  • 1
19 votes
4 answers
41k views

How to check if a GPG encrypted file is encrypted using a specific public key?

Consider if a file is encrypted using command e.g. gpg --output test.txt.gpg --encrypt --recipient [email protected] test.txt Now, consider another person received test.txt.gpg the the pub key test@...
Yoga's user avatar
  • 609
1 vote
1 answer
675 views

limit sftp access to specific folders when using a public/private key with openssh

Is it possible to limit what folders a user can sftp to when using public/private keys? Say I have a server with user1 and their home folder is /home/user1. I already have it configured so user1 can ...
IMTheNachoMan's user avatar
6 votes
1 answer
7k views

When is asymmetric and symmetric encryption used in SSH?

I was reading the following document: https://www.digitalocean.com/community/tutorials/understanding-the-ssh-encryption-and-connection-process In the asymmetric encryption it looks like the shared ...
Mohammad Karmi's user avatar
19 votes
3 answers
24k views

I got "BEGIN PGP PUBLIC KEY BLOCK" attached to an email and I don't know what it is [duplicate]

Okay, I have no clue what this is, but I just received an email that has this in it. -----BEGIN PGP PUBLIC KEY BLOCK----- [redacted] -----END PGP PUBLIC KEY BLOCK----- If this means something, ...
user958945's user avatar
1 vote
1 answer
737 views

How to verify sks-keyservers HKPS certificate?

I’m trying to make sense of how PGP is supposed to be used securely, but coherent and helpful information on the subject is surprisingly hard to find. So, SKS keyservers provide their HKPS ...
CBlew's user avatar
  • 163
2 votes
0 answers
714 views

setting up key based authentication for windows 10 ssh server and client

I am trying to set up public private key authentication for the windows 10 beta openssh server and client. But i am running into the problem where it still asks for a password. here's what I did. -...
ArandomDev's user avatar
1 vote
0 answers
502 views

Windows OpenSSH Public key issue

I have tried my best to get my ssh server configured although every time I try to log in with public key authorisation it comes up with a Server refused public key signature despite accepting key. I ...
user898421's user avatar
0 votes
1 answer
2k views

CertUtil | How CertUtil -verifykeys works internally?

I have a CA certificate in Local Machine Certificate Store. When I run this command - enter code here certutil -verifyKeys gives Key "KEYNAME" verifies as the public key for Certificate "KEYNAME" ...
User1234's user avatar
  • 103
1 vote
1 answer
285 views

Do I need a PGP key?

I've recently got familiar with the concept of OpenPGP public-private keys, and how to use GnuPG tool to manage PGP keys. I have three questions: 1- Is it necessary for me to have a PGP (or an ...
Hedayat Mahdipour's user avatar
-2 votes
1 answer
2k views

How do I restore a deleted file encryption key on Windows 10?

I deleted my file encryption key from User Certificates in the Control Panel. I understand that Windows does not delete the private key and that User Certificates only deletes the key from the ...
Hendré's user avatar
  • 863
0 votes
1 answer
781 views

GnuPG outputting rubbish when trying to use the encrypt option

I've been using GnuPG fine for the past year or so, but I haven't encrypted anything directly from the CLI for a while. I've been trying to do it today and this is the weird output I get. Doesn't ...
robotmay's user avatar
  • 241
3 votes
1 answer
891 views

`gpg --edit-key <user>` not listing public key

I'm trying to understand better how GnuPG works. When I run: gpg --edit-key chloe I would expect to see something like this (from the GnuPG privacy handbook): Secret key is available. pub 1024D/...
John L. Godlee's user avatar
8 votes
3 answers
10k views

How to encrypt a file using my GPG private key so I can decrypt it later

I have a text file on my GNU/Linux laptop and I want to encrypt it with my GPG private key so I can decrypt it later and see the output. I've tried this: gpg --encrypt file.txt but I'm asked to ...
jcubic's user avatar
  • 2,963
0 votes
1 answer
136 views

Can't export or list keys

I'm using my desktop to obtain files from a server (using git and rsync), now I want to use my notebook and try therefore to export/import the required RSA-keys. Automatic login from the notebook to ...
Qohelet's user avatar
  • 155
0 votes
2 answers
141 views

What's the simplest way to perform public key encryption?

I'm applying for a job and they asked me to send my SSN to them over e-mail. Call me paranoid, but that doesn't sit well with me. So, I'm looking for a simple form of public-key encryption that a ...
mikeLundquist's user avatar
4 votes
1 answer
3k views

Cannot export secret key without providing passphrase

I have forgotten my passphrase for my secret GPG key, and I want to export it, so that I can brute force it with a few likely ones. However, running gpg --export-secret-keys will always make the gpg-...
Lasse Halberg Haarbye's user avatar
0 votes
2 answers
649 views

Knowing when a key becomes compromised

I am trying to determine best practices for identifying a compromised key. I have had very little luck finding any material on this however was hoping there was some kind of service which would notify ...
Marcus Hughes's user avatar
3 votes
2 answers
3k views

When adding a gpg key with homedir parameter error

When adding a key using the cmd Gpg2 –-homedir . –-gen-key And Im getting the error Can’t connect to the agent: Invalid value passed to IPC This is something to do with the homedir parameter but ...
Steve Ward's user avatar
1 vote
1 answer
10k views

GPG2 Encryption - No public key error

When I generate my keys using gpg2 --gen-key and then I try to try to encrypt the file using gpg2 --batch --yes -r [email protected] --always-trust --homedir . -e test.text I get an error "...
Steve Ward's user avatar
5 votes
3 answers
2k views

How does public/private key cryptography work, who generates the key pair?

I have a requirement to encrypt a file, get it to an external partner who will then decrypt the file using a key. My "basic" understanding is that I can generate the public and private keys, encode ...
Steve Ward's user avatar
0 votes
1 answer
2k views

gpg does not ask for passphrase on one encrypted file

I have a test encrypted file on my computer that when I run gpg(2) --verify message.txt.asc I get: gpg: Signature made Tue Mar 3 21:16:41 2015 PST using RSA key ID ******* gpg: Good signature ...
jshort's user avatar
  • 111