GithubHelp home page GithubHelp logo

Comments (6)

rweather avatar rweather commented on July 28, 2024

Ed25519 needs quite a bit of RAM so if you are running it on an Arduino Uno or something similar with a small amount of memory, sometimes it can run out and crash.

I believe I may have derived some of the timings on my Web site using an Arduino Mega to get enough RAM for the operation to work. Even if the original timings were done on an Uno, then changes to the Arduino compiler over the years may have altered the memory layout enough that it doesn't fit any more.

from arduinolibs.

HEMANT8712 avatar HEMANT8712 commented on July 28, 2024

Thanks, @rweather, Is there a way to test this on Arduino Uno? as I am doing my project based on low-level devices (8-bit microcontroller) with less memory and Arduino Uno is of the correct specification.
May you please suggest.

from arduinolibs.

rweather avatar rweather commented on July 28, 2024

It's not easy - the amount of memory required for signature verification is pretty severe so you need to watch every byte used everywhere in the program. Keep things off the stack as much as possible. It only just barely fit in the first place.

The sign() function uses less memory, so you could look at the larger system design for that. If the Uno is communicating with a desktop machine, then try to arrange your high-level protocol so that the Uno does the signing and the desktop does the verifying. Then you don't need to worry about the memory requirements of verify().

Or have one Uno sign and the other verify - the TestEd25519 example has everything in one program but if you can strip away unnecessary parts you may be able to reclaim a little memory for the verifying device.

Otherwise you might need to go into the code and rearrange how it works. If you look at the verify() function, I reuse the memory inside the "hash" object for the "k" buffer. There may be other places where buffers could be overlapped, or the steps can be done in a different order that allows memory to be reclaimed.

from arduinolibs.

HEMANT8712 avatar HEMANT8712 commented on July 28, 2024

Thanks, @rweather , I have tried it on Arduino Mega2560, it is working fine and tested only verification process on Arduino Uno, it is also working.

I have one query, I am doing mathematical analysis (like the number of point multiplication and addition used) also, may you please let me know which standard algorithms you have used and where I can found their mathematical explanation.

from arduinolibs.

rweather avatar rweather commented on July 28, 2024

The main source of information on Ed25519 is from the RFC specification:

https://tools.ietf.org/html/rfc8032

The "Informative References" section contains links for the underlying academic papers that explain the mathematics involved.

from arduinolibs.

HEMANT8712 avatar HEMANT8712 commented on July 28, 2024

Thanks, @rweather, for the help.

from arduinolibs.

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.