Monday, January 27, 2014

Generate 8192 bytes RSA key - Arch Linux

GNU Privacy Guard (GnuPG or GPG) is a GPL Licensed alternative to the PGP suite of cryptographic software. GnuPG is compliant with RFC 4880, which is the current IETF standards track specification of OpenPGP. Current versions of PGP (and Veridis' Filecrypt) are interoperable with GnuPG and other OpenPGP-compliant systems. 

Well since lately i've been digging information about encrypting i decided to start and make my own 8192 bytes RSA key.

I'm using arch linux

First of all:

Make a directory with

$mkdir gnu

change to the new directory

$cd gnu

download those 3 files and save them on plain text with no extension with the same name that site gives them, place them on folder gnu

download the gnupg 2.0.22.tar.bz2

we have to decompress the .tar.bz2

$tar -jxvf gnupg-2.0.22.tar.bz2

now go on newly decompressed folder and find folder named g10
now look for file named keygen.c and change all 4096 for 8192, save the file and go back to gnu
erase your old gnupg-2.0.22.tar.bz2 and now tar the folder with modified source with

$tar -jcvf gnupg-2.0.22.tar.bz2 gnupg-2.0.22

after that we are gonna compile the new sources

$makepkg --skipchecksums --skipinteg --skippgpcheck

let it compile and install as usual with

#pacman -U gnupg-2.0.22.tar.xz

and now just generate your new key with

$gpg --gen-key


If you have problem generating entropy for your key generation use this command on 3-4 terminals:

$ls -R /

Also remember you can use haveged:

Note: in theory this works for any size of bytes, i'll try with 16834 bytes later on.

Sources that were useful on my process:

No comments:

Post a Comment