TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

I want XAES-256-GCM/11

146 pointsby harporoederalmost 2 years ago

14 comments

sdrapkinalmost 2 years ago
GCM (ie. AES-GCM) has the following problems, which extended variants - those that deterministically randomize (key,nonce) pair - do not solve:<p>Inability to encrypt more than 64Gb with the same (key,nonce) pair.<p>Lack of commitment (whether key-commitment, or key+nonce+ad commitment).<p>If one is seriously considering breaking away from existing GCM standards to create yet-another-standard, such proposal would need to offer improvements in all areas (ex. a proposed standard for converting any AEAD into streaming chunk-based AEAD with practically unlimited message sizes under the same (key,nonce) and unlimited message counts.<p>GCM-256 is ubiquitous and is often the preferred choice for all the reasons mentioned by the author, but that very argument is what makes non-standard GCM with 11 AES-rounds silly.<p>In 2023 we should be working on new standards that &quot;wrap&quot; existing crypto-primitives (which are already implemented&#x2F;available in countless hardware-accelerated libraries&#x2F;APIs) to get additional features&#x2F;benefits&#x2F;capabilities - not musing about AES with 10+1 rounds or SHA-512-really-fast with 80-1 rounds..
评论 #36625172 未加载
评论 #36623159 未加载
kmeisthaxalmost 2 years ago
Has there been any situation in which 10 rounds would be utterly broken but 14 would give you &quot;enough&quot; of a security margin? My impression is that once you&#x27;ve managed to break a cipher enough to get that many rounds, you&#x27;ve also discovered a linear-time attack on that cipher[0]. Adding a mere 28% slowdown on that attack won&#x27;t help.<p>[0] &quot;Linear time&quot; means O(n), which is computer science speak for &quot;f(n) = an, but we ignore the a because we&#x27;re only interested in the fastest growing component of the function&quot;. In some cases the a is so large as to make the algorithm in question not feasible for ANY size. Let&#x27;s just pretend the attacker doesn&#x27;t have that problem.
评论 #36622629 未加载
评论 #36626113 未加载
评论 #36625557 未加载
mananaysiemprealmost 2 years ago
&gt; we might wish OCB hadn’t been patented<p>Rogaway says he has released all his OCB patents into the public domain[1], so it sounds like OCB might be an option for greenfield projects? OTOH, I don’t see why you’d use any kind of AES in a greenfield project outside the surreal FIPS world, given how absolutely miserable constant-time software for it is. (ChaCha is kind of miserable when you don’t have at least a 32-bit ALU with a barrel shifter—that is on exactly the kind of platforms where table-based AES might actually be constant-time—but I’m not sure that’s a good enough reason.)<p>[1] <a href="https:&#x2F;&#x2F;mailarchive.ietf.org&#x2F;arch&#x2F;msg&#x2F;cfrg&#x2F;qLTveWOdTJcLn4HP3ev-vrj05Vg&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;mailarchive.ietf.org&#x2F;arch&#x2F;msg&#x2F;cfrg&#x2F;qLTveWOdTJcLn4HP3...</a>
评论 #36625879 未加载
purple_elephantalmost 2 years ago
&gt;In 2023, the way to use AES is AES-GCM. Anything else is very unlikely to make sense.<p>Encrypt-then-MAC remains the most conservative and theoretically secure option.<p>Leaving aside the (very serious) nonce reuse issue, the cracks on non-committing AEADs in general (such as AES-GCM) are already showing. Partitioning oracle attacks affect all of them: <a href="https:&#x2F;&#x2F;crypto.stackexchange.com&#x2F;questions&#x2F;88716&#x2F;understanding-the-impact-of-partitioning-oracle-attacks-on-stream-ciphers" rel="nofollow noreferrer">https:&#x2F;&#x2F;crypto.stackexchange.com&#x2F;questions&#x2F;88716&#x2F;understandi...</a><p>There are also other minor GCM-specific issues (weak keys etc.). None of the issues are cypher-breaking, but I wouldn&#x27;t say that AES-GCM is automatically the best choice for everything.
评论 #36622296 未加载
zahllosalmost 2 years ago
From the NIST doc for GCM: <a href="https:&#x2F;&#x2F;nvlpubs.nist.gov&#x2F;nistpubs&#x2F;Legacy&#x2F;SP&#x2F;nistspecialpublication800-38d.pdf" rel="nofollow noreferrer">https:&#x2F;&#x2F;nvlpubs.nist.gov&#x2F;nistpubs&#x2F;Legacy&#x2F;SP&#x2F;nistspecialpubli...</a><p>The IV can be any length up to 2^64-1. The reason for picking 96-bit IVs is that other values require an extra invocation of GHASH (page 15). The document recommends 96-bit for interoperability but that&#x27;s by no means a requirement.<p>The X part is thus in theory already allowed.
评论 #36621787 未加载
评论 #36622405 未加载
fortyalmost 2 years ago
How does it compare to XChachaPoly? I guess it&#x27;s only useful when you are sure to have CPU support for AES and not having to deal with the annoyance of non constant time software implementations. I feel like XChachaPoly has the benefit of being annoyance free (constant time by design even in software implementation), fairly fast even without hardware support and to exists, so it&#x27;s probably a good choice for most use cases.<p>EDIT: my question is probably more clearly asked as: what&#x27;s wrong with XChachaPoly that is solved by this new construct?
评论 #36621816 未加载
评论 #36622172 未加载
some_furryalmost 2 years ago
I sketched out an extended nonce construction using AES-GCM with CBC-MAC last year (both of which are permitted by FIPS).<p><a href="https:&#x2F;&#x2F;soatok.blog&#x2F;2022&#x2F;12&#x2F;21&#x2F;extending-the-aes-gcm-nonce-without-nightmare-fuel" rel="nofollow noreferrer">https:&#x2F;&#x2F;soatok.blog&#x2F;2022&#x2F;12&#x2F;21&#x2F;extending-the-aes-gcm-nonce-w...</a><p>I never considered only using 11 rounds, though. That&#x27;d have a significant performance impact if we could.
评论 #36630690 未加载
formerly_provenalmost 2 years ago
AES-256-GCM runs at well above 10 GB&#x2F;s per core on semi-modern desktop&#x2F;server CPUs and the 128 variant isn’t actually 40% faster iirc. I think it was like 11 vs 13 GB&#x2F;s on the same hardware, not what 10-vs-14 rounds would seem to imply. Even chapoly is only around 3-4x slower.<p>(That’s gigabytes per second, not gigabits)
jedisct1almost 2 years ago
AEGIS is being standardized, and solves many of the AES-GCM issues while being significantly faster.<p><a href="https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;draft-irtf-cfrg-aegis-aead&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;draft-irtf-cfrg-aegis-aead&#x2F;</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;jedisct1&#x2F;aegis-128X">https:&#x2F;&#x2F;github.com&#x2F;jedisct1&#x2F;aegis-128X</a><p>Many implementations are available, including for Go: <a href="https:&#x2F;&#x2F;github.com&#x2F;jedisct1&#x2F;draft-aegis-aead#known-implementations">https:&#x2F;&#x2F;github.com&#x2F;jedisct1&#x2F;draft-aegis-aead#known-implement...</a>
cosmojgalmost 2 years ago
If FIPS compliance is one of your primary motivations for using AES, why not use Ed25519 or Ed448 instead?
评论 #36627851 未加载
exabrialalmost 2 years ago
Do you _really_ need AES256 though? Just a large computation overhead while AES128 is extraordinarily secure already.<p>The conversation about nonce sizes is 100% on point however. Why isn’t it at least the size of the key?
评论 #36626855 未加载
评论 #36628369 未加载
评论 #36626970 未加载
dcowalmost 2 years ago
Why are we even hashing the nonce in the first place? Don’t we have enough entropy these days to just pull what we need?
评论 #36625889 未加载
barbegalalmost 2 years ago
&gt; If for example an application encrypts 2^48 messages under different 128-bit keys, and all messages start with the same few bytes, an attacker can build a lookup table, try and lookup the ciphertext of 2^64 keys, and have a 2^-16 chance to decrypt one message. Not good.<p>This is satire right? The computational and storage requirements to preform such an attack to just get a small probability of decrypting one message seem ludicrous.
评论 #36623305 未加载
评论 #36623311 未加载
jwilkalmost 2 years ago
What does 11 mean?
评论 #36622450 未加载
评论 #36622416 未加载