pub enum ShakeVariant {
V128,
V256,
}
Expand description
SHAKE algorithm variants with different security levels.
具有不同安全级别的 SHAKE 算法变体。
§Performance vs Security | 性能与安全性
SHAKE-128 offers better performance while SHAKE-256 provides higher security. Both are suitable for most applications, with the choice depending on specific security requirements.
SHAKE-128 提供更好的性能,而 SHAKE-256 提供更高的安全性。 两者都适用于大多数应用,选择取决于特定的安全要求。
Variants§
V128
SHAKE-128: 128-bit security level.
SHAKE-128: 128 位安全级别。
§Properties | 属性
- Security level: 128-bit
- Rate: 1344 bits (168 bytes)
- Capacity: 256 bits (32 bytes)
- Performance: High
§Use Cases | 使用场景
Suitable for most applications requiring variable-length output. Recommended for general-purpose key derivation and random generation.
适用于大多数需要可变长度输出的应用。 推荐用于通用密钥派生和随机生成。
V256
SHAKE-256: 256-bit security level.
SHAKE-256: 256 位安全级别。
§Properties | 属性
- Security level: 256-bit
- Rate: 1088 bits (136 bytes)
- Capacity: 512 bits (64 bytes)
- Performance: Medium
§Use Cases | 使用场景
For applications requiring higher security margins or long-term protection. Recommended for high-value or sensitive applications.
用于需要更高安全边际或长期保护的应用。 推荐用于高价值或敏感应用。
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for ShakeVariant
impl<'__de, __Context> BorrowDecode<'__de, __Context> for ShakeVariant
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Source§impl Clone for ShakeVariant
impl Clone for ShakeVariant
Source§fn clone(&self) -> ShakeVariant
fn clone(&self) -> ShakeVariant
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more