Coder Social home page Coder Social logo

ecdh_verifier's Introduction

About

ECDH Verifier written in Noir. Currently supports Curve25519 and Secp256k1.

Usage

Nargo.toml

[dependencies]
ecdh_verifier = { tag = "v0.1.1", git = "https://github.com/RajeshRk18/ecdh_verifier.git" }

// This assumes that the keys are generated using Curve25519.
    use dep::ecdh_verifier::curve25519::verify_ecdh;

    fn main(secret_key: [u8; 32], shared_key: [u8; 32], sign_shared: u8, pub_key: [u8; 32], sign_pub: u8) {

        assert(verify_ecdh(secret_key, shared_key, pub_key));

    }

Note

  • As given points(Montgomery) have been converted to Edwards Point, it is expected to give the sign of the points.
  • Support for Montgomery operations are currently wip. It is maintained in a separate branch.
  • If montgomery native operations are implemented, we can avoid the sign parameter.

Applications

  • Every TLS session involves a handshake where the client(user) and the server agree on a shared secret key which can be later used to encrypt/decrypt messages exchanged between them. If an user can prove that he/she is either a client or a server, then the interaction can be authenticated onchain. This can be used for a lot use cases such as anonymous web authentication, access control systems, and so on.

  • Assume an ideal communication protocol that is instantiated between person A and person B with the shared secret key. One of the parties can anonymously prove such communication onchain.

Disclaimer

This is experimental software and is provided on an "as is" and "as available" basis. We do not give any warranties and will not be liable for any losses incurred through any use of this code base.

ecdh_verifier's People

Contributors

rajeshrk18 avatar

Stargazers

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