utls/testdata/Server-TLSv13-ClientAuthRequestedAndGiven
Filippo Valsorda 65b9e15fc2 crypto/tls: reduce session ticket linkability
Ever since session ticket key rotation was introduced in CL 9072, we've
been including a prefix in every ticket to identify what key it's
encrypted with. It's a small privacy gain, but the cost of trial
decryptions is also small, especially since the first key is probably
the most frequently used.

Also reissue tickets on every resumption so that the next connection
can't be linked to all the previous ones. Again the privacy gain is
small but the performance cost is small and it comes with a reduction in
complexity.

For #60105

Change-Id: I852f297162d2b79a3d9bf61f6171e8ce94b2537a
Reviewed-on: https://go-review.googlesource.com/c/go/+/496817
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-05-24 23:56:24 +00:00

177 lines
14 KiB
Text

>>> Flow 1 (client to server)
00000000 16 03 01 00 ca 01 00 00 c6 03 03 09 8f c7 93 17 |................|
00000010 40 3d b9 0a 8a 9c a5 21 99 27 7e 56 bf 25 30 48 |@=.....!.'~V.%0H|
00000020 e1 c7 87 a0 f3 eb cd b6 1c 4f ad 20 6a 1c 8b 03 |.........O. j...|
00000030 89 27 a0 2d 85 e3 7b 3d c6 5f c0 f1 f3 ea be 84 |.'.-..{=._......|
00000040 79 6b 83 63 e9 c3 52 02 a5 49 4a d4 00 04 13 01 |yk.c..R..IJ.....|
00000050 00 ff 01 00 00 79 00 0b 00 04 03 00 01 02 00 0a |.....y..........|
00000060 00 0c 00 0a 00 1d 00 17 00 1e 00 19 00 18 00 16 |................|
00000070 00 00 00 17 00 00 00 0d 00 1e 00 1c 04 03 05 03 |................|
00000080 06 03 08 07 08 08 08 09 08 0a 08 0b 08 04 08 05 |................|
00000090 08 06 04 01 05 01 06 01 00 2b 00 03 02 03 04 00 |.........+......|
000000a0 2d 00 02 01 01 00 33 00 26 00 24 00 1d 00 20 29 |-.....3.&.$... )|
000000b0 e0 9a b2 3d f4 3e 07 a3 62 0a 30 c5 d7 6b d9 5e |...=.>..b.0..k.^|
000000c0 d0 1b b4 3c bf 6e ee 0f 70 fc d6 51 54 db 1f |...<.n..p..QT..|
>>> Flow 2 (server to client)
00000000 16 03 03 00 7a 02 00 00 76 03 03 00 00 00 00 00 |....z...v.......|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 00 00 20 6a 1c 8b 03 |........... j...|
00000030 89 27 a0 2d 85 e3 7b 3d c6 5f c0 f1 f3 ea be 84 |.'.-..{=._......|
00000040 79 6b 83 63 e9 c3 52 02 a5 49 4a d4 13 01 00 00 |yk.c..R..IJ.....|
00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 2f |..+.....3.$... /|
00000060 e5 7d a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 |.}.G.bC.(.._.).0|
00000070 ff f6 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 14 |.........._X.;t.|
00000080 03 03 00 01 01 17 03 03 00 17 a6 29 77 32 51 25 |...........)w2Q%|
00000090 13 ae e8 7d c0 5a f3 83 7f 50 15 73 af 17 a2 56 |...}.Z...P.s...V|
000000a0 f8 17 03 03 00 3e 63 73 83 d1 42 19 08 d5 ec 98 |.....>cs..B.....|
000000b0 64 95 f1 eb 5f 60 51 5d 07 21 48 25 d8 d3 76 51 |d..._`Q].!H%..vQ|
000000c0 9d d5 9b 5f 87 6c c0 b2 b0 b2 b8 7f 9b ed 4a 41 |..._.l........JA|
000000d0 f1 3e dc 21 8c 7c 2a da fd 7a 82 38 8c c2 e9 c1 |.>.!.|*..z.8....|
000000e0 5f f3 fe f8 17 03 03 02 6d 58 3c 00 1d ad b9 90 |_.......mX<.....|
000000f0 64 ef cb be 77 5a 5e f7 46 1e 50 18 67 53 05 d5 |d...wZ^.F.P.gS..|
00000100 b8 63 91 89 78 dc 49 0e fa d6 1f 1e 21 20 9f 4a |.c..x.I.....! .J|
00000110 a0 b4 4a 70 9c 7e 7b 33 bf f6 9d c1 b9 b1 e7 57 |..Jp.~{3.......W|
00000120 46 4e 59 a0 39 28 38 8b 1f 53 5e cf fe 90 82 fd |FNY.9(8..S^.....|
00000130 8c a3 aa 00 8a fa 75 d3 9b 9b 64 af 8a d5 18 e9 |......u...d.....|
00000140 23 d2 80 3c b7 ed fe c0 d7 59 e8 e1 62 a0 c3 bb |#..<.....Y..b...|
00000150 b4 19 1a 1a 83 02 1b 61 aa c7 d9 81 84 b4 bb 30 |.......a.......0|
00000160 3e f2 a8 55 b4 fb 1b 2c 25 72 f6 8a f5 5d 53 48 |>..U...,%r...]SH|
00000170 fb 27 d8 e3 8b 19 6c e0 94 78 e5 b6 73 05 bc cb |.'....l..x..s...|
00000180 db 36 37 d2 24 8e 0d ac fb 8a d5 20 ce f7 e8 45 |.67.$...... ...E|
00000190 d0 d6 dc 5e 15 e4 b4 f0 63 74 c7 76 14 ec e5 41 |...^....ct.v...A|
000001a0 32 e8 4b b6 eb 44 c8 95 56 6a 2e 8c 3a 8d b7 ff |2.K..D..Vj..:...|
000001b0 68 87 9c aa fa b0 0c 32 e7 6e ac df 04 47 3f fd |h......2.n...G?.|
000001c0 04 63 78 ac 48 85 81 7e c7 8c d7 55 8b 57 73 8b |.cx.H..~...U.Ws.|
000001d0 78 23 c3 8b e2 ff 10 9c e3 cb 69 ce 13 7a cf 31 |x#........i..z.1|
000001e0 2d 05 8b 6e 36 69 a9 c2 5e 77 19 7c b5 1c 04 08 |-..n6i..^w.|....|
000001f0 e9 71 00 c5 49 27 47 bb 52 e4 54 7b da 6c cf 2d |.q..I'G.R.T{.l.-|
00000200 c7 4b 80 bf 64 96 73 3e 54 5b 72 c5 2b 66 e2 8c |.K..d.s>T[r.+f..|
00000210 94 5c 6e 36 07 a0 a5 17 46 71 84 73 57 06 3e 9d |.\n6....Fq.sW.>.|
00000220 b6 6c 9b 84 44 a5 4c f5 d1 74 1a 65 81 5b 37 b2 |.l..D.L..t.e.[7.|
00000230 46 9c 83 10 e2 db 21 3b ca e8 16 25 1e 93 69 03 |F.....!;...%..i.|
00000240 06 08 a8 06 1e 89 b6 5f 45 28 29 df 44 48 c9 37 |......._E().DH.7|
00000250 06 b4 59 5f 41 bd b8 89 dd 74 a4 b2 d6 7a 87 fa |..Y_A....t...z..|
00000260 ea 8b 3d ca a7 a1 f0 44 59 af a2 c4 51 e0 17 0c |..=....DY...Q...|
00000270 a5 e7 bf f8 09 4b 97 ed 34 59 d5 97 df ba fd 05 |.....K..4Y......|
00000280 d0 47 22 8b 25 16 88 7d e7 0d 66 49 22 c3 08 01 |.G".%..}..fI"...|
00000290 ba 99 82 3e c7 5c c5 b9 b9 50 c3 4f af 5c 1d 68 |...>.\...P.O.\.h|
000002a0 6b c4 e0 06 23 75 ba f0 e3 3b 4e b7 6c 8e 78 ab |k...#u...;N.l.x.|
000002b0 bb 52 a1 f3 40 a7 be 0b 58 89 e5 20 69 ab 2d 50 |.R..@...X.. i.-P|
000002c0 74 b9 cd 92 07 bb e1 b2 45 7d ad a2 13 90 71 4d |t.......E}....qM|
000002d0 2f 45 ea e9 ac 3e 2b aa 57 b9 0f 8f 61 99 56 bc |/E...>+.W...a.V.|
000002e0 62 39 4e 23 b2 5a 89 91 b7 2e 2c 8e 1f 1d 5b 69 |b9N#.Z....,...[i|
000002f0 6d 47 13 50 1f 3f 77 f8 c0 de c0 32 7e 57 ef 35 |mG.P.?w....2~W.5|
00000300 8e c0 13 88 34 79 af ca 8d 8f 7d 43 7c 54 70 a6 |....4y....}C|Tp.|
00000310 77 8d 72 87 e5 50 5c d4 4e f3 80 cd 9b af 99 71 |w.r..P\.N......q|
00000320 16 27 0b 0c 5c 03 a0 38 60 38 c4 20 5c 14 a6 a5 |.'..\..8`8. \...|
00000330 57 f6 5b bc 26 4c 5d a8 73 10 5c 2c aa ad 8f 98 |W.[.&L].s.\,....|
00000340 70 1b a8 04 8f 5b 56 7b ee e3 e4 66 95 fa 2c 29 |p....[V{...f..,)|
00000350 07 ae cb 92 a7 cc 17 03 03 00 99 cd e6 b8 49 6c |..............Il|
00000360 97 64 24 17 30 f7 4a 79 41 13 23 4b 2b e6 87 e0 |.d$.0.JyA.#K+...|
00000370 89 19 cc 21 70 2b d6 a0 db 6c 17 8c 03 a4 0c 45 |...!p+...l.....E|
00000380 25 90 0b 73 de 8d f3 8a 41 5d 21 78 39 f5 7c d8 |%..s....A]!x9.|.|
00000390 9b 26 54 b9 4c 9c 19 95 1d 9b ef 02 f8 76 52 7e |.&T.L........vR~|
000003a0 d8 17 65 6d 61 47 d5 78 df 70 f9 07 95 c1 ec 8e |..emaG.x.p......|
000003b0 dd 91 11 1f be 85 24 96 5e 32 7a 46 ae 8e 99 6e |......$.^2zF...n|
000003c0 0a be a0 4a 4d 25 34 4f 18 9a cc 3a 8d 91 72 4e |...JM%4O...:..rN|
000003d0 d4 a2 17 8d 77 6a f3 b8 52 ec 06 d8 3d 7a b4 fa |....wj..R...=z..|
000003e0 d4 e8 36 0a ea 39 e3 da 61 32 26 95 18 1b b6 c3 |..6..9..a2&.....|
000003f0 da e0 02 ed 17 03 03 00 35 32 c6 2e 2c e6 46 e5 |........52..,.F.|
00000400 fa b0 ed c5 3d 32 28 9d 85 8d 05 07 94 64 2b b1 |....=2(......d+.|
00000410 01 94 03 80 cb 94 de aa 2e 3e 63 21 5d b9 32 86 |.........>c!].2.|
00000420 3d bf 33 72 6a a6 0c 7a da 94 a3 33 67 9d |=.3rj..z...3g.|
>>> Flow 3 (client to server)
00000000 14 03 03 00 01 01 17 03 03 02 11 c9 db 52 ed e6 |.............R..|
00000010 7e ea 09 35 cc 04 13 79 db 65 e0 1a b5 3c dd 4d |~..5...y.e...<.M|
00000020 19 65 18 97 a3 33 d2 02 d1 84 3b 72 e1 dd 6e a1 |.e...3....;r..n.|
00000030 37 ac 78 b5 dd 07 7f 41 6a 4c 8f f5 8e cb ca b1 |7.x....AjL......|
00000040 ff 8b 2b 68 7e b7 1f da b7 f7 7a aa 6b 92 fe d8 |..+h~.....z.k...|
00000050 a1 03 84 cf 1f dd 21 48 b9 3d 5b b7 b7 dc d5 f7 |......!H.=[.....|
00000060 4e 5c 70 50 5d d5 96 b9 c2 e2 23 5d c6 ba 0d cb |N\pP].....#]....|
00000070 74 b2 3f 0b a1 a7 4b e2 3a 83 e5 07 cd cb 46 a8 |t.?...K.:.....F.|
00000080 05 be e6 e7 3b 65 e9 d3 ac c3 31 0b 4a 5d 8b 4e |....;e....1.J].N|
00000090 59 a0 2d 3d 10 d8 97 73 05 f6 1a 21 4a 7c fe 01 |Y.-=...s...!J|..|
000000a0 e5 4d 68 2b 5a cf ed 8f 37 cf 00 a3 17 bf 16 56 |.Mh+Z...7......V|
000000b0 e9 3b 1b 5a 87 c1 03 f1 8a a4 8b 99 f3 3d 13 99 |.;.Z.........=..|
000000c0 90 72 5c 46 ba 26 ab 1f f2 b7 41 c5 0f 44 de 8c |.r\F.&....A..D..|
000000d0 5e 5f da 61 27 04 c7 6a 83 12 08 9c c1 73 88 09 |^_.a'..j.....s..|
000000e0 64 3d 01 25 79 ed f4 7d 18 73 ec 1c 89 88 e5 ce |d=.%y..}.s......|
000000f0 80 3b 38 83 0b 61 a6 16 6b 96 2b 28 19 31 fa 0b |.;8..a..k.+(.1..|
00000100 79 1e 1f 3b fe 3f 65 26 60 0e dd 7c 4d bb 32 77 |y..;.?e&`..|M.2w|
00000110 2a 5a 6e e6 e4 8c 38 65 d5 ae d7 1d 01 bc 19 8e |*Zn...8e........|
00000120 60 92 d3 f0 00 19 e7 13 35 f2 4d bb 60 41 6b c9 |`.......5.M.`Ak.|
00000130 68 56 7d 2d b5 d7 56 63 10 7f 53 1a 5e d1 ba 42 |hV}-..Vc..S.^..B|
00000140 e8 51 86 b6 b5 4a a1 52 e4 2c 97 94 17 d0 69 aa |.Q...J.R.,....i.|
00000150 bc d1 e6 c1 cf 23 c4 4e f0 9f 96 b7 82 b4 d9 d2 |.....#.N........|
00000160 90 1f 06 17 ac 43 fe d2 cf 31 a8 ac 31 2d 00 7e |.....C...1..1-.~|
00000170 86 99 31 27 af cb b1 b7 de 15 04 0f 4d 60 c5 63 |..1'........M`.c|
00000180 9c ff 75 4e 68 9b 80 4a b6 60 04 04 6d 50 ae 4c |..uNh..J.`..mP.L|
00000190 f0 34 72 e4 c7 37 06 32 fc 55 f0 b8 3c dd 06 1b |.4r..7.2.U..<...|
000001a0 2c bd f3 a1 77 a3 13 90 df 29 b1 6c 57 17 9d af |,...w....).lW...|
000001b0 94 82 17 74 27 30 ae b7 39 1a 77 02 bd 77 1c 1c |...t'0..9.w..w..|
000001c0 f0 62 3b 0f dd c4 b0 87 9b 41 72 02 fb 6c c0 7e |.b;......Ar..l.~|
000001d0 01 46 55 de c0 d2 de 26 18 d5 a1 17 40 b7 a7 a3 |.FU....&....@...|
000001e0 a2 48 5d 6f 65 fe 3e 44 20 18 b4 82 c8 80 11 bb |.H]oe.>D .......|
000001f0 20 88 e5 5b 98 ab c1 fc 08 8d 62 1c 36 7a d1 55 | ..[......b.6z.U|
00000200 73 00 e8 e4 a0 20 19 1b 59 62 eb 6a c3 ef d0 9d |s.... ..Yb.j....|
00000210 89 f3 7d 26 f8 9a 71 a9 85 2a 00 85 17 03 03 00 |..}&..q..*......|
00000220 99 00 e1 e9 4d 25 62 e7 d6 a5 ec dd 17 15 0a ce |....M%b.........|
00000230 60 a0 00 17 53 9d f2 a7 28 c6 9c cf ec 39 0c 88 |`...S...(....9..|
00000240 30 b2 52 85 cb 07 c9 87 49 da 76 88 04 df 5f 8a |0.R.....I.v..._.|
00000250 53 a4 e0 1d ff 1e 9a 47 e8 af f5 14 36 e5 24 bf |S......G....6.$.|
00000260 2d cf 98 2d 97 f8 46 c1 9c 5c 68 95 31 a1 35 fa |-..-..F..\h.1.5.|
00000270 b9 78 d2 82 ef 58 4c 6e 5a 92 34 c6 31 49 bb d4 |.x...XLnZ.4.1I..|
00000280 dd 5b 64 35 65 c8 a4 99 4c fa 04 da e4 d9 10 11 |.[d5e...L.......|
00000290 ef 04 33 98 c7 80 01 c8 32 f8 2c d9 22 75 55 5f |..3.....2.,."uU_|
000002a0 14 cc d3 1e 9a 91 81 ab a7 f0 b9 04 8a 2f 43 aa |............./C.|
000002b0 94 ff 92 88 b1 e1 2a ca 87 67 17 03 03 00 35 ee |......*..g....5.|
000002c0 85 79 99 da 96 18 f0 c9 ca 6a 0e 48 93 b3 3b 0b |.y.......j.H..;.|
000002d0 02 05 5a 69 1e 5d 4c 10 44 02 db 6f 49 04 65 01 |..Zi.]L.D..oI.e.|
000002e0 45 be ee c6 67 0b 07 bc c3 3a e3 8a cf ac ca 08 |E...g....:......|
000002f0 70 d2 20 40 17 03 03 00 13 ab 1c 1f 66 38 10 bb |p. @........f8..|
00000300 fa 7a f4 52 8f ba 8d 03 61 b1 5c 73 |.z.R....a.\s|
>>> Flow 4 (server to client)
00000000 17 03 03 02 7b 5b 42 c8 3b a8 38 ea aa 7b 43 8b |....{[B.;.8..{C.|
00000010 03 a5 a4 e1 fb a4 f7 5f e2 47 51 b5 41 22 15 62 |......._.GQ.A".b|
00000020 80 bf 5f f1 6c 6e 9e 92 bc a3 96 5e 11 03 80 64 |.._.ln.....^...d|
00000030 ec 42 46 1e 55 12 85 91 d8 63 7a 68 0a a5 72 bd |.BF.U....czh..r.|
00000040 fe 57 12 fe 7d 36 c6 a7 9d 5f 85 f6 59 85 f2 ef |.W..}6..._..Y...|
00000050 af f1 ea 6d ca 34 e8 41 c7 7d e3 b6 0b be 11 1b |...m.4.A.}......|
00000060 29 45 e9 a6 dc 08 67 0b 6e c9 fe ec 1a 82 f7 9c |)E....g.n.......|
00000070 42 ae 9a 88 e8 1c cd de 71 a8 8a 87 31 84 d5 fc |B.......q...1...|
00000080 d6 10 21 3e 14 d2 5f 54 00 15 11 49 ae c8 7f d5 |..!>.._T...I....|
00000090 b6 9e 33 34 22 bc f4 4d 5c 72 ad e0 4b 57 9a 11 |..34"..M\r..KW..|
000000a0 89 46 36 88 98 a6 ff 7f d8 72 02 a5 1e 78 1c 8d |.F6......r...x..|
000000b0 c6 ad b4 df 57 4a dc 8a bd 47 fa 9f dc 5a d6 1c |....WJ...G...Z..|
000000c0 1a 4c 8d 7f e8 f4 b6 e6 be 80 25 ba d5 d2 d5 10 |.L........%.....|
000000d0 19 dd 3e 28 e3 af f5 67 45 60 d3 7f 11 a8 f7 e3 |..>(...gE`......|
000000e0 55 08 75 98 45 30 2a 83 a5 cb 6b 64 fe 89 ab eb |U.u.E0*...kd....|
000000f0 c8 c3 52 45 08 82 e8 e7 78 4c 31 ab b6 ae 16 de |..RE....xL1.....|
00000100 b8 70 53 ee ec 4e 23 4f a4 84 55 0f 53 b0 17 a9 |.pS..N#O..U.S...|
00000110 d7 d0 e7 4e 62 02 15 a9 e7 54 1a 47 08 7d 00 b3 |...Nb....T.G.}..|
00000120 38 58 de c7 20 ab 36 f6 be 20 38 a1 b0 80 e8 a3 |8X.. .6.. 8.....|
00000130 a5 e7 3d 17 f5 70 6d 77 6d ae 65 9a 35 f9 25 40 |..=..pmwm.e.5.%@|
00000140 7b 65 0d 08 27 8d fd bb 9e 2a 3d dc 29 79 80 74 |{e..'....*=.)y.t|
00000150 53 cc e8 cd c9 b2 af 95 1d 10 98 2c f6 21 4a 30 |S..........,.!J0|
00000160 f8 5b ea 07 0b b5 45 2c 62 fa 91 d9 a0 72 94 9c |.[....E,b....r..|
00000170 19 ec 01 b2 a9 f3 61 71 39 f5 55 65 16 94 67 c9 |......aq9.Ue..g.|
00000180 87 f6 be fb d6 f9 f4 c7 c1 d1 ff 2c 78 07 63 19 |...........,x.c.|
00000190 23 15 a2 6d 18 0d d0 05 be 5c 81 ac d8 f2 04 a9 |#..m.....\......|
000001a0 ec 01 db cf 5f 75 e6 bc 4a 92 67 95 c5 d8 a0 94 |...._u..J.g.....|
000001b0 5e d7 9a 97 1d a8 8b e5 07 8f 6a 51 a2 cb a4 40 |^.........jQ...@|
000001c0 54 77 76 87 c2 aa b2 f5 35 f2 1f 31 1e 6f f1 58 |Twv.....5..1.o.X|
000001d0 5f 4c ef 70 09 c2 d5 63 50 ff fd 9d 9a 84 94 34 |_L.p...cP......4|
000001e0 26 26 b3 7f b2 c3 de 94 01 b2 0b 77 23 4c 95 82 |&&.........w#L..|
000001f0 5c db 47 17 93 ab f3 b6 f4 a4 83 16 a8 2f 27 88 |\.G........../'.|
00000200 bf b5 a1 7c 0d c0 66 2f a7 97 a2 56 6a 3f 4b 69 |...|..f/...Vj?Ki|
00000210 3e 68 52 62 67 15 77 f4 f5 84 14 b5 e2 a1 89 c1 |>hRbg.w.........|
00000220 9a 89 53 6b e5 f8 77 d6 18 7c 23 c7 19 7a d8 4a |..Sk..w..|#..z.J|
00000230 f9 d2 03 b2 d0 30 bd b2 e9 31 c5 c0 27 67 65 18 |.....0...1..'ge.|
00000240 2b 35 36 87 b7 70 6b 3b 05 ef c7 69 2a fc c4 e2 |+56..pk;...i*...|
00000250 e8 27 65 a3 e3 0b 18 de da f4 22 1e c8 f4 b0 d9 |.'e.......".....|
00000260 34 a0 33 6f b5 e9 61 ac 13 db 14 1a a6 eb 33 44 |4.3o..a.......3D|
00000270 39 0d 21 62 a9 7f 77 54 53 25 15 2c 5e cf 18 c5 |9.!b..wTS%.,^...|
00000280 17 03 03 00 1e 1f b3 65 70 fb 27 cd c2 17 af 37 |.......ep.'....7|
00000290 56 90 9b 4c b8 16 2b 7a 73 55 db ff cd f7 e7 57 |V..L..+zsU.....W|
000002a0 af 6a d6 17 03 03 00 13 27 b4 96 07 8e 23 a3 ef |.j......'....#..|
000002b0 93 b6 3e b7 bd a4 e4 33 bd 29 06 |..>....3.).|