import { PrivateKey } from "unicrypto"; import { AnnotatedKey } from "./AnnotatedKey"; /** * Key pairs derived from the password to access login key */ interface CloudLoginAccessKeys { /** * This key is used to decrypt other data in the could, except the login private key. */ storageKey: AnnotatedKey; /** * This key decrypts the login private, stored in the sharedbox in the registration record */ loginAccessKey: AnnotatedKey; } /** * Keys to access the cloud, derived by successful login. */ interface CloudAccessKeys { /** * This key is used to decrypt other data in the could, except the login private key. */ storageKey: AnnotatedKey; /** * This key uis decrypted from one stored in the cloud */ loginKey: PrivateKey; } /** * Calculate parts of MyOnly.cloud login/registration data, e.g. loginHash, loginKey and storageKey. */ export declare class Credentials { static deriveLoginHash(login: string): Promise; static deriveKeysFromPassword(password: string, rounds?: number): Promise; static decryptCloudKeys(password: string, encryptedKey: Uint8Array): Promise; static encryptLoginKey(loginKey: PrivateKey, password: string): Promise; } export {};