mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-03 20:17:36 +03:00
crypto/tls: add support for Ed25519 certificates in TLS 1.2 and 1.3
Support for Ed25519 certificates was added in CL 175478, this wires them up into the TLS stack according to RFC 8422 (TLS 1.2) and RFC 8446 (TLS 1.3). RFC 8422 also specifies support for TLS 1.0 and 1.1, and I initially implemented that, but even OpenSSL doesn't take the complexity, so I just dropped it. It would have required keeping a buffer of the handshake transcript in order to do the direct Ed25519 signatures. We effectively need to support TLS 1.2 because it shares ClientHello signature algorithms with TLS 1.3. While at it, reordered the advertised signature algorithms in the rough order we would want to use them, also based on what curves have fast constant-time implementations. Client and client auth tests changed because of the change in advertised signature algorithms in ClientHello and CertificateRequest. Fixes #25355 Change-Id: I9fdd839afde4fd6b13fcbc5cc7017fd8c35085ee Reviewed-on: https://go-review.googlesource.com/c/go/+/177698 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
parent
6c11745f0b
commit
28958b0da6
84 changed files with 4977 additions and 3938 deletions
|
@ -1,5 +1,5 @@
|
|||
>>> Flow 1 (client to server)
|
||||
00000000 16 03 01 00 f8 01 00 00 f4 03 03 00 00 00 00 00 |................|
|
||||
00000000 16 03 01 00 fa 01 00 00 f6 03 03 00 00 00 00 00 |................|
|
||||
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 00 00 00 00 |........... ....|
|
||||
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
|
||||
|
@ -7,20 +7,20 @@
|
|||
00000050 cc a9 c0 2f c0 2b c0 30 c0 2c c0 27 c0 13 c0 23 |.../.+.0.,.'...#|
|
||||
00000060 c0 09 c0 14 c0 0a 00 9c 00 9d 00 3c 00 2f 00 35 |...........<./.5|
|
||||
00000070 c0 12 00 0a 00 05 c0 11 c0 07 13 01 13 03 13 02 |................|
|
||||
00000080 01 00 00 79 00 05 00 05 01 00 00 00 00 00 0a 00 |...y............|
|
||||
00000080 01 00 00 7b 00 05 00 05 01 00 00 00 00 00 0a 00 |...{............|
|
||||
00000090 0a 00 08 00 1d 00 17 00 18 00 19 00 0b 00 02 01 |................|
|
||||
000000a0 00 00 0d 00 18 00 16 08 04 08 05 08 06 04 01 04 |................|
|
||||
000000b0 03 05 01 05 03 06 01 06 03 02 01 02 03 ff 01 00 |................|
|
||||
000000c0 01 00 00 12 00 00 00 2b 00 09 08 03 04 03 03 03 |.......+........|
|
||||
000000d0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}|
|
||||
000000e0 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..|
|
||||
000000f0 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t|
|
||||
000000a0 00 00 0d 00 1a 00 18 08 04 04 03 08 07 08 05 08 |................|
|
||||
000000b0 06 04 01 05 01 06 01 05 03 06 03 02 01 02 03 ff |................|
|
||||
000000c0 01 00 01 00 00 12 00 00 00 2b 00 09 08 03 04 03 |.........+......|
|
||||
000000d0 03 03 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f |......3.&.$... /|
|
||||
000000e0 e5 7d a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 |.}.G.bC.(.._.).0|
|
||||
000000f0 ff f6 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |.........._X.;t|
|
||||
>>> Flow 2 (server to client)
|
||||
00000000 16 03 03 00 59 02 00 00 55 03 03 10 af 03 5d d2 |....Y...U.....].|
|
||||
00000010 4d c8 e6 2e 88 08 57 65 8c c6 fa af b5 e7 bd 49 |M.....We.......I|
|
||||
00000020 4c d0 dc 04 e6 14 e0 83 40 79 dd 20 5a 11 db 9d |L.......@y. Z...|
|
||||
00000030 c0 10 71 f5 27 89 5a 7e 17 80 9b 26 39 09 cc ad |..q.'.Z~...&9...|
|
||||
00000040 be 1a 24 37 d7 08 a2 e1 fe 75 54 71 c0 30 00 00 |..$7.....uTq.0..|
|
||||
00000000 16 03 03 00 59 02 00 00 55 03 03 44 13 0c ac b2 |....Y...U..D....|
|
||||
00000010 4f 77 03 bb 69 b5 db 3f f5 c3 14 20 6f 8b c7 e1 |Ow..i..?... o...|
|
||||
00000020 28 40 01 a0 04 f7 29 76 42 65 b0 20 91 89 84 74 |(@....)vBe. ...t|
|
||||
00000030 8e ed c8 c3 48 67 a5 75 93 ec d3 3e 26 e4 aa c6 |....Hg.u...>&...|
|
||||
00000040 39 e7 9f 78 d3 ab 3c c0 6a 05 32 7e c0 30 00 00 |9..x..<.j.2~.0..|
|
||||
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
|
||||
00000060 03 02 59 0b 00 02 55 00 02 52 00 02 4f 30 82 02 |..Y...U..R..O0..|
|
||||
00000070 4b 30 82 01 b4 a0 03 02 01 02 02 09 00 e8 f0 9d |K0..............|
|
||||
|
@ -60,17 +60,17 @@
|
|||
00000290 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 4c 72 2b 9d |w.......@.a.Lr+.|
|
||||
000002a0 ae db 46 06 06 4d f4 c1 b3 3e c0 d1 bd 42 d4 db |..F..M...>...B..|
|
||||
000002b0 fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 16 03 03 00 |.=.`.\!.;.......|
|
||||
000002c0 ac 0c 00 00 a8 03 00 1d 20 42 0e 6e 06 83 b5 4e |........ B.n...N|
|
||||
000002d0 d9 f5 45 2b 82 1c 30 c7 65 5d 40 44 10 b8 63 aa |..E+..0.e]@D..c.|
|
||||
000002e0 6f ef 92 13 4b 8d fd 1b 0e 08 04 00 80 63 8f 8a |o...K........c..|
|
||||
000002f0 f3 6a 42 b9 e2 6d c3 06 c5 04 2d df 4b 06 0f b7 |.jB..m....-.K...|
|
||||
00000300 e5 36 d2 5f be aa 36 83 82 eb e8 06 e9 a5 b8 47 |.6._..6........G|
|
||||
00000310 db 43 fb 7d ab 0b 3a db 13 df ab 62 16 7d 80 57 |.C.}..:....b.}.W|
|
||||
00000320 4b 07 79 f6 d9 9c ad d4 1b b5 cd cb 92 44 bc 74 |K.y..........D.t|
|
||||
00000330 d0 f3 67 0c e6 1a 5a 18 53 bc bc 65 19 7a 13 f3 |..g...Z.S..e.z..|
|
||||
00000340 78 36 e7 14 7d 36 6d 85 ea d7 96 18 e2 bc 1d af |x6..}6m.........|
|
||||
00000350 58 50 f3 f7 a3 27 49 a4 89 10 e2 cc 2d db c5 4a |XP...'I.....-..J|
|
||||
00000360 4c 24 3e 9b 70 17 ae 2f f9 d0 96 8f b0 16 03 03 |L$>.p../........|
|
||||
000002c0 ac 0c 00 00 a8 03 00 1d 20 f7 1b 54 ea 8f 34 2c |........ ..T..4,|
|
||||
000002d0 09 c5 a1 63 17 9c be f5 3d 6d 58 97 63 13 db 67 |...c....=mX.c..g|
|
||||
000002e0 fb 96 ef 45 c2 8c 30 12 02 08 04 00 80 d7 1a 46 |...E..0........F|
|
||||
000002f0 a1 90 80 71 eb 2d 27 60 a1 aa 7c 06 79 0a e7 78 |...q.-'`..|.y..x|
|
||||
00000300 47 18 95 de 90 a0 cf b4 ff 0e 35 24 43 05 18 9a |G.........5$C...|
|
||||
00000310 e4 1d 23 af cb cd e1 09 81 3b a8 18 7e 30 50 3d |..#......;..~0P=|
|
||||
00000320 dd be 91 3c ec 79 3c 83 aa 78 6a d0 75 70 cf 53 |...<.y<..xj.up.S|
|
||||
00000330 07 b7 8a f1 8c 4d 03 27 d5 0e 40 57 5d c3 0f 4e |.....M.'..@W]..N|
|
||||
00000340 63 44 84 11 47 8e 5d fd 66 75 4d ce 1d 91 6f bb |cD..G.].fuM...o.|
|
||||
00000350 f5 ae 3b b2 88 5f bb d0 55 73 74 c4 8e a8 70 44 |..;.._..Ust...pD|
|
||||
00000360 0f 08 10 7a f0 34 fc c8 4d 65 3d ed a1 16 03 03 |...z.4..Me=.....|
|
||||
00000370 00 3a 0d 00 00 36 03 01 02 40 00 2e 04 03 05 03 |.:...6...@......|
|
||||
00000380 06 03 08 07 08 08 08 09 08 0a 08 0b 08 04 08 05 |................|
|
||||
00000390 08 06 04 01 05 01 06 01 03 03 02 03 03 01 02 01 |................|
|
||||
|
@ -112,26 +112,26 @@
|
|||
00000200 e5 35 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 |.5....%...! /.}.|
|
||||
00000210 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 |G.bC.(.._.).0...|
|
||||
00000220 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 16 03 03 00 |......._X.;t....|
|
||||
00000230 88 0f 00 00 84 08 04 00 80 0d 7c 62 81 7d fc c9 |..........|b.}..|
|
||||
00000240 d4 4c 3e dd 4c b0 fe ce 43 90 27 39 2c be 01 24 |.L>.L...C.'9,..$|
|
||||
00000250 bc 55 f5 87 d7 31 00 47 6c 49 ce 82 db 0e 3d af |.U...1.GlI....=.|
|
||||
00000260 a5 f3 4a 28 c9 f7 0b d3 68 e2 b8 de 2d b3 d8 5d |..J(....h...-..]|
|
||||
00000270 c6 6d da 2f 74 c4 0a f4 93 ed 58 10 00 94 55 d6 |.m./t.....X...U.|
|
||||
00000280 c8 62 d0 35 20 cc 90 dc 70 bf 1d 6f c9 76 10 de |.b.5 ...p..o.v..|
|
||||
00000290 c2 50 ba e9 b4 bd 80 d7 01 b2 aa 1d 27 03 0f ad |.P..........'...|
|
||||
000002a0 39 46 ec 30 b0 fb 68 0f 1f b3 4c 0c 26 70 4c 33 |9F.0..h...L.&pL3|
|
||||
000002b0 bf 18 79 81 11 c0 7f b9 ae 14 03 03 00 01 01 16 |..y.............|
|
||||
000002c0 03 03 00 28 00 00 00 00 00 00 00 00 a2 ee 76 00 |...(..........v.|
|
||||
000002d0 77 2b 70 9d f7 0a 11 b4 25 00 07 92 d4 4c 9c 68 |w+p.....%....L.h|
|
||||
000002e0 64 54 11 6d 39 46 6c ea 20 0c 15 ed |dT.m9Fl. ...|
|
||||
00000230 88 0f 00 00 84 08 04 00 80 6d 3c 47 cb 26 af e0 |.........m<G.&..|
|
||||
00000240 1a f1 41 2b 90 cd 19 44 16 37 61 0f 5b 89 2e 81 |..A+...D.7a.[...|
|
||||
00000250 52 b1 29 bd 3d f7 96 cc aa bb 4c 0f 74 11 11 47 |R.).=.....L.t..G|
|
||||
00000260 09 c4 da 48 7a 3b e2 be ee 08 f6 9e a0 62 c9 11 |...Hz;.......b..|
|
||||
00000270 d7 6c 06 0b eb 0b ea f0 69 ce 22 31 33 f2 b5 73 |.l......i."13..s|
|
||||
00000280 b9 a0 a7 8a d1 67 35 1d 52 5c 6d 00 9d d7 8e ba |.....g5.R\m.....|
|
||||
00000290 a4 47 68 8b 87 27 47 47 06 09 16 d4 e1 cc ea 6f |.Gh..'GG.......o|
|
||||
000002a0 7a ea 85 7d e0 bf b4 7d 7f 7c 3f 4c db 0a ce 61 |z..}...}.|?L...a|
|
||||
000002b0 31 ed cc 2e 03 08 80 9e 2d 14 03 03 00 01 01 16 |1.......-.......|
|
||||
000002c0 03 03 00 28 00 00 00 00 00 00 00 00 f9 c7 99 ab |...(............|
|
||||
000002d0 ab fc da ce 64 ae f1 6e a6 77 37 45 47 6f e7 b1 |....d..n.w7EGo..|
|
||||
000002e0 43 e1 85 5a 19 48 6a 1c 08 9f f6 8b |C..Z.Hj.....|
|
||||
>>> Flow 4 (server to client)
|
||||
00000000 14 03 03 00 01 01 16 03 03 00 28 f5 f7 fe 25 12 |..........(...%.|
|
||||
00000010 d8 e2 d9 ee b3 c8 02 a9 6e d9 80 ee 7b 7e 95 1f |........n...{~..|
|
||||
00000020 8e 97 a6 5f e8 4c ee 67 e9 a1 43 ab 0e 17 ce 92 |..._.L.g..C.....|
|
||||
00000030 7c 03 0f ||..|
|
||||
00000000 14 03 03 00 01 01 16 03 03 00 28 cf 58 0e 80 3b |..........(.X..;|
|
||||
00000010 f9 c1 03 02 1f e3 c9 d0 24 5d 0d 7b 6d 45 f7 1a |........$].{mE..|
|
||||
00000020 22 a7 94 82 a5 c1 f3 cd df 0f e0 66 0e 6f 62 7b |"..........f.ob{|
|
||||
00000030 d6 fb 07 |...|
|
||||
>>> Flow 5 (client to server)
|
||||
00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 4c 67 fb |.............Lg.|
|
||||
00000010 76 75 0d a4 56 d5 9c 1a 6d 7d 94 06 df 6d 05 98 |vu..V...m}...m..|
|
||||
00000020 39 be 1e 15 03 03 00 1a 00 00 00 00 00 00 00 02 |9...............|
|
||||
00000030 31 e3 f4 a1 b7 0e cc 48 17 a6 69 4d ba 43 a0 2d |1......H..iM.C.-|
|
||||
00000040 12 a2 |..|
|
||||
00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 66 26 3d |.............f&=|
|
||||
00000010 31 f1 eb ae 19 79 c5 97 5d 70 b6 2f fc b9 7e c8 |1....y..]p./..~.|
|
||||
00000020 2f c7 70 15 03 03 00 1a 00 00 00 00 00 00 00 02 |/.p.............|
|
||||
00000030 30 7b dd 4c f2 3d aa 01 c5 55 07 ed 7a bb ff b6 |0{.L.=...U..z...|
|
||||
00000040 91 25 |.%|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue