Giter Club home page Giter Club logo

image-enc-secret-share's Introduction

About this

密码学第三次作业,第一部分,图像加密与秘密共享

使用pycrypto模块,先散列后AES加密。

大致思路

对N位用户,创建N个密钥。对于第i个密钥Ki,生成方式如下:

  1. 构建一个一元i-1次多项式
  2. 将i个系数拼接为字符串,通过MD5散列至128bit的值H
  3. 以H为基础,生成一个AES密钥Ki(本程序取Ki = H)

加密过程中,随机选取N个密钥中的Ki, 并将选取结果存入key_sequence.txt中。将每个用户的 密钥碎片存入keystore_i中。

##使用方法

运行shareSecrete.py

TODO 暂时密钥空间是10bit,虽然python是支持128bit的,但是numpy模块的矩阵运算部分对高精度整数的支持比较混乱时间仓促没有弄好

希望有大神抽出时间加以贡献完善。提示:需要重新实现key_util.key_restore中的np.linalg.solve()方法

image-enc-secret-share's People

Contributors

nvie avatar ridgestd avatar skyline75489 avatar whs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.