You can subscribe to this list here.
2006 |
Jan
|
Feb
(24) |
Mar
(9) |
Apr
(4) |
May
(7) |
Jun
(13) |
Jul
(19) |
Aug
(1) |
Sep
(12) |
Oct
(20) |
Nov
(1) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(6) |
Mar
(24) |
Apr
(1) |
May
(10) |
Jun
(30) |
Jul
(46) |
Aug
(20) |
Sep
(12) |
Oct
(27) |
Nov
(51) |
Dec
(58) |
2008 |
Jan
(40) |
Feb
(40) |
Mar
(78) |
Apr
(138) |
May
(4) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(2) |
Jul
(10) |
Aug
(1) |
Sep
(11) |
Oct
(31) |
Nov
(7) |
Dec
(1) |
2011 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
2013 |
Jan
(3) |
Feb
(5) |
Mar
(1) |
Apr
|
May
|
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2014 |
Jan
(2) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ul...@us...> - 2011-03-25 19:38:33
|
Revision: 80 http://adc.svn.sourceforge.net/adc/?rev=80&view=rev Author: ullner Date: 2011-03-25 19:38:27 +0000 (Fri, 25 Mar 2011) Log Message: ----------- Added Paths: ----------- trunk/Schemas/ Removed Paths: ------------- trunk/Schema/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2011-03-25 19:37:47
|
Revision: 79 http://adc.svn.sourceforge.net/adc/?rev=79&view=rev Author: ullner Date: 2011-03-25 19:37:40 +0000 (Fri, 25 Mar 2011) Log Message: ----------- Adding schema of files.xml Added Paths: ----------- trunk/Schema/ trunk/Schema/files.xml.xsd Added: trunk/Schema/files.xml.xsd =================================================================== --- trunk/Schema/files.xml.xsd (rev 0) +++ trunk/Schema/files.xml.xsd 2011-03-25 19:37:40 UTC (rev 79) @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:simpleType name="base32Binary"> + <xs:restriction base="xs:string"> + <xs:pattern value="[A-Za-z2-7]+"></xs:pattern> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="zeroOne"> + <xs:restriction base="xs:int"> + <xs:enumeration value="0"></xs:enumeration> + <xs:enumeration value="1"></xs:enumeration> + </xs:restriction> + </xs:simpleType> + + <xs:complexType name="ContainerType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:choice> + <xs:element ref="Directory"></xs:element> + <xs:element ref="File"></xs:element> + <xs:any processContents="lax"></xs:any> + </xs:choice> + </xs:sequence> + </xs:complexType> + + <xs:attribute name="Base" type="xs:string"></xs:attribute> + <xs:attribute name="CID" type="base32Binary"></xs:attribute> + <xs:attribute name="Generator" type="xs:string"></xs:attribute> + <xs:attribute name="Incomplete" type="zeroOne" default="0"></xs:attribute> + <xs:attribute name="Name" type="xs:string"></xs:attribute> + <xs:attribute name="Size" type="xs:int"></xs:attribute> + <xs:attribute name="Version" type="xs:int"></xs:attribute> + + <xs:element name="FileListing"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="ContainerType"> + <xs:attribute ref="CID" use="required"></xs:attribute> + <xs:attribute ref="Version" use="required"></xs:attribute> + <xs:attribute ref="Generator" use="optional"></xs:attribute> + <xs:attribute ref="Base" use="required"></xs:attribute> + <xs:anyAttribute processContents="lax"></xs:anyAttribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Directory"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="ContainerType"> + <xs:attribute ref="Name" use="required"></xs:attribute> + <xs:attribute ref="Incomplete" use="optional"></xs:attribute> + <xs:anyAttribute processContents="lax"></xs:anyAttribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="File"> + <xs:complexType> + <xs:sequence> + <xs:any minOccurs="0" maxOccurs="unbounded"></xs:any> + </xs:sequence> + <xs:attribute ref="Name" use="required"></xs:attribute> + <xs:attribute ref="Size" use="required"></xs:attribute> + <xs:anyAttribute processContents="lax"></xs:anyAttribute> + </xs:complexType> + </xs:element> + +</xs:schema> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2011-03-25 19:29:19
|
Revision: 78 http://adc.svn.sourceforge.net/adc/?rev=78&view=rev Author: ullner Date: 2011-03-25 19:29:13 +0000 (Fri, 25 Mar 2011) Log Message: ----------- Editorial updates. Modified Paths: -------------- trunk/ADC.txt Modified: trunk/ADC.txt =================================================================== --- trunk/ADC.txt 2011-01-02 12:44:39 UTC (rev 77) +++ trunk/ADC.txt 2011-03-25 19:29:13 UTC (rev 78) @@ -1,6 +1,6 @@ = ADC Protocol Fredrik Ullner <ul...@gm...> -1.0.2, January 2011 +1.0.2, March 2011 == Abstract ADC is a text protocol for a client-server network similar to Neo-Modus' @@ -23,7 +23,7 @@ The latest draft of the next version of this document as well as intermediate and older versions can be downloaded from $URL$. -This version correspods to $Revision$. +This version corresponds to $Revision$. === Version 1.0.2, UNRELEASED Fredrik Ullner <ul...@gm...> @@ -55,7 +55,7 @@ type. * Client addresses must be specified in dotted-decimal form ("x.x.x.x") for IPv4 and RFC 4291 form for IPv6. Hub addresses must be specified in URL - form, with "adc" as protocol specifier ("adc://server:port/" and "adc://[server]:port/" for IPv4 and IPv6 respectively). + form, with "adc" as protocol specifier ("adc://server:port/"). * Numbers are sent as strings in standard floating point notation, using '.' as the decimal separator and without a thousands separator. Integers are numbers with neither a decimal portion nor an exponent. Applications should @@ -252,6 +252,7 @@ <xs:complexContent> <xs:extension base="ContainerType"> <xs:attribute ref="Name" use="required"></xs:attribute> + <xs:attribute ref="Incomplete" use="optional"></xs:attribute> <xs:anyAttribute processContents="lax"></xs:anyAttribute> </xs:extension> </xs:complexContent> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2011-01-02 12:44:45
|
Revision: 77 http://adc.svn.sourceforge.net/adc/?rev=77&view=rev Author: ullner Date: 2011-01-02 12:44:39 +0000 (Sun, 02 Jan 2011) Log Message: ----------- Made editorial updates to the document. However, this should create a new version; 1.0.2. AS OF YET UNRELEASED! Check the diff to see the differences (the only "real" difference is the IPv6 RFC reference which is likely people have updated to anyway). It is possible this document contain a mismatch of CRLF/LF. Modified Paths: -------------- trunk/ADC.txt Modified: trunk/ADC.txt =================================================================== --- trunk/ADC.txt 2010-12-02 21:52:35 UTC (rev 76) +++ trunk/ADC.txt 2011-01-02 12:44:39 UTC (rev 77) @@ -1,6 +1,6 @@ = ADC Protocol -Jacek Sieka <arn...@gm...> -1.0.1, May 2008 +Fredrik Ullner <ul...@gm...> +1.0.2, January 2011 == Abstract ADC is a text protocol for a client-server network similar to Neo-Modus' @@ -14,9 +14,9 @@ this structure. ADC stands for anything you would like it to stand for; Advanced Direct Connect is the first neutral thing that springs to mind =). -Many ideas for the protocol come from Jan Vidar Krey's DCTNG draft. Major -contributors include Dustin Brody, Walter Doekes, Timmo Stange, Fredrik -Ullner, Fredrik Stenberg and others. Jon Hess contributed the original Direct +Many ideas for the protocol come from Jan Vidar Krey's DCTNG draft. Major +contributors include Dustin Brody, Walter Doekes, Timmo Stange, Fredrik +Ullner, Fredrik Stenberg and others. Jon Hess contributed the original Direct Connect idea through the Neo-Modus Direct Connect client / hub. == Version history @@ -25,16 +25,25 @@ $URL$. This version correspods to $Revision$. +=== Version 1.0.2, UNRELEASED +Fredrik Ullner <ul...@gm...> + +* Editorial updates + === Version 1.0.1, 2008-05-02 +Jacek Sieka <arn...@gm...> + * Moved extensions to a separate document * Moved specification to a separate project on SourceForge === Version 1.0, 2007-12-01 +Jacek Sieka <arn...@gm...> + * Initial release == Line protocol === General -* All messages begin with a four-letter word. The first letter designates how +* All messages begin with a four-letter word (FOURCC). The first letter designates how the message should be sent and the other three specify what to do. * Parameters are separated by space and a newline (codepoint 0x0a) ends each message. The string "\s" escapes space, "\n" newline and "\\" backslash. @@ -45,8 +54,8 @@ invalid messages and should dispatch unknown messages according to their type. * Client addresses must be specified in dotted-decimal form ("x.x.x.x") for - IPv4 and RFC 1884 form for IPv6. Hub addresses must be specified in URL - form, with "adc" as protocol specifier ("adc://server:port/"). + IPv4 and RFC 4291 form for IPv6. Hub addresses must be specified in URL + form, with "adc" as protocol specifier ("adc://server:port/" and "adc://[server]:port/" for IPv4 and IPv6 respectively). * Numbers are sent as strings in standard floating point notation, using '.' as the decimal separator and without a thousands separator. Integers are numbers with neither a decimal portion nor an exponent. Applications should @@ -66,7 +75,7 @@ === Message syntax .................. message ::= message_body? eol -message_body ::= (b_message_header | cih_message_header | de_message_header | f_message_header | u_message_header | message_header) +message_body ::= (b_message_header | cih_message_header | de_message_header | f_message_header | u_message_header) (separator positional_parameter)* (separator named_parameter)* b_message_header ::= 'B' command_name separator my_sid cih_message_header ::= ('C' | 'I' | 'H') command_name @@ -101,17 +110,17 @@ message type only to aid in parsing the message and otherwise ignore it. The following message types are defined: -[separator="|"] -```_ -B | Broadcast | Hub must send message to all connected clients, including the sender of the message. -C | Client message | Clients must use this message type when communicating directly over TCP. -D | Direct message | The hub must send the message to the target_sid user. -E | Echo message | The hub must send the message to the target_sid user and the my_sid user. -F | Feature broadcast | The hub must send message to all clients that support both all required (+) and no excluded (-) features named. The feature name is matched against the corresponding SU field in INF sent by each client. -H | Hub message | Clients must use this message type when a message is intended for the hub only. -I | Info message | Hubs must use this message type when sending a message to a client that didn't come from another client. -U | UDP message | Clients must use this message type when communicating directly over UDP. -___ +[options="autowidth"] +|===== +|B |Broadcast |Hub must send message to all connected clients, including the sender of the message. +|C |Client message |Clients must use this message type when communicating directly over TCP. +|D |Direct message |The hub must send the message to the target_sid user. +|E |Echo message |The hub must send the message to the target_sid user and the my_sid user. +|F |Feature broadcast |The hub must send message to all clients that support both all required (+) and no excluded (-) features named. The feature name is matched against the corresponding SU field in INF sent by each client. +|H |Hub message |Clients must use this message type when a message is intended for the hub only. +|I |Info message |Hubs must use this message type when sending a message to a client that didn't come from another client. +|U |UDP message |Clients must use this message type when communicating directly over UDP. +|===== === Session hash Certain commands require the use of a hash function. The hash function used is @@ -298,6 +307,8 @@ unlisted items. "1" means the directory contains unlisted items, "0" that it does not. Incomplete="0" is the default and may thus be omitted. +"TTH" is used by the TIGR extension. + More information may be added to the file by extensions, but is not guaranteed to be interpreted by other clients. @@ -313,13 +324,13 @@ clients may support using the message in additional contexts as well. The context codes are as follows: -[separator="|"] -``_ -F | From hub (hub-client TCP) -T | To hub (hub-client TCP) -C | Between clients (client-client TCP) -U | Between clients (client-client UDP) -___ +[options="autowidth"] +|===== +|F |From hub (hub-client TCP) +|T |To hub (hub-client TCP) +|C |Between clients (client-client TCP) +|U |Between clients (client-client UDP) +|===== When requesting a new client-client connection, this protocol is identified by "ADC/1.0". @@ -355,47 +366,47 @@ Severity values: -[separator="|"] -``_ -0 | Success (used for confirming commands), error code must be "00", and an additional flag "FC" contains the FOURCC of the command being confirmed if applicable. -1 | Recoverable (error but no disconnect) -2 | Fatal (disconnect) -___ +[options="autowidth"] +|===== +|0 |Success (used for confirming commands), error code must be "00", and an additional flag "FC" contains the FOURCC of the command being confirmed if applicable. +|1 |Recoverable (error but no disconnect) +|2 |Fatal (disconnect) +|===== Error codes: -[separator="|"] -``_ -00 | Generic, show description -x0 | Same as 00, but categorized according to the rough structure set below -10 | Generic hub error -11 | Hub full -12 | Hub disabled -20 | Generic login/access error -21 | Nick invalid -22 | Nick taken -23 | Invalid password -24 | CID taken -25 | Access denied, flag "FC" is the FOURCC of the offending command. Sent when a user is not allowed to execute a particular command -26 | Registered users only -27 | Invalid PID supplied -30 | Kicks/bans/disconnects generic -31 | Permanently banned -32 | Temporarily banned, flag "TL" is an integer specifying the number of seconds left until it expires (This is used for kick as well…). -40 | Protocol error -41 | Transfer protocol unsupported, flag "TO" the token, flag "PR" the protocol string. The client receiving a CTM or RCM should send this if it doesn't support the C-C protocol. -42 | Direct connection failed, flag "TO" the token, flag "PR" the protocol string. The client receiving a CTM or RCM should send this if it tried but couldn't connect. -43 | Required INF field missing/bad, flag "FM" specifies missing field, "FB" specifies invalid field. -44 | Invalid state, flag "FC" the FOURCC of the offending command. -45 | Required feature missing, flag "FC" specifies the FOURCC of the missing feature. -46 | Invalid IP supplied in INF, flag "I4" or "I6" specifies the correct IP. -47 | No hash support overlap in SUP between client and hub. -50 | Client-client / file transfer error -51 | File not available -52 | File part not available -53 | Slots full -54 | No hash support overlap in SUP between clients. -___ +[options="autowidth"] +|===== +|00 |Generic, show description +|x0 |Same as 00, but categorized according to the rough structure set below +|10 |Generic hub error +|11 |Hub full +|12 |Hub disabled +|20 |Generic login/access error +|21 |Nick invalid +|22 |Nick taken +|23 |Invalid password +|24 |CID taken +|25 |Access denied, flag "FC" is the FOURCC of the offending command. Sent when a user is not allowed to execute a particular command +|26 |Registered users only +|27 |Invalid PID supplied +|30 |Kicks/bans/disconnects generic +|31 |Permanently banned +|32 |Temporarily banned, flag "TL" is an integer specifying the number of seconds left until it expires (This is used for kick as well…). +|40 |Protocol error +|41 |Transfer protocol unsupported, flag "TO" the token, flag "PR" the protocol string. The client receiving a CTM or RCM should send this if it doesn't support the C-C protocol. +|42 |Direct connection failed, flag "TO" the token, flag "PR" the protocol string. The client receiving a CTM or RCM should send this if it tried but couldn't connect. +|43 |Required INF field missing/bad, flag "FM" specifies missing field, "FB" specifies invalid field. +|44 |Invalid state, flag "FC" the FOURCC of the offending command. +|45 |Required feature missing, flag "FC" specifies the FOURCC of the missing feature. +|46 |Invalid IP supplied in INF, flag "I4" or "I6" specifies the correct IP. +|47 |No hash support overlap in SUP between client and hub. +|50 |Client-client / file transfer error +|51 |File not available +|52 |File part not available +|53 |Slots full +|54 |No hash support overlap in SUP between clients. +|===== Description: Description of the error, suitable for viewing directly by the user @@ -467,36 +478,35 @@ Fields: -[separator="|"] -```_ -Code | Type | Description -___ -ID | base32 | The CID of the client. Mandatory for C-C connections. -PD | base32 | The PID of the client. Hubs must check that the hash(PID) == CID and then discard the field before broadcasting it to other clients. Must not be sent in C-C connections. -I4 | IPv4 | IPv4 address without port. A zero address (0.0.0.0) means that the server should replace it with the real IP of the client. Hubs must check that a specified address corresponds to what the client is connecting from to avoid DoS attacks and only allow trusted clients to specify a different address. Clients should use the zero address when connecting, but may opt not to do so at the user's discretion. Any client that supports incoming TCPv4 connections must also add the feature TCP4 to their SU field. -I6 | IPv6 | IPv6 address without port. A zero address (::) means that the server should replace it with the IP of the client. Any client that supports incoming TCPv6 connections must also add the feature TCP6 to their SU field. -U4 | integer | Client UDP port. Any client that supports incoming UDPv4 packets must also add the feature UDP4 to their SU field. -U6 | integer | Same as U4, but for IPv6. Any client that supports incoming UDPv6 packets must also add the feature UDP6 to their SU field. -SS | integer | Share size in bytes -SF | integer | Number of shared files -VE | string | Client identification, version (client-specific, a short identifier then a dotted version number is recommended) -US | integer | Maximum upload speed, bytes/second -DS | integer | Maximum download speed, bytes/second -SL | integer | Maximum simultaneous upload connections (slots) -AS | integer | Automatic slot allocator speed limit, bytes/sec. The client keeps opening slots as long as its total upload speed doesn't exceed this value. -AM | integer | Minimum simultaneous upload connectins in automatic slot manager mode -EM | string | E-mail address -NI | string | Nickname (or hub name). The hub must ensure that this is unique in the hub up to case-sensitivity. Valid are all characters in the Unicode character set with code point above 32, although hubs may limit this further as they like with an appropriate error message. -DE | string | Description. Valid are all characters in the Unicode character set with code point equal to or greater than 32. -HN | integer | Hubs where user is a normal user and in NORMAL state -HR | integer | Hubs where user is registered (had to supply password) and in NORMAL state -HO | integer | Hubs where user is op and in NORMAL state -TO | string | Token, as received in RCM/CTM, when establishing a C-C connection. -CT | integer | Client (user) type, 1=bot, 2=registered user, 4=operator, 8=super user, 16=hub owner, 32=hub (used when the hub sends an INF about itself). Multiple types are specified by adding the numbers together. -AW | integer | 1=Away, 2=Extended away, not interested in hub chat (hubs may skip sending broadcast type MSG commands to clients with this flag) -SU | string | Comma-separated list of feature FOURCC's. This notifies other clients of extended capabilities of the connecting client. -RF | string | URL of referer (hub in case of redirect, web page) -___ +[options="autowidth,header"] +|===== +|Code |Type |Description +|ID |base32 |The CID of the client. Mandatory for C-C connections. +|PD |base32 |The PID of the client. Hubs must check that the hash(PID) == CID and then discard the field before broadcasting it to other clients. Must not be sent in C-C connections. +|I4 |IPv4 |IPv4 address without port. A zero address (0.0.0.0) means that the server should replace it with the real IP of the client. Hubs must check that a specified address corresponds to what the client is connecting from to avoid DoS attacks and only allow trusted clients to specify a different address. Clients should use the zero address when connecting, but may opt not to do so at the user's discretion. Any client that supports incoming TCPv4 connections must also add the feature TCP4 to their SU field. +|I6 |IPv6 |IPv6 address without port. A zero address (::) means that the server should replace it with the IP of the client. Any client that supports incoming TCPv6 connections must also add the feature TCP6 to their SU field. +|U4 |integer |Client UDP port. Any client that supports incoming UDPv4 packets must also add the feature UDP4 to their SU field. +|U6 |integer |Same as U4, but for IPv6. Any client that supports incoming UDPv6 packets must also add the feature UDP6 to their SU field. +|SS |integer |Share size in bytes +|SF |integer |Number of shared files +|VE |string |Client identification, version (client-specific, a short identifier then a dotted version number is recommended) +|US |integer |Maximum upload speed, bytes/second +|DS |integer |Maximum download speed, bytes/second +|SL |integer |Maximum simultaneous upload connections (slots) +|AS |integer |Automatic slot allocator speed limit, bytes/sec. The client keeps opening slots as long as its total upload speed doesn't exceed this value. +|AM |integer |Minimum simultaneous upload connectins in automatic slot manager mode +|EM |string |E-mail address +|NI |string |Nickname (or hub name). The hub must ensure that this is unique in the hub up to case-sensitivity. Valid are all characters in the Unicode character set with code point above 32, although hubs may limit this further as they like with an appropriate error message. +|DE |string |Description. Valid are all characters in the Unicode character set with code point equal to or greater than 32. +|HN |integer |Hubs where user is a normal user and in NORMAL state +|HR |integer |Hubs where user is registered (had to supply password) and in NORMAL state +|HO |integer |Hubs where user is op and in NORMAL state +|TO |string |Token, as received in RCM/CTM, when establishing a C-C connection. +|CT |integer |Client (user) type, 1=bot, 2=registered user, 4=operator, 8=super user, 16=hub owner, 32=hub (used when the hub sends an INF about itself). Multiple types are specified by adding the numbers together. +|AW |integer |1=Away, 2=Extended away, not interested in hub chat (hubs may skip sending broadcast type MSG commands to clients with this flag) +|SU |string |Comma-separated list of feature FOURCC's. This notifies other clients of extended capabilities of the connecting client. +|RF |string |URL of referrer (hub in case of redirect, web page) +|===== NOTE: Normally one would only accept an IP (I4 or I6) that is the same as the source IP of the connecting peer. Use caution when accepting unknown IPs. Only @@ -525,11 +535,11 @@ Flags: -[separator="|"] -``_ -PM<group-SID> | Private message, <group-SID> is the SID clients must send responses to. This field must contain the originating SID if this is a normal private conversation. -ME | 1 = message should be displayed as /me in IRC ("*nick text") -___ +[options="autowidth"] +|===== +|PM<group-SID> |Private message, <group-SID> is the SID clients must send responses to. This field must contain the originating SID if this is a normal private conversation. +|ME |Speak in third person, 1 = message should be displayed as /me in IRC ("*nick text") +|===== ==== SCH SCH @@ -542,15 +552,15 @@ unless no known fields are present in which case the client must ignore the search. -[separator="|"] -``_ -AN, NO, EX | String search term, where AN is include (and), NO is exclude (and not), and EX is extension. Each filename (including the path to it) should be matched using case insensitive substring search as follows: match all AN, remove those that match any NO, and make sure the extension matches at least one of the EX (if it is present). Extensions must be sent without the leading '.'. -LE | Smaller (less) than or equal size in bytes -GE | Larger (greater) than or equal size in bytes -EQ | Exact size in bytes -TO | Token, string. Used by the client to tell one search from the other. If present, the responding client must copy this field to each search result. -TY | File type, to be chosen from the following (none specified = any type): 1 = File, 2 = Directory -___ +[options="autowidth"] +|===== +|AN, NO, EX |String search term, where AN is include (and), NO is exclude (and not), and EX is extension. Each filename (including the path to it) should be matched using case insensitive substring search as follows: match all AN, remove those that match any NO, and make sure the extension matches at least one of the EX (if it is present). Extensions must be sent without the leading period (\'.'). +|LE |Smaller (less) than or equal size in bytes +|GE |Larger (greater) than or equal size in bytes +|EQ |Exact size in bytes +|TO |Token, string. Used by the client to tell one search from the other. If present, the responding client must copy this field to each search result. +|TY |File type, to be chosen from the following (none specified = any type): 1 = File, 2 = Directory +|===== Searching by UDP is subject to IP spoofing; can thus be used to initiate a DoS attack. Clients should only accept incoming UDP searches in a trusted @@ -566,13 +576,13 @@ encouraged to supply additional fields if available. Passive results should be limited to 5 and active to 10. -[separator="|"] -``_ -FN | Full filename including path in share -SI | Size, in bytes -SL | Slots currently available -TO | Token -___ +[options="autowidth"] +|===== +|FN |Full filename including path in share +|SI |Size, in bytes +|SL |Slots currently available +|TO |Token +|===== ==== CTM CTM protocol separator port separator token @@ -632,14 +642,14 @@ The following flags may be present: -[separator="|"] -``_ -ID | SID of the initiator of the disconnect (for example the one that issued a kick). -TL | Time Left until reconnect is allowed, in seconds. -1 = forever. -MS | Message. -RD | Redirect server URL. -DI | Any client that has this flag in the QUI message should have its transfers terminated by other clients connected to it, as it is unwanted in the system. -___ +[options="autowidth"] +|===== +|ID |SID of the initiator of the disconnect (for example the one that issued a kick). +|TL |Time Left until reconnect is allowed, in seconds. -1 = forever. +|MS |Message. +|RD |Redirect server URL. +|DI |Any client that has this flag in the QUI message should have its transfers terminated by other clients connected to it, as it is unwanted in the system. +|===== ==== GET GET type identifier start_pos bytes @@ -695,36 +705,34 @@ == Examples === Client – Hub connection -[separator="|"] -``_ -Client | Hub -___ -HSUP ADBASE ADTIGR ... | - | ISUP ADBASE ADTIGR ... - | ISID <client-sid> - | IINF HU1 HI1 ... -BINF <my-sid> ID... PD... | - | IGPA ... -HPAS ... | - | BINF <all clients> - | BINF <Client-SID> -... | ... -___ +[options="autowidth,header"] +|===== +|Client |Hub +|HSUP ADBASE ADTIGR ...| +| |ISUP ADBASE ADTIGR ... +| |ISID <client-sid> +| |IINF CT32 ... +|BINF <my-sid> ID... PD... | +| |IGPA ... +|HPAS ... | +| |BINF <all clients> +| |BINF <Client-SID> +|... |... +|===== === Client – Client connection -[separator="|"] -``_ -Client | Server -___ -CSUP ADBASE ADTIGR ... | - | CSUP ADBASE ADTIGR ... - | CINF IDxxx -CINF IDxxx TO<token> | - | CGET ... -CSND ... | -<data> | -___ +[options="autowidth,header"] +|===== +|Client |Server +|CSUP ADBASE ADTIGR ... | +| |CSUP ADBASE ADTIGR ... +| |CINF IDxxx +|CINF IDxxx TO<token> | +| |CGET ... +|CSND ... | +|<data> | +|===== == Standard Extensions This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-12-02 21:52:41
|
Revision: 76 http://adc.svn.sourceforge.net/adc/?rev=76&view=rev Author: ullner Date: 2010-12-02 21:52:35 +0000 (Thu, 02 Dec 2010) Log Message: ----------- Added command parsing for BASE in Python. Added Paths: ----------- trunk/Source/Python/AdcCommand.py Added: trunk/Source/Python/AdcCommand.py =================================================================== --- trunk/Source/Python/AdcCommand.py (rev 0) +++ trunk/Source/Python/AdcCommand.py 2010-12-02 21:52:35 UTC (rev 76) @@ -0,0 +1,246 @@ +import unicodedata + +def escape(line): + line = line.replace('\\', "\\") + line = line.replace('\n', "\\n") + line =line.replace(' ', '\s') + return line + +def unescape(line): + line = line.replace('\\\\', "\\") + line = line.replace('\\n', "\n") + line =line.replace('\s', ' ') + return line + +class ParseError(Exception): + pass + +class AdcCommand(object): + + #Priorities + PRIORITY_NORMAL = 0 + PRIORITY_LOW = 1 + PRIORITY_IGNORE = 2 + PRIORITY_HIGH = 3 + + #Severities + SEV_SUCSESS=0 + SEV_RECOVERABLE=1 + SEV_FATAL = 2 + + #Codes + SUCCESS = 0 + ERROR_GENERIC = 0 + ERROR_HUB_GENERIC = 10 + ERROR_HUB_FULL = 11 + ERROR_HUB_DISABLED = 12 + ERROR_LOGIN_GENERIC = 20 + ERROR_NICK_INVALID = 21 + ERROR_NICK_TAKEN = 22 + ERROR_BAD_PASSWORD = 23 + ERROR_CID_TAKEN = 24 + ERROR_COMMAND_ACCESS = 25 + ERROR_REGGED_ONLY = 26 + ERROR_INVALID_PID = 27 + ERROR_BANNED_GENERIC = 30 + ERROR_PERM_BANNED = 31 + ERROR_TEMP_BANNED = 32 + ERROR_PROTOCOL_GENERIC = 40 + ERROR_PROTOCOL_UNSUPPORTED = 41 + ERROR_CONNECT_FAILED = 42 + ERROR_INF_MISSING = 43 + ERROR_BAD_STATE = 44 + ERROR_FEATURE_MISSING = 45 + ERROR_BAD_IP = 46 + ERROR_NO_HUB_HASH = 47 + ERROR_TRANSFER_GENERIC = 50 + ERROR_FILE_NOT_AVAILABLE = 51 + ERROR_FILE_PART_NOT_AVAILABLE = 52 + ERROR_SLOTS_FULL = 53 + ERROR_NO_CLIENT_HASH = 54 + + #Command names + CMD_MSG = 'MSG' + CMD_INF = 'INF' + CMD_SID = 'SID' + CMD_SUP = 'SUP' + CMD_STA = 'STA' + CMD_SCH = 'SCH' + CMD_RES = 'RES' + CMD_CTM = 'CTM' + CMD_RCM = 'RCM' + CMD_GPA = 'GPA' + CMD_PAS = 'PAS' + CMD_QUI = 'QUI' + CMD_GET = 'GET' + CMD_GFI = 'GFI' + CMD_SND = 'SND' + CMD_CMD = 'CMD' + + #Command types + + TYPE_BROADCAST = 'B' + TYPE_CLIENT = 'C' + TYPE_DIRECT = 'D' + TYPE_ECHO = 'E' + TYPE_FEATURE = 'F' + TYPE_INFO = 'I' + TYPE_HUB = 'H' + TYPE_UDP = 'U' + ctypes = [TYPE_BROADCAST , TYPE_CLIENT , TYPE_DIRECT, TYPE_ECHO , + TYPE_FEATURE , TYPE_INFO ,TYPE_HUB ,TYPE_UDP ] + + HUB_SID = 0xffffffff + + + + @staticmethod + def parse(line, a=None): + if not a: + a = AdcCommand() + + if line.length() <4: + + raise ParseError('Command too short', line) + + params = line.split(' ') + + FCC = params.pop(0) + if FCC.length() != 4: + raise ParseError('Invalid fourcc') + + ctype = a.ctype = FCC[0] + cmd = a.command = FCC[1:4] + + if ctype not in a.ctypes: + raise ParseError('Unknown ctype ' +line) + + if ctype == a.TYPE_INFO: + a.source = a.HUB_SID + + if ctype in (a.TYPE_BROADCAST,a.TYPE_DIRECT,a.TYPE_ECHO,a.TYPE_FEATURE, a.TYPE_UDP): + sid = params.pop(0) + if sid.length() != 4: + raise ParseError('Invalid SID length %s' % sid) + a.source = sid + + if ctype in (a.TYPE_DIRECT,a.TYPE_ECHO): + sid = params.pop(0) + if sid.length() != 4: + raise ParseError('Invalid SID length %s' % sid) + a.target = sid + + if ctype == a.TYPE_FEATURE: + a.features = params.pop(0) + if len(a.features) != 5: + raise ParseError('Invalid feature length %s' % a.feature) + + if cmd == a.CMD_STA: + xyy = params.pop(0) + a.severity = int(xyy[0]) + a.code = int(xyy[1:2]) + + for p in params: + a.params.append(unescape(p)) + + return a + + + + + + def __init__(self, *args, **kwargs): + self.ctype = kwargs.get('ctype', '') + self.command =kwargs.get('command', '') + self.source = kwargs.get('source', '') + self.target = kwargs.get('target','') + self.severity = kwargs.get('severity', 0) + self.code = kwargs.get('code', 0) + self.priority = kwargs.get('priority', 0) + self.message = kwargs.get('message', '') + self.params = kwargs.get('params', []) + self.features = kwargs.get('features', '') + if len(args) == 1: + AdcCommand.parse(QString(args[0]), self) + if len(args) >= 2: + self.ctype = args[1] + self.command = args[0] + if len(args) == 3: + self.source = args[2] + + def setTo(self, sid): + self.target = sid + + def getIndex(self, index): + if len(self.params) >= index+1: + return self.params[index] + + def getParam(self, key): + for param in self.params: + if param[:2] == key: + return param[2:] + + def getParameters(self): + return list(self.params) + + def getType(self): + return self.ctype + + def getCommand(self): + return self.command + + def getBuffer(self): + line = AdcCommand.toString(self, True) + line +=chr(0x0a) + + return unicodedata.normalize('NFC', line) + + def getFCC(self): + return self.ctype+self.command + + def addParam(self, param='',val =None): + if val: + self.params.append(param+val) + else: + self.params.append(param) + return self + + def addParams(self, params): + if params: + self.params += params + return self + + def delParam(self, key): + for param in self.params: + if param[:2] == key: + self.params.removeAt(self.params.indexOf(param)) + return + + def toString(self, esc=False): + ret = self.getFCC() + if self.ctype in (self.TYPE_BROADCAST,self.TYPE_DIRECT,self.TYPE_ECHO,self.TYPE_FEATURE, self.TYPE_UDP): + ret += ' ' + self.source + + if self.ctype in (self.TYPE_DIRECT,self.TYPE_ECHO): + ret += ' ' + self.target + + if self.ctype == self.TYPE_FEATURE: + ret+= ' ' + self.features + + if self.ctype is self.TYPE_INFO: + if self.command is self.CMD_STA: + ret += ' ' + ret+= str(self.severity*100+self.code) if self.severity else '000' + + for p in self.params: + ret += ' ' + if esc: + ret += escape(p) + + else: + ret += p + return ret + + +if __name__ == '__main__': + pass \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-11-30 18:59:06
|
Revision: 75 http://adc.svn.sourceforge.net/adc/?rev=75&view=rev Author: ullner Date: 2010-11-30 18:59:00 +0000 (Tue, 30 Nov 2010) Log Message: ----------- Added Python implementation for base32. Added Paths: ----------- trunk/Source/Python/base32.py Added: trunk/Source/Python/base32.py =================================================================== --- trunk/Source/Python/base32.py (rev 0) +++ trunk/Source/Python/base32.py 2010-11-30 18:59:00 UTC (rev 75) @@ -0,0 +1,10 @@ +1.#!/usr/bin/python +2. +3.import base64 +4. +5.def toBase32(s): +6. return base64.b32encode(s).strip('=') +7. +8.def fromBase32(base32): +9. base32+= (8-len(base32) %8)*'=' +10. return base64.b32decode(base32) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-11-30 18:54:42
|
Revision: 74 http://adc.svn.sourceforge.net/adc/?rev=74&view=rev Author: ullner Date: 2010-11-30 18:54:36 +0000 (Tue, 30 Nov 2010) Log Message: ----------- Modified Paths: -------------- trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.vcproj Modified: trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.vcproj =================================================================== --- trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.vcproj 2010-11-30 18:52:40 UTC (rev 73) +++ trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.vcproj 2010-11-30 18:54:36 UTC (rev 74) @@ -184,10 +184,6 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > <File - RelativePath=".\AssemblyInfo.cpp" - > - </File> - <File RelativePath=".\Stdafx.cpp" > <FileConfiguration @@ -207,6 +203,10 @@ /> </FileConfiguration> </File> + <File + RelativePath="..\Tiger.cpp" + > + </File> </Filter> <Filter Name="Header Files" @@ -225,6 +225,10 @@ RelativePath=".\Stdafx.h" > </File> + <File + RelativePath="..\Tiger.h" + > + </File> </Filter> <Filter Name="Resource Files" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-11-30 18:52:47
|
Revision: 73 http://adc.svn.sourceforge.net/adc/?rev=73&view=rev Author: ullner Date: 2010-11-30 18:52:40 +0000 (Tue, 30 Nov 2010) Log Message: ----------- Minor update to templates.. Modified Paths: -------------- trunk/Templates/ADCMessages.xml trunk/Templates/ADCTemplate.cs Modified: trunk/Templates/ADCMessages.xml =================================================================== --- trunk/Templates/ADCMessages.xml 2010-11-29 19:18:17 UTC (rev 72) +++ trunk/Templates/ADCMessages.xml 2010-11-30 18:52:40 UTC (rev 73) @@ -47,8 +47,8 @@ <namedParameter name="Protocol" id="PR" type="string" description="" /> <namedParameter name="MissingField" id="FM" type="string" description="" /> <namedParameter name="InvalidField" id="FB" type="string" description="" /> - <namedParameter name="IPv4Address" id="I4" type="IPAddress" description="" /> - <namedParameter name="IPv6Address" id="I6" type="IPAddress" description="" /> + <namedParameter name="IPv4Address" id="I4" type="IPv4Address" description="" /> + <namedParameter name="IPv6Address" id="I6" type="IPv6Address" description="" /> <namedParameter name="ReferenceAddress" id="RF" type="string" description="" extension="1" /> </namedParameters> </command> Modified: trunk/Templates/ADCTemplate.cs =================================================================== --- trunk/Templates/ADCTemplate.cs 2010-11-29 19:18:17 UTC (rev 72) +++ trunk/Templates/ADCTemplate.cs 2010-11-30 18:52:40 UTC (rev 73) @@ -7,7 +7,7 @@ /// <summary> /// !(COMMAND_DESCRIPTION) /// </summary> - public class !(COMMAND_NAME) + public class !(COMMAND_NAME) : ADCCommand { #region Constants @@ -53,7 +53,7 @@ set; } /// END FOR EACH POSITIONAL_PARAMETER - /// + #endregion #region Named parameters @@ -75,16 +75,13 @@ public !(COMMAND_NAME)() { - /// START FOR EACH PARAMETER_LIST - !(PARAMETER_NAME) = !(REPLACE_INITIALIZE_VALUE); - /// END FOR EACH PARAMETER_LIST } #endregion #region Methods - /// START FOR EACH PARAMETER_LIST + /// START FOR EACH POSITIONAL_PARAMETERS /// <summary> /// /// </summary> @@ -94,23 +91,42 @@ return message; } - /// END FOR EACH PARAMETER_LIST + /// END FOR EACH POSITIONAL_PARAMETERS + /// START FOR EACH NAMED_PARAMETERS + /// <summary> + /// + /// </summary> + public string Get!(PARAMETER_NAME)Value() + { + string message = "!(PARAMETER_ID)" + !(REPLACE_VALUE); + + return message; + } + /// END FOR EACH NAMED_PARAMETERS + #endregion + #region Base class overrides + + public override string CommandName + { + get { return "!(COMMAND_ID)"; } + } + /// <summary> /// /// </summary> - public string ConstructMessage() + public override string ConstructMessage() { string message = ""; // Positional parameters /// START FOR EACH POSITIONAL_PARAMETERS - if (!(PARAMETER_NAME) == null) + if (!(PARAMETER_NAME) == !(PARAMETER_NULL_VALUE)) { - throw new Exception("!(PARAMETER_NAME) cannot be null!"); + throw new Exception("!(PARAMETER_NAME) cannot be !(PARAMETER_NULL_VALUE)!"); } message += SEPARATOR; @@ -120,7 +136,7 @@ // Named parameters /// START FOR EACH NAMED_PARAMETERS - if (!(PARAMETER_NAME) != null) + if (!(PARAMETER_NAME) != !(PARAMETER_NULL_VALUE)) { message += SEPARATOR; message += Get!(PARAMETER_NAME)Value(); @@ -130,5 +146,7 @@ message = message.Substring(1); return message; } + + #endregion } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-11-29 19:18:23
|
Revision: 72 http://adc.svn.sourceforge.net/adc/?rev=72&view=rev Author: ullner Date: 2010-11-29 19:18:17 +0000 (Mon, 29 Nov 2010) Log Message: ----------- Fix bad lines in history. Modified Paths: -------------- trunk/ADC-EXT.txt Modified: trunk/ADC-EXT.txt =================================================================== --- trunk/ADC-EXT.txt 2010-11-29 19:11:45 UTC (rev 71) +++ trunk/ADC-EXT.txt 2010-11-29 19:18:17 UTC (rev 72) @@ -16,25 +16,30 @@ === Version 1.0 Jacek Sieka <arn...@gm...>, 2008-05-02 + * Initial release created from original ADC 1.0 text. * Added 'PING' extension for hub pingers. === Version 1.0.1 Fredrik Ullner <ul...@gm...>, 2009-08-04 + * Added timestamp field to MSG. * Added 'DFAV' extension for distributing hub addresses. === Version 1.0.2 Fredrik Ullner <ul...@gm...>, 2010-04-04 + * Added 'UCMD' extension for user commands. === Version 1.0.3 Fredrik Ullner <ul...@gm...>, 2010-05-26 + * Removed optional keywords from UCMD. * Added 'BLOM' extension for bloom filters. === Version 1.0.4 Fredrik Ullner <ul...@gm...>, 2010-06-29 + * Added magnet link extension to UCMD. * Added NAT traversal extension 'NATT'. * Added referral field to STA. @@ -43,6 +48,7 @@ === Version 1.0.5 Fredrik Ullner <ul...@gm...>, 2010-09-16 + * Added locale field to INF. * Modified user parameter 'line' in UCMD to handle multiple inputs. * Added hidden in enumeration of CT field in INF. @@ -50,6 +56,7 @@ === Version 1.0.6 Fredrik Ullner <ul...@gm...>, 2010-09-29 + * Added 'KEYP' extension for providing certificate substitution protection in ADCS. * Added note to signal DFAV. * Added 'SUDP' extension for encryption of UDP traffic. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-11-29 19:11:51
|
Revision: 71 http://adc.svn.sourceforge.net/adc/?rev=71&view=rev Author: ullner Date: 2010-11-29 19:11:45 +0000 (Mon, 29 Nov 2010) Log Message: ----------- Pushing ADC-Ext 1.0.6 * Added 'KEYP' extension for providing certificate substitution protection in ADCS. * Added note to signal DFAV. * Added 'SUDP' extension for encryption of UDP traffic. * Added 'TYPE' extension for chat state notifications. * Added 'FEED' extension for RSS feeds. * Added 'SEGA' extension for grouping of file extensions in SCH. * Added failover hub addresses to the hub's INF. * Added free slots to the client's INF. * Added 'ADCS' extension for encryption in ADC. Modified Paths: -------------- trunk/ADC-EXT.txt Modified: trunk/ADC-EXT.txt =================================================================== --- trunk/ADC-EXT.txt 2010-11-27 23:00:48 UTC (rev 70) +++ trunk/ADC-EXT.txt 2010-11-29 19:11:45 UTC (rev 71) @@ -48,7 +48,8 @@ * Added hidden in enumeration of CT field in INF. * Added error code Invalid feature in STA. -=== Version 1.0.6 UNRELEASED +=== Version 1.0.6 +Fredrik Ullner <ul...@gm...>, 2010-09-29 * Added 'KEYP' extension for providing certificate substitution protection in ADCS. * Added note to signal DFAV. * Added 'SUDP' extension for encryption of UDP traffic. @@ -673,7 +674,7 @@ [options="autowidth"] |===== |1 |Audio |APE, FLAC, M4A, MID, MP3, MPC, OGG, RA, WAV, WMA -|2 |Compressed |7Z, ACE, ARJ, BZ2, LHA, LZH, RAR, TAR, TZ, Z, ZIP +|2 |Compressed |7Z, ACE, ARJ, BZ2, GZ, LHA, LZH, RAR, TAR, TZ, Z, ZIP |4 |Document |DOC, DOCX, HTM, HTML, NFO, ODF, ODP, ODS, ODT, PDF, PPT, PPTX, RTF, TXT, XLS, XLSX, XML, XPS |8 |Executable |APP, BAT, CMD, COM, DLL, EXE, JAR, MSI, PS1, VBS, WSF |16 |Picture |BMP, CDR, EPS, GIF, ICO, IMG, JPEG, JPG, PNG, PS, PSD, SFW, TGA, TIF, WEBP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-11-27 23:00:54
|
Revision: 70 http://adc.svn.sourceforge.net/adc/?rev=70&view=rev Author: ullner Date: 2010-11-27 23:00:48 +0000 (Sat, 27 Nov 2010) Log Message: ----------- ADCS... Fixes and changes here and there... Modified Paths: -------------- trunk/ADC-EXT.txt Modified: trunk/ADC-EXT.txt =================================================================== --- trunk/ADC-EXT.txt 2010-11-23 22:55:47 UTC (rev 69) +++ trunk/ADC-EXT.txt 2010-11-27 23:00:48 UTC (rev 70) @@ -1,6 +1,6 @@ = ADC Extensions Fredrik Ullner <ul...@gm...> -1.0.6, October 2010 +1.0.6, November 2010 == Abstract These are the official extensions to ADC. This document is based on the @@ -15,21 +15,26 @@ This version corresponds to $Revision$. === Version 1.0 +Jacek Sieka <arn...@gm...>, 2008-05-02 * Initial release created from original ADC 1.0 text. * Added 'PING' extension for hub pingers. === Version 1.0.1 +Fredrik Ullner <ul...@gm...>, 2009-08-04 * Added timestamp field to MSG. * Added 'DFAV' extension for distributing hub addresses. === Version 1.0.2 +Fredrik Ullner <ul...@gm...>, 2010-04-04 * Added 'UCMD' extension for user commands. === Version 1.0.3 +Fredrik Ullner <ul...@gm...>, 2010-05-26 * Removed optional keywords from UCMD. * Added 'BLOM' extension for bloom filters. === Version 1.0.4 +Fredrik Ullner <ul...@gm...>, 2010-06-29 * Added magnet link extension to UCMD. * Added NAT traversal extension 'NATT'. * Added referral field to STA. @@ -37,6 +42,7 @@ * Added partial file sharing extension 'PFSR'. === Version 1.0.5 +Fredrik Ullner <ul...@gm...>, 2010-09-16 * Added locale field to INF. * Modified user parameter 'line' in UCMD to handle multiple inputs. * Added hidden in enumeration of CT field in INF. @@ -48,9 +54,10 @@ * Added 'SUDP' extension for encryption of UDP traffic. * Added 'TYPE' extension for chat state notifications. * Added 'FEED' extension for RSS feeds. -* Added grouping of file extensions to SCH. +* Added 'SEGA' extension for grouping of file extensions in SCH. * Added failover hub addresses to the hub's INF. * Added free slots to the client's INF. +* Added 'ADCS' extension for encryption in ADC. == Extensions @@ -376,7 +383,7 @@ === NATT - NAT traversal NAT traversal allow two passive clients to connect to each other. For more information about NAT traversal, see https://dcpp.wordpress.com/2010/02/13/passive-mode-c-c-connections-and-nat-traversal[Passive Mode C-C Connections and NAT Traversal]. -If a client does not support TCP4 or TCP6, it will send an RCM to the client it is trying to connect to. If the other client also doesn't support TCP4 (or TCP6 correspondingly), NAT traversal may instead be used. The feature should be signalled in SUP as NATT. +If a client does not support TCP4 or TCP6, it will send an RCM to the client it is trying to connect to. If the other client also doesn't support TCP4 (or TCP6 correspondingly), NAT traversal may instead be used. Signal NATT in the INF's SU field. Do note that the hub must forward I4 or I6 for respective clients' INF. @@ -503,7 +510,7 @@ |48 |Invalid feature. Flag "FC" is the FOURCC of the invalid feature(s). If multiple features are invalid, use comma between the features (i.e. FCQWER,ASDF,ZXCV). |===== -=== KEYP - Certificate substitution protection in ADCS (Secure ADC) +=== KEYP - Certificate substitution protection in conjunction with ADCS This extension adds a simple, but secure way to protect against man-in-the-middle attacks against ADC when wrapped with TLS (1.0 or later). It does not require setting up a CA or signing keys, but that is still possible if desired. The extension introduces a keyprint parameter to the ADCS URI. The keyprint parameter is a hash of the server certificate. @@ -657,17 +664,19 @@ RSS http://example.com/rss TINew_post DEdescription_of_post LIhttp://example.com/entries/new_post DT1253628000 CRJohn_Doe ==== -=== GR - Grouping of file extensions in SCH +=== SEGA - Grouping of file extensions in SCH In BASE, clients add EX fields to SCH to denote which extension files should have. This can lead to a situation where the large bulk of extensions are of similar "type", e.g. audio files or documents. This extension intend to add a field GR which groups multiple extensions. In addition, the field RX shall be used for group-exclusion; if all extensions in a group but two are desired, field RX will be used to exclude those group items. +Signal SEGA in the INF's SU field for support of this extension. + Field GR values, where multiple groups are specified by adding the numbers together: [options="autowidth"] |===== -|1 |Audio |AIFF, APE, AU, FLAC, M4A, MID, MP2, MP3, MPC, OGG, RA, WAV, WMA +|1 |Audio |APE, FLAC, M4A, MID, MP3, MPC, OGG, RA, WAV, WMA |2 |Compressed |7Z, ACE, ARJ, BZ2, LHA, LZH, RAR, TAR, TZ, Z, ZIP |4 |Document |DOC, DOCX, HTM, HTML, NFO, ODF, ODP, ODS, ODT, PDF, PPT, PPTX, RTF, TXT, XLS, XLSX, XML, XPS |8 |Executable |APP, BAT, CMD, COM, DLL, EXE, JAR, MSI, PS1, VBS, WSF -|16 |Picture |AI, BMP, CDR, EPS, GIF, ICO, IMG, JPEG, JPG, PCT, PCX, PICT, PNG, PS, PSD, PSP, RLE, SFW, TGA, TIF +|16 |Picture |BMP, CDR, EPS, GIF, ICO, IMG, JPEG, JPG, PNG, PS, PSD, SFW, TGA, TIF, WEBP |32 |Video |3GP, ASF, ASX, AVI, DIVX, FLV, MKV, MOV, MP4, MPEG, MPG, OGM, PXP, QT, RM, RMVB, SWF, VOB, WEBM, WMV |===== @@ -701,4 +710,15 @@ |FS |Free slots available. |===== +=== ADCS - Symmetrical Encryption in ADC +ADCS is an extension that has the goal of adding the TLS/SSL layer just over the TCP layer and beneath the application layer (where ADC runs). This way, the ADC protocol remains unchanged while the connections are encrypted. The connecting party performs a TLS handshake immediately after the TCP connection is established. The ADC handshake is performed and once the TLS connection is established the ADC handshake proceeds as usual. + +Encrypted ADC connections can be established using a TLS tunnel, both for hub and for client connections. Certificates can be used to authenticate both hub and user, for example by making the hub the root CA, and only allow clients signed by the hub to connect. Ephemeral keys should be use to ensure forward secrecy when possible. A future extension or revision of this extension will provide ways to handle certificate based logins, who creates which certificates and who signs what, and all that is not specified in this revision. + +==== Client-Hub encryption +TLS client-hub connections can be initiated either by negotiating the feature "ADCS" on connection or by using the protocol adcs:// when initiating the connection. + +==== Client-Client encryption +TLS client-client connections can be established either by negotiating the feature "ADCS" on connection or by specifying "ADCS/1.0" in the CTM protocol field. Clients supporting encrypted connections must indicate this in the INF SU field with "ADCS". + // vim: set syntax=asciidoc: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-11-23 22:55:53
|
Revision: 69 http://adc.svn.sourceforge.net/adc/?rev=69&view=rev Author: ullner Date: 2010-11-23 22:55:47 +0000 (Tue, 23 Nov 2010) Log Message: ----------- Added FS field to INF - free slots in client Modified Paths: -------------- trunk/ADC-EXT.txt Modified: trunk/ADC-EXT.txt =================================================================== --- trunk/ADC-EXT.txt 2010-11-08 23:16:20 UTC (rev 68) +++ trunk/ADC-EXT.txt 2010-11-23 22:55:47 UTC (rev 69) @@ -50,6 +50,7 @@ * Added 'FEED' extension for RSS feeds. * Added grouping of file extensions to SCH. * Added failover hub addresses to the hub's INF. +* Added free slots to the client's INF. == Extensions @@ -171,7 +172,7 @@ |UP |integer |Hub uptime (seconds) |NI |string |Hub name (from BASE) |DE |string |Hub description (from BASE) -VE |string |Hub software version (from BASE) +|VE |string |Hub software version (from BASE) |===== The hub must continue to send the user list as for a normal user (move to @@ -573,7 +574,7 @@ |KY | 16 byte encryption key in BASE32. 128 bit AES encryption shall be used. |===== -For example, a SCH command will result in 29 Bytes of overhead ("<space>KY"+26 Bytes Base32 encoded key). +For example, a SCH command will result in 29 Bytes of overhead ("<separator>KY"+26 Bytes Base32 encoded key). A client that has a response for the command can now encrypt the response message by prepending 16 bytes of random data and afterwards encrypting it with AES/CBC/PKCS5Padding (Cipher/Blockmode/Padding) using 16 zero bytes as IV for CBC. @@ -613,7 +614,7 @@ |===== === FEED - RSS feeds -The extension adds RSS feed support. See http://en.wikipedia.org/wiki/RSS for a description. +The extension adds http://en.wikipedia.org/wiki/RSS[RSS feed] support. Signal FEED in SUP and the INF's SU field. @@ -657,7 +658,7 @@ ==== === GR - Grouping of file extensions in SCH -In BASE, clients add EX fields to SCH to denote which extension files should have. This can lead to a situation where the large bulk of extensions are of similar "type", e.g. audio files or documents. This extension intend to add a field GR which groups multiple extensions. In addition, the field RX shall be used for group-exclusion; if all extensions in a group but one are desired, field RX will be used to exclude those group items. +In BASE, clients add EX fields to SCH to denote which extension files should have. This can lead to a situation where the large bulk of extensions are of similar "type", e.g. audio files or documents. This extension intend to add a field GR which groups multiple extensions. In addition, the field RX shall be used for group-exclusion; if all extensions in a group but two are desired, field RX will be used to exclude those group items. Field GR values, where multiple groups are specified by adding the numbers together: [options="autowidth"] @@ -691,4 +692,13 @@ |FO |Failover hub addresses. Specify well formed ADC or ADCS URI addresses, with multiple addresses separated with a comma. Example; FOadc://example.com:1234,adc://example.net:1234 |===== +=== FS - Free slots in client +This is an extension that will broadcast the amount of free slots the client has available. + +Field FS in the client's INF: +[options="autowidth"] +|===== +|FS |Free slots available. +|===== + // vim: set syntax=asciidoc: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:54:46
|
Revision: 67 http://adc.svn.sourceforge.net/adc/?rev=67&view=rev Author: ullner Date: 2010-10-31 12:54:40 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Added Paths: ----------- trunk/Source/cpp/Microsoft Visual Studio/ trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.h trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.vcproj trunk/Source/cpp/Microsoft Visual Studio/AssemblyInfo.cpp trunk/Source/cpp/Microsoft Visual Studio/ReadMe.txt trunk/Source/cpp/Microsoft Visual Studio/Stdafx.cpp trunk/Source/cpp/Microsoft Visual Studio/Stdafx.h trunk/Source/cpp/Microsoft Visual Studio/app.ico trunk/Source/cpp/Microsoft Visual Studio/app.rc trunk/Source/cpp/Microsoft Visual Studio/resource.h Added: trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.h =================================================================== --- trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.h (rev 0) +++ trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.h 2010-10-31 12:54:40 UTC (rev 67) @@ -0,0 +1,13 @@ +// ADCLibrary.h + +#pragma once + +using namespace System; + +namespace ADCLibrary { + + public ref class Class1 + { + // TODO: Add your methods for this class here. + }; +} Added: trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.vcproj =================================================================== --- trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.vcproj (rev 0) +++ trunk/Source/cpp/Microsoft Visual Studio/ADCLibrary.vcproj 2010-10-31 12:54:40 UTC (rev 67) @@ -0,0 +1,250 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="ADCLibrary" + ProjectGUID="{8065AFB8-B939-4806-982B-BB7BE780A19D}" + RootNamespace="ADCLibrary" + Keyword="ManagedCProj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + ManagedExtensions="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=".\;..\" + PreprocessorDefinitions="WIN32;_DEBUG" + RuntimeLibrary="3" + UsePrecompiledHeader="2" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="$(NoInherit)" + LinkIncremental="2" + GenerateDebugInformation="true" + AssemblyDebug="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + ManagedExtensions="0" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories=".\;..\" + PreprocessorDefinitions="WIN32;NDEBUG" + RuntimeLibrary="2" + UsePrecompiledHeader="2" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="$(NoInherit)" + LinkIncremental="1" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + <AssemblyReference + RelativePath="System.dll" + AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" + MinFrameworkVersion="131072" + /> + <AssemblyReference + RelativePath="System.Data.dll" + AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" + MinFrameworkVersion="131072" + /> + <AssemblyReference + RelativePath="System.XML.dll" + AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" + MinFrameworkVersion="131072" + /> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\AssemblyInfo.cpp" + > + </File> + <File + RelativePath=".\Stdafx.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\ADCLibrary.h" + > + </File> + <File + RelativePath=".\resource.h" + > + </File> + <File + RelativePath=".\Stdafx.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File + RelativePath=".\app.ico" + > + </File> + <File + RelativePath=".\app.rc" + > + </File> + </Filter> + <File + RelativePath=".\ReadMe.txt" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Added: trunk/Source/cpp/Microsoft Visual Studio/AssemblyInfo.cpp =================================================================== --- trunk/Source/cpp/Microsoft Visual Studio/AssemblyInfo.cpp (rev 0) +++ trunk/Source/cpp/Microsoft Visual Studio/AssemblyInfo.cpp 2010-10-31 12:54:40 UTC (rev 67) @@ -0,0 +1,40 @@ +#include "stdafx.h" + +using namespace System; +using namespace System::Reflection; +using namespace System::Runtime::CompilerServices; +using namespace System::Runtime::InteropServices; +using namespace System::Security::Permissions; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly:AssemblyTitleAttribute("ADCLibrary")]; +[assembly:AssemblyDescriptionAttribute("")]; +[assembly:AssemblyConfigurationAttribute("")]; +[assembly:AssemblyCompanyAttribute("Microsoft")]; +[assembly:AssemblyProductAttribute("ADCLibrary")]; +[assembly:AssemblyCopyrightAttribute("Copyright (c) Microsoft 2010")]; +[assembly:AssemblyTrademarkAttribute("")]; +[assembly:AssemblyCultureAttribute("")]; + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the value or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly:AssemblyVersionAttribute("1.0.*")]; + +[assembly:ComVisible(false)]; + +[assembly:CLSCompliantAttribute(true)]; + +[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; Added: trunk/Source/cpp/Microsoft Visual Studio/ReadMe.txt =================================================================== --- trunk/Source/cpp/Microsoft Visual Studio/ReadMe.txt (rev 0) +++ trunk/Source/cpp/Microsoft Visual Studio/ReadMe.txt 2010-10-31 12:54:40 UTC (rev 67) @@ -0,0 +1,31 @@ +======================================================================== + DYNAMIC LINK LIBRARY : ADCLibrary Project Overview +======================================================================== + +AppWizard has created this ADCLibrary DLL for you. + +This file contains a summary of what you will find in each of the files that +make up your ADCLibrary application. + +ADCLibrary.vcproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +ADCLibrary.cpp + This is the main DLL source file. + +ADCLibrary.h + This file contains a class declaration. + +AssemblyInfo.cpp + Contains custom attributes for modifying assembly metadata. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// Added: trunk/Source/cpp/Microsoft Visual Studio/Stdafx.cpp =================================================================== --- trunk/Source/cpp/Microsoft Visual Studio/Stdafx.cpp (rev 0) +++ trunk/Source/cpp/Microsoft Visual Studio/Stdafx.cpp 2010-10-31 12:54:40 UTC (rev 67) @@ -0,0 +1,5 @@ +// stdafx.cpp : source file that includes just the standard includes +// ADCLibrary.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" Added: trunk/Source/cpp/Microsoft Visual Studio/Stdafx.h =================================================================== --- trunk/Source/cpp/Microsoft Visual Studio/Stdafx.h (rev 0) +++ trunk/Source/cpp/Microsoft Visual Studio/Stdafx.h 2010-10-31 12:54:40 UTC (rev 67) @@ -0,0 +1,7 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#pragma once + + Added: trunk/Source/cpp/Microsoft Visual Studio/app.ico =================================================================== (Binary files differ) Property changes on: trunk/Source/cpp/Microsoft Visual Studio/app.ico ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/Source/cpp/Microsoft Visual Studio/app.rc =================================================================== --- trunk/Source/cpp/Microsoft Visual Studio/app.rc (rev 0) +++ trunk/Source/cpp/Microsoft Visual Studio/app.rc 2010-10-31 12:54:40 UTC (rev 67) @@ -0,0 +1,63 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon placed first or with lowest ID value becomes application icon + +LANGUAGE 29, 1 +#pragma code_page(1252) +1 ICON "app.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" + "\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\0" +END + +#endif // APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + Added: trunk/Source/cpp/Microsoft Visual Studio/resource.h =================================================================== --- trunk/Source/cpp/Microsoft Visual Studio/resource.h (rev 0) +++ trunk/Source/cpp/Microsoft Visual Studio/resource.h 2010-10-31 12:54:40 UTC (rev 67) @@ -0,0 +1,3 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by app.rc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:52:26
|
Revision: 66 http://adc.svn.sourceforge.net/adc/?rev=66&view=rev Author: ullner Date: 2010-10-31 12:52:20 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Added Paths: ----------- trunk/Source/csharp/Base32.cs trunk/Source/csharp/Microsoft Visual Studio/ADCLibrary.csproj trunk/Source/csharp/Microsoft Visual Studio/ADCLibrary.sln trunk/Source/csharp/Microsoft Visual Studio/Properties/ trunk/Source/csharp/Microsoft Visual Studio/Properties/AssemblyInfo.cs trunk/Source/csharp/Tiger.cs Added: trunk/Source/csharp/Base32.cs =================================================================== --- trunk/Source/csharp/Base32.cs (rev 0) +++ trunk/Source/csharp/Base32.cs 2010-10-31 12:52:20 UTC (rev 66) @@ -0,0 +1,125 @@ +using System; +using System.Diagnostics; +using System.Security.Cryptography; +using System.Text; +using System.Collections; + + +namespace ADC +{ + /// <summary> + /// This class converts byte arrays to base32 strings and vice versa. + /// Base32 strings, unlike Base64 ones, are safe for filenames, even for + /// case-insensitive file system like Windows. Base32 Encoding is described in + /// RFC 3548 - The Base16, Base32, and Base64 Data Encodings. + /// </summary> + public class Base32 + { + private static Char[] Base32Chars = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', + 'Y', 'Z', '2', '3', '4', '5', '6', '7'}; + + private Base32() { } + + /// <summary> + /// This method converts a byte array into a Base32-encoded string. The resulting + /// string can be used safely for Windows file or directory names. + /// </summary> + /// <param name="inArray">The byte array to encode.</param> + /// <returns>A base32-encoded string representation of the byte array.</returns> + public static string ToBase32String(byte[] inArray) + { + if (inArray == null) return null; + int len = inArray.Length; + // divide the input into 40-bit groups, so let's see, + // how many groups of 5 bytes can we get out of it? + int numberOfGroups = len / 5; + // and how many remaining bytes are there? + int numberOfRemainingBytes = len - 5 * numberOfGroups; + + // after this, we're gonna split it into eight 5 bit + // values. + StringBuilder sb = new StringBuilder(); + //int resultLen = 4*((len + 2)/3); + //StringBuffer result = new StringBuffer(resultLen); + + // Translate all full groups from byte array elements to Base64 + int byteIndexer = 0; + for (int i = 0; i < numberOfGroups; i++) + { + byte b0 = inArray[byteIndexer++]; + byte b1 = inArray[byteIndexer++]; + byte b2 = inArray[byteIndexer++]; + byte b3 = inArray[byteIndexer++]; + byte b4 = inArray[byteIndexer++]; + + // first 5 bits from byte 0 + sb.Append(Base32Chars[b0 >> 3]); + // the remaining 3, plus 2 from the next one + sb.Append(Base32Chars[(b0 << 2) & 0x1F | (b1 >> 6)]); + // get bit 3, 4, 5, 6, 7 from byte 1 + sb.Append(Base32Chars[(b1 >> 1) & 0x1F]); + // then 1 bit from byte 1, and 4 from byte 2 + sb.Append(Base32Chars[(b1 << 4) & 0x1F | (b2 >> 4)]); + // 4 bits from byte 2, 1 from byte3 + sb.Append(Base32Chars[(b2 << 1) & 0x1F | (b3 >> 7)]); + // get bit 2, 3, 4, 5, 6 from byte 3 + sb.Append(Base32Chars[(b3 >> 2) & 0x1F]); + // 2 last bits from byte 3, 3 from byte 4 + sb.Append(Base32Chars[(b3 << 3) & 0x1F | (b4 >> 5)]); + // the last 5 bits + sb.Append(Base32Chars[b4 & 0x1F]); + } + + // Now, is there any remaining bytes? + if (numberOfRemainingBytes > 0) + { + byte b0 = inArray[byteIndexer++]; + // as usual, get the first 5 bits + sb.Append(Base32Chars[b0 >> 3]); + // now let's see, depending on the + // number of remaining bytes, we do different + // things + switch (numberOfRemainingBytes) + { + case 1: + // use the remaining 3 bits, padded with five 0 bits + sb.Append(Base32Chars[(b0 << 2) & 0x1F]); + // sb.Append("======"); + break; + case 2: + byte b1 = inArray[byteIndexer++]; + sb.Append(Base32Chars[(b0 << 2) & 0x1F | (b1 >> 6)]); + sb.Append(Base32Chars[(b1 >> 1) & 0x1F]); + sb.Append(Base32Chars[(b1 << 4) & 0x1F]); + // sb.Append("===="); + break; + case 3: + b1 = inArray[byteIndexer++]; + byte b2 = inArray[byteIndexer++]; + sb.Append(Base32Chars[(b0 << 2) & 0x1F | (b1 >> 6)]); + sb.Append(Base32Chars[(b1 >> 1) & 0x1F]); + sb.Append(Base32Chars[(b1 << 4) & 0x1F | (b2 >> 4)]); + sb.Append(Base32Chars[(b2 << 1) & 0x1F]); + // sb.Append("==="); + break; + case 4: + b1 = inArray[byteIndexer++]; + b2 = inArray[byteIndexer++]; + byte b3 = inArray[byteIndexer++]; + sb.Append(Base32Chars[(b0 << 2) & 0x1F | (b1 >> 6)]); + sb.Append(Base32Chars[(b1 >> 1) & 0x1F]); + sb.Append(Base32Chars[(b1 << 4) & 0x1F | (b2 >> 4)]); + sb.Append(Base32Chars[(b2 << 1) & 0x1F | (b3 >> 7)]); + sb.Append(Base32Chars[(b3 >> 2) & 0x1F]); + sb.Append(Base32Chars[(b3 << 3) & 0x1F]); + // sb.Append("="); + break; + } + } + return sb.ToString(); + } + } +} Added: trunk/Source/csharp/Microsoft Visual Studio/ADCLibrary.csproj =================================================================== --- trunk/Source/csharp/Microsoft Visual Studio/ADCLibrary.csproj (rev 0) +++ trunk/Source/csharp/Microsoft Visual Studio/ADCLibrary.csproj 2010-10-31 12:52:20 UTC (rev 66) @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.30729</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{52266005-83DD-4F72-BFA3-67F65202FB22}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>ADCLibrary</RootNamespace> + <AssemblyName>ADCLibrary</AssemblyName> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\Base32.cs"> + <Link>Base32.cs</Link> + </Compile> + <Compile Include="..\Helper.cs"> + <Link>Helper.cs</Link> + </Compile> + <Compile Include="..\Tiger.cs"> + <Link>Tiger.cs</Link> + </Compile> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/Source/csharp/Microsoft Visual Studio/ADCLibrary.sln =================================================================== --- trunk/Source/csharp/Microsoft Visual Studio/ADCLibrary.sln (rev 0) +++ trunk/Source/csharp/Microsoft Visual Studio/ADCLibrary.sln 2010-10-31 12:52:20 UTC (rev 66) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ADCLibrary", "ADCLibrary.csproj", "{52266005-83DD-4F72-BFA3-67F65202FB22}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {52266005-83DD-4F72-BFA3-67F65202FB22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52266005-83DD-4F72-BFA3-67F65202FB22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52266005-83DD-4F72-BFA3-67F65202FB22}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52266005-83DD-4F72-BFA3-67F65202FB22}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/Source/csharp/Microsoft Visual Studio/Properties/AssemblyInfo.cs =================================================================== --- trunk/Source/csharp/Microsoft Visual Studio/Properties/AssemblyInfo.cs (rev 0) +++ trunk/Source/csharp/Microsoft Visual Studio/Properties/AssemblyInfo.cs 2010-10-31 12:52:20 UTC (rev 66) @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ADCLibrary")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("ADCLibrary")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1021b33c-89f9-44c0-be2d-ea1e05dd6e61")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/Source/csharp/Tiger.cs =================================================================== --- trunk/Source/csharp/Tiger.cs (rev 0) +++ trunk/Source/csharp/Tiger.cs 2010-10-31 12:52:20 UTC (rev 66) @@ -0,0 +1,409 @@ +using System; +using System.Security.Cryptography; +using System.Text; + +namespace ADC +{ + public class Tiger : HashAlgorithm + { + #region Fields + private long a; + private long b; + private long c; + + private long[] block; + private const int BLOCKSIZE = 64; + private byte[] buf; + + private long lLen; + private int nBufPos; + private const int PASSES = 3; + private static long[] T; + #endregion + + static Tiger () + + { + long[] _Vb_t_array_0 = null; + _Vb_t_array_0 = new long[] + { + 192161084409973854L, -6034178070669973268L, 8272369121297300691L, 7854730284916899642L, -3631738584360316525L, 8463286011307239906L, -5664346993730092093L, 5082381371487377520L, -1536603760329757466L, -4232985935611735204L, + 5541490850629862524L, 766444128913191948L, 1204553577021685498L, -4121719295987045526L, 1401289229890216703L, 1893918052108309022L, 5461170853188208586L, 2807403890869420487L, -8822417684582283338L, 5699452412975025298L, + -2914262034798377397L, -8199292901130911363L, 7624427211800470465L, -5330070367527189138L, 9043806901924967914L, 7231827479902542914L, -4667804575905660192L, 6875646691050945796L, -954047427515838778L, 7786398710221814956L, + 8167597339425066981L, 1830707105885056415L, -192929137551915557L, -4000909680243679221L, -8790383730744944306L, -6559119868654993229L, -8046943608939121133L, -2635222011098072079L, 1783120314242633559L, 248005612187258982L, + 7688500634458409525L, -799055769434250085L, 8591138587399736033L, -2813706756098348539L, -4803442773389201549L, 5042603696143252264L, 2053990370701680515L, -8434990628116389527L, 3741955435321465241L, 4334407786093429776L, + -5399798173115342087L, 1449859124008718907L, -259597992345095852L, -2299784421946890745L, -8624947886301142065L, -7850603641235491331L, 3847074041673952000L, 4649400157396704725L, -4273499526689310132L, -3840742565288711634L, + 2909491499011162061L, 4458122598401901638L, 7071481730398905774L, 6725294491764459774L, -6201551736110472662L, -4372530048007926361L, 1226483701329067140L, -2522035007050864557L, -3676115808446124170L, -4975751036383735295L, + -1831728144282101387L, -7732658914112356844L, 479582384021555544L, 8040612334407127321L, -2798227069691230528L, -1334228551670664750L, 8751740296797632830L, 6603430683508552489L, 8942924799792477540L, 3573742753214737511L, + -2419519573825602302L, 6349030933445924429L, -2501945979441900175L, -6177453506703404958L, -7885857697280165792L, 5194369709296555225L, 7174555471952375656L, 7982812746821821468L, -8707669106532426453L, 3232013613859041307L, + -5747376245209101971L, -2231459388012946321L, 3112410413624570453L, -2336602742119691332L, 6658792778814911418L, 6126246269502162262L, -6070952467612144753L, 4721051187472420532L, -5533619424469951182L, -4853025588084287359L, + 2663576151211431276L, 928112258657309258L, 5664920977038299994L, 2704699625848084345L, 2312925355491498803L, -528812816973409076L, 2964761606854114992L, 4148718494125202372L, 4082542483235864459L, 5171535286737311423L, + 2166137813939512309L, 8844224567096109974L, -6373247044080797239L, -8133614489572350707L, 7053919794999990929L, 5576291611870337032L, -1374825740467639573L, -734453569254161202L, -705972172313107935L, -6688726126811769884L, + -7468621655906046812L, -3527580439205474383L, -6956282119872554589L, -6281089153129775081L, 853355433004222246L, -1924221946255713479L, 2124075034376372323L, 5881355904936746717L, 1033318428544969251L, 1692585388818821524L, + -1245985052454466526L, 1107424405919510210L, -9211670503851965599L, -5975256720516651978L, 963191604767572015L, 4506934758573727688L, -6511972687387035778L, -6714534832456272315L, 7421261837586505858L, 3318186242040429129L, + -4402061108394378299L, 1910808081503L, 4771413979138012118L, -3357965141731676491L, -6811660122601107496L, 3247421105326436348L, -1009844908434318049L, 8353265116968520410L, -5881406294935394735L, -7574869783018555510L, + 6528592316425799439L, -3049672598698961616L, -3303981966096002009L, 7320455443630736945L, -7351974990356818097L, 2539802313181221187L, -7307523792611951465L, 6084456898448652712L, 1615327116689102472L, 8126548348642832045L, + -1094214848903295726L, 6320848846662414801L, -1163799684465161365L, 3439926484095136410L, -7218302546559918104L, 4583261464596863494L, 5278432013075676693L, 672210957064462075L, -5420889727701263133L, -3948047341652367807L, + 3753742208681096767L, -5185515461782971584L, -460252340867529358L, 111470777923844445L, 1951374535466601971L, -8875343681432095955L, -4493729248843343338L, 4830799035278983864L, -5224728565293047538L, 6842302225500364445L, + -7111193868311747516L, -2729919277420993032L, -5582278241003401657L, -126421769187551098L, -4035721366655415313L, -1986169280154305277L, 3977519900599801820L, 9148781857317432677L, 6468933130968205401L, 8516219711084257782L, + 1539015908620793624L, 7527026033758878374L, -1647949680688450337L, 3088835283432281588L, 3651919061693825289L, -8985256062000155568L, -423165018983337331L, -7032056788937726985L, 308165109378616703L, 8884692927086426203L, + 2438838841395254149L, -3550173447755953499L, 2823241734971430590L, 3896218688877146334L, 393786506094771122L, -3117973570538943511L, -7973569017697024389L, -8368763565314219996L, 6934559736714979565L, -589348163057397487L, + -7554853961030558080L, -6878676038788161577L, -3798065817641571893L, -9101961441510934879L, -4559443103670756675L, -7665374195348870830L, -8336074436196531783L, 4236391428300945648L, 555138268555536248L, 5351590591369890935L, + 4306521946498657944L, -7151482210676895604L, 4901816398460471456L, -9033789479800328823L, 7485939926152528684L, -5105994143555176462L, 6245128712556390173L, -4718679834244078161L, -325273111308121687L, 7772052866533484500L, + 639373189613950878L, 2515940555210603828L, -2058685867725021174L, 9187445612742136046L, -5771987833248487369L, -2125811817212952004L, -3204735567712096048L, -3393897870002714342L, 1313621308117380133L, 3526835097255131285L, + -4953033604042954265L, 8704164972314360376L, -920137909863202916L, 5969067443919232116L, 5791404459833380522L, -1682712826007985785L, 6001456072058810555L, -8273861206301250160L, 2241175407069758350L, -2962551490920225208L, + 8359644330926224055L, -8523485772611717717L, -5183265553382750L, -1789270636298447811L, -6471656072873752544L, -1458735953920612486L, -1826563305001377480L, -5358963986493047656L, 6213947727727520144L, 5496303794639560149L, + -2795981259149962188L, 642450021946863605L, -2925749420550550287L, -4252676236223476327L, -2372897249057438062L, -2455723000952046826L, 8011611286970690052L, 5372247966639775667L, -6490268738015937967L, -265982677241022690L, + -1711898199407229911L, -2553549223344005918L, -3655427155680827379L, 1788379855404599063L, 3792259505844355329L, 857793142685420274L, 2176386753693503798L, -2281187609587102471L, -12877901320348396L, 6070247714570225101L, + 7358743242340641331L, -8703516059324417162L, 1522910625901990663L, -2134847759353728262L, 5235630359010597374L, -5774648161970196758L, 277273466943670671L, 3580831169916433691L, -1032406685548103719L, 4657750985732713388L, + 1177149711660596421L, 8685721698255572101L, -3227632359902186326L, -6349410231276355429L, -4809500581665772080L, -7923309769729008016L, -6726740716384263588L, -4587792071496920925L, -658271017113840853L, 3834592178494549117L, + -3853851402329989932L, -8865288174312808228L, 8774750272303345432L, -8428026360225307604L, -3404183201405868250L, 6519077675840655372L, 1009372798613472243L, -4504928615151511518L, 7670504156571609794L, -9068448121725124008L, + 7481699948221361317L, 2131352009749933493L, 7854556580946198495L, 5848046147829288198L, 6811751916476253359L, -635956774299390418L, -4737535235939835750L, -1614809042241653147L, 8245611441321613668L, 8087057586628171618L, + 5058061449640751271L, -5151918184365513026L, 7212395796113148780L, 8872633840395976086L, 8602726521519041395L, -5885490816789515276L, 6042660761688602872L, 1642367900117110883L, 25924001596622557L, 7531865058110106323L, + 4223621278438660202L, 3926684511422013614L, -2064363959953346089L, 5939130201053773422L, 8312208923375399755L, 5278156969609628584L, -5712322089306707131L, 3610014133393185213L, -8850224129823554669L, -7989215126425784091L, + 7953444341930717599L, -5072589324995998940L, -3677986556148923193L, 5127306049615917691L, 9121210965518562125L, 8462056263389103903L, -743704981880018871L, 5658738406708581754L, 3084862250275496789L, -2839477530259368618L, + -3966384508771725354L, -3487534071112132806L, -123994483119243460L, -1345606558677941971L, -8999779576894164844L, -4191785782441631580L, 1116769798908306816L, 1871732813531574911L, -5639228995346094013L, 2050857069623328786L, + 942713319182180155L, -8555767913901511542L, -1938713800388260250L, 7028952989422544417L, 9018945159409650955L, -9098571702620193189L, 512456053301416255L, -4053543709501018729L, -4330900206871259305L, -1512795427272957464L, + -3102984968199159270L, -7389706432295929941L, -6638196300801425917L, -7112719166685012944L, 4569666897377300404L, -7151449437793514816L, 4462677101358564049L, 3679240545963649394L, -4129112553160565951L, 776201060342576796L, + -1202834617519492059L, -842133208882402856L, -8445297248460022090L, 3458390008116962295L, -8107400727032609416L, 6618311662604863029L, 4790267690900900096L, 1716087693007726108L, 4148457837926911568L, -5418957485852076861L, + 8968309666649857421L, -2611360075161572255L, 6968029403465067289L, -3584187592496365262L, 500987773930853904L, -8168172799095912208L, 2355660670689429871L, 3178293543037890097L, -5583593033549110520L, -6297125087914569009L, + 894835714693979080L, -5305826774090122525L, -348051181029808153L, 352461093517089771L, 5441805419015688358L, -3049381223523647492L, 3501129463520285556L, -4980126173351398283L, -8303518980934164731L, -7446347735086057113L, + 2615208954064994172L, -522603252265687058L, 2237558221535645089L, -3911919600557704777L, -5210711461681408094L, 7102368496127332321L, -7719366717024918019L, 399232473491847935L, 7140013836546489399L, -8234741283244511424L, + -2231392863125672626L, -7060197492102713059L, 5038446221635409553L, 6294769326316815049L, -387802090031244907L, -3350046130045840024L, -2666808022981539793L, -6161723600240465717L, 2783168786742146440L, 1986639352536355296L, + -1988727118208302602L, 8799325730492140254L, 7305467695957075406L, 2551364576700533681L, -6081001307066006598L, -4889804522683628146L, -7324859595388608820L, -6885748294050442179L, 5760535140236403614L, 1501217875009212803L, + -1291632093432900094L, -7706153952057205239L, 6454505253869455699L, 4319683495060363885L, -6244922308576078969L, -6818767823778904188L, 2960027307368769952L, 8570410701452901115L, 160427886842421800L, -4969938860820756853L, + -4627442630994782527L, -3285648034072744413L, -7606118162332863056L, 6176075057452006273L, 7582622308322968760L, 6649763778434249567L, -183456705028906550L, 2699628156079216836L, -1767231947251866451L, 2945653313023238585L, + 2813841150172635667L, 8163160757531991904L, -7212422464109809801L, -5924618728816493121L, 649720531103423106L, 6394120152722619742L, -934965811117111118L, 4753049982369101610L, 2408845162401379802L, 1253140645631747605L, + -7799048643966905049L, -1584266091164108743L, -456002869645138839L, 8367255505928917714L, 91400768704631494L, -4464375255980341934L, 1938401838693046941L, -7520293791609324052L, -8636597607271566304L, 3990523136699180870L, + 7731749711829208666L, 4875740361372990282L, 9173201802070489451L, 7834799413446679311L, -6433392137177717442L, 3325271250982575439L, -8730608807451740020L, -2389358865336045484L, -9209652622095187875L, 4359958813756723849L, + 4539467735137059035L, -5508531677782308793L, 1312945880979454078L, -947428475416758718L, 4958176066159770025L, 1374196081931091686L, -6918434684938959032L, -1095184559281703237L, -1411469442470588444L, 3145683508650593868L, + -6039522865352658195L, -3804467173852034031L, -6563710254104815428L, 6868326517302426863L, 6758043032196830276L, 5827167051130463242L, 4074828688890126937L, 3293442170241026694L, -8065760984084440343L, 5618223731912049521L, + -3014545685365689991L, 2520538699101199374L, -819712100864953445L, 5224129141031473793L, -1683494792012715969L, 3214246200928423523L, -2720183745931134014L, 3432136347919366758L, -6844377996819786796L, -4697838837464539535L, + -3480123136110369641L, -5257202687841710057L, -3160671586143389472L, -8143604544638974599L, -7582212342885995579L, 7399204607179264370L, 2410740665327626235L, -5531319028708868287L, -1132011872800708955L, -8244108713684067595L, + -8100030830173699490L, -865042824158552761L, -1406263208487841571L, -743744098937138031L, -7255025749313877870L, 5293216666010209768L, -6686350151342941087L, 505172698323928814L, -8504163865352868456L, -6039198373597746942L, + 2102395425312436973L, -1480681786698906867L, 6364975572501938982L, -7035658141633266754L, -8022507636838873565L, -4480433668109774745L, 2328871106231838244L, 1378680973804076623L, -3586772320324138908L, -2755027987269747529L, + 7519553577929664460L, 460638964809724379L, -99820877092259348L, 6562793443469826132L, 1580997072160885165L, 859005579845670993L, -3058956174016989192L, -3379814835910611228L, -3936971176641920257L, -8723858077265400670L, + 3784640730692549981L, -2514946515147142870L, -718211188705137671L, 5877026246039211124L, -8623573777109189598L, -6383628662057423219L, 4036482174343220762L, -6451625591996463702L, -5974472282720051687L, -4119613249555124729L, + -4204805774663870152L, 1637614953354483776L, 1768420517056302872L, -6063481615036972513L, 4469119677486524438L, 6862084742702193339L, 2666591392741323510L, 1958911907595193257L, 2078226524874004819L, 9182514826368667184L, + -5667455777910095811L, -6961112304229951815L, 7984583406477441100L, 5152724216922222472L, -2011927023009527807L, -212234053999724107L, 4838452819165657451L, -8437636414480207278L, -4364095106444861094L, -8843563141488759799L, + -952547977505311611L, 7192165871822020282L, -8957588412064574366L, 4293149567017494192L, 6266031685674981260L, 3297360663327026118L, -7424220229153493459L, 1848411117523063487L, 4803542876947788811L, -6514007507455064743L, + 3918859449562378630L, 7730455268829558643L, 2300310138214025757L, 5073098731442674389L, -1867327214174801803L, -5119713925479725192L, 2481833961960165662L, 3483465760582650171L, -3799159280037322961L, -2614176868807805682L, + 3683901813415452623L, -6586240258798896426L, -6280196637815307286L, -6878770741467980580L, -8649528727307138543L, 1263269478536931145L, -7419991789716909164L, -5769815365846261236L, 7280608515770959015L, 7790930297845911262L, + -5059374975740702796L, -6705059931318638429L, 8900403996915095151L, 8816891275549542045L, -476483339080012016L, -1232282160203339243L, 3119849171172694992L, 7662494604586420558L, 149203013753700084L, 5530308158539891708L, + 4143436129840869576L, -3411623459852687238L, -1026352410626214551L, -8324492521276276327L, 6707891355510602429L, 5715986277202524800L, -393206988093480487L, 4600951196636466039L, -4593511655318796512L, 9065747437067558111L, + -8901650410637853864L, 2592076422926394627L, 228032410479194937L, 6667480117540136779L, 588648581915253038L, -2336950474993240516L, 3634608293302267354L, 1202024298738736502L, 6299068367672194603L, 1932346445954743183L, + 7573861666572117031L, -61815566784892605L, 3549459440654955014L, 8158286332358861718L, -7670372790848096527L, -515956617046547146L, -3963219078081420846L, 8464707252757847009L, 397230465775035974L, -4957137534187579283L, + 675316509725923312L, 2628613740627889320L, -2532211618462009391L, 5345232712238813773L, -4776658006885916949L, 3062009004852183467L, -2381228231588757251L, 74184876899443393L, -1882978417976974457L, 9131956796466541322L, + 8604540880985875509L, 22099178757704754L, -1755823172185693422L, -7115222264497037070L, 2945473010562318822L, -3264392033958139096L, 2789803412788518275L, -5023951698716947073L, -2879016497062593138L, 1017933909609308228L, + -2136777458168640962L, 8230916861376446652L, -4050239832011059757L, 8983610917420146076L, 8543542228473779244L, 1721876046845854392L, -2252284190053484385L, 5559864569757380000L, 4937681992884682033L, -5441254327629638811L, + -9066842030330493037L, 5670390740934713304L, 2219071780988037499L, 7008521987288882964L, 6028345117330418825L, -7500176903196747008L, 7071075452076274675L, -1604175089662029304L, 1445978213955986826L, -7979034942316814172L, + 951333080223670799L, 6099155138413436065L, -4305900099056973791L, -6236769450809946705L, -2912898243239114769L, -2065740773420267803L, -3827177893057145596L, 1340472571717533606L, -3648363291767490877L, -5756567784146095673L, + 4461163794677446508L, -5848717005041324781L, 3341940384398866564L, -4882598382547103543L, 3829921822543532494L, 899996630714791418L, 6478536468284266291L, 2994597028103565543L, 6124895672834828926L, -8376542604899771579L, + -4412652237062246342L, -7724700941812371646L, 728866099714851926L, 339635816873858970L, -1153572816294167456L, -592215260546165052L, -7150089944179092253L, 8700134485486622004L, -5552633324984327062L, -1298517758115136471L, + 8749621007278605595L, -6133576477421907076L, 4199955888901663150L, -5341432795218012713L, -239890188217778377L, 8106773277103211697L, -2229320058079270256L, 5930619164422717276L, 4368075505682949467L, 4623369983466747106L, + 8403817438537116875L, -5327756068839670070L, 1151085119119418028L, 6933250016240323664L, 6814675599201764477L, -2995490164984896514L, 5778917359701360712L, -7334472845550608018L, -9212347808668562614L, -7786744047088363785L, + 4025584697920591189L, 5446500518121291045L, -7866665254384488512L, -352887593087136842L, 8290028954029701554L, -9087549732707247512L, 7234639242841923679L, 2860911103167493259L, -3716770017321781837L, 7444204691177324181L, + 8012224255291120002L, 6549509778060988165L, -4656265058823564969L, -1532696805485516055L, 4993489137437819341L, 4727924503904151836L, -3180601338503688336L, 7858325008468642462L, 6561287832113134677L, 1893413629145602549L, + -6205320776685678598L, 7334764389497132503L, 421942495471316930L, -9085229951450268347L, 5948965432456907277L, -6872877502453521409L, 4831763938021002582L, -4272888574428519313L, 5678704711006605406L, 4536654317168965104L, + 802439540090739142L, 1728614842704535657L, 7852250862810361152L, -2970083550513149273L, 6999787169451700297L, 327545298748531618L, -2764213178345403342L, 9213801181845131435L, -5950018878971805109L, -2186876610533351532L, + -3100863505161590557L, -194921935069456237L, 2629011484744925146L, 679658461659738748L, -3068808746888436091L, 2845612796809381245L, -7722098226173915145L, 7273530125705028225L, 4410076014410041819L, -2304212329100317967L, + -45936371244098582L, -5712723046817425393L, 8922873767131958175L, -3382299200423854708L, -3236816455951139535L, -4036747678298392505L, 5226125132195873799L, 2940247444995640068L, -4418018165041970817L, 6671397049608501367L, + 8821388386505911040L, -3580187736799586652L, -1447046360908978430L, 2147098610462912262L, -1956265881574637814L, -2856917834249223582L, 5141735866072457044L, 3265027362719053310L, -6450920645962515936L, 6017965846669640613L, + 4287051124723328232L, 8655371236021312991L, -1156847972119148173L, 2365060307249772354L, 1630631832073154105L, 1828719980936758421L, 2674037562503248056L, -7295616781251116690L, -1363141094472255887L, 204405347605452144L, + 5797523068258732423L, 8122903338174012641L, 8739821670855295734L, 961841682317282412L, 3487881148722869326L, -7995384159388863717L, 7665614591556333409L, -7831409025227614873L, -822907162794399275L, -1691135090558933875L, + 3797048810173566205L, -2578904300750297763L, -3410711173298709536L, 577633178325057199L, -7379212936790430923L, -9035774148364232240L, 2754939666238358593L, 8444132705799138470L, -7894221632442939675L, 3065464070595795438L, + -6610449357786147779L, 3184382822055416328L, 5740274767717360273L, 6179930651821454089L, -4826152258144849421L, 5115645765347262247L, 4602739923119569497L, -3465801151231271281L, -6359599548771540712L, -1926152657970122275L, + -8468989295385802946L, -6500580506154635033L, 4125629484990072616L, -6834670983768857044L, -4845179353893108027L, 4230689665262407186L, -1849684427061896393L, 9047540561879224854L, 1112218670439199625L, 8426162753992594376L, + -5990769681480860131L, -2503790423972405993L, 4028912247909671416L, -409156412951274838L, -8377831951645714695L, -1152570669068554652L, -6327418252815316840L, -3725559206061705268L, 1964465731879646024L, -2441760721249263597L, + 6946242362685775318L, -3298979752616086841L, -7236283555339513389L, -1419193050620496778L, -93735727476260563L, -5905399081030416230L, 2507248404937789251L, 7581261321693772141L, -8836566033099333598L, 520172056875071564L, + 3738403388662150470L, -2357506837776452040L, -5002739851233418934L, 930169001927683533L, 6889748805645999668L, -1031349426815687751L, 7941113837267854943L, -1243211017071393764L, -2154628650105719635L, 6332043450707792835L, + 3386824618901547762L, 7130458179308482168L, 1271522336860346025L, -997034324337437613L, 4823850509807911142L, 3107332511049695348L, 5437793788182680416L, -8315628002795417155L, 1494290439970088554L, -8609438560643873897L, + -8207953325454440687L, -5432621302919780015L, 1159256241058966379L, 1026141471931805870L, -8215608786054685932L, -609691062749569444L, 7511556330643118785L, -3915792337899679783L, 3932170512244996561L, 6834333685245251200L, + 4355290964656419152L, 6487547078612259600L, 6267880520331323438L, -1545475867304599653L, 8190919284549556346L, 3366895789332200348L, 2444540809879438627L, 6459524513146455969L, 4077716903750958194L, -6168929569432701476L, + -6973483665415634802L, -5197441416039796052L, 7734160491610189202L, 7910254887717195099L, 3836881802794822270L, 8311228008842563790L, 730509642500215940L, -650400159804944995L, -5124223765383482859L, 3579688877020158541L, + 8591780283260295173L, 5028082178778891827L, -498814760953987530L, -2709709455026140056L, 5487541034902828271L, 8530400576707172340L, -7604535187505054453L, -869656751120750718L, 4656569414526204412L, 491061932033469878L, + 8035458231926703496L, 137019260109594401L, 7421708309958176805L, 8223709417363553275L, 5401705824239018731L, -7162608250562934562L, 5308870500428712900L, -5508949737295341638L, 1376856236535589493L, -5655908917112005032L, + -7100674984259216372L, 1332977380922036690L, 3015788518022419172L, -6718854486329987908L, 6396540069380292132L, 2034188120276215631L, -1655134238111203034L, -509741179510489141L, 3623665942510192329L, -9164935270648710301L, + 1765784450088366494L, 5837777785993897047L, 1564973338399864744L, -2605395199060435761L, 4964475598524693274L, -5312043978489901415L, 6706291041494563888L, -789946623649963734L, -8091303779971721549L, 7456716478970921562L, + -335263357675197259L, -8515348892102079999L, -7048796562806032069L, -233028078259189719L, 284725780453796946L, -3832073186324226638L, -4921235094493811069L, -5089093504863659344L, -5607539644671350465L, -8911681616096439592L, + -4743899514573401058L, -7664321526450198170L, -4599281686566632149L, 2560491659082246267L, 8971180328015050686L, 2265540171276805379L, 6093561527083620308L, 12169565841013306L, 9128413284208255679L, -4178722056535276608L, + -8960148414521589626L, -4216952774774654326L, -5374970407177951367L, -6668788646589711127L, -2946910590031425822L, -8674853389405194592L, -7535980417822448849L, -6115357923114297461L, -8065837346967928004L, -7487037274649424496L, + -2061373546992596293L, -5783192355322733388L, 7153300451507295513L, -8779488031786375734L, 2187906506867626476L, 5612681432830855607L, -4653220181978985551L, 4688837593722596333L, -3815667051463559517L, -1779743783662362556L, + -3650491565905270770L, -4529053496248414107L, -4021111997381021802L, -4350414089199835873L }; + Tiger.T = _Vb_t_array_0; + } + + public Tiger () + { + this.buf = new byte[64]; + this.block = new long[8]; + this.Initialize (); + } + + public override bool CanTransformMultipleBlocks + { + get { return true; } + } + + public void Compress () + { + long aa = 0L; + long bb = 0L; + long[] block = null; + long cc = 0L; + aa = this.a; + bb = this.b; + cc = this.c; + block = this.block; + this.RoundABC (block[0], 5); + this.RoundBCA (block[1], 5); + this.RoundCAB (block[2], 5); + this.RoundABC (block[3], 5); + this.RoundBCA (block[4], 5); + this.RoundCAB (block[5], 5); + this.RoundABC (block[6], 5); + this.RoundBCA (block[7], 5); + this.Schedule (block); + this.RoundCAB (block[0], 7); + this.RoundABC (block[1], 7); + this.RoundBCA (block[2], 7); + this.RoundCAB (block[3], 7); + this.RoundABC (block[4], 7); + this.RoundBCA (block[5], 7); + this.RoundCAB (block[6], 7); + this.RoundABC (block[7], 7); + this.Schedule (block); + this.RoundBCA (block[0], 9); + this.RoundCAB (block[1], 9); + this.RoundABC (block[2], 9); + this.RoundBCA (block[3], 9); + this.RoundCAB (block[4], 9); + this.RoundABC (block[5], 9); + this.RoundBCA (block[6], 9); + this.RoundCAB (block[7], 9); + this.a ^= aa; + this.b -= bb; + this.c += cc; + } + + + ~Tiger () + { + + } + + protected override void HashCore (byte[] data, int nStart, int nSize) + { + byte[] buf = null; + int nBufPos = 0; + int nEnd = 0; + int nToCopy = 0; + this.lLen += ((long) nSize); + buf = this.buf; + nBufPos = this.nBufPos; + nEnd = (nStart + nSize); + while (nStart < nEnd) + { + nToCopy = ((int) (64 - nBufPos)); + if (nToCopy > nSize) + { + nToCopy = nSize; + } + Array.Copy (((Array) data), nStart, ((Array) buf), nBufPos, nToCopy); + nStart += nToCopy; + nBufPos += nToCopy; + nSize -= nToCopy; + if (64 <= nBufPos) + { + this.ProcessBlock (); + nBufPos = 0; + continue; + } + break; + } + this.nBufPos = nBufPos; + } + + protected override byte[] HashFinal () + { + byte[] buf = null; + int nBufPos = 0; + byte[] result = null; + nBufPos = this.nBufPos; + buf = this.buf; + buf[nBufPos] = ((byte) 1); + nBufPos++; + if (56 <= nBufPos) + { + Array.Clear (((Array) buf), nBufPos, ((int) (64 - nBufPos))); + this.ProcessBlock (); + nBufPos = 0; + } + Array.Clear (((Array) buf), nBufPos, ((int) ((64 - nBufPos) - 8))); + Tiger.LongToBytes (((long) (this.lLen << 3)), buf, 56); + this.ProcessBlock (); + result = new byte[24]; + Tiger.LongToBytes (this.a, result, 0); + Tiger.LongToBytes (this.b, result, 8); + Tiger.LongToBytes (this.c, result, 16); + return result; + } + + public override void Initialize () + { + this.a = 81985529216486895L; + this.b = -81985529216486896L; + this.c = -1110518062304271993L; + this.nBufPos = 0; + this.lLen = 0L; + } + + static void LongToBytes (long lVal, byte[] buf, int nIdx) + { + int nEnd = 0; + nEnd = (nIdx + 8); + while (nIdx < nEnd) + { + buf[nIdx] = ((byte) (lVal & 255L)); + lVal = ((long) (lVal >> 8)); + nIdx++; + } + } + + public void ProcessBlock () + { + long[] block = null; + byte[] buf = null; + int nI = 0; + int nPos = 0; + nPos = 0; + block = this.block; + buf = this.buf; + while (nPos < 64) + { + block[nI] = ((long) ((((((((((long) buf[(nPos + 7)]) << 56) | ((((long) buf[(nPos + 6)]) & 255L) << 48)) | ((((long) buf[(nPos + 5)]) & 255L) << 40)) | ((((long) buf[(nPos + 4)]) & 255L) << 32)) | ((((long) buf[(nPos + 3)]) & 255L) << 24)) | ((((long) buf[(nPos + 2)]) & 255L) << 16)) | ((((long) buf[(nPos + 1)]) & 255L) << 8)) | (((long) buf[nPos]) & 255L))); + nPos += 8; + nI++; + } + this.Compress (); + } + + public void RoundABC (long x, int mul) + { + long c = 0L; + int ch = 0; + int cl = 0; + long[] T = null; + T = Tiger.T; + c = this.c; + c ^= x; + ch = ((int) (c >> 32)); + cl = ((int) c); + this.a -= (((T[(cl & 255)] ^ T[((int) (((cl >> 16) & 255) + 256))]) ^ T[((ch & 255) + 512)]) ^ T[((int) (((ch >> 16) & 255) + 768))]); + this.b += (((T[(((cl >> 8) & 255) + 768)] ^ T[((int) (((cl >> 24) & 255) + 512))]) ^ T[(((ch >> 8) & 255) + 256)]) ^ T[((int) ((ch >> 24) & 255))]); + this.b *= ((long) mul); + this.c = c; + } + + public void RoundBCA (long x, int mul) + { + long a = 0L; + int ah = 0; + int al = 0; + long[] T = null; + T = Tiger.T; + a = this.a; + a ^= x; + ah = ((int) (a >> 32)); + al = ((int) a); + this.b -= (((T[(al & 255)] ^ T[((int) (((al >> 16) & 255) + 256))]) ^ T[((ah & 255) + 512)]) ^ T[((int) (((ah >> 16) & 255) + 768))]); + this.c += (((T[(((al >> 8) & 255) + 768)] ^ T[((int) (((al >> 24) & 255) + 512))]) ^ T[(((ah >> 8) & 255) + 256)]) ^ T[((int) ((ah >> 24) & 255))]); + this.c *= ((long) mul); + this.a = a; + } + + public void RoundCAB (long x, int mul) + { + long b = 0L; + int bh = 0; + int bl = 0; + long[] T = null; + T = Tiger.T; + b = this.b; + b ^= x; + bh = ((int) (b >> 32)); + bl = ((int) b); + this.c -= (((T[(bl & 255)] ^ T[((int) (((bl >> 16) & 255) + 256))]) ^ T[((bh & 255) + 512)]) ^ T[((int) (((bh >> 16) & 255) + 768))]); + this.a += (((T[(((bl >> 8) & 255) + 768)] ^ T[((int) (((bl >> 24) & 255) + 512))]) ^ T[(((bh >> 8) & 255) + 256)]) ^ T[((int) ((bh >> 24) & 255))]); + this.a *= ((long) mul); + this.b = b; + } + + public void Schedule (long[] x) + { + int _Vb_t_i4_0 = 0; + _Vb_t_i4_0 = 0; + x[_Vb_t_i4_0] -= (x[7] ^ -6510615555426900571L); + x[1] = (x[1] ^ x[0]); + _Vb_t_i4_0 = 2; + x[_Vb_t_i4_0] += x[1]; + _Vb_t_i4_0 = 3; + x[_Vb_t_i4_0] -= ((long) (x[2] ^ ((~ x[1]) << 19))); + x[4] = (x[4] ^ x[3]); + _Vb_t_i4_0 = 5; + x[_Vb_t_i4_0] += x[4]; + _Vb_t_i4_0 = 6; + x[_Vb_t_i4_0] -= ((long) (x[5] ^ (((~ x[4]) >> 23) & 2199023255551L))); + x[7] = (x[7] ^ x[6]); + _Vb_t_i4_0 = 0; + x[_Vb_t_i4_0] += x[7]; + _Vb_t_i4_0 = 1; + x[_Vb_t_i4_0] -= ((long) (x[0] ^ ((~ x[7]) << 19))); + x[2] = (x[2] ^ x[1]); + _Vb_t_i4_0 = 3; + x[_Vb_t_i4_0] += x[2]; + _Vb_t_i4_0 = 4; + x[_Vb_t_i4_0] -= ((long) (x[3] ^ (((~ x[2]) >> 23) & 2199023255551L))); + x[5] = (x[5] ^ x[4]); + _Vb_t_i4_0 = 6; + x[_Vb_t_i4_0] += x[5]; + _Vb_t_i4_0 = 7; + x[_Vb_t_i4_0] -= (x[6] ^ 81985529216486895L); + } + + public static bool SelfTest () + { + ASCIIEncoding enc = null; + byte[] hash = null; + int nI = 0; + string TEST_DATA = null; + byte[] TEST_HASH = null; + Tiger tg = null; + int _Vb_t_i4_0 = 0; + byte[] _Vb_t_array_0 = null; + TEST_DATA = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + _Vb_t_array_0 = new byte[] { ((byte) 15), ((byte) 123), ((byte) 249), ((byte) 161), ((byte) 155), ((byte) 156), ((byte) 88), ((byte) 242), ((byte) 183), ((byte) 97), + ((byte) 13), ((byte) 247), ((byte) 232), ((byte) 79), ((byte) 10), ((byte) 195), ((byte) 167), ((byte) 28), ((byte) 99), ((byte) 30), + ((byte) 123), ((byte) 83), ((byte) 247), ((byte) 142) }; + TEST_HASH = _Vb_t_array_0; + tg = new Tiger (); + tg.Initialize (); + enc = new ASCIIEncoding (); + hash = tg.ComputeHash (enc.GetBytes (TEST_DATA)); + if (hash.Length != TEST_HASH.Length) + { + return false; + } + _Vb_t_i4_0 = (TEST_HASH.Length - 1); + for (nI = 0; (nI <= _Vb_t_i4_0); nI++) + { + if (hash[nI] != TEST_HASH[nI]) + { + return false; + } + } + return true; + } + + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:35:29
|
Revision: 65 http://adc.svn.sourceforge.net/adc/?rev=65&view=rev Author: ullner Date: 2010-10-31 12:35:23 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Removed Paths: ------------- trunk/Source/CodeTest.cs trunk/Source/Helper.cs trunk/Source/Microsoft Visual Studio/ Deleted: trunk/Source/CodeTest.cs =================================================================== --- trunk/Source/CodeTest.cs 2010-10-31 12:34:44 UTC (rev 64) +++ trunk/Source/CodeTest.cs 2010-10-31 12:35:23 UTC (rev 65) @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ADC -{ - public class CodeTest - { - public void TestHelper() - { - } - } -} Deleted: trunk/Source/Helper.cs =================================================================== --- trunk/Source/Helper.cs 2010-10-31 12:34:44 UTC (rev 64) +++ trunk/Source/Helper.cs 2010-10-31 12:35:23 UTC (rev 65) @@ -1,72 +0,0 @@ -/* -Copyright (c) 2010, ADCProject -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the ADCProject nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ADCProject BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -using System; -using System.Collections.Generic; -using System.Text; -using System.Text.RegularExpressions; - -namespace ADC -{ - public class Helper - { - /// <summary> - /// Escapes an ADC string. - /// </summary> - /// <param name="strInitial">The input string value.</param> - /// <returns>The escaped string value.</returns> - public static string Escape(string strInput) - { - string strOutput = strInput; - - // Escape backslash - strOutput = strOutput.Replace("\\", "\\\\"); - - // Escape tab - strOutput = strOutput.Replace("\t", "\\t"); - - // Escape space - Regex regex = new Regex(@"[ ]{1,}", RegexOptions.None); - strOutput = regex.Replace(strOutput, @"\s"); - - return strOutput; - } - - //public static string UnEscape(string strInput) - //{ - // string strOutput = strInput; - - // strOutput = strOutput.Replace("\\t", "\t"); - - // strOutput = strOutput.Replace("\\\\", "\\"); - - - - - //} - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:34:50
|
Revision: 64 http://adc.svn.sourceforge.net/adc/?rev=64&view=rev Author: ullner Date: 2010-10-31 12:34:44 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Added Paths: ----------- trunk/Source/csharp/Microsoft Visual Studio/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:30:42
|
Revision: 63 http://adc.svn.sourceforge.net/adc/?rev=63&view=rev Author: ullner Date: 2010-10-31 12:30:35 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Added Paths: ----------- trunk/Source/csharp/Helper.cs Copied: trunk/Source/csharp/Helper.cs (from rev 60, trunk/Source/Helper.cs) =================================================================== --- trunk/Source/csharp/Helper.cs (rev 0) +++ trunk/Source/csharp/Helper.cs 2010-10-31 12:30:35 UTC (rev 63) @@ -0,0 +1,72 @@ +/* +Copyright (c) 2010, ADCProject +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the ADCProject nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL ADCProject BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; + +namespace ADC +{ + public class Helper + { + /// <summary> + /// Escapes an ADC string. + /// </summary> + /// <param name="strInitial">The input string value.</param> + /// <returns>The escaped string value.</returns> + public static string Escape(string strInput) + { + string strOutput = strInput; + + // Escape backslash + strOutput = strOutput.Replace("\\", "\\\\"); + + // Escape tab + strOutput = strOutput.Replace("\t", "\\t"); + + // Escape space + Regex regex = new Regex(@"[ ]{1,}", RegexOptions.None); + strOutput = regex.Replace(strOutput, @"\s"); + + return strOutput; + } + + //public static string UnEscape(string strInput) + //{ + // string strOutput = strInput; + + // strOutput = strOutput.Replace("\\t", "\t"); + + // strOutput = strOutput.Replace("\\\\", "\\"); + + + + + //} + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:30:25
|
Revision: 62 http://adc.svn.sourceforge.net/adc/?rev=62&view=rev Author: ullner Date: 2010-10-31 12:30:19 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Added Paths: ----------- trunk/Source/csharp/CodeTest.cs Copied: trunk/Source/csharp/CodeTest.cs (from rev 52, trunk/Source/CodeTest.cs) =================================================================== --- trunk/Source/csharp/CodeTest.cs (rev 0) +++ trunk/Source/csharp/CodeTest.cs 2010-10-31 12:30:19 UTC (rev 62) @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ADC +{ + public class CodeTest + { + public void TestHelper() + { + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:24:14
|
Revision: 61 http://adc.svn.sourceforge.net/adc/?rev=61&view=rev Author: ullner Date: 2010-10-31 12:24:08 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Added Paths: ----------- trunk/Source/cpp/ trunk/Source/csharp/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:22:27
|
Revision: 60 http://adc.svn.sourceforge.net/adc/?rev=60&view=rev Author: ullner Date: 2010-10-31 12:22:20 +0000 (Sun, 31 Oct 2010) Log Message: ----------- add some files.. Modified Paths: -------------- trunk/Source/Helper.cs trunk/Source/Microsoft Visual Studio/ADCLibraryTest/ADCLibraryTest.csproj trunk/Source/readme.txt Added Paths: ----------- trunk/Source/Microsoft Visual Studio/ADCLibrary/ADCLibrary.sln trunk/Source/Microsoft Visual Studio/ADCLibrary.sln Modified: trunk/Source/Helper.cs =================================================================== --- trunk/Source/Helper.cs 2010-10-29 20:55:08 UTC (rev 59) +++ trunk/Source/Helper.cs 2010-10-31 12:22:20 UTC (rev 60) @@ -27,7 +27,6 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Text; using System.Text.RegularExpressions; @@ -56,5 +55,18 @@ return strOutput; } + + //public static string UnEscape(string strInput) + //{ + // string strOutput = strInput; + + // strOutput = strOutput.Replace("\\t", "\t"); + + // strOutput = strOutput.Replace("\\\\", "\\"); + + + + + //} } } Added: trunk/Source/Microsoft Visual Studio/ADCLibrary/ADCLibrary.sln =================================================================== --- trunk/Source/Microsoft Visual Studio/ADCLibrary/ADCLibrary.sln (rev 0) +++ trunk/Source/Microsoft Visual Studio/ADCLibrary/ADCLibrary.sln 2010-10-31 12:22:20 UTC (rev 60) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ADCLibrary", "ADCLibrary.csproj", "{F9C721FB-A66D-4D2A-B49E-BB41E4946A24}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/Source/Microsoft Visual Studio/ADCLibrary.sln =================================================================== --- trunk/Source/Microsoft Visual Studio/ADCLibrary.sln (rev 0) +++ trunk/Source/Microsoft Visual Studio/ADCLibrary.sln 2010-10-31 12:22:20 UTC (rev 60) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ADCLibrary", "ADCLibrary.csproj", "{F9C721FB-A66D-4D2A-B49E-BB41E4946A24}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Modified: trunk/Source/Microsoft Visual Studio/ADCLibraryTest/ADCLibraryTest.csproj =================================================================== --- trunk/Source/Microsoft Visual Studio/ADCLibraryTest/ADCLibraryTest.csproj 2010-10-29 20:55:08 UTC (rev 59) +++ trunk/Source/Microsoft Visual Studio/ADCLibraryTest/ADCLibraryTest.csproj 2010-10-31 12:22:20 UTC (rev 60) @@ -40,6 +40,9 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> + <Compile Include="..\..\CodeTest.cs"> + <Link>CodeTest.cs</Link> + </Compile> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> Modified: trunk/Source/readme.txt =================================================================== --- trunk/Source/readme.txt 2010-10-29 20:55:08 UTC (rev 59) +++ trunk/Source/readme.txt 2010-10-31 12:22:20 UTC (rev 60) @@ -1 +1,43 @@ -All code that is submitted to the ADCProject should have a note specifying the transfer of copyright to the ADCProject. \ No newline at end of file + +Table of content + +1. Code structure + +All code shall follow the following general structure for naming convention; +* Namespace or package name should be ADC +* Files, classes and most (see below for exceptions) function names are named with initial upper case letter and upper case letters starting each new word. An abbreviation shall be spelt in all upper case letters. +Examples: file TigerTreeHashImplementation.h, class TTHImplementation, function CalculateTTH() +* All member variables shall be named with first word in lower case and upper case letters starting each new word. An abbreviation shall be spelt in all upper case letters. All variables shall be prefixed with an underscore ('_') or as the language recommendation unless the language is listed as below; + C++: m_ + C#: _ +Examples: m_fooBar, _fooBar +* All member properties (e.g. in C#) shall be named similarly as Files, classes and functions. In languages that do not support properties, function implementation of properties (get/set), 'get' and 'set' shall be prefixed with the 'property' name. +Examples: MessageType, getMessageType(), setMessageType(...) +* Function scoped variables shall be named with first word in lower case and upper case letters starting each new word. An abbreviation shall be spelt in all upper case letters. +Examples: lifeAndMeaningOfLife, debugSource + +Block structure +* Ifs and loops should always be surrounded by a code block, regardless if the code blocks are needed or not. +Example: +a) OK: if( 42 == lifeAndMeaningOfLife ) { print "42" } +b) Not OK: if ( 42 == lifeAndMeaningOfLife ) print "42" + +Code/Type safety +* Implementations should always strive to be as compile-time safe as possible. +* Functions should be as const-correct as possible. All get() functions should be constant. +Example: int getFooBar() const; + +Documentation +* All files, classes, functions and member variables shall be documented. +* All files shall contain a copyright notice pointing to the ADCProject and the New BSD license. See 2. Code license below. + +Return values +* Functions should return as few values as possible and instead rely on references as funtion parameters. + +2. Code license + +All code that is submitted to the ADCProject should have a note specifying the transfer of copyright to the ADCProject. + +The LICENSE is New BSD License (3-clause BSD license). + +See the file LICENSE for the text to use in each file. \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-29 20:55:14
|
Revision: 59 http://adc.svn.sourceforge.net/adc/?rev=59&view=rev Author: ullner Date: 2010-10-29 20:55:08 +0000 (Fri, 29 Oct 2010) Log Message: ----------- Added grouping of file extensions in SCH Added failover hub addresses to the hub's INF Modified Paths: -------------- trunk/ADC-EXT.txt Modified: trunk/ADC-EXT.txt =================================================================== --- trunk/ADC-EXT.txt 2010-10-15 23:34:49 UTC (rev 58) +++ trunk/ADC-EXT.txt 2010-10-29 20:55:08 UTC (rev 59) @@ -37,17 +37,19 @@ * Added partial file sharing extension 'PFSR'. === Version 1.0.5 -* Added locale field to INF +* Added locale field to INF. * Modified user parameter 'line' in UCMD to handle multiple inputs. * Added hidden in enumeration of CT field in INF. * Added error code Invalid feature in STA. === Version 1.0.6 UNRELEASED * Added 'KEYP' extension for providing certificate substitution protection in ADCS. -* Added note to signal DFAV in SUP. +* Added note to signal DFAV. * Added 'SUDP' extension for encryption of UDP traffic. * Added 'TYPE' extension for chat state notifications. * Added 'FEED' extension for RSS feeds. +* Added grouping of file extensions to SCH. +* Added failover hub addresses to the hub's INF. == Extensions @@ -208,7 +210,7 @@ === DFAV - Distributed Favorites The idea behind this extension is to generate a public hublist from the users favorite hublist. Implementations should separate between public and private hubs in the favorite hublist of an user, in order not to distribute private hubs where one can not connect to anyway. -Signal DFAV in SUP. +Signal DFAV in SUP and the INF's SU field. ==== GFA GFA @@ -272,7 +274,7 @@ |userCID |User CID |userSID |User SID |userXX |One for each flag on the user sent; for example, userI4 and userNI -|line:info |Prompts the user for input where 'info' is the displayed text description for the user input. 'info' can be used for multiple values (combobox etc), and should be structured as "general info/default selection/value0/value1/.../valueN". The general info can be viewed as the caption of the user input dialog. Default selection is an integer k which signifies the default value to be used. Note that 0<=k<=N and N>=1. Note that values are 0-index based. Values are separated with a forward slash ('/'). If a forward slash is part of a value, it should be escaped by using an additional forward slash ('//'). +|line:info |Prompts the user for input where 'info' is the displayed text description for the user input. 'info' can be used for multiple values (combobox etc), and should be structured as "general info/default selection/value0/value1/.../valueN". The general info can be viewed as the caption of the user input dialog. Default selection is an integer k which signifies the default value to be used. Note that N >= k >= 0 and N >= 1. Note that values are 0-index based. Values are separated with a forward slash ('/'). If a forward slash is part of a value, it should be escaped by using an additional forward slash ('//'). |===== File parameters @@ -582,7 +584,7 @@ Client may otherwise verify if the message is a U-type message, followed by a known command (and a space). If that is not the case, the client takes the most recent key and decrypts. If that succeed, the message is valid. -There is a potential chance that decryption succeed with what is bad key. If that is the case, the client should verify that the data is not garbled. +There is a potential chance that decryption succeed with what is a bad key. If that is the case, the client should verify that the data is not garbled. Note that in a normal circumstance, the client will most likely be using relatively few active keys. @@ -654,4 +656,39 @@ RSS http://example.com/rss TINew_post DEdescription_of_post LIhttp://example.com/entries/new_post DT1253628000 CRJohn_Doe ==== +=== GR - Grouping of file extensions in SCH +In BASE, clients add EX fields to SCH to denote which extension files should have. This can lead to a situation where the large bulk of extensions are of similar "type", e.g. audio files or documents. This extension intend to add a field GR which groups multiple extensions. In addition, the field RX shall be used for group-exclusion; if all extensions in a group but one are desired, field RX will be used to exclude those group items. + +Field GR values, where multiple groups are specified by adding the numbers together: +[options="autowidth"] +|===== +|1 |Audio |AIFF, APE, AU, FLAC, M4A, MID, MP2, MP3, MPC, OGG, RA, WAV, WMA +|2 |Compressed |7Z, ACE, ARJ, BZ2, LHA, LZH, RAR, TAR, TZ, Z, ZIP +|4 |Document |DOC, DOCX, HTM, HTML, NFO, ODF, ODP, ODS, ODT, PDF, PPT, PPTX, RTF, TXT, XLS, XLSX, XML, XPS +|8 |Executable |APP, BAT, CMD, COM, DLL, EXE, JAR, MSI, PS1, VBS, WSF +|16 |Picture |AI, BMP, CDR, EPS, GIF, ICO, IMG, JPEG, JPG, PCT, PCX, PICT, PNG, PS, PSD, PSP, RLE, SFW, TGA, TIF +|32 |Video |3GP, ASF, ASX, AVI, DIVX, FLV, MKV, MOV, MP4, MPEG, MPG, OGM, PXP, QT, RM, RMVB, SWF, VOB, WEBM, WMV +|===== + +Field RX: +[options="autowidth"] +|===== +|RX |Extensions in a group that are not desired. E.g., "GR1 RXMP3 RXWAV" would include all extensions in the 'audio' group except 'MP3' or 'WAV'. +|===== + +=== FO - Failover hub addresses +If a hub goes down, the client's only option is to keep re-trying the last known hub address. This extension will add a list of failover hub addresses, field FO, that the client can try to connect to, if the main hub address fail. + +Clients should decide the frequency of connection attempts (for the main hub as well as the failover addresses). The client should try connecting in the specified order. The client may decide what to do after the FO-list is exhausted, but recommended is to try to connect to the main hub and continue with the list as before. + +The client should display an appropriate message to the user that it has connected to a failover address. + +This extension should be implemented, at a minimum, for favourite hubs. If clients have any concerns about where a hub may redirect users to, or about storing the extra state information, then it may avoid implementing this for non-favourite hubs. + +Field FO in the hub's INF: +[options="autowidth"] +|===== +|FO |Failover hub addresses. Specify well formed ADC or ADCS URI addresses, with multiple addresses separated with a comma. Example; FOadc://example.com:1234,adc://example.net:1234 +|===== + // vim: set syntax=asciidoc: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-15 23:34:55
|
Revision: 58 http://adc.svn.sourceforge.net/adc/?rev=58&view=rev Author: ullner Date: 2010-10-15 23:34:49 +0000 (Fri, 15 Oct 2010) Log Message: ----------- Added FEED for RSS feeds Modified Paths: -------------- trunk/ADC-EXT.txt Modified: trunk/ADC-EXT.txt =================================================================== --- trunk/ADC-EXT.txt 2010-10-15 23:23:48 UTC (rev 57) +++ trunk/ADC-EXT.txt 2010-10-15 23:34:49 UTC (rev 58) @@ -47,6 +47,7 @@ * Added note to signal DFAV in SUP. * Added 'SUDP' extension for encryption of UDP traffic. * Added 'TYPE' extension for chat state notifications. +* Added 'FEED' extension for RSS feeds. == Extensions @@ -609,4 +610,48 @@ |11 |Composing |Currently typing a message. |Must be sent. |===== +=== FEED - RSS feeds +The extension adds RSS feed support. See http://en.wikipedia.org/wiki/RSS for a description. + +Signal FEED in SUP and the INF's SU field. + +==== RSS + RSS url + +Context: F, T + +States: NORMAL + +url is the URL to the feed. + +Additional fields: + +[options="autowidth"] +|===== +|CR |Name of the author. +|TI |Name of post. +|DE |Content summary of post. +|LI |Direct link to post +|FN |Feed name +|FN |Feed description +|DT |Time of publish. Specified in seconds since UNIX epoch. +|RM |1 = Remove feed from aggregator. +|===== + +==== Examples +Publish a new feed called 'Example_feed' and with a description 'description_of_feed': +==== +RSS http://example.com/rss FNExample_feed FNdescription_of_feed +==== + +Remove a feed: +==== +RSS http://example.com/rss RM1 +==== + +Publish a new post 'New_post' from 'John_Doe': +==== +RSS http://example.com/rss TINew_post DEdescription_of_post LIhttp://example.com/entries/new_post DT1253628000 CRJohn_Doe +==== + // vim: set syntax=asciidoc: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-15 23:23:54
|
Revision: 57 http://adc.svn.sourceforge.net/adc/?rev=57&view=rev Author: ullner Date: 2010-10-15 23:23:48 +0000 (Fri, 15 Oct 2010) Log Message: ----------- Added TYPE for chat state notifications. Modified Paths: -------------- trunk/ADC-EXT.txt Modified: trunk/ADC-EXT.txt =================================================================== --- trunk/ADC-EXT.txt 2010-10-15 23:10:18 UTC (rev 56) +++ trunk/ADC-EXT.txt 2010-10-15 23:23:48 UTC (rev 57) @@ -46,6 +46,7 @@ * Added 'KEYP' extension for providing certificate substitution protection in ADCS. * Added note to signal DFAV in SUP. * Added 'SUDP' extension for encryption of UDP traffic. +* Added 'TYPE' extension for chat state notifications. == Extensions @@ -179,7 +180,7 @@ -pinger- HSUP ADBASE ADPING AD.. -hub- ISUP ADBASE ADPING AD.. -hub- ISID .. - -hub- IINF NIhubname DEcurrent\stopic VE.. HHmyhub.no-ip.org:555 WShttp://myhub.no-ip.org/ OWmyname UC2231 SS.. SF.. MS0 ML0 MC5000 + -hub- IINF NIhubname DEcurrent\stopic VE.. HHexample.org:555 WShttp://example.org/ OWmyname UC2231 SS.. SF.. MS0 ML0 MC5000 - (pinger may disconnect) ==== @@ -196,7 +197,7 @@ -hub- HSUP ADBASE ADPING AD.. -hublist- ISUP ADBASE ADPING AD.. -hublist- IINF NIhublist_name WShublist_address - -hub- HINF NIhubname DEcurrent\stopic VE.. HHmyhub.no-ip.org:555 WShttp://myhub.no-ip.org/ OWmyname UC2231 SS.. SF.. MS0 ML0 MC5000 + -hub- HINF NIhubname DEcurrent\stopic VE.. HHexample.org:555 WShttp://example.org/ OWmyname UC2231 SS.. SF.. MS0 ML0 MC5000 -( disconnect ) ==== @@ -556,7 +557,6 @@ ==== === SUDP - Encrypting UDP traffic - This is an extension that allows UDP traffic to be encrypted. While assymetric encryption may be optimal in sense of security, a symmetric cipher will protect perfectly against outside adversaries given the hub-client connections is also running ADCS. New is that senders now create a random IV for their "request command" (e.g. searches) and send it along the "response command" (e.g. search result). @@ -585,4 +585,28 @@ Note that in a normal circumstance, the client will most likely be using relatively few active keys. +=== TYPE - Typing notification +This extension adds a typing similar to Jabber's http://www.xmpp.org/extensions/xep-0085.html["Chat state notifications"]. + +Signal TYPE in SUP and the INF's SU field. + +==== TPN + TPN code + +Contexts: F, T + +States: NORMAL + +Command should be sent to the Reply-To user (PM field in MSG, if present). All TPN messages are sent when the event occur. + +Code values: +[options="autowidth"] +|===== +|00 |Gone |Closed tab, minimized window, etc |Should be sent. +|01 |Inactive |Changed tab, window became unfocused (but not closed or minimized), etc |Should be sent. +|02 |Paused |Paused typing. |Should be sent. +|10 |Active |Now in this tab, reading message and is actively participating in the chat session. |Must be sent. +|11 |Composing |Currently typing a message. |Must be sent. +|===== + // vim: set syntax=asciidoc: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-15 23:10:24
|
Revision: 56 http://adc.svn.sourceforge.net/adc/?rev=56&view=rev Author: ullner Date: 2010-10-15 23:10:18 +0000 (Fri, 15 Oct 2010) Log Message: ----------- Added SUDP extension for encryption of UDP traffic. Updated the version information to be more uniform. Modified Paths: -------------- trunk/ADC-EXT.txt Modified: trunk/ADC-EXT.txt =================================================================== --- trunk/ADC-EXT.txt 2010-10-15 21:33:45 UTC (rev 55) +++ trunk/ADC-EXT.txt 2010-10-15 23:10:18 UTC (rev 56) @@ -1,6 +1,6 @@ = ADC Extensions Fredrik Ullner <ul...@gm...> -1.0.6, September 2010 +1.0.6, October 2010 == Abstract These are the official extensions to ADC. This document is based on the @@ -15,36 +15,37 @@ This version corresponds to $Revision$. === Version 1.0 -* Initial release created from original ADC 1.0 text -* Added PING extension +* Initial release created from original ADC 1.0 text. +* Added 'PING' extension for hub pingers. === Version 1.0.1 -* Added TS as additional MSG parameter -* Added DFAV +* Added timestamp field to MSG. +* Added 'DFAV' extension for distributing hub addresses. === Version 1.0.2 -* Added UCMD extension +* Added 'UCMD' extension for user commands. === Version 1.0.3 -* Removed optional keywords from UCMD -* Added BLOM extension +* Removed optional keywords from UCMD. +* Added 'BLOM' extension for bloom filters. === Version 1.0.4 -* Added magnet link extension to 'UCMD' -* Added NAT traversal extension 'NATT' -* Added referral field to STA -* Added upload queue field to STA -* Added partial file sharing extension 'PFSR' +* Added magnet link extension to UCMD. +* Added NAT traversal extension 'NATT'. +* Added referral field to STA. +* Added upload queue field to STA. +* Added partial file sharing extension 'PFSR'. === Version 1.0.5 * Added locale field to INF -* Modified user parameter 'line' in 'UCMD' to handle multiple inputs. +* Modified user parameter 'line' in UCMD to handle multiple inputs. * Added hidden in enumeration of CT field in INF. * Added error code Invalid feature in STA. === Version 1.0.6 UNRELEASED -* Added KEYP extension for providing certificate substitution protection in ADCS. +* Added 'KEYP' extension for providing certificate substitution protection in ADCS. * Added note to signal DFAV in SUP. +* Added 'SUDP' extension for encryption of UDP traffic. == Extensions @@ -554,4 +555,34 @@ adcs://example.com:1234/?kp=SHA256/G3PJC4F4MQ5KOXGE2MPYJW5EW63IC6M7RN7OS663JLLWN2M5I6FQ ==== +=== SUDP - Encrypting UDP traffic + +This is an extension that allows UDP traffic to be encrypted. + +While assymetric encryption may be optimal in sense of security, a symmetric cipher will protect perfectly against outside adversaries given the hub-client connections is also running ADCS. New is that senders now create a random IV for their "request command" (e.g. searches) and send it along the "response command" (e.g. search result). + +Signal SUDP in SUP and in the INF's SU field. + +If a client signal support for SUDP in an ADCS hub, it may extend commands that will generate a response (e.g. SCH) with a KY-field as the encryption key. Clients shall only include the flag in ADCS hubs. + +[options="autowidth"] +|===== +|KY | 16 byte encryption key in BASE32. 128 bit AES encryption shall be used. +|===== + +For example, a SCH command will result in 29 Bytes of overhead ("<space>KY"+26 Bytes Base32 encoded key). + +A client that has a response for the command can now encrypt the response message by prepending 16 bytes of random data and afterwards encrypting it with AES/CBC/PKCS5Padding (Cipher/Blockmode/Padding) using 16 zero bytes as IV for CBC. + +In above scenario, the response would be a RES command. + +==== Decryption notes +In the case of searching, the searching client in return for decryption first has to guess which commands it receives are encrypted and which are not. It can do so for example by simply trying decryption with all currently active keys. If a key is wrong or the message was not encrypted, padding will fail and decryption is unsuccessful! + +Client may otherwise verify if the message is a U-type message, followed by a known command (and a space). If that is not the case, the client takes the most recent key and decrypts. If that succeed, the message is valid. + +There is a potential chance that decryption succeed with what is bad key. If that is the case, the client should verify that the data is not garbled. + +Note that in a normal circumstance, the client will most likely be using relatively few active keys. + // vim: set syntax=asciidoc: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-15 21:33:51
|
Revision: 55 http://adc.svn.sourceforge.net/adc/?rev=55&view=rev Author: ullner Date: 2010-10-15 21:33:45 +0000 (Fri, 15 Oct 2010) Log Message: ----------- Added note to signal DFAV in SUP. Modified Paths: -------------- trunk/ADC-EXT.txt Modified: trunk/ADC-EXT.txt =================================================================== --- trunk/ADC-EXT.txt 2010-10-11 20:56:55 UTC (rev 54) +++ trunk/ADC-EXT.txt 2010-10-15 21:33:45 UTC (rev 55) @@ -44,6 +44,7 @@ === Version 1.0.6 UNRELEASED * Added KEYP extension for providing certificate substitution protection in ADCS. +* Added note to signal DFAV in SUP. == Extensions @@ -204,6 +205,8 @@ === DFAV - Distributed Favorites The idea behind this extension is to generate a public hublist from the users favorite hublist. Implementations should separate between public and private hubs in the favorite hublist of an user, in order not to distribute private hubs where one can not connect to anyway. +Signal DFAV in SUP. + ==== GFA GFA This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |