holocron

package module
v0.0.0-...-ab6a829 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2022 License: MIT Imports: 12 Imported by: 0

README

Holocron

forthebadge forthebadge forthebadge

About

This is a tool to build QR codes with gatekeepers, meant to embed & protect information in physical objects, called a Holocrons. Holocrons are small ciphers that reveal a treasure when the right response to a prompt is provided. Holocron ciphers are small enough to be embedded in QR codes (and therefore physical objects).

The resulting Holocron should not be posted on the public internet. Brain key's aren't considered secure for blockchain wallets. However, in this case you can create a brain key (Holocron) that does not generate a wallet directly but rather points to a more secure wallet mnenomic phrase. On top of that, by embedding the Holocron in an object and keeping it off the public internet, we create a second factor an attacker has to breach in order to access the treasure. The attacker has to both know the password to the Holocron but must also physically possess the Holocron in order to steal the treasure.

Quickstart

Required Dependencies

Testing A Holocron

test

  • Download or take a picture of the QR code with your phone
  • Use a ZXing based decoder (like this one) to decode the
  • Paste the resulting data uri in your browser
  • Figure out the answer to the Gatekeeper prompt
  • Use the Decrypt in this directory (or any Balloon Hashing implementation) function along with the cipher and answer to decrypt

Creating a Holocron

Asumptions
  • The information you'd like to protect (Treasure) is relatively short (under 100 characters)
  • The information does not need to be frequently accessed, this is better for cold storage
  • The answer to your prompt is not trivially guessible
Generate Encrypted Key
  • make HOLOCRON_NAME=test HOLOCRON_GATEKEEPER="2+2?" HOLOCRON_ASCERTAINMENT=4 HOLOCRON_TREASURE=foobar"
  • Open .build folder to see QR code of holocron
  • Copy this key to use in creating a Holocron
Physical Storage

QR codes are a great mechanism for physical storage since they can be manifested physically in practically any way an image can. Options include:

Harddrives, SSDs, and flashdrives aren't great archival storage methods. Flash drives don't last that long and tape requires climate control to remain in good condition. A metal plate is small enough to fit in a safe or safety deposit box while also being able to survive adverse climates or even fires.

Types of Treasures to Store
  • Blockchain Keys
  • Master Key for Password Manager or 2 Factor Authenticator
  • Coordinates to buried treasure if you have some
  • etc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(passphrase, ciphertext string) string

func Encrypt

func Encrypt(passphrase, plaintext, saltString string) string

Types

type Holocron

type Holocron struct {
	Name          string `json:"name"`
	Gatekeeper    string `json:"gatekeeper"`
	Ascertainment string `json:"ascertainment"`
	Treasure      string `json:"treasure"`
	Salt          string `json:"salt"`
}

func NewHolocron

func NewHolocron(name, gatekeeper, ascertainment, treasure, salt string) Holocron

func (Holocron) Forge

func (h Holocron) Forge(outdir string) error

func (Holocron) ForgeForWeb

func (h Holocron) ForgeForWeb() (string, error)

func (Holocron) ForgeLightForWeb

func (h Holocron) ForgeLightForWeb() (string, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL