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
80
testdata/Client-TLSv12-ECDHE-ECDSA-AES
vendored
80
testdata/Client-TLSv12-ECDHE-ECDSA-AES
vendored
|
@ -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 fa c6 67 00 b7 |....Y...U....g..|
|
||||
00000010 e2 10 1e 8e b4 64 0e 4e 78 38 25 ff fb 5f bf 9f |.....d.Nx8%.._..|
|
||||
00000020 b6 de b2 91 50 6c 67 0a bd dc dd 20 83 f5 41 e7 |....Plg.... ..A.|
|
||||
00000030 98 0c 38 d9 3b 09 18 d2 2e 16 f5 ef 98 a9 ce 38 |..8.;..........8|
|
||||
00000040 f1 36 3e bb 6d 45 81 b8 03 82 57 3d c0 09 00 00 |.6>.mE....W=....|
|
||||
00000000 16 03 03 00 59 02 00 00 55 03 03 eb a2 77 eb b6 |....Y...U....w..|
|
||||
00000010 1e e4 5c 2c ed 5a dc 93 1b 7e 8a 75 a1 8c ac a6 |..\,.Z...~.u....|
|
||||
00000020 69 13 f6 f6 a4 69 07 93 99 cf 12 20 37 d7 f8 26 |i....i..... 7..&|
|
||||
00000030 46 ea 3a 21 03 d0 25 0f 22 84 8d 24 2f 98 3d 42 |F.:!..%."..$/.=B|
|
||||
00000040 eb 47 1d de 0c 12 ab 95 7a 55 46 f7 c0 09 00 00 |.G......zUF.....|
|
||||
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
|
||||
00000060 03 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
|
||||
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
|
||||
|
@ -55,39 +55,39 @@
|
|||
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
|
||||
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
|
||||
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
|
||||
00000270 2a 16 03 03 00 b7 0c 00 00 b3 03 00 1d 20 da 76 |*............ .v|
|
||||
00000280 af 3a be 2d da 07 b1 41 61 16 f3 ad c1 3f b5 95 |.:.-...Aa....?..|
|
||||
00000290 27 4a 91 9d de f0 b8 a3 c7 ad c8 64 47 35 04 03 |'J.........dG5..|
|
||||
000002a0 00 8b 30 81 88 02 42 01 86 ea 56 df 52 76 06 31 |..0...B...V.Rv.1|
|
||||
000002b0 ae d9 80 6b 51 a0 61 84 9c a2 e5 aa dc d5 54 ba |...kQ.a.......T.|
|
||||
000002c0 ca c9 88 d2 90 f6 a1 76 6c 38 39 d4 0b 2e e0 e5 |.......vl89.....|
|
||||
000002d0 6a f5 f1 98 97 d4 a9 5a 73 a8 c7 67 eb 8b e2 8a |j......Zs..g....|
|
||||
000002e0 2c 2a 80 a3 7e 5d 5e d8 0c 02 42 01 96 20 c9 4a |,*..~]^...B.. .J|
|
||||
000002f0 a5 43 f1 c0 08 20 72 ea d2 9c 89 2b ef aa f1 37 |.C... r....+...7|
|
||||
00000300 ff 00 78 3a 51 61 6a 13 61 7b e9 ea 37 bf 35 18 |..x:Qaj.a{..7.5.|
|
||||
00000310 5a 19 33 29 4d fe e6 d4 0e cc 1e 21 13 6e ed 62 |Z.3)M......!.n.b|
|
||||
00000320 bc d5 66 26 a4 82 d5 e0 99 3b ed 70 78 16 03 03 |..f&.....;.px...|
|
||||
00000270 2a 16 03 03 00 b7 0c 00 00 b3 03 00 1d 20 90 68 |*............ .h|
|
||||
00000280 81 8b 1d 7f d5 69 36 d3 4e 63 40 fa 3a 21 ee a4 |.....i6.Nc@.:!..|
|
||||
00000290 c7 b4 09 bc 34 51 89 df d5 d2 79 51 34 32 04 03 |....4Q....yQ42..|
|
||||
000002a0 00 8b 30 81 88 02 42 01 b4 69 6b 1c e6 35 99 81 |..0...B..ik..5..|
|
||||
000002b0 fb aa cb b4 2d e9 e0 48 6a 6c 5e 14 54 77 b7 9d |....-..Hjl^.Tw..|
|
||||
000002c0 df a3 c2 1b 53 8c d2 46 6d 2e ae 83 3a db 7c 86 |....S..Fm...:.|.|
|
||||
000002d0 4a 45 c7 51 cd 30 d6 8c f5 4f ea 37 cb 1e 27 18 |JE.Q.0...O.7..'.|
|
||||
000002e0 ba df d5 5f 11 ae 0e af 75 02 42 01 2b 37 2e 6d |..._....u.B.+7.m|
|
||||
000002f0 7c 11 57 b7 b7 8b 90 73 cd e0 c9 38 3c ee aa d5 ||.W....s...8<...|
|
||||
00000300 f2 cd ff b9 66 6a be 62 70 74 ee a4 f4 e3 fb 4f |....fj.bpt.....O|
|
||||
00000310 ed 2e d5 a7 b5 a4 53 c8 1b 17 9e e9 48 e1 dd a6 |......S.....H...|
|
||||
00000320 e8 6a 05 cf 73 b2 85 11 13 37 be e0 26 16 03 03 |.j..s....7..&...|
|
||||
00000330 00 04 0e 00 00 00 |......|
|
||||
>>> Flow 3 (client to server)
|
||||
00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.|
|
||||
00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....|
|
||||
00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......|
|
||||
00000030 16 03 03 00 40 00 00 00 00 00 00 00 00 00 00 00 |....@...........|
|
||||
00000040 00 00 00 00 00 08 0a dc 8c c5 3e 8d 03 ab e1 c3 |..........>.....|
|
||||
00000050 ea aa 03 d8 1d 19 99 9c 2c 15 09 4b 39 a8 51 c6 |........,..K9.Q.|
|
||||
00000060 4e 15 46 1c d2 7c b0 a9 4b 7f be c9 35 99 ab db |N.F..|..K...5...|
|
||||
00000070 4b e0 6c 62 17 |K.lb.|
|
||||
00000040 00 00 00 00 00 7f 83 b7 cd 14 66 fb c3 2a f9 9f |..........f..*..|
|
||||
00000050 79 ec 40 e5 dd 15 46 f3 25 8d dd b2 8e d5 78 97 |y.@...F.%.....x.|
|
||||
00000060 e5 d6 4e 1a 2e 35 21 b2 aa ac 28 6f 2c 36 a6 6e |..N..5!...(o,6.n|
|
||||
00000070 44 92 84 1b b9 |D....|
|
||||
>>> Flow 4 (server to client)
|
||||
00000000 14 03 03 00 01 01 16 03 03 00 40 ae ce d9 46 bc |..........@...F.|
|
||||
00000010 2f df aa fb d6 7d 52 e3 e9 a0 e6 e9 22 14 ae fe |/....}R....."...|
|
||||
00000020 ce 34 c2 b2 16 ae aa 6b 72 90 d3 a6 e9 1e 96 3f |.4.....kr......?|
|
||||
00000030 fd 45 d7 cc 28 db ac f7 42 55 3e 24 2c 5e dc 3e |.E..(...BU>$,^.>|
|
||||
00000040 5f 6e 36 76 6e ab 1c 35 76 e5 4b |_n6vn..5v.K|
|
||||
00000000 14 03 03 00 01 01 16 03 03 00 40 db ee f8 c1 0e |..........@.....|
|
||||
00000010 7f 23 b4 cb e6 db 03 2a fb 68 40 78 85 03 9e dc |.#.....*.h@x....|
|
||||
00000020 ac f8 f0 b5 65 8d 7c 01 4a ce 86 29 a9 c5 c3 b2 |....e.|.J..)....|
|
||||
00000030 12 8d d1 58 af e7 21 75 e4 be f3 c0 03 55 f8 bb |...X..!u.....U..|
|
||||
00000040 71 bd 85 ee 46 87 a0 32 75 ee 4c |q...F..2u.L|
|
||||
>>> Flow 5 (client to server)
|
||||
00000000 17 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........|
|
||||
00000010 00 00 00 00 00 48 f8 b0 95 19 6b 5f 9a 03 5d 10 |.....H....k_..].|
|
||||
00000020 d6 1a 3c ed d1 f8 73 4f 84 52 63 a2 3a f5 3c 4d |..<...sO.Rc.:.<M|
|
||||
00000030 94 d7 a3 cf a4 15 03 03 00 30 00 00 00 00 00 00 |.........0......|
|
||||
00000040 00 00 00 00 00 00 00 00 00 00 09 9d 9d 6b 46 62 |.............kFb|
|
||||
00000050 f2 78 42 c0 f8 07 4e 58 8c a9 fa f2 8c 80 c9 fc |.xB...NX........|
|
||||
00000060 ad 32 75 f8 9b 3b d7 32 7f 38 |.2u..;.2.8|
|
||||
00000010 00 00 00 00 00 48 95 f8 a1 0e a7 d0 50 dd cf 8f |.....H......P...|
|
||||
00000020 c4 af ec 49 89 bf 5d 8b a0 d0 60 7b 38 5a 83 e4 |...I..]...`{8Z..|
|
||||
00000030 72 47 7f 81 bd 15 03 03 00 30 00 00 00 00 00 00 |rG.......0......|
|
||||
00000040 00 00 00 00 00 00 00 00 00 00 48 06 f1 30 61 dd |..........H..0a.|
|
||||
00000050 e2 97 aa 9c 5f a7 07 bb 44 a4 fb d6 6a 7c aa f5 |...._...D...j|..|
|
||||
00000060 16 ae 38 1a 98 e5 f5 28 c2 57 |..8....(.W|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue