Hubbry Logo
Ed2k URI schemeEd2k URI schemeMain
Open search
Ed2k URI scheme
Community hub
Ed2k URI scheme
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Ed2k URI scheme
Ed2k URI scheme
from Wikipedia

In computing, eD2k links (ed2k://) are hyperlinks used to denote files stored on computers connected to the eDonkey filesharing P2P network.

General

[edit]

Many programs, such as eMule, MLDonkey and the original eDonkey2000 client by MetaMachine, which introduced the link type, as well as others using the eDonkey file sharing protocol, can be used to manage files stored in the filesharing network.

eD2k links allow a file to be identified from a link in a web browser and to be downloaded thereafter by a client like eMule, Shareaza or any other compatible software. This linking feature was one of the first URIs to be introduced in peer-to-peer file sharing, and had a vast effect on the development of the eDonkey network, as it allowed external link sites to provide verified content within the network. Nowadays, so-called Magnet links have replaced eD2k links in practice. They serve a similar role, but are not limited to the eD2k hash and can contain other hashes such as SHA-1 or MD5 for example, which makes it possible to use these links to point to files in several networks (as well as in BitTorrent) at once.

eD2k links include file hashes, as these hashes can be used as a unique identifier for files within the network, so even if the linked-to file has a different name on two computers within the network, the file can be found on both of them, and file chunks can be obtained from both sources. This is done by using a hash function on the file to calculate its checksum, depending only from the file content, not from its name.

Like other URI protocols, web browsers can be configured to automatically handle ed2k URIs. After installing an eD2k client, the eD2k protocol is optionally registered so that clicking on it in the browser automatically starts the download or asks whether the user wants to start downloading.

[edit]

File links are preceded with the "file" token, which indicates that this is a file link, as opposed to a server, serverlist, nodelist or friend link. The typical eD2k file link also includes the filename and the file size. An example (a link to the 15 MB Purist Edit trailer) is provided below:

ed2k://|file|The_Two_Towers-The_Purist_Edit-Trailer.avi|14997504|965c013e991ee246d63d45ea71954c4d|/

eD2k links can also include a reference to the IP address and port of specific clients that are known to share the linked-to file. This is done by adding a list of sources after the main part of the link, like shown in the following example:

ed2k://|file|The_Two_Towers-The_Purist_Edit-Trailer.avi|14997504|965c013e991ee246d63d45ea71954c4d|/|sources,202.89.123.6:4662|/

On eMule, the link often contains also an AICH top hash |h=H52BRVWPBBTAED5NXQDH2RJDDAKRUWST| to help recover the file in case of corruption during file transfer.

eD2k hash algorithm

[edit]

The eD2k hash function is a root hash of a list of MD4 hashes. It gives a different result than a simple usage of the MD4 algorithm.

The file data is divided into full chunks of 9500 KiB (9728000 bytes) plus a remainder chunk, and a separate 128-bit MD4 checksum is computed for each. If the file is greater than 9500 KiB (which means that there is more than one chunk), the eD2k hash is computed by concatenating the chunks' MD4 checksums in order and hashing the result again using MD4. Otherwise, the MD4 hash of the only chunk of the file is used with no further modifications.[1]

This method of hashing allows the recipient to verify that a hash list corresponds to an original eD2k file hash, without the need to actually have the file present on disk.

In the past, there has been some ambiguity for files whose size is a multiple of the chunk size (9500 KiB). Old versions of some eD2k hash tools computed file hashes with an additional 0-byte chunk at the end. This is because an ambiguity of the term remainder chunk which can be interpreted as either the last chunk or a non-full chunk at the end. Following the latter interpretation, some implementations added a zero byte chunk in case the last chunk of a file was a complete one. This practice is discouraged however and the first interpretation is used as a standard nowadays to prevent some files from having different hashes depending on the algorithm implementation used to calculate their hash.[2]

AICH

[edit]

The AICH (Advanced Intelligent Corruption Handling) is an eMule extension. It subdivides the 9500 KiB chunk into 180-KiB blocks and builds a Merkle tree out of the SHA1 hashes of the 53 blocks, so that the root hash of each block is called a block hash. The block hashes further feed into a Merkle tree, the root hash of which is the actual AICH root hash. The smaller block size allows eMule clients to more precisely identifify locations of corruption.[3]

[edit]

A server link is a reference to an eDonkey2000 server; clicking on such a link typically adds it to the server list. Server links are indicated by the server token at the beginning of the link and have the following format:

ed2k://|server|IP|PORT|/
  • IP – IP of the server to connect to.
  • PORT – Port where the server is listening for incoming eD2k connections

Example:

ed2k://|server|207.44.222.51|4242|/

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The ed2k URI scheme (ed2k://) is a provisional (URI) scheme designed to reference resources available on the (P2P) network, primarily enabling hyperlinks for specific files or network servers that can be processed by compatible client software to initiate downloads or connections. Developed by MetaMachine, the creator of the client, this scheme emerged in the early 2000s as part of the eDonkey protocol, a decentralized, mostly server-based P2P that facilitated large-scale through a combination of client-server indexing and direct peer exchanges. The scheme's syntax supports two primary formats: file links, structured as ed2k://|file|<filename>|<size in bytes>|<MD4 hash>|/, where the hash uniquely identifies the file content regardless of its name or location, and server links, formatted as ed2k://|server|<IP address>|<TCP port>|/, which direct clients to connect to specific indexing servers for search and metadata retrieval. These links were commonly shared via websites, emails, or forums to distribute files—often media content—across the network, with client applications like eDonkey2000 and eMule registering as handlers to intercept and act on ed2k URIs in web browsers. Although the official eDonkey2000 software was discontinued in 2005 following legal actions by the Recording Industry Association of America (RIAA) over copyright infringement facilitation, the ed2k scheme persists as of 2025 in open-source clients and communities, supporting ongoing use of the resilient eD2k network infrastructure.

History and Development

Origins in eDonkey Network

Jed McCaleb founded the in 2000 through his company MetaMachine, Inc., with joining as CEO in 2001, as a hybrid server-based file-sharing intended to mitigate the single-point-of-failure issues inherent in centralized protocols like Napster by distributing indexing across multiple dedicated servers. The ed2k URI scheme emerged in 2001 alongside the eDonkey2000 client software, functioning as web hyperlinks that enabled users to directly access and initiate downloads of specific files within the network by embedding file identifiers. At its core, the scheme was motivated by the need for content-based file identification through cryptographic hashes, which provided unique, filename-independent references to support efficient, decentralized searches and multi-server downloads across the distributed architecture. A pivotal early event was the shutdown of the official operations, prompted by legal pressures from a (RIAA) lawsuit that targeted networks, which prompted greater dependence on community-driven open-source implementations such as .

Evolution and Extensions

The project launched in May 2002 as a free, open-source file-sharing client for Windows, serving as an alternative to the proprietary software while extending compatibility with the ed2k URI scheme. Later versions of , starting with v0.40 in 2004, introduced enhancements such as integration with the Kademlia (Kad) network, enabling decentralized searches and operations alongside the traditional semi-centralized ed2k servers, which ensured the scheme's continued relevance. This open-source adaptation proved crucial after the network's official client and central servers were discontinued in September 2005, following legal action by the (RIAA) and the U.S. Supreme Court's ruling in MGM Studios v. Grokster, which pressured MetaMachine to cease operations. Key protocol extensions emerged through 's development, including the addition of Advanced Intelligent Corruption Handling (AICH) in 2003, which improved file integrity by generating hierarchical hashes for data blocks, allowing recovery from partial corruption without redownloading entire 9.28 MB chunks. By 2004, incorporated support for specifying multiple sources directly within ed2k URIs, facilitating faster connection to peers and web-based points for more efficient file acquisition. In September 2012, the (IANA) granted provisional registration to the ed2k URI scheme, defining its standard syntax as ed2k://|file|<filename>|<size>|<hash>|/ to enhance interoperability with web browsers and other applications beyond P2P clients. The ed2k URI scheme's model of embedding content identifiers and sources in hyperlinks influenced subsequent P2P systems, notably serving as a basis for the in , developed in 2002 as a vendor-neutral generalization of ed2k and Freenet URI formats to enable metadata-free file referencing via hashes. As of 2024, the eMule project continues with community-maintained releases, such as version 0.70b, ensuring ongoing support for the ed2k URI scheme.

Syntax and Format

General Structure

The ed2k URI scheme adheres to a structured format beginning with the scheme identifier ed2k://, followed by a type-specific path where components are delimited by the pipe character (|). This design facilitates the identification of resources on the eDonkey network, such as files or servers, through hyperlinks that clients can parse and act upon. The structure terminates with a forward slash (/) in basic forms, ensuring compatibility with standard URI parsing conventions. Mandatory elements in all ed2k URIs include the "ed2k" scheme prefix, an action type indicator (e.g., "file" for file or "server" for server connections), and subsequent parameters specific to the type, such as encoded or metadata. These parameters are separated by pipes to maintain clarity and ease of in client applications. For instance, file require details like and , while server include and , all integrated within this delimited framework. Parameters involving text, such as filenames, must be percent-encoded using representation in accordance with RFC 3986 to handle special characters, spaces, and non-ASCII content safely within the URI. Binary elements, including cryptographic hashes, are encoded in lowercase notation to ensure unambiguous transmission and verification. This encoding approach aligns with broader URI standards while accommodating the scheme's P2P-specific needs. The file link format in the ed2k URI scheme identifies specific files for download within the eDonkey network, using a structured syntax that prioritizes content verification through hashing. The complete format is ed2k://|file|<URL-encoded filename>|<file size in decimal bytes>|<hex eD2k hash>[optional parameters]|/, where parameters are delimited by pipe characters (|) and the URI concludes with a trailing slash after the final pipe. The filename parameter consists of a human-readable name, including any extension, which is URL-encoded to safely handle special characters or spaces in web contexts. The file size, specified as an in bytes, aids in initial compatibility and bandwidth during transfers. The core eD2k hash is a 32-character hexadecimal string serving as the file's unique identifier, computed as an MD4 hash of concatenated MD4 digests from fixed-size file blocks (typically 9,728,000 bytes each). Optional parameters follow the hash and are separated by , including sources for peer connections (e.g., |sources,192.168.1.1:4662|), the AICH hash for verification (e.g., |h=<32-char AICH hash>|). A basic example without optionals is ed2k://|file|example.txt|1024|0123456789abcdef0123456789abcdef|/, representing a 1,024-byte file named "example.txt" with the specified hash. These URIs act as content-addressable pointers, allowing eDonkey clients to query network servers or peers by hash to locate matching files, decoupling identification from filenames or storage locations for robust distribution. The server link format in the ed2k URI scheme provides a means for clients to directly connect to specific servers by encoding the server's and in a standardized . This format begins with the scheme identifier ed2k:// followed by the token |server|, the server's IP or hostname, the TCP number, and terminates with |/. The full syntax is ed2k://|server|<IP [address](/page/Address) or hostname>|<TCP [port](/page/Port)>|/. The parameter accepts either dotted notation (e.g., 192.168.1.1) or a DNS-resolvable (e.g., example.server.), allowing flexibility in addressing the target server. The TCP specifies the primary connection endpoint, typically defaulting to 4661 if not explicitly provided; this handles initial client-server handshakes and reliable exchange. A representative example of a basic server link is ed2k://|server|example.server.com|4661|/, which instructs a compatible client like or to add the specified server to its list and attempt a connection. This format enables users to manually incorporate trusted servers into their client's configuration, circumventing automated server discovery mechanisms that rely on peer exchanges or static lists. It proves particularly valuable in environments with restricted connectivity, such as firewalls blocking broadcast traffic or regions with censored network access, where direct specification ensures reliable entry into the eDonkey network for subsequent file searches and downloads.

Hashing Mechanisms

eD2k Hash Algorithm

The eD2k hash algorithm serves as the core identifier for files in the ed2k URI scheme, generating a unique 128-bit value to facilitate file sharing, deduplication, and integrity checks within the eDonkey network. It relies on the MD4 hash function, a one-way cryptographic primitive designed for producing fixed-length digests from arbitrary input data. This multi-stage hashing process ensures that even minor alterations to a file result in a completely different identifier, while supporting efficient partial downloads and verifications. The computation begins by partitioning the file into fixed-size chunks of 9,728,000 bytes, with the final chunk hashed as-is if smaller than this size when the file length is not evenly divisible. Each chunk is then processed independently using the MD4 algorithm to produce a 128-bit (16-byte) hash. These per-chunk hashes are concatenated sequentially to form a single binary string, which is subsequently hashed again with MD4 to derive the final eD2k hash—a 128-bit value typically encoded as 32 hexadecimal digits. For files under 9,728,000 bytes, the process simplifies to a direct MD4 hash of the entire file content, bypassing chunking. This procedure can be expressed as:

eD2k_hash = MD4( CONCAT( MD4(chunk_1), MD4(chunk_2), …, MD4(chunk_N) ) )

eD2k_hash = MD4( CONCAT( MD4(chunk_1), MD4(chunk_2), …, MD4(chunk_N) ) )

where chunk_size = 9728000 bytes and N = ceil(file_size / 9728000). The algorithm's design offers strong for practical file deduplication purposes, with the 128-bit output space making accidental hash matches negligible in large-scale networks. However, 's known cryptographic flaws render the eD2k hash vulnerable to deliberate collision attacks, enabling adversaries to construct distinct files (e.g., benign and malicious variants) that share the same identifier, thus undermining network trust. As a Merkle-Damgård hash , it is also prone to length-extension attacks, where an attacker can extend the input data while a valid hash without knowing the original content. The uniform chunk size supports granular features like verifying downloaded portions independently, enhancing resilience to transmission errors.

AICH Root Hash

The AICH Root Hash, part of the Advanced Intelligent Corruption Handling (AICH) system, was developed by the project and introduced in version 0.44a released on September 5, 2004, as an optional extension to the ed2k URI scheme for file verification. This feature allows clients to detect and repair at a granular level without requiring a full file rehash, addressing limitations in the original eDonkey network's chunk-based verification. The underlying algorithm constructs a using hashes applied to fixed 180 KB (184,320-byte) blocks within each 9.28 MB file part, resulting in approximately 53 blocks per part. Block hashes are iteratively combined through parent nodes up to the , enabling targeted validation of subtrees for partial rather than holistic checks. The hash itself is a 160-bit value encoded in , yielding a 32-character string that serves as a compact integrity anchor for the entire tree. In ed2k URIs, the AICH root hash is appended directly after the standard eD2k hash using the format |h=<base32_root_hash>|, making it an seamless extension for compatible clients. For instance, a complete file link might appear as: ed2k://|file|example.file|9728000|ed2k_md4_hash|h=H52BRVWPBBTAED5NXQDH2RJDDAKRUWST|/. This integration ensures that links generated by eMule include the parameter when AICH data is available, while older clients simply ignore it. By providing block-level , the AICH hash minimizes bandwidth during recovery: upon detecting in a part, a client can solicit a recovery packet containing relevant subtree hashes from peers with the full AICH hashset, allowing precise block repairs instead of re-downloading megabyte-scale chunks. This mechanism is particularly advantageous in peer-to-peer environments, where it reduces overall redownload overhead from up to 4.64 MB per corrupted part (under prior intelligent chunk handling) to as little as 180 KB, enhancing reliability for large or frequently transferred files.

Features and Extensions

Sources Specification

The sources parameter in ed2k file URIs is an optional component that embeds a list of known peer endpoints to facilitate direct connections in the eDonkey network. This parameter is particularly valuable for accelerating the discovery and connection to file sources, bypassing initial server queries or searches, which is beneficial for rare files or in private sharing scenarios where peer availability may be limited. The format follows the structure |sources,IP:port,IP:port,...|, where each source is an or followed by a colon and the number. Multiple sources are separated by commas, allowing clients to connections to listed peers immediately upon the URI. For example, a URI including a single source for localhost on 8080 would appear as |sources,127.0.0.1:8080|. This text-based encoding is straightforward and URL-safe, though practical limits are typically 50-100 sources per URI due to browser and URL length constraints (e.g., around 2,083 characters in many systems). Other optional extensions include HTTP sources in the format |http://URL|, which allow clients to download from web servers as an additional source, and part hashes (|part|hash1|hash2|...|) for specifying incomplete file sections to resume downloads efficiently. These features enhance flexibility in file sharing across the network.

Usage and Implementation

Client Support

The ed2k URI scheme is primarily supported by dedicated peer-to-peer (P2P) clients designed for the , which parse these URIs to initiate file downloads, connect to servers, and manage sources. Among the primary clients, has been active since 2002 as an open-source alternative to the original eDonkey software, offering full support for ed2k URIs including file links, server links, and advanced features like AICH root hashes for corruption handling. , a multi-protocol P2P client, integrates ed2k URIs alongside support for networks like BitTorrent and Gnutella, enabling swarming downloads across protocols since version 2.5.30. Shareaza, a Windows-based multi-network client, historically provided robust ed2k URI parsing and eDonkey network compatibility, though its development has largely stalled after version 2.7.10.2, making it a legacy option for ed2k operations. Cross-platform implementations extend ed2k support beyond Windows. aMule serves as a fork of tailored for and macOS, maintaining full ed2k URI handling and AICH integration while adding Unix-specific features like remote GUI control. The original client, which was Windows-only and introduced the ed2k URI scheme, ceased operations in following legal settlements, but its legacy influenced subsequent open-source clients. Browser integration for ed2k URIs typically involves registering the scheme as a URI handler at the operating system level, allowing launching of compatible clients upon clicking a link. For instance, and Chrome can be configured to pass ed2k URIs to clients like eMule or via extensions or default application settings, though this requires manual setup such as editing browser configurations or installing handler tools. As of , eMule's latest is version 0.50a, with community mods providing updates up to versions like 0.70b; these continue to support all ed2k extensions such as sources specification and opaque keywords, ensuring compatibility with modern network conditions. However, browser support remains limited due to evolving security policies that restrict custom URI schemes to mitigate risks like unauthorized protocol execution.

Security Considerations and Legacy

The eD2k URI scheme, to the , susceptible to several vulnerabilities, particularly in its early implementations. One notable issue was the in clients prior to version 35.16.61, where crafted ed2k URIs containing overlong filenames (e.g., exceeding 247 bytes) could overwrite stack , leading to denial-of-service crashes or potential . This exploit, documented in CVE-2002-0967, was deliverable via hyperlinks in emails, web pages, or chat, exploiting the client's URI mechanism without requiring . Additionally, the reliance on the hash function for file identification exposed the network to collision attacks, allowing adversaries to generate distinct files with identical hashes since the algorithm's weaknesses were identified as early as 1991. These collisions facilitated fake-file attacks, where benign content could be distributed to most peers while malicious variants (e.g., containing branching or encrypted payloads) were selectively delivered to targets, undermining file integrity and enabling targeted malware distribution. Efficient practical collisions were demonstrated by 2005, amplifying risks in peer-to-peer environments like eD2k. To mitigate these risks, users are advised to enable protocol encryption for source connections, often via the 0x01 flag in eMule's extended protocol, which obfuscates traffic and reduces eavesdropping exposure. Verifying files against AICH (Advanced Intelligent Corruption Handler) root hashes, a SHA-1-based extension, provides an additional layer of integrity checking beyond MD4, detecting alterations from collisions or corruption during downloads—though it requires explicit enablement and is most effective when applied universally rather than selectively. Furthermore, connecting only to trusted servers minimizes man-in-the-middle (MITM) risks, as unverified servers could impersonate legitimate ones to intercept or alter file exchanges. By 2025, the ed2k URI scheme persists in a niche capacity primarily through the client, which connects tens of thousands of users to the eDonkey and networks for , though it represents a minor fraction of overall traffic dominated by more modern protocols. Operational servers such as Mazinga continue to support , maintaining of active peers and files as evidenced by updated server.met files. This enduring but usage stems from the scheme's specialized features like source exchange and systems, yet it has declined sharply since the 2005 shutdown of the service amid legal pressures from holders, including cease-and-desist actions by the (RIAA). The rise of starting in 2001 accelerated this decline, as its decentralized trackerless model and superior efficiency for large files captured the majority of P2P traffic, shifting user preferences away from server-dependent systems like ed2k. With no official development since the eDonkey shutdown, ed2k relies on community-maintained clients like eMule, limiting and adaptability to contemporary standards and legal landscapes.

References

  1. https://wiki.amule.org/wiki/MD4_hash
  2. https://wiki.amule.org/wiki/AICH
  3. https://wiki.amule.org/wiki/MlDonkey
Add your contribution
Related Hubs
User Avatar
No comments yet.