Giter Club home page Giter Club logo

go-ecdh's People

Contributors

sahib avatar wsddn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-ecdh's Issues

Security issues

I think you need to check that the public key you've been given (the other party's key, that is) is actually on the curve, otherwise it's possible for an attacker to derive your private key. See Practical Invalid Curve Attacks on TLS-ECDH.

It's this kind of thing, of course, that makes implementing cryptographic algorithms tricky.

It might also be worth reading this paper about security issues in Diffie-Hellman. Some of the things in there don't apply, as far as I can tell, to elliptic curve Diffie-Hellman because of properties of the group (having the identity at infinity, in particular, appears to rule out attacks that choose the identity as the public key), but it seems a decent overview of things you'd need to pay attention to to make a genuinely secure DH implementation.

Change Size of Keys

I have a current project that uses ECDH from this embedded library and was hoping to get your library to talk to it.

https://github.com/kmackay/micro-ecc
It uses different key sizes, where it looks like yours uses 32,32 public,private

Public Key (64 bytes)
Private Key (32 bytes)

I believe it's due to the way the referenced github library defaulted, but i cannot make changes to the embedded device that has it implemented using library above.

I am not familiar enough with the algorithm to know, in all the places you have a hard coded in size, how much would get corrupted by making the change and if the hash etc belongs to one of the key sizes.

Is it possible to wrap your sizes in a const () at the top, and make it easily changeable ?

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.