Article View: sci.crypt
Article #5060Re: TEA problems with temporarely created variables ?
From: disastry
Date: Mon, 26 Aug 2002 09:37
Date: Mon, 26 Aug 2002 09:37
35 lines
2324 bytes
2324 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
skybuck wrote:
> The problems are probably with these lines of code:
>
> c version:
>
> y += (z<<4)+a ^ z+sum ^ (z>>5)+b;
> z += (y<<4)+c ^ y+sum ^ (y>>5)+d;
>
> pascal version:
>
> y := y + (z shl 4) + a xor z + _sum xor (z shr 5) + b;
> z := z + (y shl 4) + c xor y + _sum xor (y shr 5) + d;
1) try:
y := y + ((z shl 4) + a xor z + _sum xor (z shr 5) + b);
or even
y := y + (((z shl 4) + a) xor (z + _sum) xor ((z shr 5) + b));
2) better use XTEA (aka (TEAN)
__
Disastry http://disastry.dhs.org/
http://disastry.dhs.org/pgp <----PGP plugins for Netscape and MDaemon
^----PGP 2.6.3ia-multi06 (supports IDEA, CAST5, BLOWFISH, TWOFISH,
AES, 3DES ciphers and MD5, SHA1, RIPEMD160, SHA2 hashes)
-----BEGIN PGP SIGNATURE-----
Version: Netscape PGP half-Plugin 0.15 by Disastry / PGPsdk v1.7.1
iQA/AwUBPWnayDBaTVEuJQxkEQMpGACfZIT4l3qmDgc6vFEefc8IaltkSfAAoLXz
hQBQJElRGLhZ0OyB59/rQvpn
=ouN1
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<3D69F6F6.E43591E6@saiknes.lv.NO.SPaM.NET>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.gamma.ru!Gamma.RU!demos!news1.relcom.ru!racoon.riga.lv!usenetReferences:
<65fc3031.0208260053.300165ba@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1043cf,ddba2a7b81ed925a X-Google-Attributes: gid1043cf,public X-Google-Thread: 1014db,ddba2a7b81ed925a X-Google-Attributes: gid1014db,public X-Google-Thread: 10cc59,ddba2a7b81ed925a X-Google-Attributes: gid10cc59,public X-Google-Thread: fb57f,ddba2a7b81ed925a X-Google-Attributes: gidfb57f,public X-Google-ArrivalTime: 2002-08-26 02:47:16 PST Newsgroups: sci.crypt,comp.lang.pascal,borland.public.delphi.objectpascal,comp.lang.c Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.gamma.ru!Gamma.RU!demos!news1.relcom.ru!racoon.riga.lv!usenet From: disastry@saiknes.lv.NO.SPaM.NET Subject: Re: TEA problems with temporarely created variables ? X-Nntp-Posting-Host: hackserv.klinkmann.lv Content-Type: text/plain; charset=us-ascii Message-ID: <3D69F6F6.E43591E6@saiknes.lv.NO.SPaM.NET> Sender: usenet@racoon.riga.lv (Usenet News Owner) Content-Transfer-Encoding: 7bit Organization: LvNet-Teleport, Riga, Latvia X-Accept-Language: en,lv,ru References: <65fc3031.0208260053.300165ba@posting.google.com> Mime-Version: 1.0 Date: Mon, 26 Aug 2002 09:37:58 GMT X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) Lines: 35