User Tools

Site Tools


This page contains various tips and tricks for encryption technologies.


Generate a public key from existing private key

On Linux, using OpenSSH

$ ssh-keygen -y -f private-keyfile


Un-revoke a key

The revocation of a private/public key pair is designed to be un-reversible. However, it is technically possible to remove the revocation signature from the key. NOTE: This is only useful if the revocation has not left your control. If the key was uploaded, copied or transfered to anybody else then removing the revocation signature will not have any meaningful effect.

OpenSSH keys

To remove the revocation signature:

# I recommend these steps be performed in a clean/empty directory
# split key into component parts
$ gpg --export therevokedkey > tempkey.gpg
$ gpgsplit tempkey.gpg
# figure out which packet is the revocation
$ gpg --list-packets 0000*.sig
# 'sigclass' of 0x20 = revocation
$ rm (revocationfile).sig
# Re-assemble
$ cat 0000* > fixedkey.gpg
$ gpg --expert --delete-key therevokedkey
$ gpg --import fixedkey.gpg


encryption.txt · Last modified: 2017/05/17 01:24 by shawn

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki