Giter Site home page Giter Site logo

last-words's Introduction

last-words

计算力保证的加密遗言延迟发布工具

设计目的

确保加密遗言的秘钥必须在足够长的时间内获取,程序运行避免依赖网络。

实现方式

  1. 输入预设问题答案,计算答案散列字符串,作为秘钥计算初始值。
  2. 在初值后追加字符再次计算新的散列字符串,直到取得设定好的值。
  3. 此时预设问题答案散列+追加字符串再次散列即解密密文使用的秘钥。

第1步、第2步、第3步均使用不同的盐。

参数

  1. 预设问题。
  2. 预设问题答案,如果答案错误将导致第三步计算无限运行,而不会提示答案错误。
  3. 盐1、盐2、盐3。
  4. 追加字符串,长度决定取得密钥需要的计算力。
  5. 秘钥散列,通过答案+追加字符串散列预先计算所得,使用盐2。
  6. 明文
  7. 密文,通过盐3计算答案+追加字符串散列得到密钥。

参数2、4、6需要在使用后销毁,并避免保存到磁盘,必要时需要关闭系统页面文件,以保证内存不被页面交换写入磁盘。

可能的攻击方式

  1. 盐2设置过于简单,通过彩虹表逆推,由于盐3是公开的,破解秘钥散列相当于取得了秘钥。

last-words's People

Contributors

wisaly avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.