authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-12-03 02:05:59-08:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2023-12-03 02:05:59-08:00
log8a8fd47d217eadb8a45ec6b9325acfe1d42704d7
treee83269ebea160aa0934a13ef011e3a1252a827aa
parentdaf91ed8d1149d10f0e4a597efc9f17c4a49b0ca
parentf276bb107e3f33e0425558846f60f8ed079682d4
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #18176 from jedisct1/aegis_sha512

TLS: The 0x1306 TLS identifier was updated to TLS_AEGIS_256_SHA512

2 files changed, 7 insertions(+), 7 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+4-4
......@@ -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));
......@@ -569,7 +569,7 @@ pub fn init(stream: anytype, ca_bundle: Certificate.Bundle, host: []const u8) In
569569 try hsd.ensure(sig_len);
570570 const encoded_sig = hsd.slice(sig_len);
571571 const max_digest_len = 64;
572 var verify_buffer =
572 var verify_buffer: [64 + 34 + max_digest_len]u8 =
573573 ([1]u8{0x20} ** 64) ++
574574 "TLS 1.3, server CertificateVerify\x00".* ++
575575 @as([max_digest_len]u8, undefined);
......@@ -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 });