Git Product home page Git Product logo

Comments (6)

hdevalence avatar hdevalence commented on August 18, 2024 2

Unfortunately we have no plans to add C bindings to curve25519-dalek, because we use a lot of Rust features to provide a safe API. For instance, because Rust has definite initialization, we can ensure that all points are valid curve points at all times -- so unlike libsodium, we don't have a function to check whether a point is valid, because it's not possible in safe Rust to create an invalid RistrettoPoint.

Rather than provide C bindings to the mid-level API in curve25519-dalek, our suggestion is that protocols/primitives should be implemented in Rust using curve25519-dalek as a dependency, and those crates can provide minimal, buffer-oriented C APIs that are specific to the protocol/primitive.

from curve25519-dalek.

tarcieri avatar tarcieri commented on August 18, 2024

This might be helpful: https://github.com/eqrion/cbindgen

from curve25519-dalek.

Scratch-net avatar Scratch-net commented on August 18, 2024

Ok, will try but it's good when authors consider official bindings

from curve25519-dalek.

Scratch-net avatar Scratch-net commented on August 18, 2024

Ok, so the idea is to (for example) implement protocol and export only those couple of methods that deal with bytes. Got you, thanks

from curve25519-dalek.

hdevalence avatar hdevalence commented on August 18, 2024

Yeah, we should probably add this to the docs somewhere -- I'm going to reopen this issue, and close it when the docs are updated to note this

from curve25519-dalek.

hdevalence avatar hdevalence commented on August 18, 2024

Closing this now that #183 is merged.

from curve25519-dalek.

Related Issues (20)

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.