pass-tomb

roddhjavGPL-3.0更新放缓

pass 的扩展,把整个密码库放进 Tomb 加密容器里,让密码树整体加密存放,避免明文散落在磁盘上。

A pass extension that helps you keep the whole tree of passwords encrypted inside a Tomb.

v1.3发布于 2021-05-15 16:08 UTC437star33fork同步于 2026-11-07 07:33 UTC

怎么上手

由 README 提炼,执行前请确认
apt install pass-extension-tomb
硬件要求按 README 说明

README 未说明硬件要求;基于 dm-crypt,需要 Linux 环境,timer 功能要求 systemd 发行版,明确不支持 macOS 与 Android

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

给 pass 密码库套上 Tomb 加密外壳,不用时整个密码树都处于加密状态

pass 的扩展,把整个密码库放进 Tomb 加密容器里,让密码树整体加密存放,避免明文散落在磁盘上。

核心能力

  • 把整个密码库放进 Tomb 加密容器,弥补 pass 不加密文件名和目录名的缺陷
  • 复用同一把 GPG 密钥同时加密密码和 Tomb,无需额外管理密钥
  • 支持 --timer 定时自动关闭密码库,避免忘记关闭
  • 通过环境变量管理多个独立密码库,可配别名分别开关
  • 提供 pass open/close/timer 子命令管理库的开关与计时状态

容易踩的坑

需先装好 pass 1.7.0+ 和 tomb 2.4+,否则扩展无法运行;timer 定时关闭功能依赖 systemd,非 systemd 发行版不可用;从已有密码库迁移需先备份再新建 tomb 后搬回内容,直接使用会丢数据

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.3
  1. v1.3最新正式版2021-05-15 · 2021-05-15 16:08 UTC

    Added

    • Added a 'pass timer' command to show the current timer status.

    Changed

    • Improved timer tests.
    • Improved GPG trust level detection.

    Fixed

    • Ensure timer setting are persistent. #31
    • Only remove .tomb extension from tomb file. #28 #33
    • Linter fix.

    Requirements

    • pass 1.7.0 or greater.
    • tomb 2.6 or greater.
    • A systemd based linux distribution is required to use the timer feature.

    This release is signed using the GPG key 06A26D531D56C42D66805049C5469996F0DF68EC

  2. v1.22019-06-29 · 2019-06-29 22:23 UTC
    查看更新说明

    Added

    • Ensure the GPG keys used are trusted before tomb creation.
    • Add a systemd pass-close service unit, allowing more than one timer. #24
    • Add completion for bash and zsh.

    Changed

    • Compatibility with Tomb 2.6
    • Simplify test setup

    Fixed

    • Do not set password tomb permission, only ownership. #23
    • Use relative path for systemd-run #18
    • The systemd based timer now works properly

    Requirements

    • pass 1.7.0 or greater.
    • tomb 2.4 or greater.
    • A systemd based linux distribution is required to use the timer feature.

    This release is signed using the GPG key 06A26D531D56C42D66805049C5469996F0DF68EC

  3. v1.12017-12-10 · 2017-12-10 16:28 UTC
    查看更新说明

    Added

    • Add --force option, force operation (i.e. even if swap is active).

    Requirements

  4. v1.02017-05-18 · 2017-05-18 18:37 UTC
    查看更新说明

    This is the first stable release.

    This release is signed using my GPG key 06A26D531D56C42D66805049C5469996F0DF68EC

    New features

    • New -t option to automatically close the password store using a systemd timer.
    • New -p option to create & open the password tomb in a subfolder of the password store.
    • New -n option to create a password tomb but do not initialize the password store.

    Code Quality

    • The test suite has been changed from an handmade one to the sharness test suite.
    • Added code coverage using kcov.
    • The new test suite and code coverage are at the origin of a lot of debugging.

    Requirements

    • pass 1.7 or greater.
    • tomb 2.4 or greater. tomb 2.4 contains a major new feature used by pass-tomb: asymmetric GPG key support. It allows pass-tomb to protect the tomb using the same GPG key than in the password store.
    • The timer feature requires systemd.
  5. v0.52017-04-14 · 2017-04-14 18:04 UTC
    查看更新说明
    • Added --no-init or -n option. With this option, pass-tomb create a tomb but do not initialise the password store.
    • Added a quiet mode using -q
    • Various spelling corrections and code improvement.

    Warning

    pass-tomb 0.5 still requires tomb to be installed from the master branch:

    git clone https://github.com/dyne/Tomb.git
    cd Tomb
    sudo make install
    

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    pass tomb

    A pass extension that helps you keep the whole tree of passwords encrypted inside a Tomb.

    Description

    Due to the structure of pass, file- and directory names are not encrypted in the password store. pass-tomb provides a convenient solution to put your password store in a Tomb and then keep your password tree encrypted when you are not using it.

    It uses the same GPG key to encrypt passwords and tomb, therefore you don't need to manage more key or secret. Moreover, you can ask pass-tomb to automatically close your store after a given time.

    The new workflow is the following:

    • Create a password tomb with pass tomb
    • Create a new tomb and open it in ~/.password-store
    • Initialize the password store with the same GPG key
    • Use pass as usual
    • When finished, close the password tomb: pass close
    • To use pass again, you need to open the password tomb: pass open

    Usage

    pass tomb 1.3 - A pass extension that helps to keep the whole tree of
                    password encrypted inside a tomb.
    
    Usage:
        pass tomb [-n] [-T time] [-f] [-p subfolder] [-s size] gpg-id...
            Create and initialise a new password tomb
            Use gpg-id for encryption of both tomb and passwords
    
        pass open [subfolder] [-t tomb] [-k key] [-T time] [-f]
            Open a password tomb
    
        pass close [store]
            Close a password tomb
    
        pass timer [store]
            Show timer status
    
    Options:
        -n, --no-init  Do not initialise the password store
        -T, --timer    Close the store after a given time
        -p, --path     Create the store for that specific subfolder
        -k, --key      Specify the path to the password tomb key
        -t, --tomb     Specify the path to the password tomb
        -s, --size     Specify the tomb size in MB
        -f, --force    Force operation (i.e. even if swap is active)
        -q, --quiet    Be quiet
        -v, --verbose  Be verbose
        -d, --debug    Print tomb debug messages
            --unsafe   Speed up tomb creation (for testing only)
        -V, --version  Show version information.
        -h, --help     Print this help message and exit.
    
    More information may be found in the pass-tomb(1) man page.
    

    See man pass-tomb for more information.

    Examples

    Create a new password tomb

    $ pass tomb <gpg-id>
     (*) Your password tomb has been created and opened in ~/.password-store.
     (*) Password store initialized for <gpg-id>
      .  Your tomb is: ~/.password.tomb
      .  Your tomb key is: ~/.password.key.tomb
      .  You can now use pass as usual.
      .  When finished, close the password tomb using 'pass close'.
    

    Open a password tomb

    $ pass open
     (*) Your password tomb has been opened in ~/.password-store.
      .  You can now use pass as usual.
      .  When finished, close the password tomb using 'pass close'.
    

    Close a password tomb

    $ pass close
     (*) Your password tomb has been closed.
      .  Your passwords remain present in ~/.password.tomb.
    

    Create a new password tomb and set a timer

    $ pass tomb <gpg-id> --timer=1h
     (*) Your password tomb has been created and opened in ~/.password-store.
     (*) Password store initialized for <gpg-id>
      .  Your tomb is: ~/.password.tomb
      .  Your tomb key is: ~/.password.key.tomb
      .  You can now use pass as usual.
      .  This password store will be closed in 1h
    
    $ pass open
    (*) Your password tomb has been opened in ~/.password-store.
     .  You can now use pass as usual.
     .  This password store will be closed in 1h
    

    Open a password store and set a timer

    $ pass open --timer=10min
     (*) Your password tomb has been opened in ~/.password-store.
      .  You can now use pass as usual.
      .  This password store will be closed in 10min
    

    Import existing password repository

    In order to use pass-tomb with your existing password repository you can:

    1. Move your password repository: mv ~/.password-store ~/.password-store-backup
    2. Create and open a new password tomb: pass tomb <gpgid>
    3. Move all the content of your password repository in the new password tomb:
      mv ~/.password-store-backup/ ~/.password-store
      

    Environment Variables

    • PASSWORD_STORE_TOMB: path to tomb executable
    • PASSWORD_STORE_TOMB_FILE: path to the password tomb (default: ~/.password.tomb)
    • PASSWORD_STORE_TOMB_KEY: path to the password tomb key file (default: ~/.password.key.tomb)
    • PASSWORD_STORE_TOMB_SIZE: password tomb size in MB (default: 30)

    Multiple password tombs

    It is possible to create multiple pass tomb and open them separately. You only need to set the tomb file, key and the password store directory manually using the environment variables:

    Create a tomb

    PASSWORD_STORE_TOMB_FILE=<tomb_path> PASSWORD_STORE_TOMB_KEY=<key_path> PASSWORD_STORE_DIR=<dir_path> pass tomb <gpgid>
    

    Open/Close a tomb

    PASSWORD_STORE_TOMB_FILE=<tomb_path> PASSWORD_STORE_TOMB_KEY=<key_path> PASSWORD_STORE_DIR=<dir_path> pass open
    PASSWORD_STORE_TOMB_FILE=<tomb_path> PASSWORD_STORE_TOMB_KEY=<key_path> PASSWORD_STORE_DIR=<dir_path> pass close
    

    If you always need a second password store, you can create a pass alias, pass2 that will manage the second store with in .bashrc:

    alias pass2='PASSWORD_STORE_TOMB_FILE=<tomb_path> PASSWORD_STORE_TOMB_KEY=<key_path> PASSWORD_STORE_DIR=<dir_path> pass'
    

    Advanced use

    Using tomb to store your password repository, you can take advantage of the tomb advanced feature like steganography and private cloud storage. The tomb website provide a good presentation of the features available with Tomb. Moreover, you can read my guide on how to use Tomb with GPG keys.

    pass-tomb is not compatible with Android, but it should not be an issue for you. If you consider it is safe to put your password-store on Android then, it probably means you attacker model does not require the need of pass-tomb.

    Installation

    Requirements

    • pass 1.7.0 or greater.
    • tomb 2.4 or greater.
    • A systemd based Linux distribution is required to use the timer feature.

    ArchLinux

    pass-tomb is available in the Arch User Repository.

    yay -S pass-tomb  # or your preferred AUR install method
    

    Debian

    apt install pass-extension-tomb
    

    Guix

    guix install pass-tomb
    

    NixOS

    nix-env -iA nixos.passExtensions.pass-tomb
    

    OSX

    pass-tomb is based on dm-crypt and therefore it is not compatible with Mac systems.

    From git

    git clone https://github.com/roddhjav/pass-tomb/
    cd pass-tomb
    sudo make install
    

    Stable version

    wget https://github.com/roddhjav/pass-tomb/releases/download/v1.3/pass-tomb-1.3.tar.gz
    tar xzf pass-tomb-1.3.tar.gz
    cd pass-tomb-1.3
    sudo make install
    

    Releases and commits are signed using 06A26D531D56C42D66805049C5469996F0DF68EC. You should check the key's fingerprint and verify the signature:

    wget https://github.com/roddhjav/pass-tomb/releases/download/v1.3/pass-tomb-1.3.tar.gz.asc
    gpg --recv-keys 06A26D531D56C42D66805049C5469996F0DF68EC
    gpg --verify pass-tomb-1.3.tar.gz.asc
    

    Contribution

    Feedback, contributors, pull requests are all very welcome.