Skip to content

SshImportOptions ​

SshImportOptions ​

Policy options of the SSH key import functions.

ts
interface SshImportOptions {
	readonly minRsaModulusBits?: number;
	readonly acceptCompressedEcPoints?: boolean;
	readonly rsa?: {
  readonly scheme?: RsaSignatureScheme;
  readonly hash?: RsaHash
};
}

Properties

  • readonly minRsaModulusBits?: number — Smallest accepted RSA modulus in bits, an integer from 1 to 16384. Default: 2048.

    The standards leave key strength to the relying party. RFC 8332 §5.1 calls 2048 bits prudent; OpenSSH itself accepts 1024.

  • readonly acceptCompressedEcPoints?: boolean — Accept SEC 1 compressed ECDSA points. Default: false.

    RFC 5656 §3.1 allows point compression; OpenSSH reads and writes only uncompressed points.

  • readonly rsa?: { readonly scheme?: RsaSignatureScheme; readonly hash?: RsaHash } — WebCrypto parameters of an imported RSA key. Default: PKCS#1 v1.5 with SHA-256. These choose how the CryptoKey signs; they do not change the ssh-rsa key encoding.

Released under the MIT License.