From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QFUPC-0003JA-Cg for garchives@archives.gentoo.org; Thu, 28 Apr 2011 16:49:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 402421C037; Thu, 28 Apr 2011 16:47:59 +0000 (UTC) Received: from mail2.viabit.com (mail2.viabit.com [65.246.80.16]) by pigeon.gentoo.org (Postfix) with ESMTP id 117281C037 for ; Thu, 28 Apr 2011 16:47:58 +0000 (UTC) Received: from [172.17.29.6] (unknown [65.213.236.242]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail2.viabit.com (Postfix) with ESMTPSA id 7DF6ED8D57 for ; Thu, 28 Apr 2011 12:47:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=orlitzky.com; s=mail2; t=1304009278; bh=Ah3gnGoHhGFln5RciyN9jzt6+zAZ0ftPFcFdyvfyuVM=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Neo7n5HSy7UM7NXzyWTPtLdQaSKvjD2OovXAai1ixRom/Pk4dGrt64sTvAvp0lvt7 WZe3f+Z5EK5Q6Ln5m8KJDaZcP/T9WgOUGT+/3S/8nSGnZdGS5+EilafzS+kYy0sgKW eyzMUtfHoZY0fj0QfNVTyMHqPPx0L5Xt3qiJyxNk= Message-ID: <4DB99A3A.3050903@orlitzky.com> Date: Thu, 28 Apr 2011 12:47:54 -0400 From: Michael Orlitzky User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110404 Lightning/1.0b3pre Thunderbird/3.1.7 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] [OT] Script to crack gpg passphrase References: <201104262124.55281.michaelkintzios@gmail.com> <20110427181546.GA19893@crowfix.com> <201104271956.18941.michaelkintzios@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: X-Archives-Hash: 2ef27fe600a6144db0cb455bd4d38760 On 04/28/2011 10:04 AM, Mick wrote: > This finds the passphrase and prints it out on the terminal. However, its > success depends on the dictionary file I use. Also, it's not particularly > fast ... > > Any idea how I can create a dictionary file? I've used apg but it's > too random. :-) > > I have been given something like 6 passphrases that may have been used. The > problem is that at the time of creation the passphrase was typed in > incorrectly (twice!) So I would need to use some method of generating a > dictionary with potential typos of these known passphrases (pretty much how > the rephrase application works). What is a good way to generate such a file > by imputing a range of candidate characters? > > Finally, is there a way or parallelising the run so that it speeds up? > If you know the actual passphrase is "close" to some known passphrase, read up on the concept of Levenshtein distance: http://en.wikipedia.org/wiki/Levenshtein_distance If you can define a function that computes all passwords of Levenshtein distance 1 from a given password, then you can run that function twice to get the password of distance 2,3... Three or four is probably a good place to stop. Then you can take those six known passwords, and compute all words of distance 1,2,3 from all of them. Stick those in a list, and try them.