Skip to content

42LoCo42/saltcrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

saltcrypt

a very simple file encryption tool inspired by age and based on libsodium

generates a header of 41 + count · 80 bytes, compared to age’s header of 102 + count · 110 bytes (for a given count of recipients/public keys to encrypt to)

smol :3

Usage

nix shell github:42loco42/saltcrypt

# genkey prints pubkey on stderr
saltcrypt genkey >key0
# A1kAatau7vqmVFPtKsBgWv1tDZStEBQ2IUeXoXVm_zU
saltcrypt genkey >key1
# uN0ytWD0P8xjDvVIuZ4bhhTQN0-WDAqv4JdCZWJKLTU

# encrypt to a set of public keys ("recipients")
saltcrypt encrypt yourfile \
    A1kAatau7vqmVFPtKsBgWv1tDZStEBQ2IUeXoXVm_zU \
    uN0ytWD0P8xjDvVIuZ4bhhTQN0-WDAqv4JdCZWJKLTU \
    >yourfile.enc

# decrypt tries the key with all recipients
# until it finds a matching one
saltcrypt decrypt yourfile.enc key0
saltcrypt decrypt yourfile.enc key1