public enum KeyUsage
- Object
- Enum<KeyUsage>
- KeyUsage
ImplementsComparable<KeyUsage>
What a KeyHandle is allowed to do.
Usages are fixed when a handle is created and are not widened afterwards. A handle created to
seal records cannot be talked into signing, which matters because the two operations under one
key is a classic way to turn a confidentiality primitive into an oracle. Web Crypto enforces
the same restriction on a CryptoKey, and this mirrors it so a port cannot be more permissive
than the browser is.
Enum constants
SEAL | Authenticated encryption: KeyHandle.seal. |
OPEN | Authenticated decryption: KeyHandle.open. |
MAC | Message authentication: KeyHandle.mac. |
VERIFY_MAC | Verification of a tag produced by MAC. |
WRAP | Wrapping another key. |
UNWRAP | Unwrapping a key wrapped under WRAP. |
Methods
public static KeyUsage[] values() | |
public static KeyUsage valueOf(String name) |
Inherited methods
Enum constant details
SEAL
SEALAuthenticated encryption:
KeyHandle.seal.OPEN
OPENAuthenticated decryption:
KeyHandle.open.MAC
MACMessage authentication:
KeyHandle.mac.VERIFY_MAC
VERIFY_MACVerification of a tag produced by
MAC.WRAP
WRAPWrapping another key. Separate from
SEAL so a key that only protects other keys cannot
be pointed at application data, and the reverse.UNWRAP
UNWRAPUnwrapping a key wrapped under
WRAP.Method details
values
public static KeyUsage[] values()valueOf
public static KeyUsage valueOf(String name)