🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.crypt
Article #5059

TEA problems with temporarely created variables ?

#5059
From: skybuck
Date: Mon, 26 Aug 2002 08:53
21 lines
1632 bytes
Hi...

I suspect the reason why TEA does not work in pascal to be language or
compiler specific.

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;

I suspect c compilers and pascal compilers create temporarely
variables differently, giving a different result in pascal :(

Skybuck.
Technical Details
Message-ID: <65fc3031.0208260053.300165ba@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1043cf,ddba2a7b81ed925a,start
X-Google-Attributes: gid1043cf,public
X-Google-Thread: fb57f,ddba2a7b81ed925a,start
X-Google-Attributes: gidfb57f,public
X-Google-Thread: 10cc59,ddba2a7b81ed925a,start
X-Google-Attributes: gid10cc59,public
X-Google-Thread: 1014db,ddba2a7b81ed925a,start
X-Google-Attributes: gid1014db,public
X-Google-ArrivalTime: 2002-08-26 01:53:22 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: skybuck2000@hotmail.com (skybuck)
Newsgroups: sci.crypt,comp.lang.pascal,borland.public.delphi.objectpascal,comp.lang.c
Subject: TEA problems with temporarely created variables ?
Date: 26 Aug 2002 01:53:22 -0700
Organization: http://groups.google.com/
Lines: 21
Message-ID: <65fc3031.0208260053.300165ba@posting.google.com>
NNTP-Posting-Host: 217.121.93.57
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1030352002 13905 127.0.0.1 (26 Aug 2002 08:53:22 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 26 Aug 2002 08:53:22 GMT