Code Monkey home page Code Monkey logo

Comments (5)

Nashtare avatar Nashtare commented on July 4, 2024

Hi! This is indeed an expected behavior for types that implement the Copy trait, for which dropping the value won't zeroize the original memory.

from cheetah.

RajeshRk18 avatar RajeshRk18 commented on July 4, 2024

So, clearing the original memory doesn't matter because STARKs don't have a trapdoor?

from cheetah.

Nashtare avatar Nashtare commented on July 4, 2024

I am not sure to understand your sentence.
This library is intended to provide a mid-level API of elliptic curve operations over a specific curve. If you intend to use it (which I don't recommend by the way as it is unmaintained, unless it is for academic/educative purposes), in a context where Scalar values have to remain secret, you can use a wrapper that doesn't implement Copy, and will properly wipe-out memory on drop.

from cheetah.

RajeshRk18 avatar RajeshRk18 commented on July 4, 2024

I am not sure to understand your sentence.
This library is intended to provide a mid-level API of elliptic curve operations over a specific curve. If you intend to use it (which I don't recommend by the way as it is unmaintained, unless it is for academic/educative purposes), in a context where Scalar values have to remain secret, you can use a wrapper that doesn't implement Copy, and will properly wipe-out memory on drop.

As the description says that Cheetah is STARK friendly, I am just saying STARK has no trapdoor unlike traditional Cryptography which has a trapdoor in keys, signatures, etc. So, Scalar implements the Copy trait.

Yeah, if someone prefers to use Scalar as a secret, they can wrap the limb array with Box. But, this must be mentioned somewhere.

from cheetah.

Nashtare avatar Nashtare commented on July 4, 2024

The zeroize crate is already fairly well documented on what guarantees it provides and which situations that may leave unwanted copies of your data in memory. If you want to use a higher-level abstraction, you can use the secrecy crate. Again, while you mention STARKs, this library is solely intended to provide on its own support for elliptic curve operations over the so-called Cheetah curve. It is not the purpose of this library, or any library for what it's worth, to describe the behavior of all its internal dependencies.

from cheetah.

Related Issues (17)

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.