module iana-ssh-public-key-algs {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:iana-ssh-public-key-algs";
  prefix sshpka;

  organization
    "Internet Assigned Numbers Authority (IANA)";

  contact
    "Postal: ICANN
             12025 Waterfront Drive, Suite 300
             Los Angeles, CA  90094-2536
             United States of America
     Tel:    +1 310 301 5800
     Email:  iana@iana.org";

  description
    "This module defines identities for the public key algorithms
     defined in the 'Public Key Algorithm Names' sub-registry of the
     'Secure Shell (SSH) Protocol Parameters' registry maintained
     by IANA.

     Copyright (c) 2024 IETF Trust and the persons identified as
     authors of the code. All rights reserved.

     Redistribution and use in source and binary forms, with
     or without modification, is permitted pursuant to, and
     subject to the license terms contained in, the Revised
     BSD License set forth in Section 4.c of the IETF Trust's
     Legal Provisions Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     The initial version of this YANG module is part of RFC EEEE
     (https://www.rfc-editor.org/info/rfcEEEE); see the RFC
     itself for full legal notices.";

  revision 2024-02-08 {
    description
      "Reflects contents of the public key algorithms registry.";
    reference
      "RFC EEEE: YANG Groupings for SSH Clients and SSH Servers";
  }

  // Typedefs

  typedef public-key-algorithm-ref {
    type identityref {
      base "public-key-alg-base";
    }
    description
      "A reference to an SSH public key algorithm identifier.";
  }


  // Identities

  identity public-key-alg-base {
    description
      "Base identity for SSH public key algorithms.";
  }

  identity ssh-dss {
    base public-key-alg-base;
    description
      "Identity for the 'ssh-dss' algorithm.  Section 6.6";
    reference
      "RFC 4253:
         The Secure Shell (SSH) Transport Layer Protocol";
  }

  identity ssh-rsa {
    base public-key-alg-base;
    description
      "Identity for the 'ssh-rsa' algorithm.  Section 6.6";
    reference
      "RFC 4253:
         The Secure Shell (SSH) Transport Layer Protocol";
  }

  identity rsa-sha2-256 {
    base public-key-alg-base;
    description
      "Identity for the 'rsa-sha2-256' algorithm.  Section 3";
    reference
      "RFC 8332:
         Use of RSA Keys with SHA-256 and SHA-512 in the Secure Shell
         (SSH) Protocol";
  }

  identity rsa-sha2-512 {
    base public-key-alg-base;
    description
      "Identity for the 'rsa-sha2-512' algorithm.  Section 3";
    reference
      "RFC 8332:
         Use of RSA Keys with SHA-256 and SHA-512 in the Secure Shell
         (SSH) Protocol";
  }

  identity spki-sign-rsa {
    base public-key-alg-base;
    description
      "Identity for the 'spki-sign-rsa' algorithm.  Section 6.6";
    reference
      "RFC 4253:
         The Secure Shell (SSH) Transport Layer Protocol";
  }

  identity spki-sign-dss {
    base public-key-alg-base;
    description
      "Identity for the 'spki-sign-dss' algorithm.  Section 6.6";
    reference
      "RFC 4253:
         The Secure Shell (SSH) Transport Layer Protocol";
  }

  identity pgp-sign-rsa {
    base public-key-alg-base;
    description
      "Identity for the 'pgp-sign-rsa' algorithm.  Section 6.6";
    reference
      "RFC 4253:
         The Secure Shell (SSH) Transport Layer Protocol";
  }

  identity pgp-sign-dss {
    base public-key-alg-base;
    description
      "Identity for the 'pgp-sign-dss' algorithm.  Section 6.6";
    reference
      "RFC 4253:
         The Secure Shell (SSH) Transport Layer Protocol";
  }

  identity null {
    base public-key-alg-base;
    description
      "Identity for the 'null' algorithm.  Section 5";
    reference
      "RFC 4462:
         Generic Security Service Application Program Interface (GSS-
         API) Authentication and Key Exchange for the Secure Shell
         (SSH) Protocol";
  }

  identity ecdsa-sha2-nistp256 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-nistp256' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-nistp384 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-nistp384' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-nistp521 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-nistp521' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-1.3.132.0.1 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-1.3.132.0.1' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-1.2.840.10045.3.1.1 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-1.2.840.10045.3.1.1' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-1.3.132.0.33 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-1.3.132.0.33' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-1.3.132.0.26 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-1.3.132.0.26' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-1.3.132.0.27 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-1.3.132.0.27' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-1.3.132.0.16 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-1.3.132.0.16' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-1.3.132.0.36 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-1.3.132.0.36' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-1.3.132.0.37 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-1.3.132.0.37' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity ecdsa-sha2-1.3.132.0.38 {
    base public-key-alg-base;
    description
      "Identity for the 'ecdsa-sha2-1.3.132.0.38' algorithm.";
    reference
      "RFC 5656:
         Elliptic Curve Algorithm Integration in the Secure Shell
         Transport Layer";
  }

  identity x509v3-ssh-dss {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ssh-dss' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ssh-rsa {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ssh-rsa' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-rsa2048-sha256 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-rsa2048-sha256' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-nistp256 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-nistp256' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-nistp384 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-nistp384' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-nistp521 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-nistp521' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-1.3.132.0.1 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-1.3.132.0.1' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-1.2.840.10045.3.1.1 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-1.2.840.10045.3.1.1'
       algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-1.3.132.0.33 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-1.3.132.0.33' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-1.3.132.0.26 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-1.3.132.0.26' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-1.3.132.0.27 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-1.3.132.0.27' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-1.3.132.0.16 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-1.3.132.0.16' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-1.3.132.0.36 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-1.3.132.0.36' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-1.3.132.0.37 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-1.3.132.0.37' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity x509v3-ecdsa-sha2-1.3.132.0.38 {
    base public-key-alg-base;
    description
      "Identity for the 'x509v3-ecdsa-sha2-1.3.132.0.38' algorithm.";
    reference
      "RFC 6187:
         X.509v3 Certificates for Secure Shell Authentication";
  }

  identity ssh-ed25519 {
    base public-key-alg-base;
    description
      "Identity for the 'ssh-ed25519' algorithm.";
    reference
      "RFC 8709:
         Ed25519 and Ed448 Public Key Algorithms for the Secure Shell
         (SSH) Protocol";
  }

  identity ssh-ed448 {
    base public-key-alg-base;
    description
      "Identity for the 'ssh-ed448' algorithm.";
    reference
      "RFC 8709:
         Ed25519 and Ed448 Public Key Algorithms for the Secure Shell
         (SSH) Protocol";
  }

}