declare type b64 = string;
declare type CryptoServiceParams = {
    password_hash: b64;
    password_key_salt: b64;
    cup: b64;
    recovery_password_hash: b64;
    recovery_password_key_salt: b64;
    recovery_cup: b64;
    public_key: b64;
    tag_encryption_key: b64;
    common_key: b64;
    email: string;
};
declare type KeyDetails = {
    cap: CryptoKey;
    encryptedCommonKey: b64;
    encryptedTagEncryptionKey: b64;
};
export declare const createLoginHash: (password: string) => Promise<b64>;
declare type ApproveArguments = {
    keys: KeyDetails;
    commonKeyHistory: {
        common_key_id: string;
        common_key: string;
    }[];
    requesterPublicKey: CryptoKey;
    tag: string;
};
export declare const createShareApproveDetails: (args: ApproveArguments) => Promise<{
    encryptedTag: any;
    requesterCommonKeyHistory: {
        common_key_id: string;
        common_key: any;
    }[];
}>;
declare type Permission = {
    permission_id: string;
    grantee_public_key: string;
};
declare type KeyRotationArguments = {
    permissionIdsToRevoke: string[];
    permissionsToKeep: Permission[];
    keys: KeyDetails;
    userPublicKey: CryptoKey;
};
export declare const createKeyRotationPayload: (args: KeyRotationArguments) => Promise<{
    tek: any;
    common_key: any;
    revoked_grantees: string[];
    shared_common_keys: {
        permission_id: string;
        common_key: any;
    }[];
}>;
/**
 * This creates the necessary crypto material necessary for registering a user.
 * Could be outsourced to js-crypto-js.
 */
export declare const createRegisterPayload: (email: string, password: string, recoveryKey: string) => Promise<CryptoServiceParams>;
export declare const createResetPasswordPayload: (recoveryKey: string, newPassword: string, decryptedCup: string) => Promise<{
    recovery_password_hash: string;
    new_password_hash: string;
    new_password_key_salt: any;
    new_cup: any;
}>;
export declare const createChangePasswordPayload: (currentPassword: string, newPassword: string, decryptedCup: string) => Promise<{
    password_hash: string;
    new_password_hash: string;
    new_password_key_salt: any;
    new_cup: any;
}>;
export declare const decryptCUP: (password: string, passwordSalt: b64, cup: b64) => Promise<b64>;
export declare const generateAppKeyPair: () => Promise<any>;
export declare const getEncryptedCommonKeyWithAppPublicKey: ({ appPubKey, loginResponse, password, }: {
    appPubKey: any;
    loginResponse: any;
    password: any;
}) => Promise<any>;
export {};
