Sponsored Content
Special Forums Cybersecurity [PGP/GnuPG] Importing and signing keys Post 302558393 by imchi on Friday 23rd of September 2011 12:34:26 PM
Old 09-23-2011
[PGP/GnuPG] Importing and signing keys

Hi,

I need to export an existing PGP key and import it into GnuPG on a different machine.
This is how I did the export:
Code:
pgp -kx myuser _myuser_public  
pgp -kx myuser _myuser_private secring.skr

(this is from the pgp installation directory that contains secring.skr).

This produced two files:
_mykey_public.pgp
_mykey_private.pgp.

Then I moved them to the target machine and did this:
Code:
gpg --import _myuser_public.pgp
gpg --import _myuser_private.pgp

The later gives me the message "key not changed". Not sure what it means.

Now if I try to encrypt the file "test" with gpg:

Code:
gpg --encrypt -r myuser test

I get this message:
Code:
There is no assurance this key belongs to the named user.

(then there is a command prompt for Y/N).

My understanding is that I am supposed to sign the key for my user. So, I tried doing this:
Code:
pg --edit-key myuser

Output:
Code:
pub  xxxx  created: xxxx expires: xxxx       usage: xxxx
                     trust: unknown       validity: unknown
sub  xxx  created: xxxx  xxxx: never       usage:xxxx

Then I see a GPG command prompt and issue the command "sign". I get the message:
Code:
gpg: no default secret key: No secret key

At this point, I am not sure how to proceed. What else do I need to do to make the key trusted? I've read a lot of documentation on the web, but it hasn't been very helpflul.

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Importing PGP keys

I'm hoping someone can help get me moving in the right direction here, so bear with me. I've got 2 RedHat Linux servers, let's call them A & B. - A receives "sensitive" files, which are PGP encrypted, and immediately sends them off to B for decryption/processing/deletion - B needs to make... (1 Reply)
Discussion started by: peteroc
1 Replies

2. Shell Programming and Scripting

Problem with GnuPG...need help

hello, i am writing an automated script for GnuPG decryption for a file, which was already being encrypted, homedir="/home/.gnupg" PassPhrase=`cat /home/.gnupg/.passphrase` echo $PassPhrase | gpg --homedir $homedir --passphrase-fd 0 --no-tty --output secret21.txt --decrypt-files... (0 Replies)
Discussion started by: manas_ranjan
0 Replies

3. UNIX for Dummies Questions & Answers

Gnupg

hey guys i need to restrict access to the GNUPG program because of the possibility that sensitive data like encryption keys and passwords that it is using may be written into the virtual memory swap partition on the hard disk and thus be retrieved at a later date long after the program has... (2 Replies)
Discussion started by: mile1982
2 Replies

4. Red Hat

Signing RPM packages using GPG

I am having difficulty getting rpm to trust the gpg key I have used to sign rpm packages I am creating. I used gpg --gen-key to create the key. I chose RSA, 1024. $ gpg --list-key /home/rpmbuild/.gnupg/pubring.gpg --------------------------------- pub 1024R/42A05359 2009-07-15 uid ... (2 Replies)
Discussion started by: Padow
2 Replies

5. UNIX for Dummies Questions & Answers

Import and export PGP/GnuPG keys

Hi, I need to export an existing PGP key and import it into GnuPG on a different machine. This is how I did the export: pgp -kx myuser _myuser_public pgp -kx myuser _myuser_private secring.skr (this is from the pgp installation directory that contains secring.skr). This produced two... (0 Replies)
Discussion started by: imchi
0 Replies

6. Shell Programming and Scripting

GnuPG Syntax Help

Hi all, I'm trying to decrypt a GnuPG file but not having much luck. I'm new to using it and have tried 4 different ways to do it but nothing works. Here are examples of the attempts I have made: gpg -o ./file_name.tar.Z --passphrase-fd 0 ./file_name.tar.Z.gpg 0<./password.txt cat... (5 Replies)
Discussion started by: Korn0474
5 Replies

7. Shell Programming and Scripting

PGP generating keys.

Hi Guys, Am facing issue in generating PGP keys. Can you please help me to figure this out?? I fired the below command to generate keys. The log say keys successfully created. But when i tried to list it doesnt shows me the keys created. pgp --gen-key "pgptest<ram@gmail.com>"... (3 Replies)
Discussion started by: Vinoth Kumar G
3 Replies

8. AIX

PGP importing public keys method

Hi Guys, I am trying to import the public of vendor to my system. I am getting below error while importing public key. can anyone please help me with this?? laranakejt4:/u/raja/.pgp $ pgp --import secure.asc 0x1545A56A52:import key (4007:key failed signature check) secure.asc:import key... (0 Replies)
Discussion started by: Vinoth Kumar G
0 Replies

9. UNIX for Dummies Questions & Answers

PGP importing public keys method

Hi Guys, I am trying to import the public of vendor to my system. I am getting below error while importing public key. can anyone please help me with this?? laranakejt4:/u/raja/.pgp $ pgp --import secure.asc 0x1545A56A52:import key (4007:key failed signature check) secure.asc:import key... (2 Replies)
Discussion started by: Vinoth Kumar G
2 Replies

10. AIX

Use SMB/CIFS signing when mounting Win shares

Hi, We have a number of Windows Server 2003 shares mounted on our AIX server via CIFS, using a command similar to this: mkcifsmnt -f /test -d testshare -h testserver -c testuser -p pass -w DOMAIN The windows servers are currently being upgraded to 2012, and as part of this they are setting... (0 Replies)
Discussion started by: AndyG
0 Replies
pgpverify(8)						      System Manager's Manual						      pgpverify(8)

NAME
pgpverify - cryptographically verify Usenet control messages SYNOPSIS
pgpverify DESCRIPTION
The pgpverify program reads (on standard input) a Usenet control message that has been cryptographically signed using the signcontrol pro- gram. pgpverify then uses the pgp program to determine who signed the control message. If the control message was validly signed, pgpver- ify outputs (to stdout) the User ID of the key ID that signed the message. OPTIONS
The pgpverify program takes no options. EXIT STATUS
pgpverify returns the follow exit statuses for the following cases: 0 The control message had a good PGP signature. 1 The control message had no PGP signature. 2 The control message had an unknown PGP signature. 3 The control message had a bad PGP signature. 255 A problem occurred not directly related to PGP analysis of signature. AUTHOR
David C Lawrence <tale@isc.org> ENVIRONMENT
pgpverify does not modify or otherwise alter the environment before invoking the pgp program. It is the responsibility of the person who installs pgpverify to ensure that when pgp runs, it has the ability to locate and read a PGP key file that contains the PGP public keys for the appropriate Usenet hierarchy administrators. SEE ALSO
pgp(1) NOTES
Historically, Usenet news server administrators have configured their news servers to automatically honor Usenet control messages based on the originator of the control messages and the hierarchies for which the control messages applied. For example, in the past, David C Lawrence <tale@uunet.uu.net> always issued control messages for the "Big 8" hierarchies (comp, humanities, misc, news, rec, sci, soc, talk). Usenet news administrators would configure their news server software to automatically honor newgroup and rmgroup control messages that originated from David Lawrence and applied to any of the Big 8 hierarchies. Unfortunately, Usenet news articles (including control messages) are notoriously easy to forge. Soon, malicious users realized they could create or remove (at least temporarily) any Big 8 newsgroup they wanted by simply forging an appropriate control message in David Lawrence's name. As Usenet became more widely used, forgeries became more common. The pgpverify program was designed to allow Usenet news administrators to configure their servers to cryptographically verify control mes- sages before automatically acting on them. Under the pgpverify system, a Usenet hierarchy maintainer creates a PGP public/private key pair and disseminates the public key. Whenever the hierarchy maintainer issues a control message, he uses the signcontrol program to sign the control message with the PGP private key. Usenet news administrators configure their news servers to run the pgpverify program on the appropriate control messages, and take action based on the PGP key User ID that signed the control message, not the name and address that appear in the control message's From or Sender headers. Thus, using the signcontrol and pgpverify programs appropriately essentially eliminates the possibility of malicious users forging Usenet control messages that sites will act upon, as such users would have to obtain the PGP private key in order to forge a control message that would pass the cryptographic verification step. If the hierarchy administrators properly protect their PGP private keys, the only way a malicious user could forge a validly-signed control message would be by breaking the RSA encryption algorithm, which (at least at this time) is believed to be an NP-complete problem. If this is indeed the case, discovering the PGP private key based on the PGP public key is computationally impossible for PGP keys of a sufficient bit length. <URL:ftp://ftp.isc.org/pub/pgpcontrol/> is where the most recent versions of signcontrol and pgpverify live, along with PGP public keys used for hierarchy administration. pgpverify(8)
All times are GMT -4. The time now is 06:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy