Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux > #53785

Re: usb3 sticks do not seem to work properly.

From Peter Pearson <pkpearson@nowhere.invalid>
Newsgroups alt.os.linux
Subject Re: usb3 sticks do not seem to work properly.
Date 2019-02-12 17:55 +0000
Message-ID <gcgfjvF8u0cU1@mid.individual.net> (permalink)
References (1 earlier) <878sym17ns.fsf@LkoBDZeT.terraraq.uk> <q3stth$ujl$1@dont-email.me> <8736ot1jju.fsf@LkoBDZeT.terraraq.uk> <q3uqo8$bdu$1@dont-email.me> <slrnq65sie.dor.BitTwister@wb.home.test>

Show all headers | View raw


On Tue, 12 Feb 2019 10:20:29 -0600, Bit Twister wrote:
> ["Followup-To:" header set to alt.os.linux.mageia.]
> On Tue, 12 Feb 2019 16:03:20 -0000 (UTC), William Unruh wrote:
>> On 2019-02-12, Richard Kettlewell <invalid@invalid.invalid> wrote:
>
>>>
>>> In general I would move on from md5sum to at least sha256, but it
>>> shouldn’t matter much for this particular application.
>>
>> Why? Is sha faster?
>
> No.
>
>> AFAIK for detecting changes in a file (rather than
>> standing as a guardian against forgeries) md5 and any sha are equally
>> good.
>
> Not so. Seen articles years ago where criminals had a program to
> append their malware then add the correct number/content bytes to the
> file to cause collision of the md5sum to come out correct.
>
> https://en.wikipedia.org/wiki/MD5


William Unruh is presumably interested in the probability that a random
error would go undetected, and not concerned about the possibility
that the powers of darkness are interfering in his flash-drive
initialization.  For that purpose, MD5, SHA-1, and SHA-256 are all more
than adequate.

It seems that SHA-1 (for which collisions have also been found, but with
much more difficulty) is about 25% slower than MD5, while SHA-256 takes
a bit over 3 times longer (I hope I'm doing this right):

$ head -c 1G </dev/urandom >temp.tmp

$ time md5sum <temp.tmp
2de65a591115f6c70cfa9350aff4ab5c  -

real	0m1.642s
user	0m1.360s
sys	0m0.280s

$ time sha1sum <temp.tmp
0d32c484eb431f752053ff5615f506478109e238  -

real	0m1.963s
user	0m1.748s
sys	0m0.212s

$ time sha256sum <temp.tmp
f6aaf16f8da766f0e3c270525d9918376c443a3765f697764059c283d163031e  -

real	0m4.898s
user	0m4.728s
sys	0m0.168s


-- 
To email me, substitute nowhere->runbox, invalid->com.

Back to alt.os.linux | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

usb3 sticks do not seem to work properly. William Unruh <unruh@invalid.ca> - 2019-02-11 16:42 +0000
  Re: usb3 sticks do not seem to work properly. Mike Easter <MikeE@ster.invalid> - 2019-02-11 08:56 -0800
  Re: usb3 sticks do not seem to work properly. Richard Kettlewell <invalid@invalid.invalid> - 2019-02-11 18:50 +0000
    Re: usb3 sticks do not seem to work properly. William Unruh <unruh@invalid.ca> - 2019-02-11 22:45 +0000
      Re: usb3 sticks do not seem to work properly. Jasen Betts <jasen@xnet.co.nz> - 2019-02-12 01:59 +0000
      Re: usb3 sticks do not seem to work properly. Richard Kettlewell <invalid@invalid.invalid> - 2019-02-12 08:45 +0000
        Re: usb3 sticks do not seem to work properly. Paul <nospam@needed.invalid> - 2019-02-12 05:50 -0500
        Re: usb3 sticks do not seem to work properly. William Unruh <unruh@invalid.ca> - 2019-02-12 16:03 +0000
          Re: usb3 sticks do not seem to work properly. Bit Twister <BitTwister@mouse-potato.com> - 2019-02-12 10:20 -0600
            Re: usb3 sticks do not seem to work properly. Peter Pearson <pkpearson@nowhere.invalid> - 2019-02-12 17:55 +0000
          Re: usb3 sticks do not seem to work properly. "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2019-02-12 13:56 -0500
            Re: usb3 sticks do not seem to work properly. Richard Kettlewell <invalid@invalid.invalid> - 2019-02-12 19:18 +0000
              Re: usb3 sticks do not seem to work properly. "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2019-02-12 14:59 -0500
          Re: usb3 sticks do not seem to work properly. Richard Kettlewell <invalid@invalid.invalid> - 2019-02-12 19:15 +0000
  Re: usb3 sticks do not seem to work properly. Wes Newell <w.newell@tx.rr.com> - 2019-02-11 20:27 +0000
  Re: usb3 sticks do not seem to work properly. "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2019-02-11 15:32 -0500
    Re: usb3 sticks do not seem to work properly. faeychild <faeychild@afraid.org> - 2019-02-12 08:32 +1100
    Re: usb3 sticks do not seem to work properly. William Unruh <unruh@invalid.ca> - 2019-02-11 22:49 +0000
      Re: usb3 sticks do not seem to work properly. "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2019-02-11 21:49 -0500
        Re: usb3 sticks do not seem to work properly. Paul <nospam@needed.invalid> - 2019-02-11 22:15 -0500
    Re: usb3 sticks do not seem to work properly. Jasen Betts <jasen@xnet.co.nz> - 2019-02-12 02:03 +0000
      Re: usb3 sticks do not seem to work properly. "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2019-02-11 22:15 -0500
        Re: usb3 sticks do not seem to work properly. "Carlos E.R." <robin_listas@es.invalid> - 2019-02-12 05:22 +0100
  Re: usb3 sticks do not seem to work properly. "Carlos E. R." <robin_listas@es.invalid> - 2019-02-11 22:28 +0100
  Re: usb3 sticks do not seem to work properly. Paul <nospam@needed.invalid> - 2019-02-11 18:52 -0500
    Re: usb3 sticks do not seem to work properly. ant@zimage.comANT (Ant) - 2019-02-11 21:47 -0600
      Re: usb3 sticks do not seem to work properly. William Unruh <unruh@invalid.ca> - 2019-02-12 04:22 +0000
        Re: usb3 sticks do not seem to work properly. "Carlos E. R." <robin_listas@es.invalid> - 2019-02-12 21:40 +0100
      Re: usb3 sticks do not seem to work properly. "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2019-02-11 23:29 -0500
        Re: usb3 sticks do not seem to work properly. Doug Laidlaw <laidlaws@hotkey.net.au> - 2019-02-13 06:40 +1100
          Re: usb3 sticks do not seem to work properly. Doug Laidlaw <laidlaws@hotkey.net.au> - 2019-02-14 03:01 +1100
            Re: usb3 sticks do not seem to work properly. "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2019-02-13 23:24 -0500
  Re: usb3 sticks do not seem to work properly. Jasen Betts <jasen@xnet.co.nz> - 2019-02-12 01:50 +0000

csiph-web