On-line engine blitz tourney July

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Ras
Posts: 1136
Joined: Tue Aug 30, 2016 6:19 pm
Contact:

Re: On-line engine blitz tourney July

Post by Ras » Sat Jul 28, 2018 8:49 pm

bad luck this weekend, but thanks as always. :-)
Rasmus Althoff
https://www.ct800.net

Sven
Posts: 3811
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Contact:

Re: On-line engine blitz tourney July

Post by Sven » Sat Jul 28, 2018 9:06 pm

hgm wrote:
Sat Jul 28, 2018 8:46 pm
The timeseal decoder is closed source.
Could it be replaced by an open-source decoder? Or is the timeseal protocol still "secret"?
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)

D Sceviour
Posts: 439
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

Re: On-line engine blitz tourney July

Post by D Sceviour » Sat Jul 28, 2018 9:08 pm

hgm wrote:
Sat Jul 28, 2018 8:46 pm
Sorry guys,

I see no alterative but to cancel the tourney for tonight. I took the server off line.

It is clear to me what the problem is: most of you connect through timeseal, which encrypts everything you sent to the ICS. The ICS sends the encrypted input to a separate process, running the timeseal decoder, which then gives it the decrypted input back. It is this process that crashes and dies, so that the ICS only sees the encrypted input. Which it of course rejects as invalid.

The timeseal decoder is closed source.

This has happened once before, and the cause was the too long kibitz lines from one of the participating engines. I could fix that by having the ICS clip the lines it sends to the decoder to a safe length. So I am surprised the problem can occur again. But the ICS saves a command log, so I shoul be able to figure out which was the last input line before the commands got gibberish. This is the line that must have crashed the decoder. Hopefully seeing that line can give me an idea what it contains that is problematic, so I can defuse such lines before they go to the decoder. This will take some time.
This afternoon, an "AD_BLOCKED" comment appearing in output accompanied with garbage. One thing to look for is an interposed AD trying to attach itself to timeseal in the cross current. There are all kinds of new stuff out there on the net.

Maybe a new tournament could be arranged to make up for this lost one, assuming everything gets fixed.

Joost Buijs
Posts: 897
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: On-line engine blitz tourney July

Post by Joost Buijs » Sun Jul 29, 2018 4:37 am

Sven wrote:
Sat Jul 28, 2018 9:06 pm
hgm wrote:
Sat Jul 28, 2018 8:46 pm
The timeseal decoder is closed source.
Could it be replaced by an open-source decoder? Or is the timeseal protocol still "secret"?
About 15 years ago the timeseal protocol was already reverse engineered, so it is not really secret anymore. Anyway, what is the usefulness of using an open-timeseal if anybody could tamper with it?

For a commercial server like ICS an encrypted timeseal is a necessity, but for HG's server which is mainly used by our community it doesn't seem very important, just sending the time-stamp would do. My guess is that if anybody wants to cheat on that he will be caught red handed immediately.

Anyway, I hope that HG can find out what the culprit is and that we can have a follow up next week or so.

User avatar
hgm
Posts: 23378
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: On-line engine blitz tourney July

Post by hgm » Sun Jul 29, 2018 8:17 am

This seems to be the place where it goes wrong. (The 'pNN:' prefixes indicate the number of the player from which the command was received.) I don't see anything suspect in the preceeding kibitz message, however.
p36: 'd8c7'
p36: 'kibitz !!! +999.93/1 (0.00 sec, 25 nodes, 25 knps) PV=d8c7'
p10: 'gameend'
p10: ''
p37: 'kibitz 6 ply, M-3, 0ms, 6573nodes, PV = b5b4 c7b7 b4a4 d4c4 a4a3 b7b3'
p37: 'b5b4'
p37: 'kibitz !!! -100.03/6 (0.00 sec, 6573 nodes, 6573 knps) PV=b5b4 c7b7 b4a4 d4c4 a4a3 b7b3'
p34: ''
p34: '�ԍ֙}�ș|���'
p34: '�ԍ֙}���f��'
p37: '�yz������ՒƖ'
p19: 'tell 49 Lozza vs. Nemeton a game in tourney #1 just ended. Lozza checkmated 0-1'
p16: 'ź�����ՠ����'
p36: '���qv�`�b����'
p36: '�{�n�{�y�f`i�y������`ޢ�c~�z�f�q���p�����ir�q���i����q�o��wѴsu�wy˟��֘'
p16: '�`�l�n�y��h����x`�iaxyaq���b���n�wv��qĥk}me�ղ��~ݱ}n}�r��v�����q�g~`�y����o����b�t��u܎h��j�Ǚ������������v�t��ب˶d�c��k��g���l��c����ٗ����k�s����������js`h��qa|w�q��`m��������ig�`d��z����l�Dzf����re���}t{���`w�np�y˂����go��ev��uߎ�uo�`����v̂�m���l��hюq��ҠeŸ`m�q�l��ij�x��k���sn��Ѧ��y���cr������Ԉ�Ө���|f��w�������ec�`��tߗ���j���f�xŽ���Ͱ��q�'
p40: '������yڪ��m�'
p40: '�l�}�w��i�Ɉ�gq�qboet�����d���gxq�pݷ�|zo�����~ɿ�n�drc�`�����}s�h�c����'
p13: 'ű�����դ����'
And this was the first time:
p25: 'kibitz !!! +0.00/29 (1.87 sec, 32569369 nodes, 17407 knps) PV=35 17398 21784Kd4 Be8 Nh4 Bd7 Ng2 Bg4 Nf4 Bf3 Nd3 Bg4 Ne5 Bh5 c4 bxc4 Nxc4+ dxc4 Kxc4'
p13: 'kibitz depth:17 score:29998 Knodes:23357 Knps:7368 time:3s'
p13: 'kibitz pv:Qxg7+ M1#Qxg7+ M2#Qxg7+ M3#Qxg7+ M4#Qxg7+ M5#Qxg7+ M6#Qxg7+ M7#Qxg7+ M8#Qxg7+ M9#Qxg7+ '
p13: 'f7g7'
p6: 'b5b4'
p33: 'd5e4'
p40: 'gameend'
p33: 'kibitz !!! -6.49/17 (3.80 sec, 3150813 nodes, 829 knps) PV=Ke4 Rxe6 Ra1 Kg4 Ra3 Rb8 Bf2 Rb7 Bxg3 Rb4+ Kd5 Rd6+ Kc5 Rdb6!'
p40: ''
p3: 'tell 49 Nemeton vs. Lozza a game in tourney #1 just ended. Lozza checkmated 1-0'
p17: 'e3d3'
p17: 'kibitz !!! -8.66/25 (12.18 sec, 26363244 nodes, 2164 knps) PV=e3d3 d5e6 f6h4 e4h4 d2e2 c8c7 d3e3 e6d5 e3d3 d5e5 d3d8 c7c2 e2f3 c2b2 d8e8 e5d6 e8f8 b2b3 f3g2 b3a3 f8c8 d6d5 c8d8 d5c6 d8g8 c6c7 g8g7 c7d6 g7g6 d6d5 g2g1'
p41: 'g3e4'
p41: 'kibitz !!! +2.14/11 (3.23 sec, 5768515 nodes, 1785 knps) PV=Ne4 bxa4 bxa4 Rd3 Rxd3 Bxd3 Kc6 Bc2 Nc5 Kc3 Kd5'
p34: 'h2h3'
p34: 'kibitz !!! +1.20/17 (1.15 sec, 2129864 nodes, 1850 knps) PV=h2h3 e5e4 g3f2 d6e7 b2b3 e7c5 d2e3 c5e7 f2g2 e7f6 g2g3 e4f3 g3f3 f6c3 f3e2 c3b2 e3c5 b2c3 e2d3 '
p13: ''
p13: '}���|��xm����'
p13: '}���|̹�ܢ�٭'
p34: '{Ͱ������ș��'
p38: '˴�y���ݫw�l�'
p18: 's~u����ʶh�a�ζ����sc��'
p18: '���{�wn��o�x����`z����gq�qz�ua`s�|�����kw�gvlȷ������brcnԟ�����kvuhҌ��w��n�wu��si�t�k�ݶs��u�sםn����y��ǫ'
p38: 'ӡteq���|��e��������s��m`nzb��`��oon�}~�����������v�`�`�t�
p38: 'sgqa�hut��nv�����m������ǹ�n���o��x�'
p27: '�g}eqxqȡl�v�lf���xr��tב'
p27: 'ˀšh���o�`�r����������p��p����j��ߣ��n�zi`|����}~v�ʃ���q�`u{`�zg���nja�t�~`���q�n��z�jy�l�f���nx�h�܄�iv�cnp�{���i�u�����sc{rȶowk�t�t�hz�o�`v�`�qq�����z`�������b��w��'
p21: 'd7g4'
p25: '��uҧ�����Ǫ'
p21: 'kibitz !!! +0,00/28 (2,04 sec, 17741985 nodes, 8693 knps) PV=0 d7g4 g6f4 g4f3 d4e3 f3e4 f4e2 e4g2 e2d4 g2f1 e3d2 d6e5 d2e3 e5d6 e3d2'
p8: 'b4c4'
p28: '�ͱ������ș��'
p30: '��w|��ҫz����d֡هee�coԇ'
p30: '���`��`�o��f����fq�q`bq{p�a�d�d����r��`�jj|z�`߄��n�g}n������{�ػ�}q�fsa���}�cs����'
p7: '�}�����̹e���r��|�€�����'
p7: '�d��i�ɗҫ`}e`ctmq���������at����v����`�aeh�ة�����f������epuxane֕С}��s��c��ʚz�n��'
p7: 'i��p��q�ܿfџ'

User avatar
hgm
Posts: 23378
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: On-line engine blitz tourney July

Post by hgm » Sun Jul 29, 2018 10:09 am

Joost Buijs wrote:
Sun Jul 29, 2018 4:37 am
About 15 years ago the timeseal protocol was already reverse engineered, so it is not really secret anymore. Anyway, what is the usefulness of using an open-timeseal if anybody could tamper with it?

For a commercial server like ICS an encrypted timeseal is a necessity, but for HG's server which is mainly used by our community it doesn't seem very important, just sending the time-stamp would do. My guess is that if anybody wants to cheat on that he will be caught red handed immediately.

Anyway, I hope that HG can find out what the culprit is and that we can have a follow up next week or so.
I agree that keeping the decoder secret (and thus in a separate process to circumvent the GPL, which applies to the rest of the ICS code) makes no sense at all when the encoder (where people could cheat) is open source through openseal. So the best solution would probably be to write my own decoder (the encryption is quite trivial) and put it in the ICS itself, rather than in a separate process that runs apparently buggy code.

Ras
Posts: 1136
Joined: Tue Aug 30, 2016 6:19 pm
Contact:

Re: On-line engine blitz tourney July

Post by Ras » Sun Jul 29, 2018 10:10 am

Joost Buijs wrote:
Sun Jul 29, 2018 4:37 am
Anyway, what is the usefulness of using an open-timeseal if anybody could tamper with it?
Encryption must never rely on secrecy of the algorithm because security through obscurity does not work. The security must be in the cypher key alone.
Rasmus Althoff
https://www.ct800.net

User avatar
hgm
Posts: 23378
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: On-line engine blitz tourney July

Post by hgm » Sun Jul 29, 2018 10:50 am

I agree that the encryption algorithm used by timeseal is very weak.

But this doesn't affect the secrecy problem much. The encryption key would have to be secret in order to prevent people from encrypting arbitrary messages. So the encryption could not be in the open source-part.

I guess the situation is pretty hopeless anyway, when people could simple disassembe the timeseal executable to get the encryption key.

Joost Buijs
Posts: 897
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: On-line engine blitz tourney July

Post by Joost Buijs » Sun Jul 29, 2018 11:06 am

hgm wrote:
Sun Jul 29, 2018 10:50 am
I agree that the encryption algorithm used by timeseal is very weak.

But this doesn't affect the secrecy problem much. The encryption key would have to be secret in order to prevent people from encrypting arbitrary messages. So the encryption could not be in the open source-part.

I guess the situation is pretty hopeless anyway, when people could simple disassembe the timeseal executable to get the encryption key.
Indeed, you have to put the public key in the encoder source or you have to obtain it from the server, in both cases this is very easy to hack.
There are ways to make disassembling rather difficult, but for somebody with knowledge of assembly and using IDA-Pro it will still be a piece of cake.

Strange that timeseal suddenly gives problems, it worked flawlessly for several years, maybe somebody was sending not printable characters that timeseal doesn't like. I can't think of any other explanation.

Sven
Posts: 3811
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Contact:

Re: On-line engine blitz tourney July

Post by Sven » Sun Jul 29, 2018 12:35 pm

hgm wrote:
Sun Jul 29, 2018 8:17 am
This seems to be the place where it goes wrong. (The 'pNN:' prefixes indicate the number of the player from which the command was received.) I don't see anything suspect in the preceeding kibitz message, however.
I would not expect an input line that crashes the decoder to appear decoded in the log file. So the bad news might be that you do not know the bad input line in its decoded form. The only information you might get from the log file this way would be the player number, which seems to be different in the two scenarios we had (p13 and p34, although the last line in the log of the first occurrence that was successfully decoded was from p34 as well).
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)

Post Reply