GithubHelp home page GithubHelp logo

stef / klutshnik Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 1.0 142 KB

data-at-rest encryption and generic (t)OPRF server and client

Home Page: https://klutshnik.info

License: GNU General Public License v3.0

Makefile 0.95% C 94.20% Python 4.75% Shell 0.10%
crypto data-at-rest encryption opaque oprf threshold danger experimental

klutshnik's People

Contributors

stef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

v-p-b

klutshnik's Issues

Compile error: open() flag format mismatch?

My compiler doesn't like this line:

https://github.com/stef/klutshnik/blob/master/noise.c#L233

noise.c:233:12: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Werror=implicit-function-declaration]
  233 |   int fd = open(path,'r');

I think this is a result if mixed up use of the open() and fopen() calls: the character 'r' has some bits set that makes fcntl2's open() implementation assume that the file is going to be created so it expects a third parameter for umask.

I think the second parameter here should be O_RDONLY or fopen() should be used.

godmode auth tokens

their acceptance greatly impacts the security of the whole system, eliminate them.

Question about file key

Hi,
I really like this project.

One question:
Normally you calculate the file key for symmetric encryption e.g. with Hash(shared_key || publickey_A || publickey_B) or you use HKDF() instead of Hash().
You only use Hash(shared_key) here (https://github.com/stef/klutshnik/blob/master/common.c#L45), because publickey_A and publickey_B change during a key rotation and you would get a different file key for the symmetric encryption.
Would it make sense to choose a fixed nonce for each file and calculate the file key with Hash(shared_key || nonce) or HDKF(ikm = shared_key, salt = nonce, info = "info") to get a bit more "randomness"?
(Similar to how the payload key is calculated in age https://github.com/C2SP/C2SP/blob/main/age.md#payload)

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.