module infix-crypto-types {
  yang-version 1.1;
  namespace "urn:infix:crypto-types:ns:yang:1.0";
  prefix infix-ct;
  import ietf-crypto-types {
    prefix ct;
  }

  revision 2025-11-09 {
    description "Add Wireguard public/private key and sha";
  }
  revision 2025-06-17 {
    description "Add Wi-Fi secret support.";
  }
  revision 2025-02-04 {
    description "Initial";
  }

  identity private-key-format {
    base ct:private-key-format;
    description
      "Base for Infix private key format extensions.";
  }

  identity public-key-format {
    base ct:public-key-format;
    description
      "Base for Infix public key format extensions.";
  }

  identity rsa-private-key-format {
    base private-key-format;
    base ct:rsa-private-key-format;
    description
      "RSA private key in PKCS#1 format (RFC 8017).
       Used for SSH host keys.";
  }

  identity ssh-public-key-format {
    base public-key-format;
    base ct:ssh-public-key-format;
    description
      "SSH public key format (RFC 4253, Section 6.6).
       Used for SSH host keys.";
  }

  identity symmetric-key-format {
    base ct:symmetric-key-format;
    description
      "Base for Infix symmetric key format extensions.";
  }

  identity passphrase-key-format {
    base ct:symmetric-key-format;
    base symmetric-key-format;
    description
      "Human-readable passphrase, e.g., WiFi WPA2/WPA3 passwords.";
  }

  identity x25519-public-key-format {
    base public-key-format;
    base ct:public-key-format;
    description
      "X25519 (Curve25519) public key format for Diffie-Hellman key exchange.
       This format is used by network protocols such as WireGuard VPN.";
  }

  identity x25519-private-key-format {
    base private-key-format;
    base ct:private-key-format;
    description
      "X25519 (Curve25519) private key format for Diffie-Hellman key exchange.
       This format is used by network protocols such as WireGuard VPN.";
  }
}
