authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2023-12-01 17:53:21+01:00
committergravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2023-12-01 18:00:15+01:00
log9831dc9e0ca945277104a1e32fc6782700b1d6a2
treecc1fcda545a131f90549fa1e616084786d5c519e
parentbf5ab54510fd8fbd300ddc22f9af4767477be0e5

TLS: The 0x1306 TLS identifier was updated to TLS_AEGIS_256_SHA512

Following the recommendations from [1], the AEGIS specification and the TLS registry [2] were updated to recommend SHA512 for the traffic secrets. [1] https://eprint.iacr.org/2023/913.pdf [2] https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4

2 files changed, 6 insertions(+), 6 deletions(-)

lib/std/crypto/tls.zig+3-3
......@@ -290,7 +290,7 @@ pub const CipherSuite = enum(u16) {
290290 CHACHA20_POLY1305_SHA256 = 0x1303,
291291 AES_128_CCM_SHA256 = 0x1304,
292292 AES_128_CCM_8_SHA256 = 0x1305,
293 AEGIS_256_SHA384 = 0x1306,
293 AEGIS_256_SHA512 = 0x1306,
294294 AEGIS_128L_SHA256 = 0x1307,
295295 _,
296296};
......@@ -330,7 +330,7 @@ pub const HandshakeCipher = union(enum) {
330330 AES_128_GCM_SHA256: HandshakeCipherT(crypto.aead.aes_gcm.Aes128Gcm, crypto.hash.sha2.Sha256),
331331 AES_256_GCM_SHA384: HandshakeCipherT(crypto.aead.aes_gcm.Aes256Gcm, crypto.hash.sha2.Sha384),
332332 CHACHA20_POLY1305_SHA256: HandshakeCipherT(crypto.aead.chacha_poly.ChaCha20Poly1305, crypto.hash.sha2.Sha256),
333 AEGIS_256_SHA384: HandshakeCipherT(crypto.aead.aegis.Aegis256, crypto.hash.sha2.Sha384),
333 AEGIS_256_SHA512: HandshakeCipherT(crypto.aead.aegis.Aegis256, crypto.hash.sha2.Sha512),
334334 AEGIS_128L_SHA256: HandshakeCipherT(crypto.aead.aegis.Aegis128L, crypto.hash.sha2.Sha256),
335335};
336336
......@@ -355,7 +355,7 @@ pub const ApplicationCipher = union(enum) {
355355 AES_128_GCM_SHA256: ApplicationCipherT(crypto.aead.aes_gcm.Aes128Gcm, crypto.hash.sha2.Sha256),
356356 AES_256_GCM_SHA384: ApplicationCipherT(crypto.aead.aes_gcm.Aes256Gcm, crypto.hash.sha2.Sha384),
357357 CHACHA20_POLY1305_SHA256: ApplicationCipherT(crypto.aead.chacha_poly.ChaCha20Poly1305, crypto.hash.sha2.Sha256),
358 AEGIS_256_SHA384: ApplicationCipherT(crypto.aead.aegis.Aegis256, crypto.hash.sha2.Sha384),
358 AEGIS_256_SHA512: ApplicationCipherT(crypto.aead.aegis.Aegis256, crypto.hash.sha2.Sha512),
359359 AEGIS_128L_SHA256: ApplicationCipherT(crypto.aead.aegis.Aegis128L, crypto.hash.sha2.Sha256),
360360};
361361
lib/std/crypto/tls/Client.zig+3-3
......@@ -355,7 +355,7 @@ pub fn init(stream: anytype, ca_bundle: Certificate.Bundle, host: []const u8) In
355355 inline .AES_128_GCM_SHA256,
356356 .AES_256_GCM_SHA384,
357357 .CHACHA20_POLY1305_SHA256,
358 .AEGIS_256_SHA384,
358 .AEGIS_256_SHA512,
359359 .AEGIS_128L_SHA256,
360360 => |tag| {
361361 const P = std.meta.TagPayloadByName(tls.HandshakeCipher, @tagName(tag));
......@@ -1406,7 +1406,7 @@ fn limitVecs(iovecs: []std.os.iovec, len: usize) []std.os.iovec {
14061406const cipher_suites = if (crypto.core.aes.has_hardware_support)
14071407 enum_array(tls.CipherSuite, &.{
14081408 .AEGIS_128L_SHA256,
1409 .AEGIS_256_SHA384,
1409 .AEGIS_256_SHA512,
14101410 .AES_128_GCM_SHA256,
14111411 .AES_256_GCM_SHA384,
14121412 .CHACHA20_POLY1305_SHA256,
......@@ -1415,7 +1415,7 @@ else
14151415 enum_array(tls.CipherSuite, &.{
14161416 .CHACHA20_POLY1305_SHA256,
14171417 .AEGIS_128L_SHA256,
1418 .AEGIS_256_SHA384,
1418 .AEGIS_256_SHA512,
14191419 .AES_128_GCM_SHA256,
14201420 .AES_256_GCM_SHA384,
14211421 });