[zeromq-dev] Question about CurveCP implementation in CZMQ

T. Linden tlinden at cpan.org
Sat Oct 12 14:35:30 CEST 2013


Hi,

while working with the curve encrypted feature of CZMQ I found that not
everything is encrypted, see attached snoop (hex dump). ZMQ message
headers are clear text like "MESSAGE", "HELLO", "READY" and so forth.

Are there any plans to change this in the future, i.e. to encrypt them
as well? And another thing ocurred to me: the packets didn't seem to be
padded. So, an attacker could see, which packet has which purpose AND by
looking at the packet size assume what kind of message might be in
there.

Yes, I admit this sounds somewhat paranoid :) But that's a virtue these
days, isn't it?




best regards,
Tom

-- 
    PGP Key: https://www.daemon.de/txt/tom-pgp-pubkey.txt
S/Mime Cert: https://www.daemon.de/txt/tom-smime-cert.pem
 Bitmessage: BM-2DAcYUx3xByfwbx2bYYxeXgq3zDscez8wC

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
    00000000  ff 00 00 00 00 00 00 00  01 7f                   ........ ..

00000000  ff 00 00 00 00 00 00 00  01 7f 03                ........ ...

    0000000A  03 00 43 55 52 56 45 00  00 00 00 00 00 00 00 00 ..CURVE. ........

    0000001A  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 ........ ........

    0000002A  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 ........ ........

    0000003A  00 00 00 00 00 00                                ......

0000000B  00 43 55 52 56 45 00 00  00 00 00 00 00 00 00 00 .CURVE.. ........

0000001B  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 ........ ........

0000002B  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 ........ ........

0000003B  00 00 00 00 00                                   .....

00000040  04 c8 05 48 45 4c 4c 4f  01 00 00 00 00 00 00 00 ...HELLO ........

00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 ........ ........

00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 ........ ........

00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 ........ ........

00000080  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 ........ ........

00000090  00 00 b7 4d 6b e4 4b 19  4f 5c a6 3e 96 79 00 4f ...Mk.K. O\.>.y.O

000000A0  f5 84 78 70 b6 b0 fe 36  c0 b4 d6 d4 75 6f 89 20 ..xp...6 ....uo. 

000000B0  f3 6c 00 00 00 00 00 00  00 00 22 86 b9 91 6b e9 .l...... .."...k.

000000C0  18 b1 5c fd 95 36 73 72  07 13 60 b0 f5 10 ee be ..\..6sr ..`.....

000000D0  c3 46 9c 90 18 f3 0c 2d  d8 12 f6 93 5a e6 89 20 .F.....- ....Z.. 

000000E0  b3 48 62 41 b0 ef b4 af  9e 50 8e 60 53 b7 17 74 .HbA.... .P.`S..t

000000F0  a7 2e 43 eb cd 27 1d c3  92 9f df b7 28 be 26 c8 ..C..'.. ....(.&.

00000100  77 15 a5 1a c4 46 25 c6  8a ac                   w....F%. ..

    00000040  04 a8 07 57 45 4c 43 4f  4d 45 6a 72 3b 84 4c 86 ...WELCO MEjr;.L.

    00000050  8d 94 14 c4 55 80 0a 6c  b3 68 02 90 37 da d2 bd ....U..l .h..7...

    00000060  a3 86 2c 24 3f 84 bf b4  63 9b d5 c1 05 65 19 3e ..,$?... c....e.>

    00000070  7a ec 0e 0e 85 9a fa 1d  95 64 69 8c f7 a5 0b 23 z....... .di....#

    00000080  23 e0 4c 9c ab 63 8d a9  2a 4c 0d 09 d8 6a d2 39 #.L..c.. *L...j.9

    00000090  6d d4 5a 4b 3a fb ee db  29 3a 5d 9c c5 94 b6 af m.ZK:... ):].....

    000000A0  59 3c dd 66 a3 e7 5d 75  24 20 5e ff 42 88 e6 e4 Y<.f..]u $ ^.B...

    000000B0  02 1b 66 b3 ea 98 f0 07  fa d1 3c e7 fc e7 67 21 ..f..... ..<...g!

    000000C0  dc de be d1 19 57 2d 3b  9a 11 f2 c1 5b 1d 31 08 .....W-; ....[.1.

    000000D0  3e cd 4f 2c 57 73 4d 96  95 54 39 f9 55 ac 80 dd >.O,WsM. .T9.U...

    000000E0  f1 67 85 cb a0 a7 87 ac  47 ba                   .g...... G.

0000010A  06 00 00 00 00 00 00 01  01 08 49 4e 49 54 49 41 ........ ..INITIA

0000011A  54 45 1f 9a 29 47 68 a9  ae 9e 1a 09 ad c9 57 49 TE..)Gh. ......WI

0000012A  73 e4 ad 34 91 1a c8 fa  b7 7a 6d 2b 4c 86 6c de s..4.... .zm+L.l.

0000013A  32 a9 b0 05 2b 90 ff b8  6f c2 b0 94 7f 8a 3f 7c 2...+... o.....?|

0000014A  54 09 c3 92 8d eb 4c 80  b6 24 a4 de f1 9a f9 76 T.....L. .$.....v

0000015A  ae ea a6 16 29 a8 22 b9  22 ea a7 60 c5 ff 76 cd ....).". "..`..v.

0000016A  29 18 76 62 7c 24 14 ec  83 11 b9 ae 88 fe 14 e4 ).vb|$.. ........

0000017A  a8 3d 01 00 00 00 00 00  00 00 fa 2c 2f 93 b0 67 .=...... ...,/..g

0000018A  0e a3 e2 d3 28 d8 1a 1f  78 dd f2 6b 5b 85 c1 22 ....(... x..k[.."

0000019A  63 05 84 e3 fe 68 99 23  29 ca 6f 39 49 cb 0d d8 c....h.# ).o9I...

000001AA  9a c8 41 93 5a 53 2f 14  79 21 50 07 6c 7b 9f 13 ..A.ZS/. y!P.l{..

000001BA  1f 5c 94 25 3b 51 61 ab  f6 d6 0c a3 54 b5 0a 1a .\.%;Qa. ....T...

000001CA  04 96 47 57 ac 41 32 eb  60 46 75 c0 bc c5 dd 9d ..GW.A2. `Fu.....

000001DA  c9 bd 85 ad 8e 06 a8 78  00 41 60 5e a7 13 bd 88 .......x .A`^....

000001EA  bc 3d 7b 31 3d 38 c6 ab  9a 4d b5 64 a9 f1 d0 70 .={1=8.. .M.d...p

000001FA  51 40 c9 6c 7a c5 91 a8  d3 3d 25 50 0e d8 40 43 Q at .lz... .=%P.. at C

0000020A  5c 57 03 db 05 5f 53 20  36 90                   \W..._S  6.

    000000EA  04 31 05 52 45 41 44 59  01 00 00 00 00 00 00 00 .1.READY ........

    000000FA  23 80 92 79 fc f4 8f f5  04 cb 8e a5 a0 e7 d2 61 #..y.... .......a

    0000010A  5e 89 e5 16 28 e5 b3 57  34 8b 51 6a 28 3e 96 bd ^...(..W 4.Qj(>..

    0000011A  0b 18 2f                                         ../

00000214  00 21 07 4d 45 53 53 41  47 45 02 00 00 00 00 00 .!.MESSA GE......

00000224  00 00 c3 a3 5d 25 bd 7a  33 2d d7 60 73 f6 9e cb ....]%.z 3-.`s...

00000234  41 b2 57 00 24 07 4d 45  53 53 41 47 45 03 00 00 A.W.$.ME SSAGE...

00000244  00 00 00 00 00 a2 48 00  d3 f4 37 7f 19 aa f2 5e ......H. ..7....^

00000254  21 32 01 6b 93 48 41 f1  c1                      !2.k.HA. .

    0000011D  00 21 07 4d 45 53 53 41  47 45 02 00 00 00 00 00 .!.MESSA GE......

    0000012D  00 00 71 81 b5 56 cb ea  4e c4 c9 8a 93 73 8c 4f ..q..V.. N....s.O

    0000013D  6d c4 45 00 76 07 4d 45  53 53 41 47 45 03 00 00 m.E.v.ME SSAGE...

    0000014D  00 00 00 00 00 8b b7 cb  34 37 ba c5 6c 5f 08 e6 ........ 47..l_..

    0000015D  86 76 94 fe 56 78 fc 6f  93 bf 79 dd 71 56 bd 3c .v..Vx.o ..y.qV.<

    0000016D  fe 21 e4 48 ff c0 71 17  82 14 5c 0f c1 a3 2a f8 .!.H..q. ..\...*.

    0000017D  c3 60 83 94 8b 19 3d b9  ec 11 80 0f 76 d3 5e 4c .`....=. ....v.^L

    0000018D  05 d1 b3 cd fd 91 c9 03  e6 08 2f 60 05 15 d1 4d ........ ../`...M

    0000019D  a8 b6 d8 6d 80 19 01 88  94 cc 94 8f 2d 18 91 9f ...m.... ....-...

    000001AD  b7 d2 8c 97 1d 41 91 e1  dc c7 6f                .....A.. ..o



More information about the zeromq-dev mailing list