@blockchaincommons/components - v1.0.0-beta.4
    Preparing search index...

    Type Alias SshPrivateKeyData

    SshPrivateKeyData:
        | { kind: "ed25519"; seed: Uint8Array; pubBytes: Uint8Array }
        | {
            kind: "ecdsa";
            curve: SshEcdsaCurve;
            scalar: Uint8Array;
            point: Uint8Array;
        }
        | {
            kind: "dsa";
            p: Uint8Array;
            q: Uint8Array;
            g: Uint8Array;
            y: Uint8Array;
            x: Uint8Array;
        }
        | {
            kind: "rsa";
            n: Uint8Array;
            e: Uint8Array;
            d: Uint8Array;
            iqmp: Uint8Array;
            p: Uint8Array;
            q: Uint8Array;
        }

    Algorithm-specific private-key data.

    • ed25519: 32-byte seed.
    • ecdsa: curve + canonical scalar (32 / 48 / 66 bytes, no sign byte).
    • dsa: canonical positive p, q, g, y (re-stated from the public key blob), plus the secret exponent x.
    • rsa: canonical positive n, e (re-stated), d, iqmp, p, q.

    Type Declaration

    • { kind: "ed25519"; seed: Uint8Array; pubBytes: Uint8Array }
      • kind: "ed25519"

        ssh-ed25519.

      • seed: Uint8Array

        The 32-byte seed.

      • pubBytes: Uint8Array

        The 32 raw public key bytes.

    • { kind: "ecdsa"; curve: SshEcdsaCurve; scalar: Uint8Array; point: Uint8Array }
      • kind: "ecdsa"

        ecdsa-sha2-nistp256 / ecdsa-sha2-nistp384 / ecdsa-sha2-nistp521.

      • curve: SshEcdsaCurve

        The NIST curve.

      • scalar: Uint8Array

        The canonical scalar (32, 48 or 66 bytes, no sign byte).

      • point: Uint8Array

        The SEC1 uncompressed public point.

    • {
          kind: "dsa";
          p: Uint8Array;
          q: Uint8Array;
          g: Uint8Array;
          y: Uint8Array;
          x: Uint8Array;
      }
      • kind: "dsa"

        ssh-dss.

      • p: Uint8Array

        The prime modulus, canonical positive bytes.

      • q: Uint8Array

        The subgroup order, canonical positive bytes.

      • g: Uint8Array

        The generator, canonical positive bytes.

      • y: Uint8Array

        The public value, canonical positive bytes.

      • x: Uint8Array

        The secret exponent, canonical positive bytes.

    • {
          kind: "rsa";
          n: Uint8Array;
          e: Uint8Array;
          d: Uint8Array;
          iqmp: Uint8Array;
          p: Uint8Array;
          q: Uint8Array;
      }
      • kind: "rsa"

        ssh-rsa.

      • n: Uint8Array

        The modulus, canonical positive bytes.

      • e: Uint8Array

        The public exponent, canonical positive bytes.

      • d: Uint8Array

        The private exponent, canonical positive bytes.

      • iqmp: Uint8Array

        The CRT coefficient q^-1 mod p, canonical positive bytes.

      • p: Uint8Array

        The first prime, canonical positive bytes.

      • q: Uint8Array

        The second prime, canonical positive bytes.