Code Monkey home page Code Monkey logo

memorable-pgpgen's Introduction

Memorable PGP key ID Generator

简体中文

This works by generating a key and then adjusting the creation date until it finds something that hashes to the desired ending values.

This generator uses GPU to achieve high-speed operation of keys through CUDA. After testing, in the device configuration shown in the table below, the version implemented with GPU is 3 to 4 times faster than the version implemented with CPU.

CPU GPU
Intel i7-5500U NVIDIA GeForce 940M

Versions

The original version by Valodim is outdated. GnuPG's 2.1 and newer version don't use the secring for secret keys storage anymore (Cf. GnuPG). The version located in the traditional branch has been modified for this update and the input logic has been modified for easy use.

The version located in the main branch requires CUDA to be installed to compile. If you do not have the conditions to run, please use the general traditional branch version.

You need to manually modify the nvcc compilation flag in the Makefile file. The flag is like this:

CUDAFLAGS= -O3 -rdc=true -gencode arch=compute_50,code=sm_50

In the device configuration in the above table, the graphics card NVIDIA GeForce 940M is not compatible with the latest CUDA default configuration due to low compute capability, so these items have been added to compile. You should first remove -gencode and everything afterwards and try to run it. If error occured, please check the compute capability of your graphics card via here, and modify -gencode accordingly.

A simple way to check whether it can run normally is to compile according to the following usage method and enter ./pgpgen AA. This command will be completed in a short time. Check the import message of the GPG at the latter part in the output of the command and check whether the key fingerprint ends with AA.

Usage

Build with

make

Generate your key with a preferred suffix (e.g. 0xDEADBEEF). The length of suffix should be even.

./pgpgen DEADBEEF

You may run this for multiple times, each of the result will be added to the private.key file.

All these keys will be in an odd state since there is no valid UID and no signatures. Import them directly may ruin your keychain, or just impossible due to GnuPG rules.

To protect your existing keyring, Import the result into a temporary gpg homedir (e.g. result):

mkdir --mode 700 result
gpg --homedir ./result --allow-non-selfsigned-uid --import private.key

View your generated keys:

gpg --homedir ./result --list-keys

To modify this into a common PGP key, edit the key (e.g. 5E1EC210DEADBEEF):

gpg --homedir ./result --edit-key 5E1EC210DEADBEEF

Enter these commands to modify as you wish:

adduid (interactive: user description)

uid 1
deluid (select the fake uid and delete it)

addkey (create an RSA signing key)
addkey (create an RSA encryption key)
passwd (change your password)
save   (save it and quit the edit)

Export the common key (e.g. 5E1EC210DEADBEEF) to file (e.g. good.key) with:

gpg --homedir ./result --armor --output good.key --export-secret-keys 5E1EC210DEADBEEF

then import this key file (e.g. good.key) as a normal one to your own keychain.

gpg --import good.key

To clean the directory to avoid unwanted leakage, run

make clean

to clean the generated directory.

You also need to remove the result folder, and good.key file yourself.

memorable-pgpgen's People

Contributors

osresearch avatar rcasatta avatar valodim avatar victrid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

izouxv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.