MD5 / SHA1 / SHA5 utils on the MSX...

Par Wild_Penguin

Hero (644)

Portrait de Wild_Penguin

02-10-2011, 09:20

Hi!

I just googled and was a bit suprised to find none of the aforementioned utils for MSX(dos).

Does anyone know if they exist at all? If they do, are they freeware and as such, legally downloadable somewhere? Any checksum utility widely available on other platforms would do.

If not, well there's a little coding exercise just waiting for someone ;-)

!login ou Inscrivez-vous pour poster

Par Manuel

Ascended (18946)

Portrait de Manuel

02-10-2011, 09:37

Yes, for you! Have fun!

I wonder how long it would take a normal MSX to calculate a sha1sum....

Par Wild_Penguin

Hero (644)

Portrait de Wild_Penguin

02-10-2011, 09:52

Heh ;-)

I have no idea actually how much does it take for the checksums. If they are CPU intensive, well that explains why they don't exist ;-)

But, for my use case (actually I can do without), any general checksum utility which can make you fairly certain that a file hasn't changed (the security issues are not a problem here, so the checksum does not need to be strong against attacks) would suffice. Perhaps some of the older algorithms would be viable even on a Z80@3,58MhZ ._,

Par pitpan

Prophet (3152)

Portrait de pitpan

02-10-2011, 10:41

SHA0 could be feasible.

Par Manuel

Ascended (18946)

Portrait de Manuel

02-10-2011, 13:36

MSX compression software usually has checksums of CRC type. You can use that, perhaps.

Par pitpan

Prophet (3152)

Portrait de pitpan

02-10-2011, 15:53

Regular checksum (CRC) is not appropiate for identification purposes. It's too easy to have collisions, I mean, two different files with same checksum. Order does not matter for CRC.

CRC"SHIT"=CRC"THIS"

Par konamiman

Paragon (1176)

Portrait de konamiman

02-10-2011, 16:21

Besides of the SHA1 C library pointed out by Sd-Snatcher, there is also an MD5 routine embedded in the source code of InterNestor Lite (this one is assembler): konamiman.com/msx/inl2/inl20src.zip

Par Sd-Snatcher

Hero (582)

Portrait de Sd-Snatcher

02-10-2011, 18:08

Regular checksum (CRC) is not appropiate for identification purposes. It's too easy to have collisions, I mean, two different files with same checksum. Order does not matter for CRC.

CRC"SHIT"=CRC"THIS"

Soooo If This use CRC and this is SHIT, CRC is SHIT... Tongue

Par wouter_

Champion (486)

Portrait de wouter_

02-10-2011, 19:27

Regular checksum (CRC) is not appropiate for identification purposes. It's too easy to have collisions, I mean, two different files with same checksum. Order does not matter for CRC.

CRC"SHIT"=CRC"THIS"
CRC is not _that_ bad (the CRC value of "SHIT" and "THIS" are not the same). You won't have _that_ easily a collision by accident. Though it is relatively easy to create a collision on purpose. Dvik wrote about exactly this is his software blog: www.danielvik.com/.

Par pitpan

Prophet (3152)

Portrait de pitpan

03-10-2011, 11:32

You're totally right, wouter. I was thinking about regular checksum, not CRC.

Therefore:

Checksum"SHIT"=Checksum"THIS"

but

CRC"SHIT"<>CRC"This"

'cause it pays some attention to order.