aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: <Resolved, bug report filed> alcc and alc (link creator) with AICH support?  (Read 7242 times)

Nil Einne

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 16

It would be good if someone can add AICH hash support to the alcc and alc programs (link creators). The eMule link creator does support AICH but sadly has no command line option.

P.S. I intended to ask here http://forum.amule.org/index.php?topic=13434.msg83320#msg83320 but called it kad support instead :-P
« Last Edit: December 01, 2008, 06:22:50 PM by Nil Einne »
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: alcc and alc (link creator) with AICH support?
« Reply #1 on: September 30, 2008, 12:52:53 PM »

ALC supports AICH hashes (Create link with part hashes) and so does alcc using the -p switch.

This applies for aMule 2.2.2 and probably for earlier versions as well.
Logged

Schuttwegraeumer

  • Sr. Member
  • ****
  • Karma: 2
  • Offline Offline
  • Posts: 421
Re: alcc and alc (link creator) with AICH support?
« Reply #2 on: October 24, 2008, 08:42:18 PM »

ALC supports AICH hashes (Create link with part hashes) and so does alcc using the -p switch.

This applies for aMule 2.2.2 and probably for earlier versions as well.

The "-p" switch generates ALL Hashsets.
I need a switch for the AICH only like the GUI Version of the aMule.

EDIT:
Code: [Select]
ed2k://|file|24c3-2318-en-cybercrime20-COMPATIBLE.mp4|116461928|33d3d6b40fbc66edcfb28c842e1c29d3|p=d6e857ed0d9c7223980c66b676a147de:8260ba6e6bb8899feabb49c6b6c5cd5b:b8499c1fb95a39b6225173bffe99f69f:25376581f48014b72286043becd8cd9a:c433650783053b837f75e4727dfbee9f:b5e2c8617d435443739d234d585ea195:76c0ee1be1c7ab1cccd5da1ab93a7517:aabf88c62d13976e781dc1790ce4be43:32691ee6eb13821aa2d52b634836a96d:ac54d7b799688ea132a2a17db8e38fca:95b82b276bdb771fd563a8dfd0889d61:497b721770d5815746612123e77726e6|/
Is the ed2k Link generated with alcc -p.
If I need not all of the hashsets but the AICH hash.

Code: [Select]
ed2k://|file|24c3-2318-en-cybercrime20-COMPATIBLE.mp4|116461928|33d3d6b40fbc66edcfb28c842e1c29d3|p=d6e857ed0d9c7223980c66b676a147de|/should be correct?


EDIT2:
ed2k Link with AICH Info:

Code: [Select]
ed2k://|file|24c3-2318-en-cybercrime20-COMPATIBLE.mp4|116461928|33D3D6B40FBC66EDCFB28C842E1C29D3|/|h=WH2ZPCYX7JNQOWPB5GVYMJGDVF6YAUKM|/
Is different.
« Last Edit: October 24, 2008, 08:47:24 PM by Schuttwegraeumer »
Logged

Nil Einne

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 16
Re: alcc and alc (link creator) with AICH support?
« Reply #3 on: November 06, 2008, 06:44:10 PM »

ALC supports AICH hashes (Create link with part hashes) and so does alcc using the -p switch.

This applies for aMule 2.2.2 and probably for earlier versions as well.

Apologies I missed the replies (I thought I'd asked it to notify me but it seems I didn't).

Anyway Schuttwegraeumer is right even though he/she doesn't quite understand what's going on. ALC and alcc can generate part hashes, but not the new AICH http://www.amule.org/wiki/index.php/AICH that was added by eMule 4.7 or something (don't really recall that well) and somewhere in aMule 2.0 I think.

So my suggestion still applies :-)

I guess wuischke knows, but for the benefit of those like Schutt that don't. Part hashes is part of ED2K error correction system. Basically each file is divided into parts of ~9mb and an MD4 hash of each part is made. Then MD4 has of all these hashes is made which is the basic ED2K hash. Because these part hashes give you the main hash, you always know if you have the correct part hashes since you can take the hash of them all and make sure it gives you the main hash. So while having the parthashes is helpful particularly with rare files, it isn't essential.

AICH was added latter and is basically completely unconnected to the main hash. It's an additional error correction hash where the part files are divided into small blocks (53 x 180KB). These are then used to make a SHA1 based hash tree (a bit like earlier but more complicated http://www.emule-project.net/home/files/help/1033/AICHHash.png). Anyway the key thing to understand here is that because the AICH hash is completely seperate from the main hash, there is no way you can be sure what the correct AICH hash is if all you have is the main has until you have the complete file. You can make a guess, if there is only one AICH hash and 1000 of people have the same one then very likely it's the correct one but it's always a guess. Obviously if you add the file with both hashes then you are accepting that they are both the correct ones. The advantage with AICH is it nearly always reduces the amount of data you need to download if there is corruption. And as I've said, with the AICH hash you can verify if you have the correct hashtree (if you have the complete hashtree)

See http://www.emule-project.net/home/perl/help.cgi?l=1&topic_id=589&rm=show_topic for further info
« Last Edit: November 06, 2008, 06:47:44 PM by Nil Einne »
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: alcc and alc (link creator) with AICH support?
« Reply #4 on: November 06, 2008, 07:27:52 PM »

I'm very sorry to have misinformed you. I was using the Italian translation of aMule and misinterpreted the strings, although they clearly state "part hash". It's kind of embarrassing, but I didn't know there were ed2k links with part hashes.

Would you kindly file a bug report? (just to remind me of this issue) I know about AICH, but not how it exactly works. So I'll need some time for research which I currently unfortunately lack. Patches are of course welcome. ;)

Actually I would like to refactor this part of the code and use the aMule internal hashing implementation, but a bird in the hand is worth two in the bush...
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: alcc and alc (link creator) with AICH support?
« Reply #5 on: November 06, 2008, 07:56:22 PM »

It's kind of embarrassing, but I didn't know there were ed2k links with part hashes.
Same here. Wonders never cease. ;D
Just verified it, if you pass a link with full hashset aMule stores the hashset right away and doesn't need to get it from a client first. So does eMule. Not really useful though. And I've never seen such a link in the wild.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

Nil Einne

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 16
Re: alcc and alc (link creator) with AICH support?
« Reply #6 on: December 01, 2008, 06:18:29 PM »

I'm very sorry to have misinformed you. I was using the Italian translation of aMule and misinterpreted the strings, although they clearly state "part hash". It's kind of embarrassing, but I didn't know there were ed2k links with part hashes.

Would you kindly file a bug report? (just to remind me of this issue) I know about AICH, but not how it exactly works. So I'll need some time for research which I currently unfortunately lack. Patches are of course welcome. ;)

Actually I would like to refactor this part of the code and use the aMule internal hashing implementation, but a bird in the hand is worth two in the bush...

Sorry I read your post and was planning to file a report later but then forgot about it :-P Anyway I've filed a report now http://bugs.amule.org/bug_view_advanced_page.php?bug_id=1452 although I somehow missed the category selection while filing so it's in external connections not utilities
Logged