| View previous topic :: View next topic |
| Author |
Message |
pango Sage

Joined: 31 Oct 2002 Posts: 2436
|
Posted: Sun Nov 06, 2005 5:00 pm Post subject: |
|
|
CryptoKit lacked DER encoding, maybe more.
But if an ocaml implementation can be found or coded, I'm all for it... |
|
| Back to top |
|
 |
Alvo neophyte

Joined: 19 Jun 2005 Posts: 13 Location: Germany
|
Posted: Thu Nov 10, 2005 10:41 am Post subject: Crypto |
|
|
Hi All!
I tested a bit with SecIdent, and i revealed some details.
Question: Why is a pubkey 76 bytes while eMule devs say, a public key is 384bit / 48 byte?
Ans: the pubkey is transmitted in DER-encoding (Distinguished encoding rules)
Question: DER and pubkey, whats going on?
Ans: Clients sends us pubkeys in DER-Encoding:
0x304a300d06092a864886f70d01010105000339003036023100d0ab393783c89e435ad46bd7783ff9f77bc363e56269e99398061b2d3a6547594c93f78b947b34cd9239e2017a00a1b3020111
0x304a300d06092a864886f70d01010105000339003036023100b20b4ea46cc17eb61bb3adb4586d778a542e5dcda6ebc2b59e62fb0f648155a6a90d14e810aa2cf2d898660ee030939b020111
As you can see, the first and last part is constant, the byte-subset 25-73 differ, this is coincidentally 48 bytes. This is the public key, the rest is waste.
Question: A RSA-Pubkey consists of two numbers, but apparently only one number is transmitted, why?
Ans: eMule devs probably diddnt care about the public exponent number, they used a library which had a default of 17. So the RSA public exponent number is fixed to 17 and is not transmitted.
When you try decoding received signatures with the signers public key (which is the modulus N), you'll get results like this:
0x01ffffffffffffffffffff003021300906052b0e03021a05000414d100a84fe86a8674abba7278c3bb03b4b375c244
0x01ffffffffffffffffffff003021300906052b0e03021a05000414f07151cf48a6401b3da8d5b54d8a96d86f5ac35b
Interesting that the first part is constant and always only the last 20 bytes differ. Well, thats PKCS-SHA1, so the to be signed message is preliminarily mangled by SHA1. SHA1 has a message digest of 20 bytes, this is why only the last 20 bytes differ in decoded signatures. The SHA1 digest is prepended with a constant number of 27 bytes.
Question: What is the input of this SHA1-hash function?
Ans:Its the public key from the signature requestors in DER-encoding and the challenge (SecIdent V1).
Question: Why is the SHA1-digest prepended with a constant value?
Ans: i don't know, maybe its written in the stars
So this all has something to do with DER-encoding and PKCS-message-mangling, somehow
regards
Alvo (Owe)
Last edited by Alvo on Fri Nov 11, 2005 7:59 am; edited 3 times in total |
|
| Back to top |
|
 |
Enig neophyte
Joined: 23 Jul 2005 Posts: 22 Location: USA
|
Posted: Thu Nov 10, 2005 12:10 pm Post subject: |
|
|
Thank owe.
It's time to add SUI with Mulus now.  |
|
| Back to top |
|
 |
Hoodoo user

Joined: 16 Oct 2004 Posts: 56 Location: OZ
|
Posted: Mon Nov 28, 2005 9:37 am Post subject: |
|
|
| Is there a download counter in mldonkey or mulus that tracks the amount of data that is downloaded/uploaded to keep it alive on the various networks? |
|
| Back to top |
|
 |
fabtar Sage

Joined: 04 Feb 2004 Posts: 1575 Location: Italy
|
Posted: Mon Dec 05, 2005 8:50 am Post subject: |
|
|
@hoodoo
Could you elaborate your question.
You can see ed2k stats in statistical panel of mldonkey/mulus about other stas I am not experienced about. |
|
| Back to top |
|
 |
Knocker professional

Joined: 05 Nov 2002 Posts: 612 Location: Germany
|
Posted: Mon Dec 05, 2005 9:21 am Post subject: |
|
|
| Enig wrote: |
It's time to add SUI with Mulus now.  |
Looks like there is an answer from me missing. I'm sure I answered in this thread after Enig's message.
My last answer did go something like:
Wow that (SUI) is more complex than I thougt. I will have a look in mldonkey 2.7 to figure things out. |
|
| Back to top |
|
 |
Hoodoo user

Joined: 16 Oct 2004 Posts: 56 Location: OZ
|
Posted: Tue Dec 06, 2005 9:32 am Post subject: |
|
|
| fabtar wrote: | @hoodoo
Could you elaborate your question.
You can see ed2k stats in statistical panel of mldonkey/mulus about other stas I am not experienced about. |
Yeah, I had a look at those stats and they are good for looking at the number of connections etc. I guess I am looking for a byte accumulator that counts network traffic associated with each protocol (ie excluding the actual files that are being downloaded) for example the bytes uploaded/downloaded relating to connection requests, connection to servers etc. |
|
| Back to top |
|
 |
|