diff options
author | Florian Dold <florian@dold.me> | 2021-10-21 18:51:19 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-10-21 18:51:19 +0200 |
commit | 3740010117df56c0ab8cfa97c983d9cf0143daf1 (patch) | |
tree | e290a211f9e76af226e69a30012f3d2079b93829 /packages/anastasis-core/src/recovery-document-types.ts | |
parent | 0ee669f52341a8331394a1e9892264c0ef0bb7d7 (diff) | |
download | wallet-core-3740010117df56c0ab8cfa97c983d9cf0143daf1.tar.xz |
anastasis: make recovery work, at least for security questions
Diffstat (limited to 'packages/anastasis-core/src/recovery-document-types.ts')
-rw-r--r-- | packages/anastasis-core/src/recovery-document-types.ts | 47 |
1 files changed, 34 insertions, 13 deletions
diff --git a/packages/anastasis-core/src/recovery-document-types.ts b/packages/anastasis-core/src/recovery-document-types.ts index a1d9a55fc..74003ccb1 100644 --- a/packages/anastasis-core/src/recovery-document-types.ts +++ b/packages/anastasis-core/src/recovery-document-types.ts @@ -1,22 +1,37 @@ import { TruthKey, TruthSalt, TruthUuid } from "./crypto.js"; export interface RecoveryDocument { - // Human-readable name of the secret + /** + * Human-readable name of the secret + * FIXME: Why is this optional? + */ secret_name?: string; - // Encrypted core secret. - encrypted_core_secret: string; // bytearray of undefined length + /** + * Encrypted core secret. + * + * Variable-size length, base32-crock encoded. + */ + encrypted_core_secret: string; - // List of escrow providers and selected authentication method. + /** + * List of escrow providers and selected authentication method. + */ escrow_methods: EscrowMethod[]; - // List of possible decryption policies. + /** + * List of possible decryption policies. + */ policies: DecryptionPolicy[]; } export interface DecryptionPolicy { - // Salt included to encrypt master key share when - // using this decryption policy. + /** + * Salt included to encrypt master key share when + * using this decryption policy. + * + * FIXME: Rename to policy_salt + */ salt: string; /** @@ -43,12 +58,16 @@ export interface EscrowMethod { */ escrow_type: string; - // UUID of the escrow method. - // 16 bytes base32-crock encoded. + /** + * UUID of the escrow method. + * 16 bytes base32-crock encoded. + */ uuid: TruthUuid; - // Key used to encrypt the Truth this EscrowMethod is related to. - // Client has to provide this key to the server when using /truth/. + /** + * Key used to encrypt the Truth this EscrowMethod is related to. + * Client has to provide this key to the server when using /truth/. + */ truth_key: TruthKey; /** @@ -60,7 +79,9 @@ export interface EscrowMethod { // at this provider. provider_salt: string; - // The instructions to give to the user (i.e. the security question - // if this is challenge-response). + /** + * The instructions to give to the user (i.e. the security question + * if this is challenge-response). + */ instructions: string; } |