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

Door Wild_Penguin

Hero (644)

afbeelding van 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 ;-)

Aangemeld of registreer om reacties te plaatsen

Van Manuel

Ascended (19462)

afbeelding van 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....

Van Wild_Penguin

Hero (644)

afbeelding van 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 ._,

Van pitpan

Prophet (3155)

afbeelding van pitpan

02-10-2011, 10:41

SHA0 could be feasible.

Van Manuel

Ascended (19462)

afbeelding van Manuel

02-10-2011, 13:36

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

Van pitpan

Prophet (3155)

afbeelding van 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"

Van konamiman

Paragon (1198)

afbeelding van 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

Van Sd-Snatcher

Hero (582)

afbeelding van 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

Van wouter_

Hero (522)

afbeelding van 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/.

Van pitpan

Prophet (3155)

afbeelding van 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.