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

Por Wild_Penguin

Hero (644)

imagem 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 ;-)

Entrar ou registrar-se para comentar

Por Manuel

Ascended (18794)

imagem 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....

Por Wild_Penguin

Hero (644)

imagem 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 ._,

Por pitpan

Prophet (3152)

imagem de pitpan

02-10-2011, 10:41

SHA0 could be feasible.

Por Manuel

Ascended (18794)

imagem de Manuel

02-10-2011, 13:36

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

Por pitpan

Prophet (3152)

imagem 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"

Por konamiman

Paragon (1172)

imagem 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

Por Sd-Snatcher

Hero (582)

imagem 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

Por wouter_

Champion (484)

imagem 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/.

Por pitpan

Prophet (3152)

imagem 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.