hcseedbundle

SeedBundle parsing and generation library.

Project Forum Chat

License: MIT License: Apache-2.0

Links

Rationale

hcSeedBundle Encoding Spec

Encoded in MSGPACK binary format.

To better facilitate rust/javascript interoperability, the rust library will treat msgpack "ext" types as binary data.

SeedBundle

``` // seedbundle is a top-level array 'seedbundle':array [ // literal 'hcsb0' version / heuristic marker 'id_ver':str,

// list of SeedCiphers define how to decrypt 'cipherlist':array [ 'cipher1':SeedCipher, 'cipher2':SeedCipher, // .. 'cipherN':SeedCipher, ],

// associated application data 'app_data':bin, ] ```

SeedCipher::PwHash

``` // the PwHash type SeedCipher defines a straight-forward // pwhash secret that is use to secretstream encrypt a seed 'seed_cipher':array [ // literal 'pw' indicates the pw hash cipher type 'type':str,

// argon2id 16 byte salt 'salt':bin,

// argon2id mem limit capped to u32 for js compatibility 'mem_limit':int,

// argon2id ops limit capped to u32 for js compatibility 'ops_limit':int,

// secretstream 24 byte header 'header':bin,

// secretstream 49 byte cipher 'cipher':bin, ] ```

SeedCipher::SecurityQuestions

``` // Security Questions SeedCipher defines a pwhash cipher // based on concatonating 3 answers that are lcased/trimmed 'seed_cipher':array [ // literal 'qa' indicates the security question cipher type 'type':str,

// argon2id 16 byte salt 'salt':bin,

// argon2id mem limit capped to u32 for js compatibility 'mem_limit':int,

// argon2id ops limit capped to u32 for js compatibility 'ops_limit':int,

// the first security question to be answered 'question_1':str,

// the second security question to be answered 'question_2':str,

// the third security question to be answered 'question_3':str,

// secretstream 24 byte header 'header':bin,

// secretstream 49 byte cipher 'cipher':bin, ] ```

Algorithms

License: MIT OR Apache-2.0