You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于SHA-3文档中|Z|符号含义的技术咨询

Clarifying the |Z| Notation in SHA-3's FIPS 202 Document

Great question—this notation inconsistency can be really confusing! Let's clear it up:

|Z| absolutely represents the length of the string Z here, even though you’ve seen len(Z) used elsewhere in the same document. Here’s why that makes perfect sense:

Looking at the context you shared:

If d≤|Z|, then return Truncd(Z); else continue.
其中d为非负整数,Z为字符串

The Trunc_d(Z) operation means truncating Z to d bits (or bytes, depending on the SHA-3 context). Logically, you can only truncate a string to a length that’s less than or equal to its original length—if d were larger than Z’s length, truncating wouldn’t be meaningful, hence the "else continue" clause. This directly aligns with |Z| being the length of Z.

In cryptography and formal mathematical writing, |X| is a standard notation for the size of X—whether that’s the length of a string/sequence, or the cardinality of a set. Even though the FIPS 202 document uses len(Z) in other sections, this is just a switch to a widely accepted mathematical convention. It’s likely an oversight that the symbol glossary page didn’t explicitly list |Z|, but the context and standard usage leave no doubt about its meaning.

If you want to confirm further, take a look at other NIST cryptography specifications—you’ll find |X| used repeatedly to denote string length, often alongside len(X) in different sections.

内容的提问来源于stack exchange,提问作者Cl00e9ment

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 06:36:52