authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2026-04-20 23:02:25+02:00
committergravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2026-05-28 16:34:04+02:00
logb1240e13872509f1806924ec9b3df653510088f2
tree6741ba1dfe54200a9e73ac90ddc4ea960952e2bf
parent03fbadbf3a1aa64faa9a74a16712a4a0f3c16653

aes-siv: update the comment to mention the max number of AD inputs


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

lib/std/crypto/aes_siv.zig+2-2
...@@ -226,7 +226,7 @@ fn AesSiv(comptime Aes: anytype) type {...@@ -226,7 +226,7 @@ fn AesSiv(comptime Aes: anytype) type {
226226
227 /// Encrypts plaintext with multiple associated data components.227 /// Encrypts plaintext with multiple associated data components.
228 /// This is the most general form of AES-SIV encryption that accepts228 /// This is the most general form of AES-SIV encryption that accepts
229 /// an arbitrary vector of associated data strings as specified in RFC 5297.229 /// a vector of up to 126 associated data strings as specified in RFC 5297.
230 pub fn encryptWithAdVector(c: []u8, tag: *[tag_length]u8, m: []const u8, ad: []const []const u8, key: [key_length]u8) void {230 pub fn encryptWithAdVector(c: []u8, tag: *[tag_length]u8, m: []const u8, ad: []const []const u8, key: [key_length]u8) void {
231 debug.assert(c.len == m.len);231 debug.assert(c.len == m.len);
232 debug.assert(ad.len <= 126); // AES-SIV supports at most 126 associated data components232 debug.assert(ad.len <= 126); // AES-SIV supports at most 126 associated data components
...@@ -261,7 +261,7 @@ fn AesSiv(comptime Aes: anytype) type {...@@ -261,7 +261,7 @@ fn AesSiv(comptime Aes: anytype) type {
261261
262 /// Decrypts ciphertext with multiple associated data components.262 /// Decrypts ciphertext with multiple associated data components.
263 /// This is the most general form of AES-SIV decryption that accepts263 /// This is the most general form of AES-SIV decryption that accepts
264 /// an arbitrary vector of associated data strings as specified in RFC 5297.264 /// a vector of up to 126 associated data strings as specified in RFC 5297.
265 pub fn decryptWithAdVector(m: []u8, c: []const u8, tag: [tag_length]u8, ad: []const []const u8, key: [key_length]u8) AuthenticationError!void {265 pub fn decryptWithAdVector(m: []u8, c: []const u8, tag: [tag_length]u8, ad: []const []const u8, key: [key_length]u8) AuthenticationError!void {
266 assert(c.len == m.len);266 assert(c.len == m.len);
267 assert(ad.len <= 126); // AES-SIV supports at most 126 associated data components267 assert(ad.len <= 126); // AES-SIV supports at most 126 associated data components