Logs: freenode/#haskell
| 2020-09-18 18:11:10 | × | ransom quits (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-09-18 18:11:25 | × | mpereira quits (~mpereira@2a02:810d:f40:d96:4908:4fea:105f:a3b8) (Ping timeout: 272 seconds) |
| 2020-09-18 18:12:48 | × | gestone quits (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) (Ping timeout: 272 seconds) |
| 2020-09-18 18:13:03 | → | mdunnio joins (~mdunnio@208.59.170.5) |
| 2020-09-18 18:15:14 | → | ahmr88 joins (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) |
| 2020-09-18 18:16:03 | × | mariatsji quits (~mariatsji@2a01:79d:53aa:c66c:fcb4:8a4:b249:c1d3) (Remote host closed the connection) |
| 2020-09-18 18:16:05 | → | ransom joins (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) |
| 2020-09-18 18:17:05 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 2020-09-18 18:17:27 | → | kleisli__ joins (~kleisli@2605:e000:1804:94c6:68bd:9d76:dbd8:24e7) |
| 2020-09-18 18:17:28 | × | RusAlex quits (~Chel@unaffiliated/rusalex) (Read error: Connection reset by peer) |
| 2020-09-18 18:18:25 | → | RusAlex joins (~Chel@unaffiliated/rusalex) |
| 2020-09-18 18:19:19 | → | Tops21 joins (~Tobias@dyndsl-095-033-022-068.ewe-ip-backbone.de) |
| 2020-09-18 18:19:29 | → | Saten-san joins (~Saten-san@ip-83-134-68-193.dsl.scarlet.be) |
| 2020-09-18 18:19:54 | × | ahmr88 quits (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Ping timeout: 260 seconds) |
| 2020-09-18 18:22:56 | × | Tops2 quits (~Tobias@dyndsl-095-033-022-068.ewe-ip-backbone.de) (Ping timeout: 272 seconds) |
| 2020-09-18 18:24:33 | × | coeus quits (~coeus@p200300d027117c00036e7a2e9abb019c.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-09-18 18:26:27 | × | tzh quits (~tzh@2601:448:c500:5300::ad1c) (Quit: sdjbnkj) |
| 2020-09-18 18:28:49 | → | gestone joins (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) |
| 2020-09-18 18:32:00 | → | galagora joins (c5ed143c@197.237.20.60) |
| 2020-09-18 18:32:47 | × | Dolly quits (585fd1fd@ti0203q160-5312.bb.online.no) (Remote host closed the connection) |
| 2020-09-18 18:32:50 | → | machinedgod joins (~machinedg@d67-193-126-196.home3.cgocable.net) |
| 2020-09-18 18:33:01 | → | Faker joins (bad2e42c@186.210.228.44) |
| 2020-09-18 18:33:04 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2020-09-18 18:33:14 | → | Dolly joins (585fd1fd@ti0203q160-5312.bb.online.no) |
| 2020-09-18 18:33:16 | × | gestone quits (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) (Ping timeout: 256 seconds) |
| 2020-09-18 18:33:44 | → | acidjnk_new3 joins (~acidjnk@p200300d0c73658736c60527e87d72a12.dip0.t-ipconnect.de) |
| 2020-09-18 18:34:19 | → | eric joins (~eric@2804:431:c7d4:402a:cc9a:66fe:3007:383) |
| 2020-09-18 18:36:13 | → | geekosaur joins (42d52102@66.213.33.2) |
| 2020-09-18 18:36:38 | × | cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: Quit.) |
| 2020-09-18 18:37:25 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 2020-09-18 18:40:14 | → | mpereira joins (~mpereira@2a02:810d:f40:d96:d572:7a06:140c:5191) |
| 2020-09-18 18:41:11 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:b0dc:6c54:247b:ece) (Remote host closed the connection) |
| 2020-09-18 18:41:15 | → | coeus joins (~coeus@p200300d0271eff006d82f7a13f36e33f.dip0.t-ipconnect.de) |
| 2020-09-18 18:43:33 | ← | Faker parts (bad2e42c@186.210.228.44) () |
| 2020-09-18 18:44:16 | × | mpereira quits (~mpereira@2a02:810d:f40:d96:d572:7a06:140c:5191) (Read error: Connection reset by peer) |
| 2020-09-18 18:45:19 | → | mpereira joins (~mpereira@2a02:810d:f40:d96:d572:7a06:140c:5191) |
| 2020-09-18 18:45:25 | → | Faker joins (bad2e42c@186.210.228.44) |
| 2020-09-18 18:49:10 | <hyiltiz> | Is it possible to compute embed a hashstring inside its input, aha does a hash function that can satisfy the following property exist (if not, can we prove): X = hash(X++Y) where ++ is string concatanation, Y is arbitrary string, X is computed and embedded hash string. |
| 2020-09-18 18:49:35 | → | gestone joins (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) |
| 2020-09-18 18:49:43 | → | tzh joins (~tzh@2601:448:c500:5300::ad1c) |
| 2020-09-18 18:50:29 | <hyiltiz> | s/compute//, s/aha/aka/ |
| 2020-09-18 18:51:05 | <hyiltiz> | I.e. is it ever possible to embed the checksum/hash of a file inside the same file being hashed? |
| 2020-09-18 18:53:08 | <geekosaur> | it could conceivably occur there randomly, but if it's a secure hash function then one of the things it's trying to do is prevent that scenario |
| 2020-09-18 18:53:20 | <exarkun> | It's called a fixed point |
| 2020-09-18 18:53:25 | <exarkun> | most hash functions have them |
| 2020-09-18 18:53:28 | <exarkun> | many of them are known |
| 2020-09-18 18:53:41 | → | alp joins (~alp@2a01:e0a:58b:4920:9049:c6fa:1cbb:b0d3) |
| 2020-09-18 18:53:43 | → | devnewton joins (~devnewton@193.56.252.210) |
| 2020-09-18 18:53:52 | <exarkun> | wait no, where Y is arbitrary? sorry didn't read very carefully |
| 2020-09-18 18:54:11 | <geekosaur> | (but at best it can only make it very unlikely) |
| 2020-09-18 18:54:13 | × | gestone quits (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) (Ping timeout: 264 seconds) |
| 2020-09-18 18:55:21 | × | alp quits (~alp@2a01:e0a:58b:4920:9049:c6fa:1cbb:b0d3) (Remote host closed the connection) |
| 2020-09-18 18:55:55 | → | alp joins (~alp@2a01:e0a:58b:4920:fd02:bd51:47ad:2987) |
| 2020-09-18 18:56:37 | <merijn> | It depends on the kind of hash |
| 2020-09-18 18:56:50 | <merijn> | There's way to many implicit unstated assumption here to give any answer |
| 2020-09-18 18:57:34 | <merijn> | There are certainly hashes where "hash a <> hash b == hash (a <> b)" |
| 2020-09-18 18:57:34 | × | alp quits (~alp@2a01:e0a:58b:4920:fd02:bd51:47ad:2987) (Remote host closed the connection) |
| 2020-09-18 18:57:49 | <merijn> | Probably not cryptographically secure hashes, but then, that was never stated |
| 2020-09-18 18:58:20 | <merijn> | I mean, "checksum is embedded in the file" is trivially answered via: "yes" |
| 2020-09-18 18:58:26 | <merijn> | Exhibit #1: CRC32 |
| 2020-09-18 18:58:32 | → | alp joins (~alp@88.126.45.36) |
| 2020-09-18 18:58:52 | <merijn> | Like, that's literally what IP packets do :) |
| 2020-09-18 18:59:23 | <hyiltiz> | merijn: what assumptions du think needs to be specified/relevant for a meaningful discussion? |
| 2020-09-18 18:59:36 | <hyiltiz> | thx for mentioning crc32 i'll look into it |
| 2020-09-18 19:00:32 | <geekosaur> | what kind of hash, for one. merijn and I both mentioned cryptographically secure hashes, which try to make a number of guarantees or near-guarantees compared to other kinds of hashes |
| 2020-09-18 19:00:33 | <merijn> | hyiltiz: Well, hash is often implicitly interpreted as "cryptographically secure" and most of the well known hashes are (or rather, were intended to be) cryptographically secure in which case what you're asking is actively designed against |
| 2020-09-18 19:00:55 | <merijn> | hyiltiz: CRC32 otoh is designed as a checksum against non-malicious tampering |
| 2020-09-18 19:01:39 | <merijn> | i.e. it detects "natural" errors and thus properties like "embedding the checksum" are kinda nice, since for example IP packets want the checksum included in the packet for things to make any sense |
| 2020-09-18 19:01:50 | <hyiltiz> | if by cryptographically secure means can only unhash with gazillion computers in gazillion years, then no, I didn't specify that and is not needed. |
| 2020-09-18 19:02:18 | <merijn> | hyiltiz: Cryptographically secure means "we don't want attackers to be able to forge unintended messages" |
| 2020-09-18 19:02:24 | <merijn> | Suppose you have an email |
| 2020-09-18 19:02:26 | <monochrom> | But CRC doesn't satisfy X = hash(X++Y). CRC satisfies X=hash(Y) iff 0=hash(Y++X) |
| 2020-09-18 19:02:38 | <merijn> | monochrom: Nobody said it did |
| 2020-09-18 19:02:56 | <merijn> | monochrom: The follow up question was about "embedding the checksum in the file being checked" |
| 2020-09-18 19:03:02 | <merijn> | monochrom: Which is what CRC32 answered |
| 2020-09-18 19:03:06 | <monochrom> | But hyiltiz was stating X = hash(X++Y |
| 2020-09-18 19:03:10 | <sm[m]> | tomsmeding: re your "stack build --RTS --ghc-options +RTS --ghc-options -M100M --ghc-options -c --ghc-options -RTS" command - I can easily get confused here but the --RTS flag looks weird/unknown |
| 2020-09-18 19:03:50 | <tomsmeding> | I barely ever use RTS flags, but in this case I read the documentation :) |
| 2020-09-18 19:03:52 | <merijn> | hyiltiz: Now, suppose you checksum the aforementioned email, but the checksum allows someone else to append text to your email and compute a new (valid) checksum |
| 2020-09-18 19:04:13 | <merijn> | hyiltiz: That's clearly undesirable if you plan to use checksum to guarantee data integrity in the presence of attackers |
| 2020-09-18 19:04:15 | <tomsmeding> | +RTS starts RTS flags, -RTS stops RTS flags; --RTS permanently stops RTS flags so that you can pass stuff that _looks_ like an RTS flag as normal options |
| 2020-09-18 19:04:45 | <merijn> | But if you only plan to guard against, e.g. data corruption by magnetic waves or cosmic radiation, then it's probably fine |
| 2020-09-18 19:04:48 | <tomsmeding> | if I didn't use --RTS there, stack itself would've interpreted the +RTS, tried to parse --ghc-options as an RTS flag, and failed |
| 2020-09-18 19:05:14 | <hyiltiz> | merijn: I get what u mean but that other one is gonna have a different Y and as a result (most likely) a different X |
| 2020-09-18 19:05:32 | <merijn> | hyiltiz: So "cryptographically secure" hashes are the class of hashes that are expected to be robust in the presence of malicious/active manipulation of the data (which means the properties you asked about are actively undesirable) |
| 2020-09-18 19:05:56 | <hyiltiz> | so if I know the hash, I can look up that hash by text search and find exactly the file I am looking for |
| 2020-09-18 19:06:37 | <monochrom> | tomsmeding: Does it help to use the syntax --ghc-options=+RTS ? |
| 2020-09-18 19:06:45 | × | mirrorbird_ quits (~psutcliff@2a00:801:3fb:46ee:ec96:e1f0:7c6a:69aa) (Remote host closed the connection) |
| 2020-09-18 19:06:50 | <exarkun> | hyiltiz: Why don't you just not include the hash value if you ever need to rehash the content? |
| 2020-09-18 19:06:54 | <hyiltiz> | so I guess i am not interested in cryptographically secure type of hash |
| 2020-09-18 19:06:58 | <exarkun> | hyiltiz: Why do you want to embed a hash in a document? |
| 2020-09-18 19:07:36 | <monochrom> | Yeah, usually embedded hash is of interest to hardware desginers only. Their life is easier that way. |
| 2020-09-18 19:07:40 | <hyiltiz> | exarkun: huh? u mean, hash the file, emded the hash in it and store; if file is edited, repeat? |
| 2020-09-18 19:07:45 | <monochrom> | A programmable couldn't care less either way. |
| 2020-09-18 19:07:52 | geekosaur | would typically put the hash as metadata, possibly by (sym)linking the file by its hash as well as its name |
| 2020-09-18 19:07:54 | <tomsmeding> | monochrom: help for what, exactly? |
| 2020-09-18 19:07:58 | <exarkun> | hyiltiz: No |
| 2020-09-18 19:08:01 | → | bennofs_ joins (~quassel@dslb-188-106-250-199.188.106.pools.vodafone-ip.de) |
| 2020-09-18 19:08:15 | <exarkun> | hyiltiz: Or, sure, do it like that if you want I suppose |
| 2020-09-18 19:08:16 | <geekosaur> | tomsmeding, presumably hiding RTS options from stack so it doesn't eat them |
All times are in UTC.