Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104059 - gnupg static USE flag and Jari's extra strength for 1.4*
Summary: gnupg static USE flag and Jari's extra strength for 1.4*
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-28 12:32 UTC by Venkat Manakkal
Modified: 2005-08-31 14:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Modified Ebuild for 1.4.2-r1 with static and Jari's patch (gnupg-1.4.2-r1.ebuild,6.21 KB, application/octet-stream)
2005-08-28 12:33 UTC, Venkat Manakkal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Venkat Manakkal 2005-08-28 12:32:19 UTC
Static 1.4 gnupg requires --enable-static-rnd=linux and -static to ldflags

Jari's key iteration boost patch:
Note: patch works on 1.4.2

From http://loop-aes.sf.net/loop-AES.README

When gpg encrypts data with symmetric cipher only or when gpg encrypts
secret keyring keys with secret passphrase, gpg uses seeded (salted) and
iterated key setup. However, default amount of iteration is tuned for slow
processors and can be increased for better resistance against dictionary
attacks. Larger key iteration makes key setup much slower, but also makes
dictionary attacks much slower too.

Included optional gpg patch makes gpg password iteration 128 times slower.
gpg stores new iteration value along with seed bytes into symmetric cipher
encrypted output file or secret keyring, so unpatched gpg versions will read
and decrypt the data just fine.
gpg sources are available from:

    ftp://ftp.gnupg.org/gcrypt/gnupg/

These commands, as root user, will recompile and install gpg and gpgv and
their man pages:

    zcat gnupg-1.4.1.tar.gz | tar xvf -
    cd gnupg-1.4.1
    patch -p1 <../gnupg-1.4.1.diff
    CFLAGS="-O2" LDFLAGS="-static -s" ./configure --prefix=/usr
--enable-static-rnd=linux
    make
    rm -f /usr/share/man/man1/{gpg,gpgv}.1.gz
    make install
    chown root.root /usr/bin/gpg
    chmod 4755 /usr/bin/gpg

Note: Above instructions create statically linked version of gpg. Static
linking is necessary if you ever decide to encrypt your root partition.


Reproducible: Always
Steps to Reproduce:
1. Follow instruction in section 5 of http://loop-aes.sf.net/loop-AES.README
2. Above results in modified ebuild that is attached
3. Compile with USE=static, get static gpg with key iteration boost of 128
Comment 1 Venkat Manakkal 2005-08-28 12:33:44 UTC
Created attachment 67105 [details]
Modified Ebuild for 1.4.2-r1 with static and Jari's patch
Comment 2 Daniel Black (RETIRED) gentoo-dev 2005-08-30 20:13:05 UTC
I'm concerned that Jari's key iteration boost patch will break backwards 
compatibility. 
Comment 3 Daniel Black (RETIRED) gentoo-dev 2005-08-31 04:20:54 UTC
added without Jari patch. If you can show the Jari patch doesn't break 
backwards compatibility I'll include it. 
Comment 4 Venkat Manakkal 2005-08-31 06:08:25 UTC
I have been using Jari's patch with no problems communicating to PGP and older
GnuPG users. Jari himself says (and I quoted in the original report):

"gpg stores new iteration value along with seed bytes into symmetric cipher
encrypted output file or secret keyring, so unpatched gpg versions will read
and decrypt the data just fine."

So I think in the interests of good security we can put in Jari's patch.
Comment 5 Daniel Black (RETIRED) gentoo-dev 2005-08-31 14:01:04 UTC
Venkat - thanks. Added jari patch to gnupg-1.4.2-r2