hcseedbundle

License: Apache-2.0

SeedBundle parsing and generation library.

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

javascript // seed_bundle is a top-level array 'seed_bundle':array [ // literal 'hcsb0' version / heuristic marker 'id_ver':str, // list of SeedCiphers define how to decrypt 'cipher_list':array [ 'cipher_1':SeedCipher, 'cipher_2':SeedCipher, // .. 'cipher_N':SeedCipher, ], // additional second-level encoding app data 'app_data':bin, ]

SeedCipher::PwHash

javascript // the PwHash type SeedCipher defines a straight-forward // pwhash secret that is use to secretstream encrypt a seed 'seed_cipher':array [ // for the pw hash cipher, this is a literal 'pw' '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

javascript // Security Questions SeedCipher defines a pwhash cipher // based on concatonating 3 answers that are lcased/trimmed 'seed_cipher':array [ // for the pw hash cipher, this is a literal 'qa' '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: Apache-2.0