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) {...@@ -290,7 +290,7 @@ pub const CipherSuite = enum(u16) {
290 CHACHA20_POLY1305_SHA256 = 0x1303,290 CHACHA20_POLY1305_SHA256 = 0x1303,
291 AES_128_CCM_SHA256 = 0x1304,291 AES_128_CCM_SHA256 = 0x1304,
292 AES_128_CCM_8_SHA256 = 0x1305,292 AES_128_CCM_8_SHA256 = 0x1305,
293 AEGIS_256_SHA384 = 0x1306,293 AEGIS_256_SHA512 = 0x1306,
294 AEGIS_128L_SHA256 = 0x1307,294 AEGIS_128L_SHA256 = 0x1307,
295 _,295 _,
296};296};
...@@ -330,7 +330,7 @@ pub const HandshakeCipher = union(enum) {...@@ -330,7 +330,7 @@ pub const HandshakeCipher = union(enum) {
330 AES_128_GCM_SHA256: HandshakeCipherT(crypto.aead.aes_gcm.Aes128Gcm, crypto.hash.sha2.Sha256),330 AES_128_GCM_SHA256: HandshakeCipherT(crypto.aead.aes_gcm.Aes128Gcm, crypto.hash.sha2.Sha256),
331 AES_256_GCM_SHA384: HandshakeCipherT(crypto.aead.aes_gcm.Aes256Gcm, crypto.hash.sha2.Sha384),331 AES_256_GCM_SHA384: HandshakeCipherT(crypto.aead.aes_gcm.Aes256Gcm, crypto.hash.sha2.Sha384),
332 CHACHA20_POLY1305_SHA256: HandshakeCipherT(crypto.aead.chacha_poly.ChaCha20Poly1305, crypto.hash.sha2.Sha256),332 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),
334 AEGIS_128L_SHA256: HandshakeCipherT(crypto.aead.aegis.Aegis128L, crypto.hash.sha2.Sha256),334 AEGIS_128L_SHA256: HandshakeCipherT(crypto.aead.aegis.Aegis128L, crypto.hash.sha2.Sha256),
335};335};
336336
...@@ -355,7 +355,7 @@ pub const ApplicationCipher = union(enum) {...@@ -355,7 +355,7 @@ pub const ApplicationCipher = union(enum) {
355 AES_128_GCM_SHA256: ApplicationCipherT(crypto.aead.aes_gcm.Aes128Gcm, crypto.hash.sha2.Sha256),355 AES_128_GCM_SHA256: ApplicationCipherT(crypto.aead.aes_gcm.Aes128Gcm, crypto.hash.sha2.Sha256),
356 AES_256_GCM_SHA384: ApplicationCipherT(crypto.aead.aes_gcm.Aes256Gcm, crypto.hash.sha2.Sha384),356 AES_256_GCM_SHA384: ApplicationCipherT(crypto.aead.aes_gcm.Aes256Gcm, crypto.hash.sha2.Sha384),
357 CHACHA20_POLY1305_SHA256: ApplicationCipherT(crypto.aead.chacha_poly.ChaCha20Poly1305, crypto.hash.sha2.Sha256),357 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),
359 AEGIS_128L_SHA256: ApplicationCipherT(crypto.aead.aegis.Aegis128L, crypto.hash.sha2.Sha256),359 AEGIS_128L_SHA256: ApplicationCipherT(crypto.aead.aegis.Aegis128L, crypto.hash.sha2.Sha256),
360};360};
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...@@ -355,7 +355,7 @@ pub fn init(stream: anytype, ca_bundle: Certificate.Bundle, host: []const u8) In
355 inline .AES_128_GCM_SHA256,355 inline .AES_128_GCM_SHA256,
356 .AES_256_GCM_SHA384,356 .AES_256_GCM_SHA384,
357 .CHACHA20_POLY1305_SHA256,357 .CHACHA20_POLY1305_SHA256,
358 .AEGIS_256_SHA384,358 .AEGIS_256_SHA512,
359 .AEGIS_128L_SHA256,359 .AEGIS_128L_SHA256,
360 => |tag| {360 => |tag| {
361 const P = std.meta.TagPayloadByName(tls.HandshakeCipher, @tagName(tag));361 const P = std.meta.TagPayloadByName(tls.HandshakeCipher, @tagName(tag));
...@@ -1406,7 +1406,7 @@ fn limitVecs(iovecs: []std.os.iovec, len: usize) []std.os.iovec {...@@ -1406,7 +1406,7 @@ fn limitVecs(iovecs: []std.os.iovec, len: usize) []std.os.iovec {
1406const cipher_suites = if (crypto.core.aes.has_hardware_support)1406const cipher_suites = if (crypto.core.aes.has_hardware_support)
1407 enum_array(tls.CipherSuite, &.{1407 enum_array(tls.CipherSuite, &.{
1408 .AEGIS_128L_SHA256,1408 .AEGIS_128L_SHA256,
1409 .AEGIS_256_SHA384,1409 .AEGIS_256_SHA512,
1410 .AES_128_GCM_SHA256,1410 .AES_128_GCM_SHA256,
1411 .AES_256_GCM_SHA384,1411 .AES_256_GCM_SHA384,
1412 .CHACHA20_POLY1305_SHA256,1412 .CHACHA20_POLY1305_SHA256,
...@@ -1415,7 +1415,7 @@ else...@@ -1415,7 +1415,7 @@ else
1415 enum_array(tls.CipherSuite, &.{1415 enum_array(tls.CipherSuite, &.{
1416 .CHACHA20_POLY1305_SHA256,1416 .CHACHA20_POLY1305_SHA256,
1417 .AEGIS_128L_SHA256,1417 .AEGIS_128L_SHA256,
1418 .AEGIS_256_SHA384,1418 .AEGIS_256_SHA512,
1419 .AES_128_GCM_SHA256,1419 .AES_128_GCM_SHA256,
1420 .AES_256_GCM_SHA384,1420 .AES_256_GCM_SHA384,
1421 });1421 });