/// <reference types="node" />
import { Buffer } from 'buffer';
import { SshAlgorithm } from './sshAlgorithm';
import { Signer, Verifier } from './hmacAlgorithm';
import { Disposable, CancellationToken } from 'vscode-jsonrpc';
import { BigInt } from '../io/bigInt';
export declare abstract class PublicKeyAlgorithm implements SshAlgorithm {
    readonly name: string;
    readonly keyAlgorithmName: string;
    readonly hashAlgorithmName: string;
    protected constructor(name: string, keyAlgorithmName: string, hashAlgorithmName: string);
    abstract createKeyPair(): KeyPair;
    abstract generateKeyPair(keySizeInBits?: number): Promise<KeyPair>;
    abstract createSigner(keyPair: KeyPair): Signer;
    abstract createVerifier(keyPair: KeyPair): Verifier;
    readSignatureData(signatureData: Buffer): Buffer;
    createSignatureData(signature: Buffer): Buffer;
}
export interface KeyPair extends Disposable {
    readonly keyAlgorithmName: string;
    readonly hasPublicKey: boolean;
    readonly hasPrivateKey: boolean;
    comment: string | null;
    setPublicKeyBytes(keyBytes: Buffer): Promise<void>;
    getPublicKeyBytes(algorithmName?: string): Promise<Buffer | null>;
    generate(): Promise<void>;
    importParameters(parameters: KeyPairParameters): Promise<void>;
    exportParameters(): Promise<KeyPairParameters>;
}
interface KeyPairParameters {
}
export interface RsaParameters extends KeyPairParameters {
    modulus: BigInt;
    exponent: BigInt;
    d?: BigInt;
    p?: BigInt;
    q?: BigInt;
    dp?: BigInt;
    dq?: BigInt;
    qi?: BigInt;
}
export interface ECParameters extends KeyPairParameters {
    curve: {
        name?: string;
        oid?: string;
    };
    x: BigInt;
    y: BigInt;
    d?: BigInt;
}
/**
 * Given a public key, provides the corresponding private key.
 */
export type PrivateKeyProvider = (publicKey: KeyPair, cancellation: CancellationToken) => Promise<KeyPair | null>;
export {};
//# sourceMappingURL=publicKeyAlgorithm.d.ts.map