Protocols/OSCAR/SNAC/BUCP CHALLENGE RESPONSE: Difference between revisions

From Toxi's Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:Protocols/OSCAR}}
{{Template:Protocols/OSCAR}}


This is the SNAC sent by the server in reply to [[Protocols/OSCAR/SNAC/BUCP__CHALLENGE_REQUEST|BUCP__CHALLENGE_REQUEST]]. After this is sent, the client should send a [[Protocols/OSCAR/SNAC/BUCP__LOGIN_REQUEST|BUCP__LOGIN_REQUEST]] packet, where the challenge it recieves here is used when hashing the password.
This is the first SNAC sent by the server in response to [[Protocols/OSCAR/SNAC/BUCP__CHALLENGE_REQUEST|BUCP__CHALLENGE_REQUEST]]. After this is sent, the client should store the challenge given here, and use it for hashing the password in [[Protocols/OSCAR/SNAC/BUCP__LOGIN_REQUEST|BUCP__LOGIN_REQUEST]].
 


=== SNAC Header ===
{{Template:Protocols/OSCAR/SNAC/Header
{{Template:Protocols/OSCAR/SNAC/Header
|foodgroup=00 17
|foodgroup=00 17
|subgroup=00 07
|subgroup=00 07
|flags=00 00
|flags=00 00
|request_id=00 00 00 00}}
|request_id=00 00 00 00}}
 
<!-- This isn't a TLV, so we can't use Template:Protocols/OSCAR/SNAC/TLV -->
<!-- TODO(subpurple): Maybe make something custom for non-TLV data? -->
 
                    <tr>
                        <td width="20"></td>
                        <td>
                            <table width="610" bgcolor="darkgreen" cellspacing="0" cellpadding="0" border="0">
                                <tr><td>
                                    <table width="100%" cellspacing="2" cellpadding="0" align="center" border="0">
                                        <tr><td bgcolor="#f9f9f9">
                                            <table width="610" cellspacing="0" cellpadding="0" align="center" border="0">
                                                <tr>
                                                    <td width="20%">&nbsp;xx xx</td>
                                                    <td width="5">&nbsp;</td>
                                                    <td>word</td>
                                                    <td width="5">&nbsp;</td>
                                                    <td width="60%">Challenge length</td>
                                                </tr>
                                                <tr>
                                                    <td>&nbsp;xx ..</td>
                                                    <td width="5">&nbsp;</td>
                                                    <td>string</td>
                                                    <td width="5">&nbsp;</td>
                                                    <td width="60%">Challenge</td>
                                                </tr>
                                            </table>
                                        </td></tr>
                                    </table>
                                </td></tr>
                            </table>
                        </td>
                        <td width="5"></td>
                    </tr>
 
                    <tr>
                        <td height="5" colspan="3"></td>
                    </tr>


=== SNAC Data ===
{{Template:Protocols/OSCAR/SNAC/Footer}}
The SNAC data is as follows, in this order:
* Challenge length (uint16/word)
* Challenge (bytes)


Example dump (from NINA's servers - with a FLAP header):
Example dump (from NINA's servers - dump contains a FLAP header):
<pre>
<pre>
0000  00 0c 29 d0 5f 85 00 50 56 f1 00 4c 08 00 45 00   ..)._..PV..L..E.
0000  2a 02 00 01 00 16 00 17 00 07 00 00 00 00 00 00  *...............
0010  00 44 00 e1 00 00 80 06 f2 d6 86 d1 af f6 c0 a8  .D..............
0010   00 0a 36 30 30 35 38 35 35 39 34 36              ..6005855946
0020  4f 8c 14 46 04 8a 6c 15 1c b4 de 01 cb ad 50 18  O..F..l.......P.
0030  fa f0 f0 2e 00 00 2a 02 00 01 00 16 00 17 00 07   ......*.........
0040   00 00 00 00 00 00 00 0a 36 30 30 35 38 35 35 39   ........60058559
0050  34 36                                            46
</pre>
</pre>


''Note for server developers: I'm not quite sure if there is anything fancy going on in the challenge generation in NINA, but judging by the packet dumps above, I simply just made a string with 10 random numbers, as seen in my [https://github.com/subpurple/escargot server]''
''Note for server developers: I'm not quite sure if there is anything fancy going on in the challenge generation in NINA, but judging by the packet dumps alone, I simply just made a string with 10 random numbers, as seen in my [https://github.com/subpurple/escargot server]''

Latest revision as of 18:58, 21 July 2024

OSCAR Protocol
IntroductionTermsClients
Basic
TODO
Tutorials
Sign On
Foodgroups
OSERVICE (0x0001)
BUCP (0x0017)

This is the first SNAC sent by the server in response to BUCP__CHALLENGE_REQUEST. After this is sent, the client should store the challenge given here, and use it for hashing the password in BUCP__LOGIN_REQUEST.


 00 17   word   SNAC foodgroup
 00 07   word   SNAC subgroup
 00 00   word   SNAC flags
 00 00 00 00   dword   SNAC request ID
 xx xx   word   Challenge length
 xx ..   string   Challenge

Example dump (from NINA's servers - dump contains a FLAP header):

0000   2a 02 00 01 00 16 00 17 00 07 00 00 00 00 00 00   *...............
0010   00 0a 36 30 30 35 38 35 35 39 34 36               ..6005855946

Note for server developers: I'm not quite sure if there is anything fancy going on in the challenge generation in NINA, but judging by the packet dumps alone, I simply just made a string with 10 random numbers, as seen in my server