forked from quic-go/quic-go
use chacha20poly1305 instead of AES and include cert in key derivation
Unfortunately QUIC uses non-standard tag sizes with both AES-GCM and Poly1305. Adopting AES-GCM seems much harder, so I changed it to Chacha20Poly1305 and only made some slight changes to an existing algo. This should probably be double-checked at some point.
This commit is contained in:
@@ -27,7 +27,7 @@ func (s *ServerConfig) Get() []byte {
|
||||
handshake.WriteHandshakeMessage(&serverConfig, handshake.TagSCFG, map[handshake.Tag][]byte{
|
||||
handshake.TagSCID: []byte{0xC5, 0x1C, 0x73, 0x6B, 0x8F, 0x48, 0x49, 0xAE, 0xB3, 0x00, 0xA2, 0xD4, 0x4B, 0xA0, 0xCF, 0xDF},
|
||||
handshake.TagKEXS: []byte("C255"),
|
||||
handshake.TagAEAD: []byte("AESG"),
|
||||
handshake.TagAEAD: []byte("CC20"),
|
||||
handshake.TagPUBS: append([]byte{0x20, 0x00, 0x00}, s.kex.PublicKey()...),
|
||||
handshake.TagOBIT: []byte{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7},
|
||||
handshake.TagEXPY: []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
|
||||
|
||||
Reference in New Issue
Block a user