Enum Class AlgorithmFamily

java.lang.Object
java.lang.Enum<AlgorithmFamily>
zeroecho.core.AlgorithmFamily
All Implemented Interfaces:
Serializable, Comparable<AlgorithmFamily>, Constable

public enum AlgorithmFamily extends Enum<AlgorithmFamily>
High-level classification of cryptographic algorithms.

Each AlgorithmFamily groups primitives with similar lifecycle constraints, key properties, and safe usage patterns.

Families

  • ASYMMETRIC: Public-key algorithms such as signature schemes (Ed25519, RSA) or public-key encryption.
  • SYMMETRIC: Shared-key algorithms such as block/stream ciphers and message authentication codes.
  • KEM: Key encapsulation mechanisms, including post-quantum schemes.
  • DIGEST: Unkeyed hash functions and extendable-output functions (e.g., SHA-2, SHA-3, BLAKE3).
  • AGREEMENT: Key-agreement schemes (e.g., X25519, ECDH), distinct from KEMs but with similar goals.

Usage: Libraries and protocols can branch on this classification to enforce correct API surfaces (e.g., demanding nonces for symmetric AEAD, or key pairs for asymmetric operations).

Since:
1.0
  • Enum Constant Details

    • ASYMMETRIC

      public static final AlgorithmFamily ASYMMETRIC
      Public-key primitives (signatures, RSA, etc.).
    • SYMMETRIC

      public static final AlgorithmFamily SYMMETRIC
      Shared-key primitives (ciphers, MACs).
    • KEM

      public static final AlgorithmFamily KEM
      Key encapsulation mechanisms (encapsulate/decapsulate).
    • DIGEST

      public static final AlgorithmFamily DIGEST
      Unkeyed hash functions or XOFs.
    • AGREEMENT

      public static final AlgorithmFamily AGREEMENT
      Key-agreement schemes such as ECDH/X25519.
  • Method Details

    • values

      public static AlgorithmFamily[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AlgorithmFamily valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null