Expand description
Extendable Output Functions (XOF) for variable-length cryptographic output.
用于可变长度密码输出的可扩展输出函数 (XOF)。
§Overview | 概述
Extendable Output Functions (XOFs) are cryptographic functions that can produce output of any desired length. Unlike traditional hash functions with fixed output sizes, XOFs can generate arbitrarily long pseudorandom sequences from input data.
可扩展输出函数 (XOF) 是可以产生任何所需长度输出的密码函数。 与具有固定输出大小的传统哈希函数不同,XOF 可以从输入数据生成任意长的伪随机序列。
§Use Cases | 使用场景
-
Key Derivation: Generate keys of specific lengths
-
Random Number Generation: Produce cryptographically secure random data
-
Stream Ciphers: Create keystreams for encryption
-
Mask Generation: Generate masks for cryptographic protocols
-
Domain Separation: Create distinct outputs for different contexts
-
密钥派生: 生成特定长度的密钥
-
随机数生成: 产生密码学安全的随机数据
-
流密码: 为加密创建密钥流
-
掩码生成: 为密码协议生成掩码
-
域分离: 为不同上下文创建不同的输出
§SHAKE Algorithm Family | SHAKE 算法族
SHAKE functions are based on the Keccak sponge construction (same as SHA-3) but with extendable output capability:
SHAKE 函数基于 Keccak 海绵构造(与 SHA-3 相同),但具有可扩展输出能力:
Algorithm | Security Level | Rate | Capacity | Use Case |
---|---|---|---|---|
SHAKE-128 | 128-bit | 1344 bits | 256 bits | General purpose |
SHAKE-256 | 256-bit | 1088 bits | 512 bits | High security |
§Security Properties | 安全属性
-
Pseudorandomness: Output is indistinguishable from random
-
Collision Resistance: Infeasible to find two inputs with same output
-
Preimage Resistance: Given output, infeasible to find input
-
Domain Separation: Different contexts produce independent outputs
-
伪随机性: 输出与随机数据无法区分
-
抗碰撞性: 找到具有相同输出的两个输入在计算上不可行
-
原像抗性: 给定输出,找到输入在计算上不可行
-
域分离: 不同上下文产生独立的输出
Structs§
- XofAlgorithm
Builder - Builder for constructing XOF algorithm instances.
Enums§
- Shake
Variant - SHAKE algorithm variants with different security levels.
- XofAlgorithm
- Extendable Output Function algorithm enumeration.