import { SupportedKeyDerivationTypes } from '../module.js';
import { JWK } from 'jose';
export interface IKey {
    getFingerprint(): Promise<Uint8Array>;
    getPublicKey(): Promise<IPublicKey>;
    exportKeyInformation(): Promise<KeyInformation>;
    toJWK({ includePrivate }: {
        includePrivate: boolean;
    }): Promise<JWK & Required<Pick<JWK, 'kid'>>>;
    toCryptoKey(): Promise<CryptoKey>;
}
export interface IPublicKey {
    verify(signature: Uint8Array, message: Uint8Array): Promise<boolean>;
    getPublicKeyHex(): Promise<string>;
    getPublicKeyBytes(): Promise<Uint8Array>;
}
export interface IEncryptableKey {
    encrypt(message: Uint8Array): Promise<Uint8Array>;
    decrypt(encryptedMessage: Uint8Array): Promise<Uint8Array>;
}
export interface IDerivedKey extends IKey {
    getPath(): DerivationNonce;
}
export interface IAsymmetricKey extends IKey {
    getPublicKeyBytes(): Promise<Uint8Array>;
    getPrivateKeyBytes(): Promise<Uint8Array>;
    sign(message: Uint8Array): Promise<Uint8Array>;
    verify(signature: Uint8Array, message: Uint8Array): Promise<boolean>;
}
export declare class DerivationNonce {
    salt: string;
    iterations: number;
    static fromString(nonce: string): DerivationNonce;
    constructor(salt: string, iterations: number);
    toString(): string;
    static fromRandom(): DerivationNonce;
}
export interface IKeyDerivationStrategy {
    /**
     * Imports a buffer to be interpreted as raw key material
     */
    fromRaw(rawKey: Uint8Array): Promise<IKey>;
    /**
     * Creates a new key, derived from the masterKey, salted with the nonce
     */
    create(masterKey: CryptoKey, salt: string): Promise<IDerivedKey>;
    /**
     * Recovers a derived key created from the key derivation strategy
     */
    hydrate(masterKey: CryptoKey, nonce: DerivationNonce): Promise<IDerivedKey>;
}
export interface KeyInformation {
    version: number;
    curve: SupportedKeyDerivationTypes;
    key: {
        type: 'raw' | 'derived';
        rawKeyHex?: string;
        from?: string;
        nonce?: string;
    };
    fingerprint: string;
    publicKey: string;
}
