Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=python.org; s=200901; t=1359729276; bh=hCmKf4sM1H2Jubjq7DmcsE02JkLE/3oAOcsNIR9xRvk=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=qKRQuln5kov1NyzglUmWrsrlVRS/PTKHwRkpg8bVBUQCzBAR4Va9fXuO9nZGKqzRv ECgopPwswvEY148ayXwGH3Q2j9UEa/Q1auZCutO4Zrp7tjSBG6nBQF13IygScyZ40I tXialW6rA6RSFmO7X1HYBEB13IqnRzWvLAL39MdY= Date: Fri, 01 Feb 2013 15:34:35 +0100 From: Christian Heimes User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: kryptox.exchange@gmail.com Subject: Re: Need some help confirming transactions using sha256 References: <21037ba0-57e5-4e44-8d50-6503a1187492@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: python-list@python.org, Peter Pearson X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1359729277 news.xs4all.nl 6901 [2001:888:2000:d::a6]:38934 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38040 Am 31.01.2013 18:55, schrieb Peter Pearson: >>>> txid = 'r7A7clvs9waizF+6QEiI0tgAq1ar48JItK3kg9kaeAFXz2vsMsHmOd9r9fhkmtxTz3CQnGAPMaDeKLvgb1A2VA' >>>> secret = '10812806653842663997bf5971637f86f26c71a4716276d7fa8f323a83588d91:1' >>>> hashlib.sha256(txid+":"+secret).hexdigest() > 'dfa8769be81a543002865c88a5b52fa07f3b67fc7cd9b519c3f6a6452bcd48e4' >>>> 0x48e4 > 18660 >>>> > > .. . . which is the number you wanted, right? Kryptox, you have chosen the correct algorithm to calculate a MAC. Very good! But the designers of the game are using an improper algorithm. Apparently they don't know much about cryptography, especially length extension attacks ... Christian