Results 1 to 10 of 17

Thread: How To: Compile and Install GnuPG from source with Camellia and IDEA ciphers

Threaded View

  1. #1
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,554
    Distro
    Ubuntu 12.04 Precise Pangolin

    How To: Compile and Install GnuPG from source with Camellia and IDEA ciphers

    HowTo Compile GnuPG with IDEA and Camellia Ciphers

    **Updated to Include GPG and GPG2

    PreRequisite Packages for Both Version

    1. Dependencies:
    build-essential, linux-header files, subversion, automake

    (Cut and paste following inside terminal to install necessary dependencies)
    Code:
    sudo aptitude install build-essential linux-headers-$(uname -r) subversion automake checkinstall
    2. Working Directory Structure (Using this directory structure so guide is coherent. You may choose to download your svn sources and libs and place them in a different directory)

    Code:
    mkdir -p ~/src
    cd ~/src
    mkdir -p gnupg
    mkdir -p gnupg2
    Compilation of GnuPG (GnuPG Version 1)
    ***Platforms Tested: Ubuntu, Cygwin (Although installation steps are slightly different)

    Requirements
    1. SVN sources of GnuPG
    2. IDEA module (Optional)
    3. BZIP2 Developmental library

    We will be using the GnuPG svn stable branch

    GnuPG (Version 1) SVN Source Files

    Code:
    cd ~/src
    svn co svn://cvs.gnupg.org/gnupg/branches/STABLE-BRANCH-1-4 gnupg
    cd gnupg
    (Optional) IDEA module

    Code:
    cd ~/src/gnupg/cipher
    wget ftp://ftp.gnupg.dk/pub/contrib-dk/idea.c.gz
    gunzip idea.c.gz
    cd ~/src/gnupg
    BZIP2 library

    Code:
    sudo aptitude install libbz2-dev
    Compile GnuPG enabling camellia and idea ciphers
    Code:
    ./autogen.sh --force
    ./configure --enable-camellia --enable-idea --enable-maintainer-mode
    make
    make check
    
    Choose one of the Following Options (First Option Recommended if Installing Within the Apt Packaging System):
    sudo checkinstall -D --fstrans=no --install=yes --pkgname gnupg --pkgversion svn-`svn info|grep Revision |cut -f2 -d' '`
    sudo make install
    gnupg.exe will be installed to /usr/local/bin. You need to ensure in your PATH environment variable that /usr/local/bin is listed before /usr/bin (echo $PATH). This is normally to the case unless the path statement has been modified.

    To check the ciphers available with gpg
    Code:
    gpg --version
    Example showing installed gpg version:
    Code:
    $  gpg --version
    gpg (GnuPG) 1.4.10-svn4881
    Copyright (C) 2008 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Home: ~/.gnupg
    Supported algorithms:
    Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
    Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, 
            CAMELLIA192, CAMELLIA256
    Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
    Compression: Uncompressed, ZIP, ZLIB, BZIP2
    (Optional)Generating the gpg.conf directory (Needed if going to be modifying default gpg behaivor)

    Code:
    mkdir -p ~/.gnupg
    chmod 600 ~/.gnupg
    cp /usr/local/share/gnupg/options.skel ~/.gnupg/gpg.conf
    I would recommend reading about the various options that can be included/modified in this file, however recommend the following flags be included in the file:

    enable-dsa2
    personal-cipher-preferences
    personal-digest-preferences
    personal-compress-preferences
    default-preference-list

    The preferences above need preferences specified explicitly if wanting to change the default SHA1 digest algorithm to SHA256 or SHA512.

    ------------------------------------------------------------------------------------
    Compilation of GnuPG2 (GnuPG version 2)
    ***Platforms Tested: Ubuntu, (Unable to compile with Cygwin)

    Requirements
    1. Additional Prerequisite Dependenices needed for GnuPG2
    2. SVN sources of GnuPG2

    Additional GnuPG2 PreRequisite Dependencies
    Code:
    sudo aptitude install libksba-dev libpth-dev texinfo transfig libbz2-dev
    cd ~/src
    wget ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-1.0.5.tar.bz2
    tar jxvf libassuan-1.0.5.tar.bz2
    cd libassuan-1.0.5
    ./configure && make
    
    Choose one of the Following Options (First Option Recommended if Installing Within the Apt Packaging System):
    sudo checkinstall -D --fstrans=no --install=yes --pkgname libassuan --pkgversion 1.0.5
    sudo make install
    
    cd ~/src
    svn co svn://cvs.gnupg.org/libgcrypt/trunk libgcrypt
    cd libgcrypt
    ./autogen.sh && ./configure --enable-maintainer-mode && make && make check
    
    Choose one of the Following Options (First Option Recommended if Installing Within the Apt Packaging System):
    sudo checkinstall -D --fstrans=no --install=yes --pkgname libgcrypt --pkgversion svn-`svn info|grep Revision |cut -f2 -d' '`
    sudo make install
    GnuPG2 SVN Installation -- Enabling Camellia Cipher

    Code:
    cd ~/src
    svn co svn://cvs.gnupg.org/gnupg/trunk gnupg2
    cd ~/src/gnupg2
    ./autogen.sh --force
    ./configure --sysconfdir=/etc --enable-maintainer-mode --enable-camellia
    make
    make check
    
    Choose one of the Following Options (First Option Recommended if Installing Within the Apt Packaging System):
    sudo checkinstall -D --fstrans=no --install=yes --pkgname gnupg2 --pkgversion svn-`svn info|grep Revision |cut -f2 -d' '`
    sudo make install
    gnupg2 will be installed to /usr/local/bin. You need to ensure in your PATH environment variable that /usr/local/bin is listed before /usr/bin.

    To check the ciphers available with gpg2
    Code:
    gpg2 --version
    Example showing installed gpg2 version:
    Code:
    $   gpg2 --version
    gpg (GnuPG) 2.0.10-svn4881
    libgcrypt 1.4.1
    Copyright (C) 2008 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Home: ~/.gnupg
    Supported algorithms:
    Pubkey: RSA, ELG, DSA
    Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, 
            CAMELLIA192, CAMELLIA256
    Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
    Compression: Uncompressed, ZIP, ZLIB, BZIP2
    (Optional)Generating the gpg.conf directory (Needed if going to be modifying default gpg behaivor)

    Code:
    mkdir -p ~/.gnupg
    chmod 600 ~/.gnupg
    cp /usr/local/share/gnupg/options.skel ~/.gnupg/gpg.conf
    I would recommend reading about the various options that can be included/modified in this file, however recommend the following flags be included in the file:

    enable-dsa2
    personal-cipher-preferences
    personal-digest-preferences
    personal-compress-preferences
    default-preference-list

    The preferences above need preferences specified explicitly if wanting to change the default SHA1 digest algorithm to SHA256 or SHA512.
    _________________________________________________
    Updating the GnuPG and GnuPG2 Installation

    Since both GnuPG and GnuPG2 were installed from svn source packages, it is easy to update the packages when new svn sources are released.


    Updating the GnuPG Installation

    Code:
    cd ~/src/gnupg
    svn up
    rm -rf autom4te.cache
    ./autogen.sh && ./configure --enable-maintainer-mode --enable-camellia --enable-idea && make
    
    Depending on the method Used to Install the Original Installation (Choose One of the following):
    sudo checkinstall -D --fstrans=no --install=yes --pkgname gnupg --pkgversion svn-`svn info|grep Revision |cut -f2 -d' '`
    sudo make install

    Updating the GnuPG2 Installation

    Code:
    cd ~/src/gnupg2
    svn up
    rm -rf autom4te.cache
    ./autogen.sh && ./configure --sysconfdir=/etc --enable-maintainer-mode --enable-camellia && make
    
    Depending on the method Used to Install the Original Installation (Choose One of the following):
    sudo checkinstall -D --fstrans=no --install=yes --pkgname gnupg2 --pkgversion svn-`svn info|grep Revision |cut -f2 -d' '`
    sudo make install
    Last edited by kevdog; December 5th, 2008 at 05:21 AM. Reason: Further additions

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •