Remove the last remnants of iovec in their experimental state Also move the ChaCha20-Poly1305 TODOs to the new bug. Bug: 383343306, 473454967 Change-Id: Ie0aa981b5b306f17ffe037ef2739c302652c1398 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/86567 Commit-Queue: Rudolf Polzer <rpolzer@google.com> Auto-Submit: David Benjamin <davidben@google.com> Reviewed-by: Rudolf Polzer <rpolzer@google.com>
diff --git a/crypto/cipher/aead_test.cc b/crypto/cipher/aead_test.cc index 356a2a8..39a68ed 100644 --- a/crypto/cipher/aead_test.cc +++ b/crypto/cipher/aead_test.cc
@@ -628,20 +628,10 @@ TestIOVecs iovecs = TestIOVecs::Split(in, splits, in_place); std::vector<uint8_t> out_tag(EVP_AEAD_max_overhead(aead_config.func())); size_t out_tag_len; - int ret = EVP_AEAD_CTX_sealv( + ASSERT_TRUE(EVP_AEAD_CTX_sealv( ctx.get(), iovecs.iovecs().data(), iovecs.iovecs().size(), out_tag.data(), &out_tag_len, out_tag.size(), nonce.data(), - nonce.size(), advecs.ivecs().data(), advecs.ivecs().size()); - - // Skip encryption for AEADs that don't implement sealv(). - // TODO(crbug.com/383343306): Remove this check once all AEADs do. - if (!ret && ERR_equals(ERR_peek_error(), ERR_LIB_CIPHER, - CIPHER_R_CTRL_NOT_IMPLEMENTED)) { - t->SkipCurrent(); - return; - } - - ASSERT_TRUE(ret); + nonce.size(), advecs.ivecs().data(), advecs.ivecs().size())); out_tag.resize(out_tag_len); EXPECT_EQ(Bytes(ct), Bytes(iovecs.Output())); EXPECT_EQ(Bytes(tag), Bytes(out_tag));
diff --git a/crypto/cipher/e_chacha20poly1305.cc b/crypto/cipher/e_chacha20poly1305.cc index ab6ff0a..d665274 100644 --- a/crypto/cipher/e_chacha20poly1305.cc +++ b/crypto/cipher/e_chacha20poly1305.cc
@@ -171,7 +171,7 @@ iovecs[1].len - done, key, nonce.data(), block_counter); } - // TODO(crbug.com/383343306): Support more than 1 extra ciphertext. + // TODO(crbug.com/473454967): Support more than 1 extra ciphertext. data.in.extra_ciphertext = iovecs[1].out; data.in.extra_ciphertext_len = iovecs[1].len; } else { @@ -192,7 +192,7 @@ bssl::iovec::ForEachBlockRange<64, /*WriteOut=*/true>( iovecs, [&](const uint8_t *in, uint8_t *out, size_t len) { - // TODO(crbug.com/383343306): Maybe just provide asm version of this? + // TODO(crbug.com/473454967): Maybe just provide asm version of this? // Here, len is always a multiple of 64. CRYPTO_chacha_20(out, in, len, key, nonce.data(), block); CRYPTO_poly1305_update(&ctx, out, len); @@ -281,7 +281,7 @@ union chacha20_poly1305_open_data data; if (chacha20_poly1305_asm_capable() && iovecs.size() <= 1 && aadvecs.size() <= 1) { - // TODO(crbug.com/383343306): Support more than 1 ciphertext segment. + // TODO(crbug.com/473454967): Support more than 1 ciphertext segment. OPENSSL_memcpy(data.in.key, key, 32); data.in.counter = 0; CopySpan(nonce, data.in.nonce); @@ -299,7 +299,7 @@ bssl::iovec::ForEachBlockRange<64, /*WriteOut=*/true>( iovecs, [&](const uint8_t *in, uint8_t *out, size_t len) { - // TODO(crbug.com/383343306): Maybe just provide asm version of this? + // TODO(crbug.com/473454967): Maybe just provide asm version of this? // Here, len is always a multiple of 64. CRYPTO_poly1305_update(&ctx, in, len); CRYPTO_chacha_20(out, in, len, key, nonce.data(), block);
diff --git a/include/openssl/aead.h b/include/openssl/aead.h index b9901fd..d23c16d 100644 --- a/include/openssl/aead.h +++ b/include/openssl/aead.h
@@ -424,12 +424,6 @@ // ciphertext to the |out| pointers of |iovec| and the authentication tag to // |out_tag|. It returns one on success and zero otherwise. // -// WARNING: This is a preview API and should not be used yet. Not all AEADs -// support it, or support may exist but be slow. -// -// TODO(crbug.com/383343306): remove the above note once this is implemented -// for all ciphers. -// // This function computes the same output as |EVP_AEAD_CTX_seal_scatter|, but // without requiring the input or output to be a contiguous buffer. The // individual input and output pieces are logically concatenated for a single